Changeset 136045 in webkit
- Timestamp:
- Nov 28, 2012 12:39:52 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r136042 r136045 1 2012-11-28 Alexandru Chiculita <achicu@adobe.com> 2 3 [CSS Regions] Crash when using hover and first-letter inside a flow-thread 4 https://bugs.webkit.org/show_bug.cgi?id=102957 5 6 Reviewed by David Hyatt. 7 8 Added CSS Regions tests for the firstLetter and listMarker render objects that use 9 different destroy paths in the code. 10 11 * fast/regions/firstletter-inside-flowthread-expected.html: Added. 12 * fast/regions/firstletter-inside-flowthread.html: Added. 13 * fast/regions/listmarker-inside-flowthread-expected.html: Added. 14 * fast/regions/listmarker-inside-flowthread.html: Added. 15 1 16 2012-11-28 Tony Chang <tony@chromium.org> 2 17 -
trunk/Source/WebCore/ChangeLog
r136039 r136045 1 2012-11-28 Alexandru Chiculita <achicu@adobe.com> 2 3 [CSS Regions] Crash when using hover and first-letter inside a flow-thread 4 https://bugs.webkit.org/show_bug.cgi?id=102957 5 6 Reviewed by David Hyatt. 7 8 Some RenderObjects use a different path when they are destroyed. That's because they are dynamically 9 added just before layout happens and their parent is usually not their actual owner. In those cases the parent 10 will remove the object from the tree, but it's actually the owner that will destroy the object and all its 11 children. 12 13 RenderFlowThread maintains a RenderBoxRegionInfo object for each RenderObject that is rendered inside the 14 flow-thread. When the RenderObject is removed from the RenderFlowThread, the associated RenderBoxRegionInfo object 15 also needs to be removed. 16 17 In these special cases (list-marker, first-letter), the object itself was removed from the RenderFlowThread, 18 but its children were still left in the flow-thread. When the these special objects were later destroyed, 19 they will remove their own children. Removing their children means it will try to remove them from the 20 associated RenderFlowThread. However, in this cases there would be no link back to the parent flow-thread, 21 as the tree is now detached from the enclosing RenderFlowThread. 22 23 Added code that recursively removes the whole children tree from the RenderFlowThread when the root is removed. 24 25 Tests: fast/regions/firstletter-inside-flowthread.html 26 fast/regions/listmarker-inside-flowthread.html 27 28 * rendering/RenderObject.cpp: 29 (WebCore::RenderObject::willBeRemovedFromTree): 30 (WebCore::RenderObject::removeFromRenderFlowThread): 31 (WebCore): 32 (WebCore::RenderObject::removeFromRenderFlowThreadRecursive): 33 * rendering/RenderObject.h: 34 (RenderObject): 35 1 36 2012-11-28 Alexandru Chiculita <achicu@adobe.com> 2 37 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r136001 r136045 2448 2448 parent()->dirtyLinesFromChangedChild(this); 2449 2449 2450 if (inRenderFlowThread()) { 2451 ASSERT(enclosingRenderFlowThread()); 2452 enclosingRenderFlowThread()->removeFlowChildInfo(this); 2453 } 2450 if (inRenderFlowThread()) 2451 removeFromRenderFlowThread(); 2454 2452 2455 2453 if (RenderNamedFlowThread* containerFlowThread = parent()->enclosingRenderNamedFlowThread()) … … 2460 2458 parent()->setNeedsBoundariesUpdate(); 2461 2459 #endif 2460 } 2461 2462 void RenderObject::removeFromRenderFlowThread() 2463 { 2464 RenderFlowThread* renderFlowThread = enclosingRenderFlowThread(); 2465 ASSERT(renderFlowThread); 2466 // Sometimes we remove the element from the flow, but it's not destroyed at that time. 2467 // It's only until later when we actually destroy it and remove all the children from it. 2468 // Currently, that happens for firstLetter elements and list markers. 2469 // Pass in the flow thread so that we don't have to look it up for all the children. 2470 removeFromRenderFlowThreadRecursive(renderFlowThread); 2471 } 2472 2473 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderFlowThread) 2474 { 2475 if (const RenderObjectChildList* children = virtualChildren()) { 2476 for (RenderObject* child = children->firstChild(); child; child = child->nextSibling()) 2477 child->removeFromRenderFlowThreadRecursive(renderFlowThread); 2478 } 2479 renderFlowThread->removeFlowChildInfo(this); 2480 setInRenderFlowThread(false); 2462 2481 } 2463 2482 -
trunk/Source/WebCore/rendering/RenderObject.h
r135779 r136045 986 986 987 987 private: 988 void removeFromRenderFlowThread(); 989 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); 990 988 991 RenderStyle* cachedFirstLineStyle() const; 989 992 StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensitiveProperties) const;
Note: See TracChangeset
for help on using the changeset viewer.