Changeset 229288 in webkit
- Timestamp:
- Mar 5, 2018 10:43:53 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r229286 r229288 1 2018-03-05 Antti Koivisto <antti@apple.com> 2 3 Don't invalidate all children when doing insertion/deletion in presence of backward positional selectors 4 https://bugs.webkit.org/show_bug.cgi?id=183325 5 <rdar://problem/38134480> 6 7 Reviewed by Zalan Bujtas. 8 9 It is sufficient to invalidate siblings before the mutation point. 10 11 * dom/Element.cpp: 12 (WebCore::checkForSiblingStyleChanges): 13 14 We already do sibling walk in the case of forwards positional rules and sibling combinators. The work 15 done here is insignifant compared to cost of overinvalidating. 16 1 17 2018-03-05 Ali Juma <ajuma@chromium.org> 2 18 -
trunk/Source/WebCore/dom/Element.cpp
r229209 r229288 2077 2077 // We have to invalidate everything following the insertion point in the forward case, and everything before the insertion point in the 2078 2078 // backward case. 2079 // |afterChange| is 0 in the parser callback case, so we won't do any work for the forward case if we don't have to. 2080 // For performance reasons we just mark the parent node as changed, since we don't want to make childrenChanged O(n^2) by crawling all our kids 2081 // here. recalcStyle will then force a walk of the children when it sees that this has happened. 2082 if (parent.childrenAffectedByBackwardPositionalRules() && elementBeforeChange) 2083 parent.invalidateStyleForSubtree(); 2079 if (parent.childrenAffectedByBackwardPositionalRules()) { 2080 for (auto* previous = elementBeforeChange; previous; previous = previous->previousElementSibling()) 2081 previous->invalidateStyleForSubtree(); 2082 } 2084 2083 } 2085 2084
Note: See TracChangeset
for help on using the changeset viewer.