Title: [139782] trunk/Source/WebCore
Revision
139782
Author
o...@chromium.org
Date
2013-01-15 13:41:47 -0800 (Tue, 15 Jan 2013)

Log Message

Moving updating of margins from computePreferredLogicalWidths to layout
https://bugs.webkit.org/show_bug.cgi?id=106939

Reviewed by Levi Weintraub.

The margins don't affect it's preferred width. We should update them
during layout like we do in other classes (e.g. RenderBlock).

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::layout):
(WebCore::RenderListMarker::computePreferredLogicalWidths):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (139781 => 139782)


--- trunk/Source/WebCore/ChangeLog	2013-01-15 21:40:29 UTC (rev 139781)
+++ trunk/Source/WebCore/ChangeLog	2013-01-15 21:41:47 UTC (rev 139782)
@@ -1,3 +1,17 @@
+2013-01-15  Ojan Vafai  <o...@chromium.org>
+
+        Moving updating of margins from computePreferredLogicalWidths to layout
+        https://bugs.webkit.org/show_bug.cgi?id=106939
+
+        Reviewed by Levi Weintraub.
+
+        The margins don't affect it's preferred width. We should update them
+        during layout like we do in other classes (e.g. RenderBlock).
+
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::layout):
+        (WebCore::RenderListMarker::computePreferredLogicalWidths):
+
 2013-01-15  Adam Barth  <aba...@webkit.org>
 
         Generalize DocumentWeakReference into WTF::WeakPtr

Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (139781 => 139782)


--- trunk/Source/WebCore/rendering/RenderListMarker.cpp	2013-01-15 21:40:29 UTC (rev 139781)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp	2013-01-15 21:41:47 UTC (rev 139782)
@@ -1316,6 +1316,8 @@
 {
     StackStats::LayoutCheckPoint layoutCheckPoint;
     ASSERT(needsLayout());
+
+    updateMargins();
  
     if (isImage()) {
         setWidth(m_image->imageSize(this, style()->effectiveZoom()).width());
@@ -1367,7 +1369,6 @@
         LayoutSize imageSize = m_image->imageSize(this, style()->effectiveZoom());
         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = style()->isHorizontalWritingMode() ? imageSize.width() : imageSize.height();
         setPreferredLogicalWidthsDirty(false);
-        updateMargins();
         return;
     }
 
@@ -1478,8 +1479,6 @@
     m_maxPreferredLogicalWidth = logicalWidth;
 
     setPreferredLogicalWidthsDirty(false);
-    
-    updateMargins();
 }
 
 void RenderListMarker::updateMargins()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to