Changeset 274630 in webkit
- Timestamp:
- Mar 18, 2021, 3:10:14 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
rendering/updating/RenderTreeUpdater.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r274627 r274630 1 2021-02-26 Sergio Villar Senin <svillar@igalia.com> 2 3 Invalidate RenderTreePosition's next sibling with display:contents 4 https://bugs.webkit.org/show_bug.cgi?id=218578 5 6 Reviewed by Antti Koivisto. 7 8 When inserting elements in the tree from JS it might happen that the renderTreePosition() in the RenderTreeUpdater 9 caches a nextSibling() value which is only temporarily correct because we sequentially process the descendants of a 10 given root node in RenderTreeUpdater::updateRenderTree(). One of those potentially incorrect scenarios is when 11 using display:contents. We can detect those cases because we would leave a parent element in RenderTreeUpdater::popParent() 12 without changing renderingParent() and so without changing renderTreePosition(). Once we are in that situation we 13 must invalidate the cached position so the next sibling is recomputed. 14 15 * rendering/updating/RenderTreeUpdater.cpp: 16 (WebCore::RenderTreeUpdater::popParent): Invalidate the render tree position's next sibling if the parent element is not 17 the renderingParent(). 18 1 19 2021-03-18 Carlos Garcia Campos <cgarcia@igalia.com> 2 20 -
trunk/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
r273621 r274630 238 238 updateAfterDescendants(*parent.element, parent.updates); 239 239 240 if (&parent != &renderingParent()) 241 renderTreePosition().invalidateNextSibling(); 242 240 243 m_parentStack.removeLast(); 241 244 }
Note:
See TracChangeset
for help on using the changeset viewer.