Closed Bug 1189922 Opened 9 years ago Closed 9 years ago

Add a pref to enable the CSSUnprefixingService globally

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: miketaylr, Assigned: miketaylr)

References

Details

Attachments

(1 file, 2 obsolete files)

To allow for testing on Nightly, and to get a better understanding of what might break with aliasing/unprefixing of certain webkit prefixes, let's add a pref that will enable the unprefixing service for all domains.

Once Bug 1177263 is fixed (however that actually happens), this can be removed.
Assignee: nobody → miket
See Also: → 1177263
Thanks, Mike.

BTW - the new logic in ShouldUseUnprefixingService() (in nsCSSParser.cpp) should probably be #ifdef NIGHTLY_BUILD, so that this pref only ever does stuff in Nightly / mozilla-central builds.
Agreed, will update my patch and upload in a bit. Thx.
This is a temporary preference to allow for testing-in-the-wild by a larger
audience, for nightly builds. When 1177263 is fixed this can be removed.
Comment on attachment 8641940 [details] [diff] [review]
. Add a preference to enable global whitelisting of the CSSUnprefixingService. r=dholbert

(first time using git-bz, let me try that again)
Attachment #8641940 - Attachment is obsolete: true
This is a temporary preference to allow for testing-in-the-wild by a larger
audience, for nightly builds. When 1177263 is fixed this can be removed.
Comment on attachment 8641944 [details] [diff] [review]
. Add a preference to enable global whitelisting of the CSSUnprefixingService. r=dholbert

Daniel, should we wrap everything else in NIGHTLY_BUILD ifdefs? Or is it OK to have pref that does nothing everywhere else?
Attachment #8641944 - Flags: review?(dholbert)
Comment on attachment 8641944 [details] [diff] [review]
. Add a preference to enable global whitelisting of the CSSUnprefixingService. r=dholbert

Review of attachment 8641944 [details] [diff] [review]:
-----------------------------------------------------------------

> Daniel, should we wrap everything else in NIGHTLY_BUILD ifdefs? Or is it OK
> to have pref that does nothing everywhere else?

Yeah... It's pretty cheap so not a huge deal, but we probably should wrap the sUnprefixingServiceGloballyWhitelisted decl & AddBoolVarCache call in #ifdef NIGHTLY_BUILD, since they're useless in release builds.

r=me with those #ifdefs, and with a few comment nits noted below -- tl;dr: we should avoid language saying that this pref "enables" anything, to avoid confusion about how this pref interacts with the other one (which is actually about "enabling").


Thanks for the patch!

::: layout/style/nsCSSParser.cpp
@@ +6667,5 @@
>      return false;
>    }
> +#ifdef NIGHTLY_BUILD
> +  if (sUnprefixingServiceGloballyWhitelisted) {
> +    // Unprefixing is globally enabled.

s/globally enabled/globally whitelisted, so no need to check mSheetPrincipal/

::: modules/libpref/init/all.js
@@ +2291,5 @@
>  
>  // Is the CSS Unprefixing Service enabled? (This service emulates support
>  // for certain vendor-prefixed properties & values, for sites on a "fixlist".)
>  pref("layout.css.unprefixing-service.enabled", true);
> +// Is the CSS Unprefixing Service enabled for all domains, all the time?

To avoid confusion about how this interacts with the other pref:

s/enabled/whitelisted/
s/all the time//

And also probably worth adding a parenthetical here saying "(Only honored in Nightly builds)" or something like that.
Attachment #8641944 - Flags: review?(dholbert) → review+
Agreed on the comment improvements. Will update and throw at try later tonight. Thanks for the review!
Put everything else behind #ifdef NIGHTLY_BUILD and fixed comments according to dholbert's feedback. Carrying forward r+.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=b0f66a49dd20
Attachment #8641944 - Attachment is obsolete: true
Attachment #8641979 - Flags: review+
Try look good. → checkin-needed
Keywords: checkin-needed
Comment on attachment 8641979 [details] [diff] [review]
1189922.-Add-a-preference-to-enable-global-white.patch

>+#ifdef NIGHTLY_BUILD
>+  if (sUnprefixingServiceGloballyWhitelisted) {
>+    // Unprefixing is globally globally whitelisted,

nit: "globally globally" wants to just be "globally"

Fixed locally & pushed:
 https://hg.mozilla.org/integration/mozilla-inbound/rev/523ffd5c4588
> "globally globally" wants to just be "globally"

Indeed it does. Thanks for catching that!
https://hg.mozilla.org/mozilla-central/rev/523ffd5c4588
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: