Closed
Bug 1290013
Opened 8 years ago
Closed 8 years ago
add a pref to disable/enable stylo
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: heycam, Assigned: heycam)
References
Details
Attachments
(1 file, 3 obsolete files)
1.84 KB,
patch
|
bholley
:
review+
shinglyu
:
feedback+
|
Details | Diff | Splinter Review |
In order to use reftests to verify stylo against stock Gecko rendering, we need a way to turn stylo on or off for a given document. We can add a method to control whether a docshell will load its next document with stylo enabled.
Assignee | ||
Comment 1•8 years ago
|
||
Is this patch enough to get reftest stylo mode switching working?
Attachment #8775518 -
Flags: feedback?(slyu)
Assignee | ||
Comment 2•8 years ago
|
||
Rebased.
Attachment #8775518 -
Attachment is obsolete: true
Attachment #8775518 -
Flags: feedback?(slyu)
Attachment #8777257 -
Flags: feedback?(slyu)
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8777257 -
Attachment is obsolete: true
Attachment #8777257 -
Flags: feedback?(slyu)
Attachment #8777714 -
Flags: review?(bobbyholley)
Comment 4•8 years ago
|
||
Dumb question - why can't we just make it pref-controlled, and toggle the pref back and forth between loads on the reftest? It seems like that would be a lot simpler than munging the docshell, and give us automatic UI as well.
Assignee | ||
Comment 5•8 years ago
|
||
That would work too. And I guess, since we will eventually want this to have a pref when we ship in Nightly, may as well do that now.
Assignee | ||
Comment 6•8 years ago
|
||
I don't think there should be any problems, but Shing can you test this patch with some reftest runner changes that set the pref?
Attachment #8777714 -
Attachment is obsolete: true
Attachment #8777714 -
Flags: review?(bobbyholley)
Attachment #8778027 -
Flags: feedback?(slyu)
Comment 7•8 years ago
|
||
Comment on attachment 8778027 [details] [diff] [review] patch v2 Review of attachment 8778027 [details] [diff] [review]: ----------------------------------------------------------------- r=me with those fixes. ::: dom/base/nsDocument.cpp @@ +13413,5 @@ > // we avoid Servo-backed style sets for SVG documents. > if (!mDocumentContainer) { > NS_WARNING("stylo: No docshell yet, assuming Gecko style system"); > + } else if (nsLayoutUtils::SupportsServoStyleBackend(this) && > + Preferences::GetBool("layout.stylo.enabled")) { Can you use a BoolVarCache instead? No sense in doing hash table lookups when we don't need to. ::: modules/libpref/init/all.js @@ +5489,5 @@ > #endif > + > +#ifdef MOZ_STYLO > +// Is the Servo-backed style system enabled? > +pref("layout.stylo.enabled", true); Nit: Can we call this layout.css.servo.enabled instead? This pref is likely to persist for a few releases when we ship, and I'd rather keep the rather-opaque 'stylo' moniker from propagating too far.
Attachment #8778027 -
Flags: review+
Comment 8•8 years ago
|
||
Oh also - can you move the pref check to nsPresContext::StyloEnabled instead? It seems more appropriate there.
Assignee | ||
Comment 9•8 years ago
|
||
I moved it to nsLayoutUtils, where we've got a bunch of other on-Initialize pref caches set up.
Comment 10•8 years ago
|
||
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ba23c008090d Add a pref to disable stylo. r=bholley
Assignee | ||
Updated•8 years ago
|
Summary: add a way to disable and enable stylo in a docshell → add a pref to disable/enable stylo
Comment 11•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ba23c008090d
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Comment 12•8 years ago
|
||
Comment on attachment 8778027 [details] [diff] [review] patch v2 Cleaning up
Attachment #8778027 -
Flags: feedback?(slyu) → feedback+
You need to log in
before you can comment on or make changes to this bug.
Description
•