Changeset 224976 in webkit
- Timestamp:
- Nov 17, 2017 11:34:32 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224973 r224976 1 2017-11-17 Antti Koivisto <antti@apple.com> 2 3 Move destroyLeftoverChildren call to RenderObject::destroy 4 https://bugs.webkit.org/show_bug.cgi?id=179819 5 6 Reviewed by Zalan Bujtas. 7 8 This is currently called inconsistenly from various willBeDestroyed implementations. 9 We should always call it before invoking willBeDestroyed. 10 11 * rendering/RenderBlockFlow.cpp: 12 (WebCore::RenderBlockFlow::willBeDestroyed): 13 * rendering/RenderElement.cpp: 14 (WebCore::RenderElement::willBeDestroyed): 15 * rendering/RenderElement.h: 16 (WebCore::RenderElement::setLastChild): 17 * rendering/RenderInline.cpp: 18 (WebCore::RenderInline::willBeDestroyed): 19 * rendering/RenderLayer.cpp: 20 (WebCore::RenderLayer::~RenderLayer): 21 22 Add some release asserts verifying layer has been detached before destruction. 23 This would reveal cases where destroyLeftoverChildren was called too late. 24 25 * rendering/RenderObject.cpp: 26 (WebCore::RenderObject::destroy): 27 28 Call destroyLeftoverChildren. 29 1 30 2017-11-17 Said Abou-Hallawa <sabouhallawa@apple.com> 2 31 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r224933 r224976 133 133 void RenderBlockFlow::willBeDestroyed() 134 134 { 135 // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will136 // properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise.137 destroyLeftoverChildren();138 139 135 if (!renderTreeBeingDestroyed()) { 140 136 if (firstRootBox()) { -
trunk/Source/WebCore/rendering/RenderElement.cpp
r224933 r224976 1127 1127 view().frameView().removeSlowRepaintObject(this); 1128 1128 1129 destroyLeftoverChildren();1130 1131 1129 unregisterForVisibleInViewportCallback(); 1132 1130 -
trunk/Source/WebCore/rendering/RenderElement.h
r224933 r224976 230 230 void setIsFirstLetter() { m_isFirstLetter = true; } 231 231 232 void destroyLeftoverChildren(); 233 232 234 protected: 233 235 enum BaseTypeFlag { … … 255 257 void setFirstChild(RenderObject* child) { m_firstChild = child; } 256 258 void setLastChild(RenderObject* child) { m_lastChild = child; } 257 void destroyLeftoverChildren();258 259 259 260 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle); -
trunk/Source/WebCore/rendering/RenderInline.cpp
r224933 r224976 85 85 #endif 86 86 87 // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will88 // properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise.89 destroyLeftoverChildren();90 91 87 if (!renderTreeBeingDestroyed()) { 92 88 if (firstLineBox()) { -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r224712 r224976 436 436 437 437 clearBacking(true); 438 439 // Layer and all its children should be removed from the tree before destruction. 440 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(renderer().renderTreeBeingDestroyed() || !m_parent); 441 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(renderer().renderTreeBeingDestroyed() || !m_first); 438 442 } 439 443 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r224537 r224976 1520 1520 RELEASE_ASSERT(!m_bitfields.beingDestroyed()); 1521 1521 1522 if (is<RenderElement>(*this)) 1523 downcast<RenderElement>(*this).destroyLeftoverChildren(); 1524 1522 1525 m_bitfields.setBeingDestroyed(true); 1523 1526
Note: See TracChangeset
for help on using the changeset viewer.