Title: [214764] releases/WebKitGTK/webkit-2.16
Revision
214764
Author
carlo...@webkit.org
Date
2017-04-03 03:32:41 -0700 (Mon, 03 Apr 2017)

Log Message

Merge r214119 - 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: releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog (214763 => 214764)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog	2017-04-03 10:29:39 UTC (rev 214763)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/ChangeLog	2017-04-03 10:32:41 UTC (rev 214764)
@@ -1,3 +1,14 @@
+2017-03-17  Zalan Bujtas  <za...@apple.com>
+
+        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-16  Zalan Bujtas  <za...@apple.com>
 
         Stay inside the continuation while searching for a candidate ancestor for insertion.

Added: releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced-expected.txt (0 => 214764)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced-expected.txt	2017-04-03 10:32:41 UTC (rev 214764)
@@ -0,0 +1,2 @@
+PASS if no crash or assert.
+

Added: releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced.html (0 => 214764)


--- releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/fast/multicol/fix-inherit-when-container-is-replaced.html	2017-04-03 10:32:41 UTC (rev 214764)
@@ -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: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (214763 => 214764)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-04-03 10:29:39 UTC (rev 214763)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-04-03 10:32:41 UTC (rev 214764)
@@ -1,3 +1,19 @@
+2017-03-17  Zalan Bujtas  <za...@apple.com>
+
+        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  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [Cairo] Handle the blend mode in GraphicsContext::drawPattern

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderObject.cpp (214763 => 214764)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderObject.cpp	2017-04-03 10:29:39 UTC (rev 214763)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderObject.cpp	2017-04-03 10:32:41 UTC (rev 214764)
@@ -191,8 +191,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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to