As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 455265 - Default Y parameter for -moz-transform:translate differs from Apple's proposal
: Default Y parameter for -moz-transform:translate differs from Apple's proposal
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla1.9.1b1
Assigned To: Keith Schwarz [:kschwarz]
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks: 435293
  Show dependency treegraph
 
Reported: 2008-09-14 18:25 PDT by Robert O'Callahan (:roc) (email my personal email if necessary)
Modified: 2008-09-20 09:58 PDT (History)
5 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Potential Patch #1 [Checkin: Comment 9] (10.55 KB, patch)
2008-09-15 12:08 PDT, Keith Schwarz [:kschwarz]
dbaron: review+
dbaron: superreview+
Details | Diff | Splinter Review

Description User image Robert O'Callahan (:roc) (email my personal email if necessary) 2008-09-14 18:25:11 PDT
Apple's spec says that the default Y parameter for 'translate(N)' is 0. We use N.
http://webkit.org/specs/CSSVisualEffects/CSSTransforms.html#transform-functions

Personally, I don't see the point of allowing the second parameter to be optional, since 'translateX' exists. Same goes for 'skew'.
Comment 1 User image Dean Jackson 2008-09-15 03:37:26 PDT
This was for compatibility with the SVG translate function.
Comment 2 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2008-09-15 04:33:18 PDT
I see. SVG doesn't have translateX, so their default makes a little more sense there.

I guess we should make it 0 then. It's definitely not worth quibbling about.
Comment 3 User image Keith Schwarz [:kschwarz] 2008-09-15 09:50:46 PDT
Looks like I missed that detail in the spec.  I'll try to get a patch posted ASAP.
Comment 4 User image Keith Schwarz [:kschwarz] 2008-09-15 12:08:50 PDT
Created attachment 338699 [details] [diff] [review]
Potential Patch #1
[Checkin: Comment 9]

Fixes the problem and updates reftests that relied on the old behavior of translate.  Rather than setting dY to be equal to dX if not specified, it just ignores the dY component, which defaults to zero.
Comment 5 User image David Baron :dbaron: ⌚️UTC-8 2008-09-15 13:06:46 PDT
Comment on attachment 338699 [details] [diff] [review]
Potential Patch #1
[Checkin: Comment 9]

r+sr=dbaron

(Though in the comment right before ProcessTranslate, you might call it a "function" rather than a "functiont". :-)
Comment 6 User image Keith Schwarz [:kschwarz] 2008-09-15 16:21:38 PDT
Just FYI - it looks like Webkit does _not_ have the second parameter default to zero when omitted, even though that's what it says to do in the spec.  Any suggestions about what behavior we should have?
Comment 7 User image Dean Jackson 2008-09-15 18:28:11 PDT
WebKit nightlies do the right thing (default to 0).

My memory isn't great, but I think this was a bug I fixed since Safari 3.1.
Comment 8 User image David Baron :dbaron: ⌚️UTC-8 2008-09-15 20:07:52 PDT
I think you need to make the same change for skew() as well, according to the spec.  (The WebKit I have doesn't seem to support skew(), though.)
Comment 9 User image Serge Gautherie (:sgautherie) 2008-09-20 09:53:11 PDT
Comment on attachment 338699 [details] [diff] [review]
Potential Patch #1
[Checkin: Comment 9]

http://hg.mozilla.org/mozilla-central/rev/6ca8a5838659

with comment 5 nit.
Comment 10 User image Serge Gautherie (:sgautherie) 2008-09-20 09:57:02 PDT
(In reply to comment #9)
> with comment 5 nit.

Missed to include that part: done in
http://hg.mozilla.org/mozilla-central/rev/48a37ccd42a8

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