Title: [194461] trunk
Revision
194461
Author
[email protected]
Date
2015-12-31 11:27:58 -0800 (Thu, 31 Dec 2015)

Log Message

Simple line layout: Nested block with pseudo first-line parent should bail out of simple line layout.
https://bugs.webkit.org/show_bug.cgi?id=152599

Reviewed by Simon Fraser.

We should bail out of simple line layout if any of the ancestors have pseudo first-line style.
(see RenderBlock::firstLineBlock())

Source/WebCore:

Test: fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):

LayoutTests:

* fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout-expected.html: Added.
* fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (194460 => 194461)


--- trunk/LayoutTests/ChangeLog	2015-12-31 19:17:23 UTC (rev 194460)
+++ trunk/LayoutTests/ChangeLog	2015-12-31 19:27:58 UTC (rev 194461)
@@ -1,3 +1,16 @@
+2015-12-31  Zalan Bujtas  <[email protected]>
+
+        Simple line layout: Nested block with pseudo first-line parent should bail out of simple line layout.
+        https://bugs.webkit.org/show_bug.cgi?id=152599
+
+        Reviewed by Simon Fraser.
+
+        We should bail out of simple line layout if any of the ancestors have pseudo first-line style.
+        (see RenderBlock::firstLineBlock()) 
+
+        * fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout-expected.html: Added.
+        * fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout.html: Added.
+
 2015-12-31  Martin Robinson  <[email protected]>
 
         Mark some tests as failing on WebKitGTK+.

Added: trunk/LayoutTests/fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout-expected.html (0 => 194461)


--- trunk/LayoutTests/fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout-expected.html	2015-12-31 19:27:58 UTC (rev 194461)
@@ -0,0 +1,21 @@
+<html>
+<head>
+<title>This tests that we properly bail out of simple line layout when first-line pseudo class is present.</title>
+<script>
+  if (window.internals)
+    internals.settings.setSimpleLineLayoutEnabled(false);
+</script>
+<style>
+  .outer::first-line{
+    color: red;
+  }
+
+  div {
+    color : blue;
+  }
+</style>
+</head>
+<body>
+<div class=outer><div><div><div>First line has color red<br> while this second line has color blue.</div></div></div></div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout.html (0 => 194461)


--- trunk/LayoutTests/fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout.html	2015-12-31 19:27:58 UTC (rev 194461)
@@ -0,0 +1,17 @@
+<html>
+<head>
+<title>This tests that we properly bail out of simple line layout when first-line pseudo class is present.</title>
+<style>
+  .outer::first-line{
+    color: red;
+  }
+
+  div {
+    color : blue;
+  }
+</style>
+</head>
+<body>
+<div class=outer><div><div><div>First line has color red<br> while this second line has color blue.</div></div></div></div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (194460 => 194461)


--- trunk/Source/WebCore/ChangeLog	2015-12-31 19:17:23 UTC (rev 194460)
+++ trunk/Source/WebCore/ChangeLog	2015-12-31 19:27:58 UTC (rev 194461)
@@ -1,3 +1,18 @@
+2015-12-31  Zalan Bujtas  <[email protected]>
+
+        Simple line layout: Nested block with pseudo first-line parent should bail out of simple line layout.
+        https://bugs.webkit.org/show_bug.cgi?id=152599
+
+        Reviewed by Simon Fraser.
+
+        We should bail out of simple line layout if any of the ancestors have pseudo first-line style.
+        (see RenderBlock::firstLineBlock()) 
+
+        Test: fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout.html
+
+        * rendering/SimpleLineLayout.cpp:
+        (WebCore::SimpleLineLayout::canUseForWithReason):
+
 2015-12-30  Simon Fraser  <[email protected]>
 
         Change ScrollView::scrollTo() to take a ScrollPosition

Modified: trunk/Source/WebCore/rendering/SimpleLineLayout.cpp (194460 => 194461)


--- trunk/Source/WebCore/rendering/SimpleLineLayout.cpp	2015-12-31 19:17:23 UTC (rev 194460)
+++ trunk/Source/WebCore/rendering/SimpleLineLayout.cpp	2015-12-31 19:27:58 UTC (rev 194461)
@@ -287,7 +287,7 @@
     // Printing does pagination without a flow thread.
     if (flow.document().paginated())
         SET_REASON_AND_RETURN_IF_NEEDED(FlowIsPaginated, reasons, includeReasons);
-    if (flow.isAnonymous() && flow.firstLineBlock())
+    if (flow.firstLineBlock())
         SET_REASON_AND_RETURN_IF_NEEDED(FlowHasPseudoFirstLine, reasons, includeReasons);
     if (flow.isAnonymousBlock() && flow.parent()->style().textOverflow())
         SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextOverflow, reasons, includeReasons);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to