Closed Bug 1367553 Opened 8 years ago Closed 8 years ago

Move stylesheets changed logic to the StyleSet.

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(3 files)

This is a refactoring which is a prerequisite for make bug 1357583 sane. I also plan to use the same invalidation logic for media queries, so I'd rather do it now.
So this is apparently failing test_moz_document_rule and test_additional_sheets in Gecko, and it's not clear to me why, so there's no need to review this until I fix that.
Comment on attachment 8871001 [details] Bug 1367553: Move dirty style tracking to the StyleSet. https://reviewboard.mozilla.org/r/142568/#review146286 ::: layout/style/nsStyleSet.cpp:2404 (Diff revision 2) > + MOZ_ASSERT(mStylesHaveChanged || !mChangedScopeStyleRoots.IsEmpty()); > + MOZ_ASSERT_IF(mStylesHaveChanged, mChangedScopeStyleRoots.IsEmpty()); I guess you could do: MOZ_ASSERT(mStylesHaveChanged != mChangedScopeStyleRoots.IsEmpty()); ::: layout/style/nsStyleSet.cpp:2434 (Diff revision 2) > + eRestyle_Subtree, > + nsChangeHint(0)); > + } > + } > +} > + Nit: drop this extra blank line.
Attachment #8871001 - Flags: review+
Comment on attachment 8871002 [details] Bug 1367553: Provide the kind of change that the stylesheet suffered to RecordStyleSheetChange. https://reviewboard.mozilla.org/r/142570/#review146290 Looks good. I guess this is going in the direction of what I was doing in bug 1213122. ::: commit-message-891fa:8 (Diff revision 2) > +I plan to use it for now to force a full document restyle when a standalone rule > +changes or something like that. > + > +In practice, we can do better sometimes, and we may just want to propagate to > +the StyleSet all the style change notifications in order to have access to the > +rule that changed an all that... *and
Attachment #8871002 - Flags: review+
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/1ee24478fa16 Move dirty style tracking to the StyleSet. r=heycam https://hg.mozilla.org/integration/autoland/rev/3e6c9a752596 Provide the kind of change that the stylesheet suffered to RecordStyleSheetChange. r=heycam
Attachment #8871275 - Flags: review?(emilio+bugs) → review+
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/44d70b4b15d7 Move dirty style tracking to the StyleSet. r=heycam https://hg.mozilla.org/integration/autoland/rev/266536456e3b Provide the kind of change that the stylesheet suffered to RecordStyleSheetChange. r=heycam https://hg.mozilla.org/integration/autoland/rev/ad068e7e7103 Avoid import hell in StyleSheet.h. r=emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: