Closed Bug 721136 Opened 8 years ago Closed 8 years ago

transform property serialization doesn't normalize case

Categories

(Core :: DOM: CSS Object Model, defect, minor)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: ayg, Assigned: ayg)

Details

Attachments

(1 file, 1 obsolete file)

data:text/html,<!DOCTYPE html>
<script>
document.head.style.MozTransform = 'RotatE( 3rAd )scalex(2) translateX(10%)';
document.documentElement.textContent = 
document.head.style.MozTransform
</script>

Results (adjusted for prefixes):

IE9, Chrome 17 dev: rotate(3rad) scaleX(2) translateX(10%)
Firefox 12.0a1: RotatE(3rad) scalex(2) translateX(10%)
Opera Next 12.00 alpha: rotate(171.89deg) scaleX(2) translateX(10%)

Behavior here is not currently specified, and I filed a spec bug on it:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15710

I recommended the IE/Chrome behavior, since it makes the most sense.  Either the input should be returned as-is with no normalization, or everything should be normalized, including function names' case.  But all browsers but Opera agree units shouldn't be mangled.
We'd probably want to fix this in either CSSParserImpl::ParseFunction or CSSParserImpl::ParseSingleTransform.
Attached patch Patch v1 (obsolete) — Splinter Review
Dunno if this is the right way to do it, but it works for me.
Assignee: nobody → ayg
Attachment #596754 - Flags: review?(dbaron)
Whiteboard: [autoland]
Whiteboard: [autoland] → [autoland-in-queue]
Autoland Patchset:
	Patches: 596754
	Branch: mozilla-central => try
	Destination: http://hg.mozilla.org/try/pushloghtml?changeset=abb8726f04a7
Try run started, revision abb8726f04a7. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=abb8726f04a7
Comment on attachment 596754 [details] [diff] [review]
Patch v1

>+    default:
>+      ;

Make this "break;" instead of ";".

r=dbaron with that
Attachment #596754 - Flags: review?(dbaron) → review+
Attached patch Patch v2Splinter Review
Attachment #596754 - Attachment is obsolete: true
Attachment #596775 - Flags: review+
Try run for abb8726f04a7 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=abb8726f04a7
Results (out of 211 total builds):
    exception: 2
    success: 175
    warnings: 20
    failure: 14
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-abb8726f04a7
Whiteboard: [autoland-in-queue]
http://hg.mozilla.org/integration/mozilla-inbound/rev/7c1f492fc1b1
Flags: in-testsuite+
Keywords: checkin-needed
Target Milestone: --- → mozilla13
https://hg.mozilla.org/mozilla-central/rev/7c1f492fc1b1
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.