Title: [227087] trunk
Revision
227087
Author
[email protected]
Date
2018-01-17 14:37:23 -0800 (Wed, 17 Jan 2018)

Log Message

Multicol: RenderMultiColumnFlow should not inherit the flow state
https://bugs.webkit.org/show_bug.cgi?id=181762
<rdar://problem/35448565>

Reviewed by Simon Fraser.

Source/WebCore:

Do not compute the inherited flow state flag for RenderMultiColumnFlow.
It is (by definition) always inside a fragmented flow.

Test: fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html

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

LayoutTests:

* fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow-expected.txt: Added.
* fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (227086 => 227087)


--- trunk/LayoutTests/ChangeLog	2018-01-17 22:34:16 UTC (rev 227086)
+++ trunk/LayoutTests/ChangeLog	2018-01-17 22:37:23 UTC (rev 227087)
@@ -1,3 +1,14 @@
+2018-01-17  Zalan Bujtas  <[email protected]>
+
+        Multicol: RenderMultiColumnFlow should not inherit the flow state
+        https://bugs.webkit.org/show_bug.cgi?id=181762
+        <rdar://problem/35448565>
+
+        Reviewed by Simon Fraser.
+
+        * fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow-expected.txt: Added.
+        * fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html: Added.
+
 2018-01-17  Ryan Haddad  <[email protected]>
 
         [iOS] Re-enable LayoutTests in the storage/indexeddb directory

Added: trunk/LayoutTests/fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow-expected.txt (0 => 227087)


--- trunk/LayoutTests/fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow-expected.txt	2018-01-17 22:37:23 UTC (rev 227087)
@@ -0,0 +1,2 @@
+PASS if no crash.
+

Added: trunk/LayoutTests/fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html (0 => 227087)


--- trunk/LayoutTests/fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html	2018-01-17 22:37:23 UTC (rev 227087)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.positioned {
+  position: absolute;
+}
+div, span {
+ column-count: 2;
+}
+</style>
+</head>
+<body>
+PASS if no crash.
+<div><div></div><span></span><div class=positioned><div class=positioned><div></div></div></div>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+document.body.offsetHeight;
+document.head.innerText = "";
+</script>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (227086 => 227087)


--- trunk/Source/WebCore/ChangeLog	2018-01-17 22:34:16 UTC (rev 227086)
+++ trunk/Source/WebCore/ChangeLog	2018-01-17 22:37:23 UTC (rev 227087)
@@ -1,3 +1,19 @@
+2018-01-17  Zalan Bujtas  <[email protected]>
+
+        Multicol: RenderMultiColumnFlow should not inherit the flow state
+        https://bugs.webkit.org/show_bug.cgi?id=181762
+        <rdar://problem/35448565>
+
+        Reviewed by Simon Fraser.
+
+        Do not compute the inherited flow state flag for RenderMultiColumnFlow.
+        It is (by definition) always inside a fragmented flow.
+
+        Test: fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::computedFragmentedFlowState):
+
 2018-01-17  Alex Christensen  <[email protected]>
 
         Deprecate Application Cache

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (227086 => 227087)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2018-01-17 22:34:16 UTC (rev 227086)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2018-01-17 22:37:23 UTC (rev 227087)
@@ -196,6 +196,11 @@
     if (!renderer.parent())
         return renderer.fragmentedFlowState();
 
+    if (is<RenderMultiColumnFlow>(renderer)) {
+        // Multicolumn flows do not inherit the flow state.
+        return InsideInFragmentedFlow;
+    }
+
     auto inheritedFlowState = RenderObject::NotInsideFragmentedFlow;
     if (is<RenderText>(renderer))
         inheritedFlowState = renderer.parent()->fragmentedFlowState();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to