Closed
Bug 1367592
Opened 8 years ago
Closed 8 years ago
stylo: Ensure we restyle the whole document when the root font-size changes.
Categories
(Core :: CSS Parsing and Computation, enhancement)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: emilio, Assigned: heycam)
References
Details
Attachments
(1 file)
Similar to 1367589, a font-size change on the document element should cause a whole document restyle if it uses rem units.
I was thinking that some cascade optimizations may make us break this, but the fact that rem units may be used down the tree makes it unavoidable anyway.
I don't recall seeing code for doing this off-hand. Heycam, is it handled elsewhere in Gecko?
Assuming it's not, we'll need to fix this.
Reporter | ||
Comment 1•8 years ago
|
||
ni? heycam for the question above (sorry, I'd look into it myself, but I need to run right now)
Flags: needinfo?(cam)
Assignee | ||
Comment 2•8 years ago
|
||
In Gecko we handle root font-size changes here:
http://searchfox.org/mozilla-central/rev/35b37316149108d53a02fb8498e250ea8a22ab5d/layout/base/GeckoRestyleManager.cpp#123-143
So we check if we're restyling the root element, and if so, convert the current restyle process into a "rebuild all style data" one. Effectively that will just add eRestyle_ForceDescendants to the restyle hint for the root, which will cause us to recascade the entire tree. I'm just starting to look into handling the cascading stuff in bug 1367647.
Depends on: 1367647
Flags: needinfo?(cam)
Assignee | ||
Comment 3•8 years ago
|
||
Servo has code here to update the root font size on the Device when we restyle the root element:
http://searchfox.org/mozilla-central/rev/31eec6f59eb303adf3318058cb30bd6a883115a5/servo/components/style/properties/properties.mako.rs#2737-2740
but we still need something that adds the RECASCADE_DESCENDANTS flags to the restyle hint for children, when we detect the change.
Reporter | ||
Comment 4•8 years ago
|
||
We could use the CascadeInfo stuff for that, I guess.
Assignee | ||
Comment 5•8 years ago
|
||
Comment hidden (mozreview-request) |
Reporter | ||
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8874078 [details]
Bug 1367592 - Test.
https://reviewboard.mozilla.org/r/145544/#review149482
Attachment #8874078 -
Flags: review?(emilio+bugs) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8874078 -
Flags: review?(cam) → review+
Assignee | ||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a570baba7458
Test. r=emilio
![]() |
||
Comment 11•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → cam
You need to log in
before you can comment on or make changes to this bug.
Description
•