Bug 129842

Summary: [CSS Shapes] polygon y-value calc() args serialize incorrectly
Product: WebKit Reporter: Rebecca Hauck <rhauck>
Component: CSSAssignee: Zoltan Horvath <zoltan>
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, gyuyoung.kim, macpherson, menard, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 98664    
Description Flags
Test case for bug
Patch none

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.