Bug 81478 - CSS3 calc: background positioning works with mixed percent/absolute expressions
Summary: CSS3 calc: background positioning works with mixed percent/absolute expressions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mike Lawther
URL:
Keywords:
Depends on:
Blocks: 16662
  Show dependency treegraph
 
Reported: 2012-03-18 18:06 PDT by Mike Lawther
Modified: 2012-03-19 14:57 PDT (History)
3 users (show)

See Also:


Attachments
Patch (20.79 KB, patch)
2012-03-18 18:07 PDT, Mike Lawther
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Patch
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]
Patch

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]
Patch

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.