Closed Bug 455265 Opened 12 years ago Closed 12 years ago
Default Y parameter for -moz-transform:translate differs from Apple's proposal
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'.
This was for compatibility with the SVG translate function.
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.
Looks like I missed that detail in the spec. I'll try to get a patch posted ASAP.
Assignee: nobody → keith
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 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". :-)
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?
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.
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 on attachment 338699 [details] [diff] [review] Potential Patch #1 [Checkin: Comment 9] http://hg.mozilla.org/mozilla-central/rev/6ca8a5838659 with comment 5 nit.
Attachment #338699 - Attachment description: Potential Patch #1 → Potential Patch #1 [Checkin: Comment 8]
(In reply to comment #9) > with comment 5 nit. Missed to include that part: done in http://hg.mozilla.org/mozilla-central/rev/48a37ccd42a8
Attachment #338699 - Attachment description: Potential Patch #1 [Checkin: Comment 8] → Potential Patch #1 [Checkin: Comment 9]
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: wanted1.9.1? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.