Bug 127200

Summary: [CSS Shapes] Preserve box-shape order when serializing shape values
Product: WebKit Reporter: Bear Travis <betravis>
Component: CSSAssignee: Bear Travis <betravis>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, dstockwell, esprehn+autocc, glenn, gyuyoung.kim, kondapallykalyan, macpherson, menard, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 124173    
Attachments:
Description Flags
Initial Patch
none
Factoring code common to shapes and clipping
none
Swapping boolean for CSSPropertyID none

Description Bear Travis 2014-01-17 15:40:07 PST
The shape-outside value 'content-box circle()' should serialize as 'content-box circle()' rather than 'circle() content-box'.

This is only true for non-computed styles, as the computed style places the box after the shape.
Comment 1 Bear Travis 2014-01-17 16:05:20 PST
Created attachment 221505 [details]
Initial Patch
Comment 2 Bear Travis 2014-01-20 13:40:27 PST
Created attachment 221688 [details]
Factoring code common to shapes and clipping
Comment 3 Dirk Schulze 2014-01-21 01:54:07 PST
Comment on attachment 221688 [details]
Factoring code common to shapes and clipping

View in context: https://bugs.webkit.org/attachment.cgi?id=221688&action=review

Patch looks great! Just some smaller snippets.

> Source/WebCore/css/CSSParser.cpp:5862
> +PassRefPtr<CSSValue> CSSParser::parseBasicShapeAndOrBox(bool allowBoundingBox)

Could you make that a static function or inline function please? Could you replace the boolean with a CSSPropertyID and check the id instead? That makes understanding the code easier.

> Source/WebCore/css/CSSParser.h:182
> +    PassRefPtr<CSSValue> parseBasicShapeAndOrBox(bool allowBoundingBox);

See comment above
Comment 4 Bear Travis 2014-01-21 13:11:05 PST
Created attachment 221780 [details]
Swapping boolean for CSSPropertyID
Comment 5 Dirk Schulze 2014-01-21 13:38:18 PST
Comment on attachment 221780 [details]
Swapping boolean for CSSPropertyID

r=me
Comment 6 WebKit Commit Bot 2014-01-21 14:19:31 PST
Comment on attachment 221780 [details]
Swapping boolean for CSSPropertyID

Clearing flags on attachment: 221780

Committed r162475: <http://trac.webkit.org/changeset/162475>
Comment 7 WebKit Commit Bot 2014-01-21 14:19:34 PST
All reviewed patches have been landed.  Closing bug.