Last Comment Bug 745523 - [css3-transforms] Unprefix transforms
: [css3-transforms] Unprefix transforms
Status: RESOLVED FIXED
[qa+]
: dev-doc-complete
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: mozilla16
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
Depends on: 689498 726766 732153 770560 719054 735373 790915 802285 803126 807636 849203
Blocks: unprefix 772342 772462 772463 814214
  Show dependency treegraph
 
Reported: 2012-04-15 02:09 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2013-03-08 11:25 PST (History)
15 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+


Attachments
Part a: Remove prefixes from functions and enums (18.06 KB, patch)
2012-04-15 08:23 PDT, :Ms2ger (⌚ UTC+1/+2)
dbaron: review+
Ms2ger: checkin+
Details | Diff | Splinter Review
Part b: Unprefix (4.28 KB, patch)
2012-04-15 08:24 PDT, :Ms2ger (⌚ UTC+1/+2)
no flags Details | Diff | Splinter Review
Part b: Unprefix and update tests in layout/style (21.20 KB, patch)
2012-06-24 03:27 PDT, :Ms2ger (⌚ UTC+1/+2)
dbaron: review+
Ms2ger: checkin+
Details | Diff | Splinter Review
List of top domains that use -moz-transform, collected using Fennec UA (1.99 KB, text/plain)
2012-07-10 16:39 PDT, John Jensen
no flags Details

Description :Ms2ger (⌚ UTC+1/+2) 2012-04-15 02:09:30 PDT
Filing this bug to track what needs to be done before we unprefix CSS transforms.
Comment 1 :Ms2ger (⌚ UTC+1/+2) 2012-04-15 08:23:55 PDT
Created attachment 615160 [details] [diff] [review]
Part a: Remove prefixes from functions and enums

We appear to be inconsistent about using moz-prefixes internally. I think it would probably be good to get rid of them already. (Note that the enum is prefixed for transform / transform-origin, but not for backface-visibility / perspective / perspective-origin / transform-style.)
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-04-15 08:24:42 PDT
Created attachment 615161 [details] [diff] [review]
Part b: Unprefix

For later.
Comment 3 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2012-04-15 09:25:32 PDT
Comment on attachment 615160 [details] [diff] [review]
Part a: Remove prefixes from functions and enums

>   -. 'id' should be the same as 'name' except that all hyphens ('-')
>-  in 'name' are converted to underscores ('_') in 'id'. This lets us
>-  do nice things with the macros without having to copy/convert strings
>-  at runtime.  These are the names used for the enum values of the
>-  nsCSSProperty enumeration defined in nsCSSProps.h.
>+  in 'name' are converted to underscores ('_') in 'id', and any '-moz-'
>+  prefix is removed in 'id'. This lets us do nice things with the
>+  macros without having to copy/convert strings at runtime.  These are
>+  the names used for the enum values of the nsCSSProperty enumeration
>+  defined in nsCSSProps.h.

I think this should say that *for properties on a standards track*, any '-moz-' prefix is removed in 'id'.  I think we probably still want it for things that aren't standards-track at all, although those a relatively rare.

But otherwise agreed that we should be avoiding prefixes here.

(And we should probably also remove the use of prefixes through nsComputedDOMStyle as well... at least until we get around to bug 264517 which would make the issue moot.)
Comment 4 :Ms2ger (⌚ UTC+1/+2) 2012-05-05 10:26:08 PDT
Comment on attachment 615160 [details] [diff] [review]
Part a: Remove prefixes from functions and enums

https://hg.mozilla.org/mozilla-central/rev/5852f4fd12f8
Comment 5 Jason Smith [:jsmith] 2012-05-05 14:27:14 PDT
Transforms were heavily shown as evidence to being a problem in John Jensen's report with top sites. Nominating for kilimanjaro, as this affects many top sites.
Comment 6 Jet Villegas (:jet) 2012-06-04 12:14:35 PDT
Matt: Please review the 4 bugs I added as "blockers." We need to determine if we should fix those issues prior to unprefixing.
Comment 7 Tantek Çelik 2012-06-06 16:22:05 PDT
Note, the CSS Working Group has agreed to give the go-ahead to browser implementers to unprefix CSS3 Transitions, Transforms, and Animations:

http://lists.w3.org/Archives/Public/www-style/2012Jun/0105.html
Comment 8 :Ms2ger (⌚ UTC+1/+2) 2012-06-07 01:11:57 PDT
Do we want to keep supporting the -moz- versions for now? If not, we'll need a patch to fix the places where we use those.
Comment 9 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2012-06-14 16:01:25 PDT
(In reply to :Ms2ger from comment #8)
> Do we want to keep supporting the -moz- versions for now? If not, we'll need
> a patch to fix the places where we use those.

For now, yes, though we probably want to go through the tree sooner rather than later.

(Better to do the search-and-replace closer to adding support for unprefixed, and then another pass (to fix stuff that was in people's trees or copied) before landing the removal of the prefixed support.)
Comment 10 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2012-06-14 16:02:43 PDT
Comment on attachment 615161 [details] [diff] [review]
Part b: Unprefix

You're probably going to want to add aliases to nsCSSPropAliasList and nsIDOMCSS2Properties for the prefixed versions, for now.  (Probably not for too long, though.)
Comment 11 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2012-06-14 16:04:06 PDT
Comment on attachment 615161 [details] [diff] [review]
Part b: Unprefix

And I think you're at the very least going to need to update the tests in layout/style/ at the same time as this.
Comment 12 :Ms2ger (⌚ UTC+1/+2) 2012-06-24 03:27:08 PDT
Created attachment 636145 [details] [diff] [review]
Part b: Unprefix and update tests in layout/style

I don't really have time to fix up the whole tree at the moment; can I push that to a followup?
Comment 13 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2012-06-29 14:10:12 PDT
Comment on attachment 636145 [details] [diff] [review]
Part b: Unprefix and update tests in layout/style

Re-sort the tests in test_transitions_per_property.html and r=dbaron.

Sorry for the delay.
Comment 14 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2012-06-29 14:10:37 PDT
Comment on attachment 636145 [details] [diff] [review]
Part b: Unprefix and update tests in layout/style

And also:

>diff --git a/dom/interfaces/css/nsIDOMCSS2Properties.idl b/dom/interfaces/css/nsIDOMCSS2Properties.idl

need to rev IID
Comment 15 :Ms2ger (⌚ UTC+1/+2) 2012-07-02 02:13:05 PDT
Comment on attachment 636145 [details] [diff] [review]
Part b: Unprefix and update tests in layout/style

https://hg.mozilla.org/mozilla-central/rev/4004407a1f49
Comment 16 Jason Smith [:jsmith] 2012-07-02 08:31:54 PDT
John - Do you have a list of top sites that use -moz-transform? We could probably QA to do a quick pass to make sure nothing looks busted.

Jean-Yves - Can you get the MDN doc up to date for transforms?

David - If I understand correctly, unprefixing transforms is low risk for regressions, right? Is there anything special a web developer needs to do to migrate from using -moz-transform to the unprefixed version?
Comment 17 Jet Villegas (:jet) 2012-07-03 08:43:39 PDT
May need additional unprefixing in this Layout test:
layout/base/tests/test_bug731777.html
Comment 18 John Jensen 2012-07-10 16:39:48 PDT
Created attachment 640857 [details]
List of top domains that use -moz-transform, collected using Fennec UA

> John - Do you have a list of top sites that use -moz-transform? We could probably QA to do a quick pass to make sure nothing looks busted.

Sorry about the delay in seeing/replying to this; was on PTO. See attached.

Note You need to log in before you can comment on or make changes to this bug.