Closed Bug 1324341 Opened 8 years ago Closed 8 years ago

stylo: redo the cascade when CSSOM methods modify style sheets

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: heycam, Unassigned)

References

Details

Attachments

(3 files)

Currently, if we modify a style sheet with a CSSOM method like insertRule, we won't correctly restyle the document. We need to tell the Stylist that its style sheets' contents have changed. This causes layout/style/crashtests/645951-1.html (which is really a reftest) to fail.
Attachment #8819738 - Flags: review?(xidorn+moz)
Comment on attachment 8819740 [details] Bug 1324341 - Part 2: Redo the cascade when CSSOM methods modify style sheets. https://reviewboard.mozilla.org/r/99390/#review99702
Attachment #8819740 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8819738 [details] Add FFI function to make the Stylist realize we have modified style sheets. https://reviewboard.mozilla.org/r/99386/#review99704
Attachment #8819738 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8819739 [details] Bug 1324341 - Part 1: Convert eRestyle_Subtree into (eRestyle_Self | eRestyle_SomeDescendants), so Servo will actually restyle descendants. https://reviewboard.mozilla.org/r/99388/#review99706 I admit I'm not very sure about this, but I guess it is fine for now. ::: layout/base/ServoRestyleManager.cpp:69 (Diff revision 1) > + // RESTYLE_SELF | RESTYLE_DESCENDANTS, since this is a commonly > + // posted restyle hint that doesn't yet align with RestyleHint's > + // bits. > + if (aRestyleHint & eRestyle_Subtree) { > + aRestyleHint &= ~eRestyle_Subtree; > + aRestyleHint |= (eRestyle_Self | eRestyle_SomeDescendants); The parens are not necessary here.
Attachment #8819739 - Flags: review?(xidorn+moz) → review+
Comment on attachment 8819739 [details] Bug 1324341 - Part 1: Convert eRestyle_Subtree into (eRestyle_Self | eRestyle_SomeDescendants), so Servo will actually restyle descendants. https://reviewboard.mozilla.org/r/99388/#review99706 Yeah, we need to expand our support for restyle hints on the Servo side so that eventually we don't need to do much of this kind of thing.
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/bfc182766682 Part 1: Convert eRestyle_Subtree into (eRestyle_Self | eRestyle_SomeDescendants), so Servo will actually restyle descendants. r=xidorn https://hg.mozilla.org/integration/mozilla-inbound/rev/1eee3d9d3ac1 Part 2: Redo the cascade when CSSOM methods modify style sheets. r=xidorn
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: