Title: [214119] trunk
Revision
214119
Author
[email protected]
Date
2017-03-17 14:12:47 -0700 (Fri, 17 Mar 2017)

Log Message

Fix the flow thread state on the descendants of out of flow positioned replaced elements.
https://bugs.webkit.org/show_bug.cgi?id=169821
<rdar://problem/30964017>

Reviewed by Simon Fraser.

Source/WebCore:

Descendants of a replaced out of flow elmement should inherit the flowthread state
from the replaced element and not from the replaced element's parent.

Test: fast/multicol/fix-inherit-when-container-is-replaced.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::computedFlowThreadState):

LayoutTests:

* fast/multicol/fix-inherit-when-container-is-replaced-expected.txt: Added.
* fast/multicol/fix-inherit-when-container-is-replaced.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (214118 => 214119)


--- trunk/LayoutTests/ChangeLog	2017-03-17 20:59:35 UTC (rev 214118)
+++ trunk/LayoutTests/ChangeLog	2017-03-17 21:12:47 UTC (rev 214119)
@@ -1,3 +1,14 @@
+2017-03-17  Zalan Bujtas  <[email protected]>
+
+        Fix the flow thread state on the descendants of out of flow positioned replaced elements.
+        https://bugs.webkit.org/show_bug.cgi?id=169821
+        <rdar://problem/30964017>
+
+        Reviewed by Simon Fraser.
+
+        * fast/multicol/fix-inherit-when-container-is-replaced-expected.txt: Added.
+        * fast/multicol/fix-inherit-when-container-is-replaced.html: Added.
+
 2017-03-17  Youenn Fablet  <[email protected]>
 
         Update webrtc tests expectations

Added: trunk/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced-expected.txt (0 => 214119)


--- trunk/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced-expected.txt	2017-03-17 21:12:47 UTC (rev 214119)
@@ -0,0 +1,2 @@
+PASS if no crash or assert.
+

Added: trunk/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced.html (0 => 214119)


--- trunk/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced.html	2017-03-17 21:12:47 UTC (rev 214119)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we set the correct flow states for positioned inline descendants.</title>
+<style>
+div {
+    column-count: 2;
+}
+
+video {
+    position: fixed;
+}
+</style>
+<script>
+function runTest() {
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
+    document.body.offsetHeight;
+    setTimeout(function() {
+        div.style.columnCount = "auto";
+        document.body.offsetHeight;
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }, 0);
+}
+</script>
+</head>
+<body _onload_="runTest()">
+PASS if no crash or assert.
+<div id=div><video><track></video></div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (214118 => 214119)


--- trunk/Source/WebCore/ChangeLog	2017-03-17 20:59:35 UTC (rev 214118)
+++ trunk/Source/WebCore/ChangeLog	2017-03-17 21:12:47 UTC (rev 214119)
@@ -1,3 +1,19 @@
+2017-03-17  Zalan Bujtas  <[email protected]>
+
+        Fix the flow thread state on the descendants of out of flow positioned replaced elements.
+        https://bugs.webkit.org/show_bug.cgi?id=169821
+        <rdar://problem/30964017>
+
+        Reviewed by Simon Fraser.
+
+        Descendants of a replaced out of flow elmement should inherit the flowthread state
+        from the replaced element and not from the replaced element's parent.
+
+        Test: fast/multicol/fix-inherit-when-container-is-replaced.html
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::computedFlowThreadState):
+
 2017-03-17  Jon Davis  <[email protected]>
 
         Update feature status for outdated entries: CSS Shapes, Force Click Events

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (214118 => 214119)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2017-03-17 20:59:35 UTC (rev 214118)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2017-03-17 21:12:47 UTC (rev 214119)
@@ -197,8 +197,8 @@
         // containingBlock() skips svg boundary (SVG root is a RenderReplaced).
         if (auto* svgRoot = SVGRenderSupport::findTreeRootObject(downcast<RenderElement>(renderer)))
             inheritedFlowState = svgRoot->flowThreadState();
-    } else if (auto* containingBlock = renderer.containingBlock())
-        inheritedFlowState = containingBlock->flowThreadState();
+    } else if (auto* container = renderer.container())
+        inheritedFlowState = container->flowThreadState();
     else {
         // Splitting lines or doing continuation, so just keep the current state.
         inheritedFlowState = renderer.flowThreadState();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to