Default Y parameter for -moz-transform:translate differs from Apple's proposal

RESOLVED FIXED in mozilla1.9.1b1

Status

()

Core
Layout
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: roc, Assigned: kschwarz)

Tracking

Trunk
mozilla1.9.1b1
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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

9 years ago
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.
Flags: wanted1.9.1?
(Assignee)

Comment 3

9 years ago
Looks like I missed that detail in the spec.  I'll try to get a patch posted ASAP.
Assignee: nobody → keith
(Assignee)

Comment 4

9 years ago
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.
Attachment #338699 - Flags: superreview?(dbaron)
Attachment #338699 - Flags: review?(dbaron)
Attachment #338699 - Flags: superreview?(dbaron)
Attachment #338699 - Flags: superreview+
Attachment #338699 - Flags: review?(dbaron)
Attachment #338699 - Flags: review+
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". :-)
(Assignee)

Comment 6

9 years ago
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

9 years ago
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.)
Blocks: 435293
Keywords: checkin-needed
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
Last Resolved: 9 years ago
Flags: wanted1.9.1? → in-testsuite+
Keywords: checkin-needed
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.