Changeset 193773 in webkit
- Timestamp:
- Dec 8, 2015, 12:44:51 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r193770 r193773 1 2015-12-08 Zalan Bujtas <zalan@apple.com> 2 3 Do not insert positioned renderers to multiple gPositionedDescendantsMap. 4 https://bugs.webkit.org/show_bug.cgi?id=151878 5 rdar://problem/22229889 6 7 Reviewed by Simon Fraser. 8 9 We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them. 10 This static map is at block level. A particular absolute positioned object is added to its closest ancestor that 11 returns true for RenderElement::canContainAbsolutelyPositionedObjects(). 12 canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform. 13 If this container's style changes so that it's no longer positioned and it has no transform anymore, 14 we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout). 15 16 This patch addresses the case when the renderer does not have transforms anymore. 17 18 * fast/block/positioning/crash-when-transform-is-removed-expected.txt: Added. 19 * fast/block/positioning/crash-when-transform-is-removed.html: Added. 20 1 21 2015-12-08 Ryan Haddad <ryanhaddad@apple.com> 2 22 -
trunk/Source/WebCore/ChangeLog
r193764 r193773 1 2015-12-08 Zalan Bujtas <zalan@apple.com> 2 3 Do not insert positioned renderers to multiple gPositionedDescendantsMap. 4 https://bugs.webkit.org/show_bug.cgi?id=151878 5 rdar://problem/22229889 6 7 Reviewed by Simon Fraser. 8 9 We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them. 10 This static map is at block level. A particular absolute positioned object is added to its closest ancestor that 11 returns true for RenderElement::canContainAbsolutelyPositionedObjects(). 12 canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform. 13 If this container's style changes so that it's no longer positioned and it has no transform anymore, 14 we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout). 15 16 This patch addresses the case when the renderer does not have transforms anymore. 17 18 Test: fast/block/positioning/crash-when-transform-is-removed.html 19 20 * rendering/RenderBlock.cpp: 21 (WebCore::RenderBlock::styleWillChange): 22 1 23 2015-12-08 Eric Carlson <eric.carlson@apple.com> 2 24 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r192854 r193773 243 243 setReplaced(newStyle.isDisplayInlineType()); 244 244 245 if (oldStyle && oldStyle->hasTransformRelatedProperty() && !newStyle.hasTransformRelatedProperty()) 246 removePositionedObjects(nullptr, NewContainingBlock); 247 245 248 if (oldStyle && parent() && diff == StyleDifferenceLayout && oldStyle->position() != newStyle.position()) { 246 249 if (newStyle.position() == StaticPosition) 247 250 // Clear our positioned objects list. Our absolutely positioned descendants will be 248 251 // inserted into our containing block's positioned objects list during layout. 249 removePositionedObjects( 0, NewContainingBlock);252 removePositionedObjects(nullptr, NewContainingBlock); 250 253 else if (oldStyle->position() == StaticPosition) { 251 254 // Remove our absolutely positioned descendants from their current containing block.
Note:
See TracChangeset
for help on using the changeset viewer.