Bug 129842 - [CSS Shapes] polygon y-value calc() args serialize incorrectly
Summary: [CSS Shapes] polygon y-value calc() args serialize incorrectly
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zoltan Horvath
Depends on:
Blocks: 98664
  Show dependency treegraph
Reported: 2014-03-06 16:10 PST by Rebecca Hauck
Modified: 2014-04-04 16:26 PDT (History)
7 users (show)

See Also:

Test case for bug (1.15 KB, text/html)
2014-03-06 16:11 PST, Rebecca Hauck
no flags Details
Patch (4.87 KB, patch)
2014-04-04 15:44 PDT, Zoltan Horvath
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rebecca Hauck 2014-03-06 16:10:54 PST
The attached tests file tests a polygon that has a calc() y-value:  polygon(10px calc(10in))

The inline style is serialized as:
polygon(nonzero, calc(10in) 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022278417114)

The correct serialization should be:
polygon(10px calc(10in)

The computed style is serializes as:

polygon(nonzero, 960px )

The correct serialization should be:

polygon(10px 960px) 

For both of these cases, the default fill-rule should also be omitted - that's logged as a separate bug:  https://bugs.webkit.org/show_bug.cgi?id=129840.

Note: I tested this with polygons with multiple vertices and it reproduces wherever the calc() y-value is on the arg list.

Note: This uses testharness.js and the relative path in the test assumes the test is run from LayoutTests/fast/shapes/parsing
Comment 1 Rebecca Hauck 2014-03-06 16:11:17 PST
Created attachment 226058 [details]
Test case for bug
Comment 2 Zoltan Horvath 2014-04-04 15:44:58 PDT
Created attachment 228626 [details]
Comment 3 Bem Jones-Bey 2014-04-04 15:54:14 PDT
Comment on attachment 228626 [details]

Global state is evil. Good catch.

Comment 4 WebKit Commit Bot 2014-04-04 16:26:08 PDT
Comment on attachment 228626 [details]

Clearing flags on attachment: 228626

Committed r166813: <http://trac.webkit.org/changeset/166813>
Comment 5 WebKit Commit Bot 2014-04-04 16:26:12 PDT
All reviewed patches have been landed.  Closing bug.