Last Comment Bug 682919 - "-moz-transform-style: fixed" is parsed as preserve-3d
: "-moz-transform-style: fixed" is parsed as preserve-3d
Status: RESOLVED FIXED
[inbound]
: testcase
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: x86_64 Mac OS X
: -- normal (vote)
: mozilla10
Assigned To: Nobody; OK to take it and work on it
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks: 505115
  Show dependency treegraph
 
Reported: 2011-08-29 11:40 PDT by Jesse Ruderman
Modified: 2011-10-03 08:04 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (142 bytes, text/html)
2011-08-29 11:40 PDT, Jesse Ruderman
no flags Details
Test for invalid value to -moz-transform-style (959 bytes, patch)
2011-08-30 16:48 PDT, Matt Woodrow (:mattwoodrow)
no flags Details | Diff | Splinter Review
Add eCSSKeyword_UNKNOWN (1.29 KB, patch)
2011-09-30 21:12 PDT, Matt Woodrow (:mattwoodrow)
dbaron: review+
Details | Diff | Splinter Review

Description Jesse Ruderman 2011-08-29 11:40:18 PDT
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.
Comment 1 Matt Woodrow (:mattwoodrow) 2011-08-30 16:48:10 PDT
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.
Comment 2 Jesse Ruderman 2011-09-30 16:36:32 PDT
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
Comment 3 David Baron :dbaron: ⌚️UTC-10 2011-09-30 19:52:05 PDT
Yes, that's needed.  Not sure what alternative API you'd suggest; you either need a terminator or a length.
Comment 4 Jesse Ruderman 2011-09-30 20:12:35 PDT
You could compute the length using NS_ARRAY_LENGTH instead of specifying it.
Comment 5 David Baron :dbaron: ⌚️UTC-10 2011-09-30 20:50:18 PDT
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).
Comment 6 Matt Woodrow (:mattwoodrow) 2011-09-30 21:12:31 PDT
Created attachment 563929 [details] [diff] [review]
Add eCSSKeyword_UNKNOWN

Thanks Jesse, good catch.
Comment 7 David Baron :dbaron: ⌚️UTC-10 2011-09-30 21:22:15 PDT
Comment on attachment 563929 [details] [diff] [review]
Add eCSSKeyword_UNKNOWN

r=dbaron
Comment 8 Matt Woodrow (:mattwoodrow) 2011-10-02 21:04:50 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/91055546d0cb
Comment 9 Marco Bonardo [::mak] 2011-10-03 08:04:14 PDT
https://hg.mozilla.org/mozilla-central/rev/91055546d0cb

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