Closed Bug 1367647 Opened 2 years ago Closed 2 years ago

stylo: have a way to request a restyle that recascades the entire tree

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(1 file, 1 obsolete file)

We need some way to request that cascading of a tree's descendants happens even when there is no restyle hint indicating we need to re-selector match, and when the parent's style didn't change.  This is so that we can handle changes to, for example, system colors, which affect the style value computation process.

This is the second part of (3) in bug 1334732.
Bobby's suggestion in bug 1334732 comment 0 is to expand the current boolean that determines whether we must cascade children into a CascadeHint.  Although I think it would work just as well as new RestyleHint flags.
Blocks: 1367592
Attachment #8872247 - Flags: review?(emilio+bugs)
Comment on attachment 8872247 [details]
style: Support a restyle hint that indicates all descendants must be recascaded.

https://reviewboard.mozilla.org/r/143734/#review147520

::: servo/components/style/restyle_hints.rs:422
(Diff revision 1)
> +        // inherited values after restyling for animations, and thus we
> +        // want to remove it so that we don't later try to restyle the element
> +        // during a normal restyle.  (We could have separate
> +        // RECASCADE_SELF_NORMAL and RECASCADE_SELF_ANIMATIONS flags to make it
> +        // clear, but this isn't currently necessary.)
> +        self.recascade.remove(RECASCADE_SELF);

Hmm... This is indeed tricky, but I guess it's fine. Thanks for the comment.
Attachment #8872247 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8872248 [details]
Bug 1367647 - Test expectation updates.

https://reviewboard.mozilla.org/r/143736/#review147522
Attachment #8872248 - Flags: review?(emilio+bugs) → review+
Attachment #8872247 - Attachment is obsolete: true
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d43415e71e01
Test expectation updates. r=emilio
https://hg.mozilla.org/mozilla-central/rev/d43415e71e01
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee: nobody → cam
You need to log in before you can comment on or make changes to this bug.