OLD | NEW |
1 This Markdown file intends to demystify some of the StyleRecalc process: | 1 This Markdown file intends to demystify some of the StyleRecalc process: |
2 TODO(nainar): Add more details about the StyleRecalc process here. | 2 TODO(nainar): Add more details about the StyleRecalc process here. |
3 | 3 |
4 ## Different StyleRecalc states | 4 ## Different StyleRecalc states |
5 | 5 |
6 Different StyleRecalc states are stored in blink::ComputedStyleConstants in blin
k::StyleRecalcChange. | 6 Different StyleRecalc states are stored in blink::ComputedStyleConstants in blin
k::StyleRecalcChange. |
7 | 7 |
8 The states are as follows: | 8 The states are as follows: |
9 1. NoChange -> No style recalc change is needed. | 9 1. NoChange -> No style recalc change is needed. |
10 2. NoInherit -> Only perform style recalc on the Node itself. | 10 2. NoInherit -> Only perform style recalc on the Node itself. |
11 3. UpdatePseudoElements -> Causes an update of just the pseudo element children
in the case where the styles for the element itself were recalced, but resulted
in NoChange or NoInherit. | 11 3. UpdatePseudoElements -> Causes an update of just the pseudo element children
in the case where the styles for the element itself were recalced, but resulted
in NoChange or NoInherit. |
12 4. IndependentInherit -> Same as Inherit except style recalc stops early if only
independent properties were changed. We still visit every descendant, but we ap
ply the styles directly instead of doing selector matching to compute a new styl
e. Independent properties are those which do not depend on and do not affect any
other properties on ComputedStyle (e.g. visibility and Pointer Events). | 12 4. IndependentInherit -> Same as Inherit except style recalc stops early if only
independent properties were changed. We still visit every descendant, but we ap
ply the styles directly instead of doing selector matching to compute a new styl
e. Independent properties are those which do not depend on and do not affect any
other properties on ComputedStyle (e.g. visibility and Pointer Events). |
13 5. Inherit -> Do a full style recalc of children. | 13 5. Inherit -> Do a full style recalc of children. |
14 6. Force -> Fallback that causes us to do a full style recalc. This is as we don
't know what changes. The primary reason for it is SubtreeStyleChange. | 14 6. Force -> Fallback that causes us to do a full style recalc. This is as we don
't know what changes. The primary reason for it is SubtreeStyleChange. |
15 7. Reattach -> reattachLayoutTree() has been completed. | 15 7. Reattach -> reattachLayoutTree() needs to be performed. |
16 8. ReattachNoLayoutObject -> reattachLayoutTree() has been completed and now don
t have a layoutObject. | |
OLD | NEW |