Bug 127617

Summary: [CSS Shapes] inset() function with multiple spaces on element style
Product: WebKit Reporter: Dirk Schulze <krit>
Component: CSSAssignee: Zoltan Horvath <zoltan>
Status: RESOLVED FIXED    
Severity: Normal CC: betravis, bjonesbe, commit-queue, esprehn+autocc, glenn, gyuyoung.kim, macpherson, menard, rwlbuis, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 124173    
Attachments:
Description Flags
Patch
krit: review+, krit: commit-queue-
Patch for landing none

Description Dirk Schulze 2014-01-25 04:22:23 PST
Additional spaces after defining the inset parameters dependent how many parameters have been specified

inset(2px) gets to inset(2px   )  - three spaces
inset(2px 2px) gets to inset(2px 2px 2px  )  - two spaces
inset(2px 2px 2px) gets to inset(2px 2px 2px )  - one space

element style: element.style.webkitShapeInside = "inset(2px)"
Comment 1 Zoltan Horvath 2014-01-25 09:28:15 PST
Created attachment 222212 [details]
Patch
Comment 2 Dirk Schulze 2014-01-25 12:12:29 PST
Comment on attachment 222212 [details]
Patch

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

r=me with comments.

> Source/WebCore/css/CSSBasicShapes.cpp:428
> +    if (!right.isNull()) {
> +        result.appendLiteral(separator);
> +        result.append(right);
> +        if (!bottom.isNull()) {
> +            result.appendLiteral(separator);
> +            result.append(bottom);
> +            if (!left.isNull()) {
> +                result.appendLiteral(separator);
> +                result.append(left);
> +            }
> +        }
> +    }

I don't think that it needs to be nested... At this point we should be able to rely on sane data, shouldn't we? Of course we would have some extra checks though. I leaf it up to you.

> Source/WebCore/css/CSSBasicShapes.cpp:444
> +        result.append("/");

s/"/'/g
Comment 3 Zoltan Horvath 2014-01-27 10:22:31 PST
Created attachment 222334 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2014-01-27 11:10:52 PST
Comment on attachment 222334 [details]
Patch for landing

Clearing flags on attachment: 222334

Committed r162848: <http://trac.webkit.org/changeset/162848>
Comment 5 WebKit Commit Bot 2014-01-27 11:10:55 PST
All reviewed patches have been landed.  Closing bug.