Bug 127617 - [CSS Shapes] inset() function with multiple spaces on element style
Summary: [CSS Shapes] inset() function with multiple spaces on element style
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zoltan Horvath
URL:
Keywords:
Depends on:
Blocks: 124173
  Show dependency treegraph
 
Reported: 2014-01-25 04:22 PST by Dirk Schulze
Modified: 2014-02-07 09:41 PST (History)
10 users (show)

See Also:


Attachments
Patch (24.07 KB, patch)
2014-01-25 09:28 PST, Zoltan Horvath
krit: review+
krit: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (24.02 KB, patch)
2014-01-27 10:22 PST, 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 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.