"-moz-transform-style: fixed" is parsed as preserve-3d

RESOLVED FIXED in mozilla10

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

({testcase})

Trunk
mozilla10
x86_64
Mac OS X
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(3 attachments)

(Reporter)

Description

6 years ago
Created attachment 556624 [details]
testcase

"-moz-transform-style: fixed" is parsed as "preserve-3d". I'm guessing this isn't intentional, based on looking at patch 14a in bug 505115.
Created attachment 557034 [details] [diff] [review]
Test for invalid value to -moz-transform-style

I can see the same behaviour here, but I'm not sure why.

I tried adding the above tests to catch this behaviour, and they pass.
(Reporter)

Comment 2

6 years ago
Maybe you need "eCSSKeyword_UNKNOWN,-1" at the end of kTransformStyleKTable. (The table above it also seems to be missing that. Not the sanest API.)

http://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSProps.cpp#590
Yes, that's needed.  Not sure what alternative API you'd suggest; you either need a terminator or a length.
(Reporter)

Comment 4

6 years ago
You could compute the length using NS_ARRAY_LENGTH instead of specifying it.
I suppose so, but then we'd need to pass that length around in a whole bunch of places, or add a structure wrapping the length and a pointer to the list (probably the better option).
Created attachment 563929 [details] [diff] [review]
Add eCSSKeyword_UNKNOWN

Thanks Jesse, good catch.
Attachment #563929 - Flags: review?(dbaron)
Comment on attachment 563929 [details] [diff] [review]
Add eCSSKeyword_UNKNOWN

r=dbaron
Attachment #563929 - Flags: review?(dbaron) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/91055546d0cb
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/91055546d0cb
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.