Title: [195110] releases/WebKitGTK/webkit-2.10
- Revision
- 195110
- Author
- [email protected]
- Date
- 2016-01-15 02:35:47 -0800 (Fri, 15 Jan 2016)
Log Message
Merge r193773 - Do not insert positioned renderers to multiple gPositionedDescendantsMap.
https://bugs.webkit.org/show_bug.cgi?id=151878
rdar://problem/22229889
Reviewed by Simon Fraser.
We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
This static map is at block level. A particular absolute positioned object is added to its closest ancestor that
returns true for RenderElement::canContainAbsolutelyPositionedObjects().
canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform.
If this container's style changes so that it's no longer positioned and it has no transform anymore,
we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout).
This patch addresses the case when the renderer does not have transforms anymore.
Source/WebCore:
Test: fast/block/positioning/crash-when-transform-is-removed.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleWillChange):
LayoutTests:
* fast/block/positioning/crash-when-transform-is-removed-expected.txt: Added.
* fast/block/positioning/crash-when-transform-is-removed.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (195109 => 195110)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog 2016-01-15 10:32:59 UTC (rev 195109)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog 2016-01-15 10:35:47 UTC (rev 195110)
@@ -1,3 +1,23 @@
+2015-12-08 Zalan Bujtas <[email protected]>
+
+ Do not insert positioned renderers to multiple gPositionedDescendantsMap.
+ https://bugs.webkit.org/show_bug.cgi?id=151878
+ rdar://problem/22229889
+
+ Reviewed by Simon Fraser.
+
+ We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
+ This static map is at block level. A particular absolute positioned object is added to its closest ancestor that
+ returns true for RenderElement::canContainAbsolutelyPositionedObjects().
+ canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform.
+ If this container's style changes so that it's no longer positioned and it has no transform anymore,
+ we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout).
+
+ This patch addresses the case when the renderer does not have transforms anymore.
+
+ * fast/block/positioning/crash-when-transform-is-removed-expected.txt: Added.
+ * fast/block/positioning/crash-when-transform-is-removed.html: Added.
+
2015-12-08 Frederic Wang <[email protected]>
[cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/block/positioning/crash-when-transform-is-removed-expected.txt (0 => 195110)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/block/positioning/crash-when-transform-is-removed-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/block/positioning/crash-when-transform-is-removed-expected.txt 2016-01-15 10:35:47 UTC (rev 195110)
@@ -0,0 +1 @@
+ PASS if no crash or assert.
Added: releases/WebKitGTK/webkit-2.10/LayoutTests/fast/block/positioning/crash-when-transform-is-removed.html (0 => 195110)
--- releases/WebKitGTK/webkit-2.10/LayoutTests/fast/block/positioning/crash-when-transform-is-removed.html (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/fast/block/positioning/crash-when-transform-is-removed.html 2016-01-15 10:35:47 UTC (rev 195110)
@@ -0,0 +1,12 @@
+<body style="transform: translateX(0);">
+<img style="position: absolute;">
+PASS if no crash or assert.
+</body>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+document.body.offsetHeight;
+document.body.setAttribute("style","");
+document.body.offsetHeight;
+document.getElementsByTagName("img")[0].setAttribute("style","");
+</script>
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (195109 => 195110)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2016-01-15 10:32:59 UTC (rev 195109)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2016-01-15 10:35:47 UTC (rev 195110)
@@ -1,3 +1,25 @@
+2015-12-08 Zalan Bujtas <[email protected]>
+
+ Do not insert positioned renderers to multiple gPositionedDescendantsMap.
+ https://bugs.webkit.org/show_bug.cgi?id=151878
+ rdar://problem/22229889
+
+ Reviewed by Simon Fraser.
+
+ We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
+ This static map is at block level. A particular absolute positioned object is added to its closest ancestor that
+ returns true for RenderElement::canContainAbsolutelyPositionedObjects().
+ canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform.
+ If this container's style changes so that it's no longer positioned and it has no transform anymore,
+ we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout).
+
+ This patch addresses the case when the renderer does not have transforms anymore.
+
+ Test: fast/block/positioning/crash-when-transform-is-removed.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::styleWillChange):
+
2015-12-08 Frederic Wang <[email protected]>
[cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlock.cpp (195109 => 195110)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlock.cpp 2016-01-15 10:32:59 UTC (rev 195109)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/RenderBlock.cpp 2016-01-15 10:35:47 UTC (rev 195110)
@@ -242,11 +242,14 @@
setReplaced(newStyle.isDisplayInlineType());
+ if (oldStyle && oldStyle->hasTransformRelatedProperty() && !newStyle.hasTransformRelatedProperty())
+ removePositionedObjects(nullptr, NewContainingBlock);
+
if (oldStyle && parent() && diff == StyleDifferenceLayout && oldStyle->position() != newStyle.position()) {
if (newStyle.position() == StaticPosition)
// Clear our positioned objects list. Our absolutely positioned descendants will be
// inserted into our containing block's positioned objects list during layout.
- removePositionedObjects(0, NewContainingBlock);
+ removePositionedObjects(nullptr, NewContainingBlock);
else if (oldStyle->position() == StaticPosition) {
// Remove our absolutely positioned descendants from their current containing block.
// They will be inserted into our positioned objects list during layout.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes