Bug 81478

Summary: CSS3 calc: background positioning works with mixed percent/absolute expressions
Product: WebKit Reporter: Mike Lawther <mikelawther>
Component: New BugsAssignee: Mike Lawther <mikelawther>
Severity: Normal CC: macpherson, menard, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 16662    
Description Flags
Patch none

Description Mike Lawther 2012-03-18 18:06:53 PDT
CSS3 calc: background positioning works with mixed percent/absolute expressions
Comment 1 Mike Lawther 2012-03-18 18:07:36 PDT
Created attachment 132515 [details]
Comment 2 Mike Lawther 2012-03-18 18:09:12 PDT
Here is the test that is now passing: http://trac.webkit.org/browser/trunk/LayoutTests/css3/calc/background-position-parsing.html.

Just linking here since it doesn't show up in the review as the test itself hasn't changed.
Comment 3 Luke Macpherson 2012-03-18 22:48:17 PDT
Life will be easier if could find a way to add this to primitiveValue->convertToLength and then just use it everywhere - that way there won't be special cases all over the place.
Comment 4 Ojan Vafai 2012-03-19 10:26:03 PDT
Comment on attachment 132515 [details]

I agree with Luke, we should see if there are good helper functions for this. I guess it's a little tricky because sometimes you need to handle Auto lengths and sometimes you don't?
Comment 5 WebKit Review Bot 2012-03-19 10:34:36 PDT
Comment on attachment 132515 [details]

Clearing flags on attachment: 132515

Committed r111200: <http://trac.webkit.org/changeset/111200>
Comment 6 WebKit Review Bot 2012-03-19 10:34:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Mike Lawther 2012-03-19 14:57:20 PDT
Hmm, if I could roll it in there, I think that means I could remove the external distinction between isPercent and isCalculatedPercentageWithLength. All of the isLength() and isPercentage() cases would also end up getting factored out as well.