Title: [99029] branches/chromium/912
Revision
99029
Author
cev...@google.com
Date
2011-11-01 19:05:05 -0700 (Tue, 01 Nov 2011)

Log Message

Merge 98561
BUG=100526
Review URL: http://codereview.chromium.org/8399045

Modified Paths

Added Paths

Diff

Copied: branches/chromium/912/LayoutTests/fast/css/nested-first-letter-with-float-crash-expected.txt (from rev 98561, trunk/LayoutTests/fast/css/nested-first-letter-with-float-crash-expected.txt) (0 => 99029)


--- branches/chromium/912/LayoutTests/fast/css/nested-first-letter-with-float-crash-expected.txt	                        (rev 0)
+++ branches/chromium/912/LayoutTests/fast/css/nested-first-letter-with-float-crash-expected.txt	2011-11-02 02:05:05 UTC (rev 99029)
@@ -0,0 +1,2 @@
+PASS, if the script does not cause a crash or ASSERT failure
+

Copied: branches/chromium/912/LayoutTests/fast/css/nested-first-letter-with-float-crash.html (from rev 98561, trunk/LayoutTests/fast/css/nested-first-letter-with-float-crash.html) (0 => 99029)


--- branches/chromium/912/LayoutTests/fast/css/nested-first-letter-with-float-crash.html	                        (rev 0)
+++ branches/chromium/912/LayoutTests/fast/css/nested-first-letter-with-float-crash.html	2011-11-02 02:05:05 UTC (rev 99029)
@@ -0,0 +1,26 @@
+<html>
+    <style type="text/css">
+        .parentStyle { position: absolute; }
+        .parentStyle:first-letter { position: inherit; }
+        .positionedChildStyle { position: absolute; }
+        .divChildStyle:first-letter { float: left; }
+        .divChildStyle:after { float: inherit; content: counter(blah); }
+    </style>
+    PASS, if the script does not cause a crash or ASSERT failure
+    <script>
+        function runTest() {
+            parentDiv = document.createElement('div');
+            parentDiv.setAttribute('class', 'parentStyle');
+            document.documentElement.appendChild(parentDiv);
+            positionedDiv = document.createElement('div');
+            positionedDiv.setAttribute('class', 'positionedChildStyle');
+            parentDiv.appendChild(positionedDiv);
+            divChild = document.createElement('div');
+            divChild.setAttribute('class', 'divChildStyle');
+            parentDiv.appendChild(divChild);
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+        }
+        window._onload_ = runTest;
+    </script>
+</html>

Modified: branches/chromium/912/Source/WebCore/rendering/RenderBlock.cpp (99028 => 99029)


--- branches/chromium/912/Source/WebCore/rendering/RenderBlock.cpp	2011-11-02 01:53:46 UTC (rev 99028)
+++ branches/chromium/912/Source/WebCore/rendering/RenderBlock.cpp	2011-11-02 02:05:05 UTC (rev 99029)
@@ -5556,6 +5556,11 @@
             currChild = currChild->nextSibling();
         } else if (currChild->isReplaced() || currChild->isRenderButton() || currChild->isMenuList())
             break;
+        else if (currChild->style()->hasPseudoStyle(FIRST_LETTER) && currChild->canHaveChildren())  {
+            // We found a lower-level node with first-letter, which supersedes the higher-level style
+            firstLetterBlock = currChild;
+            currChild = currChild->firstChild();
+        }
         else
             currChild = currChild->firstChild();
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to