Don't style-invalidate children of display:none elements.
If an element has a null ComputedStyle, its descendants can only have a ComputedStyle on the next lifecycle update if the element's ComputedStyle is updated. That would follow directly from inheritance in Element::RecalcStyle() and we won't need to mark those descendant with NeedsStyleRecalc(). Thus, we can skip style invalidation of descendants of display:none elements. This is a StyleInvalidator optimization, but also we are preparing for not marking style dirty for elements outside the flat tree for making it feasible to e.g. skip non-slotted subtrees of shadow hosts during style recalc. Bug: 972752 Change-Id: If586ac229c842189b6e3e664dfa756b262a9162c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1783140 Commit-Queue: Rune Lillesveen <futhark@chromium.org> Reviewed-by:Eric Willigers <ericwilligers@chromium.org> Cr-Commit-Position: refs/heads/master@{#693108}
Showing
Please register or sign in to comment