Title: [207100] releases/WebKitGTK/webkit-2.14
- Revision
- 207100
- Author
- [email protected]
- Date
- 2016-10-11 05:05:57 -0700 (Tue, 11 Oct 2016)
Log Message
Merge r206343 - ASSERTION FAILED: !newRelayoutRoot.container() || is<RenderView>(newRelayoutRoot.container()) || !newRelayoutRoot.container()->needsLayout() while loading sohu.com
https://bugs.webkit.org/show_bug.cgi?id=162466
Reviewed by Simon Fraser.
Source/WebCore:
When we come across a out-of-flow positioned renderer during layout, we add it to a tracker map with
its containing block (calling RenderBlock::insertPositionedObject).
It ensures that a containing block can easily access to the out-of-flow positioned descendants during layout/painting/hittesting.
We do it even when the containing block - positioned renderer pair is already in this tracker map.
RenderBlock::insertPositionedObject() eagerly sets the positioned-child-needs-layout flag on the containing block
assuming it needs to layout this descendant later in the layout phase.
This patch ensure that we only flag the containing block dirty when the descendant needs layout.
Test: fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::insertPositionedObject):
LayoutTests:
* fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block-expected.txt: Added.
* fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog (207099 => 207100)
--- releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog 2016-10-11 12:01:54 UTC (rev 207099)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog 2016-10-11 12:05:57 UTC (rev 207100)
@@ -1,3 +1,13 @@
+2016-09-23 Zalan Bujtas <[email protected]>
+
+ ASSERTION FAILED: !newRelayoutRoot.container() || is<RenderView>(newRelayoutRoot.container()) || !newRelayoutRoot.container()->needsLayout() while loading sohu.com
+ https://bugs.webkit.org/show_bug.cgi?id=162466
+
+ Reviewed by Simon Fraser.
+
+ * fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block-expected.txt: Added.
+ * fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block.html: Added.
+
2016-09-23 Carlos Garcia Campos <[email protected]>
REGRESSION(r194387): Crash on github.com in IntlDateTimeFormat::resolvedOptions in C locale
Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block-expected.txt (0 => 207100)
--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block-expected.txt 2016-10-11 12:05:57 UTC (rev 207100)
@@ -0,0 +1 @@
+PASS if no assert in debug.
Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block.html (0 => 207100)
--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block.html (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block.html 2016-10-11 12:05:57 UTC (rev 207100)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that subtree layout works fine with positioned elements.</title>
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+}
+
+.positionedParent {
+ position: absolute;
+}
+
+.boundaryParent {
+ overflow: hidden;
+}
+
+.positionedChild {
+ background-color: blue;
+ position: absolute;
+}
+
+</style>
+</head>
+<body>
+<div>
+ <div class=positionedParent>
+ <div class=boundaryParent>
+ <div id=sibling></div>
+ <div class=positionedChild>PASS if no assert in debug.</div>
+ </div>
+ </div>
+</div>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+setTimeout(function() {
+ document.getElementById("sibling").style.width = "10px";
+ setTimeout(function() {
+ document.getElementById("sibling").style.width = "20px";
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+}, 0);
+</script>
+</body>
+</html>
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (207099 => 207100)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog 2016-10-11 12:01:54 UTC (rev 207099)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog 2016-10-11 12:05:57 UTC (rev 207100)
@@ -1,3 +1,23 @@
+2016-09-23 Zalan Bujtas <[email protected]>
+
+ ASSERTION FAILED: !newRelayoutRoot.container() || is<RenderView>(newRelayoutRoot.container()) || !newRelayoutRoot.container()->needsLayout() while loading sohu.com
+ https://bugs.webkit.org/show_bug.cgi?id=162466
+
+ Reviewed by Simon Fraser.
+
+ When we come across a out-of-flow positioned renderer during layout, we add it to a tracker map with
+ its containing block (calling RenderBlock::insertPositionedObject).
+ It ensures that a containing block can easily access to the out-of-flow positioned descendants during layout/painting/hittesting.
+ We do it even when the containing block - positioned renderer pair is already in this tracker map.
+ RenderBlock::insertPositionedObject() eagerly sets the positioned-child-needs-layout flag on the containing block
+ assuming it needs to layout this descendant later in the layout phase.
+ This patch ensure that we only flag the containing block dirty when the descendant needs layout.
+
+ Test: fast/block/positioning/subtree-assert-when-positioned-element-dirties-containing-block.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::insertPositionedObject):
+
2016-09-22 Brady Eidson <[email protected]>
IDBIndex.openCursor() matches indices on multiple object stores.
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp (207099 => 207100)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp 2016-10-11 12:01:54 UTC (rev 207099)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp 2016-10-11 12:05:57 UTC (rev 207100)
@@ -2250,12 +2250,14 @@
void RenderBlock::insertPositionedObject(RenderBox& positioned)
{
ASSERT(!isAnonymousBlock());
-
if (positioned.isRenderFlowThread())
return;
- // We should turn this bit on only while in layout.
- ASSERT(posChildNeedsLayout() || view().frameView().isInLayout());
- setPosChildNeedsLayoutBit(true);
+ // FIXME: Find out if we can do this as part of positioned.setChildNeedsLayout(MarkOnlyThis)
+ if (positioned.needsLayout()) {
+ // We should turn this bit on only while in layout.
+ ASSERT(posChildNeedsLayout() || view().frameView().isInLayout());
+ setPosChildNeedsLayoutBit(true);
+ }
positionedDescendantsMap().addDescendant(*this, positioned, isRenderView() ? PositionedDescendantsMap::MoveDescendantToEnd::Yes
: PositionedDescendantsMap::MoveDescendantToEnd::No);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes