Title: [139789] trunk
Revision
139789
Author
o...@chromium.org
Date
2013-01-15 14:15:35 -0800 (Tue, 15 Jan 2013)

Log Message

Unreviewed, rolling out r139782.
http://trac.webkit.org/changeset/139782
https://bugs.webkit.org/show_bug.cgi?id=106939

Source/WebCore:

Broke preferred widths on list markers.

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

LayoutTests:

* fast/lists/marker-preferred-margins-expected.txt: Added.
* fast/lists/marker-preferred-margins.html: Added.
Adding a new test to cover the case that broke.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (139788 => 139789)


--- trunk/LayoutTests/ChangeLog	2013-01-15 22:14:29 UTC (rev 139788)
+++ trunk/LayoutTests/ChangeLog	2013-01-15 22:15:35 UTC (rev 139789)
@@ -1,3 +1,13 @@
+2013-01-15  Ojan Vafai  <o...@chromium.org>
+
+        Unreviewed, rolling out r139782.
+        http://trac.webkit.org/changeset/139782
+        https://bugs.webkit.org/show_bug.cgi?id=106939
+
+        * fast/lists/marker-preferred-margins-expected.txt: Added.
+        * fast/lists/marker-preferred-margins.html: Added.
+        Adding a new test to cover the case that broke.
+
 2013-01-15  Elliott Sprehn  <espr...@chromium.org>
 
         Heap-use-after-free in WebCore::RenderObject::willBeRemovedFromTree

Added: trunk/LayoutTests/fast/lists/marker-preferred-margins-expected.txt (0 => 139789)


--- trunk/LayoutTests/fast/lists/marker-preferred-margins-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/lists/marker-preferred-margins-expected.txt	2013-01-15 22:15:35 UTC (rev 139789)
@@ -0,0 +1,2 @@
+The list items should have no content.
+PASS

Added: trunk/LayoutTests/fast/lists/marker-preferred-margins.html (0 => 139789)


--- trunk/LayoutTests/fast/lists/marker-preferred-margins.html	                        (rev 0)
+++ trunk/LayoutTests/fast/lists/marker-preferred-margins.html	2013-01-15 22:15:35 UTC (rev 139789)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<style>
+li {
+    float: left;
+    border: 5px solid pink;
+}
+div {
+    background-color: salmon;
+    width: 20px;
+    height: 20px;
+}
+</style>
+The list items should have no content.
+
+<ul style="border:2px solid blue;">
+    <li data-expected-width=10></li>
+    <li data-expected-width=10></li>
+</ul>
+
+<script src=""
+<script>
+checkLayout('ul');
+</script>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (139788 => 139789)


--- trunk/Source/WebCore/ChangeLog	2013-01-15 22:14:29 UTC (rev 139788)
+++ trunk/Source/WebCore/ChangeLog	2013-01-15 22:15:35 UTC (rev 139789)
@@ -1,3 +1,15 @@
+2013-01-15  Ojan Vafai  <o...@chromium.org>
+
+        Unreviewed, rolling out r139782.
+        http://trac.webkit.org/changeset/139782
+        https://bugs.webkit.org/show_bug.cgi?id=106939
+
+        Broke preferred widths on list markers.
+
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::layout):
+        (WebCore::RenderListMarker::computePreferredLogicalWidths):
+
 2013-01-15  Elliott Sprehn  <espr...@chromium.org>
 
         Heap-use-after-free in WebCore::RenderObject::willBeRemovedFromTree

Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (139788 => 139789)


--- trunk/Source/WebCore/rendering/RenderListMarker.cpp	2013-01-15 22:14:29 UTC (rev 139788)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp	2013-01-15 22:15:35 UTC (rev 139789)
@@ -1316,8 +1316,6 @@
 {
     StackStats::LayoutCheckPoint layoutCheckPoint;
     ASSERT(needsLayout());
-
-    updateMargins();
  
     if (isImage()) {
         setWidth(m_image->imageSize(this, style()->effectiveZoom()).width());
@@ -1369,6 +1367,7 @@
         LayoutSize imageSize = m_image->imageSize(this, style()->effectiveZoom());
         m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = style()->isHorizontalWritingMode() ? imageSize.width() : imageSize.height();
         setPreferredLogicalWidthsDirty(false);
+        updateMargins();
         return;
     }
 
@@ -1479,6 +1478,8 @@
     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