DescriptionDefer pushing the parent stack in recalcStyle until StyleResolver::styleForElement()
This means that when style sharing we don't always have to push the bloom
filter and parent stack and also avoids pushing the stack for elements that
only have text node children. Similarly this improves the performance of things
like editing that will insert a text node and immediately call recalcStyle to
cause it to attach by avoiding the parent stack since it's not needed.
I had tried to make the StyleResolverParentPusher smarter to push implicitly in
https://codereview.chromium.org/68253003 but it was reverted in
https://codereview.chromium.org/59883011 because it caused a perf regression by
making us push the filter for elements that only had text node children in
recalcStyle. In fixing that I realized that we push inside ::attach() even if
there are only text children and could get a similar perf improvement by avoiding
pushing in those cases.
R=ojan@chromium.org,eseidel@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170168
Patch Set 1 #Patch Set 2 : no-find-copies #
Total comments: 1
Patch Set 3 : Make recalcStyle and attach have the same order #Patch Set 4 : pushScopes -> ensureParentStackIsPushed #Patch Set 5 : Rebase #Patch Set 6 : Rebase #
Messages
Total messages: 10 (0 generated)
|