Open Bug 1299250 Opened 8 years ago Updated 2 years ago

stylo: Consider lazy processing (or even computation of) changehints / RestyleDamage

Categories

(Core :: CSS Parsing and Computation, defect, P5)

defect

Tracking

()

Tracking Status
firefox57 --- wontfix

People

(Reporter: bholley, Unassigned)

References

(Blocks 1 open bug)

Details

Gecko currently supports lazy frame construction as described in [1]. However, as far as I know, we don't support lazy frame _re_construction, or any laziness with respect to change hints. Blink is currently refactoring their style system to separate style resolution from frame construction. They're doing this for various reasons, but one benefit cited in [2] is the ability to collapse script-driven restyles into a (potentially smaller, sometimes zero) net change for layout: > The ability to respond to ComputedStyle DOM APIs without building the Layout > Tree. This would be useful in cases where styleRecalc is performed on an > element but the LayoutTree does not change. For example, an author makes a > style change on an element, queries the style of the element, then removes > the style change within the same block of Javascript (see below). This use > case does not change the final state of the LayoutTree, but currently > requires the LayoutTree to be rebuilt twice. It's not clear to me how much of a win this is, or how we'd do it (in either Gecko or Servo). Still, I wanted to get this on file to consider at some point down the road. [1] http://searchfox.org/mozilla-central/rev/064025c802c22cd5ad122746733cbd34ea47393c/layout/base/nsCSSFrameConstructor.h#158 [2] https://docs.google.com/document/d/1RlEfhfUnhIEJSgV0nb8AKT4uyWbNsSY_k9uSGTUCQ2I
Priority: -- → P5
status-firefox57=wontfix unless someone thinks this bug should block 57
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.