Closed
Bug 1186636
Opened 9 years ago
Closed 9 years ago
Add pref to control legacy -moz-prefixed gradients
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: miketaylr, Assigned: emk)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
3.17 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
This should be enabled by default, but will allow people to test sites with legacy prefixed gradients disabled. dholbert suggests "layout.css.moz-gradient.enabled" in https://bugzilla.mozilla.org/show_bug.cgi?id=1176496#c18.
Updated•9 years ago
|
Keywords: dev-doc-needed
Comment 1•9 years ago
|
||
emk, would you like to take this? (miketaylr also volunteered in IRC, so no pressure if you're busy with other things.) I think all we need here is a new static bool, a targeted check for it, and a default value in all.js, as discussed in bug 1176496 comment 18. > dholbert suggests "layout.css.moz-gradient.enabled" I'm not married to this name, FWIW, in part because "moz-gradient" isn't actually a thing; it's just an abbreviation for moz-[radial|linear]-gradient. If we come up with something better/clearer, that's fine too. The name probably doesn't matter too much, because it's mostly intended for our own testing. (I initially considered "legacy-gradient" or "prefixed-gradient", but those are likely more confusing since we will soon globally support legacy/prefixed "-webkit-*-gradient" variants, and that support won't be related to this pref.)
Flags: needinfo?(VYV03354)
Assignee | ||
Comment 2•9 years ago
|
||
IMO it's better to add separate prefs for -moz-linear-gradient and -moz-radial-gradient such as "layout.css.moz-linear-gradient.enabled" and "layout.css.moz-radial-gradient.enabled". Because -moz-radial-gradient usage would be much less than -moz-linear-gradient usage. All bug 1176496 blocker depended on -moz-linear-gradient.
Flags: needinfo?(VYV03354)
Assignee | ||
Comment 3•9 years ago
|
||
Ah, I forgot to response the question. Taking.
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Comment 4•9 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #2) > IMO it's better to add separate prefs [....] > Because -moz-radial-gradient usage would be much less than -moz-linear-gradient usage. Hmm... I'm mixed on this idea. So the motiviation here is to allow us to unsupport -moz-radial-gradient sooner, while keeping -moz-linear-gradient around for longer, since more of the web depends on it? (I think you're right about -moz-radial-gradient being less frequent -- but I'd bet that's just because radial gradients are less common *in general* than linear gradients. It doesn't necessarily mean the websites *that do* use radial gradients are any more likely to use them in a standards-compatible way.) > All bug 1176496 blocker depended on -moz-linear-gradient. This is an interesting observation -- but I expect it's just because radial gradients are less common, and because bug 1176496 only lived on trunk for a few days. If we'd kept it on Nighlty for longer, I expect we would have found some sites that rely on -moz-radial-gradient & were broken, too.
Comment 5•9 years ago
|
||
(Anyway, since the pref/prefs are just for our own nightly testing at this point anyway, I shouldn't bikeshed the number-of-prefs decision too much. :) So, I'm OK with proceeding down the two-pref path at this point.)
Reporter | ||
Comment 6•9 years ago
|
||
From a developer point of view, it would be nice to only have to flip one pref to test my site for old-gradient bustage (if we think devs will actually do this).
Assignee | ||
Comment 7•9 years ago
|
||
OK, I'm adding only one pref for now. I employed "layout.css.prefixes.gradients" for consistency with existing pref names. If this name is confusing, we should rename all similar prefs at once.
Attachment #8637878 -
Flags: review?(dholbert)
Comment 8•9 years ago
|
||
Comment on attachment 8637878 [details] [diff] [review] Add a pref to configure -moz prefixed gradients support Looks great, thanks! (I hadn't realized that we had an existing convention on naming for -moz prefix prefs -- thanks for noticing/knowing that & staying consistent with it.)
Attachment #8637878 -
Flags: review?(dholbert) → review-
Comment 9•9 years ago
|
||
Comment on attachment 8637878 [details] [diff] [review] Add a pref to configure -moz prefixed gradients support er, r+.
Attachment #8637878 -
Flags: review- → review+
Comment 10•9 years ago
|
||
Why not to enable the pref by default on the aurora and nightly channels?
Comment 11•9 years ago
|
||
I meant: *disable* (layout.css.prefixes.gradients = false)
Comment 12•9 years ago
|
||
That's a separate decision than simply making it pref-controllable. It'll also require a more substantial patch, because it'll require us to drop prefixed gradients [or tweaking the pref] in all our automated testcases, or else we'll have test failures on nightly (and eventually aurora) TreeHerder. So, probably better to perform that change in its own bug. (Probably worth doing, though.)
Comment 13•9 years ago
|
||
(Also: as long as we support this pref for release users, we do need to keep *some* testcases that ensure that they actually work. So we don't want to remove prefixes from *all* our tests, like we did in bug 1176496.)
Comment 14•9 years ago
|
||
Okay, thanks. I forgot about automated tests.
Assignee | ||
Comment 15•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0183ffe2be3a
https://hg.mozilla.org/mozilla-central/rev/b6e25b86bbe5
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Comment 18•9 years ago
|
||
I've added a tiny note in the compat data tables about the existence of this pref: https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient#Browser_compatibility https://developer.mozilla.org/en-US/docs/Web/CSS/radial-gradient#Browser_compatibility https://developer.mozilla.org/en-US/docs/Web/CSS/repeating-linear-gradient#Browser_Compatibility https://developer.mozilla.org/en-US/docs/Web/CSS/repeating-radial-gradient#Browser_compatibility and https://developer.mozilla.org/en-US/Firefox/Releases/42#CSS
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•