WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
129404
[CSS Shapes] Serialize circle positions
https://bugs.webkit.org/show_bug.cgi?id=129404
Summary
[CSS Shapes] Serialize circle positions
Bear Travis
Reported
2014-02-26 16:02:53 PST
The circle basic shape should serialize its positions based on the spec.
http://dev.w3.org/csswg/css-shapes/#basic-shape-serialization
Attachments
Initial Patch
(15.85 KB, patch)
2014-02-26 16:42 PST
,
Bear Travis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2
(459.86 KB, application/zip)
2014-02-26 17:39 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
(497.93 KB, application/zip)
2014-02-26 18:14 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion
(494.45 KB, application/zip)
2014-02-26 19:07 PST
,
Build Bot
no flags
Details
Updated patch
(18.41 KB, patch)
2014-02-27 14:01 PST
,
Bear Travis
no flags
Details
Formatted Diff
Diff
Updating Patch
(18.49 KB, patch)
2014-02-28 13:12 PST
,
Bear Travis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Bear Travis
Comment 1
2014-02-26 16:42:14 PST
Created
attachment 225321
[details]
Initial Patch
Build Bot
Comment 2
2014-02-26 17:39:36 PST
Comment on
attachment 225321
[details]
Initial Patch
Attachment 225321
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/5820055455531008
New failing tests: svg/masking/mask-negative-scale.svg fast/masking/parsing-clip-path-shape.html
Build Bot
Comment 3
2014-02-26 17:39:38 PST
Created
attachment 225330
[details]
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 4
2014-02-26 18:14:33 PST
Comment on
attachment 225321
[details]
Initial Patch
Attachment 225321
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/5159757383991296
New failing tests: svg/masking/mask-negative-scale.svg fast/masking/parsing-clip-path-shape.html
Build Bot
Comment 5
2014-02-26 18:14:37 PST
Created
attachment 225334
[details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-07 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 6
2014-02-26 19:07:54 PST
Comment on
attachment 225321
[details]
Initial Patch
Attachment 225321
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/5822013960617984
New failing tests: fast/masking/parsing-clip-path-shape.html
Build Bot
Comment 7
2014-02-26 19:07:58 PST
Created
attachment 225337
[details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Rob Buis
Comment 8
2014-02-27 06:20:46 PST
Comment on
attachment 225321
[details]
Initial Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=225321&action=review
The code looks good to me. I think the tests is something astearns should look at.
> Source/WebCore/css/CSSBasicShapes.cpp:126 > + }
Would it be possible to combine this with the next if/else block? I am not sure if the side == CSSValueCenter needs to do the later if checks or not.
Bear Travis
Comment 9
2014-02-27 14:01:46 PST
Created
attachment 225407
[details]
Updated patch Fixing up clip-path test and adding some extra position test cases
Bear Travis
Comment 10
2014-02-28 13:12:47 PST
Created
attachment 225483
[details]
Updating Patch
Dirk Schulze
Comment 11
2014-03-03 03:30:53 PST
Comment on
attachment 225483
[details]
Updating Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=225483&action=review
Sorry for the delay. Have some comments to the test results that I would like to clarify before landing.
> LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt:76 > +PASS getCSSText("-webkit-shape-inside", "circle(closest-side)") is "circle(closest-side at 50% 50%)"
This is not correct IMO. From the spec "omitting components when possible without changing the meaning" There is even an example that is very similar to this one.
> LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt:98 > +PASS getCSSText("-webkit-shape-inside", "circle(10px at right 0px bottom 0px)") is "circle(10px at 100% 100%)"
That looks like the code is more intelligent than it should be. According to the spec this needs calc(right - 0px) and therefore must be written as right 0px.
> LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt:99 > +PASS getComputedStyleValue("-webkit-shape-inside", "circle(10px at right 0px bottom 0px)") is "circle(10px at 100% 100%)"
Ditto.
> LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt:92 > +PASS getCSSText("-webkit-shape-outside", "circle(10px at left top 10px)") is "circle(10px at 0% 10px)"
This seems more intelligent than it should be as well. I read the spec that this should be serialized to "circle(10px at left 0% top 10px)"
> LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt:94 > +PASS getCSSText("-webkit-shape-outside", "circle(10px at top 10px left 10px)") is "circle(10px at 10px 10px)"
Ditto.
> LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt:98 > +PASS getCSSText("-webkit-shape-outside", "circle(10px at right 0px bottom 0px)") is "circle(10px at 100% 100%)"
Ditto.
> LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt:99 > +PASS getComputedStyleValue("-webkit-shape-outside", "circle(10px at right 0px bottom 0px)") is "circle(10px at 100% 100%)"
Ditto.
Alan Stearns
Comment 12
2014-03-03 08:24:32 PST
(In reply to
comment #11
)
> (From update of
attachment 225483
[details]
) > > LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt:76 > > +PASS getCSSText("-webkit-shape-inside", "circle(closest-side)") is "circle(closest-side at 50% 50%)" > > This is not correct IMO. From the spec "omitting components when possible without changing the meaning" There is even an example that is very similar to this one.
The test is correct. <position> values always use the 2- or 4-value form, so you can't omit the default <position>
> > LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt:98 > > +PASS getCSSText("-webkit-shape-inside", "circle(10px at right 0px bottom 0px)") is "circle(10px at 100% 100%)" > > That looks like the code is more intelligent than it should be. According to the spec this needs calc(right - 0px) and therefore must be written as right 0px.
Since right 0px can be written using a left offset without calc, the test is correct that it should serialize as 100%. And the same applies to the rest of your comments. All of the tests you mention are correct.
Alan Stearns
Comment 13
2014-03-03 08:29:22 PST
(In reply to
comment #12
)
> (In reply to
comment #11
) > > (From update of
attachment 225483
[details]
[details]) > > > LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt:76 > > > +PASS getCSSText("-webkit-shape-inside", "circle(closest-side)") is "circle(closest-side at 50% 50%)" > > > > This is not correct IMO. From the spec "omitting components when possible without changing the meaning" There is even an example that is very similar to this one. > > The test is correct. <position> values always use the 2- or 4-value form, so you can't omit the default <position>
Whoops - I was only looking at <position>. You are correct that closest-side should be omitted.
Bear Travis
Comment 14
2014-03-03 09:12:22 PST
(In reply to
comment #13
)
> (In reply to
comment #12
) > > (In reply to
comment #11
) > > > (From update of
attachment 225483
[details]
[details] [details]) > > > > LayoutTests/fast/shapes/parsing/parsing-shape-inside-expected.txt:76 > > > > +PASS getCSSText("-webkit-shape-inside", "circle(closest-side)") is "circle(closest-side at 50% 50%)" > > > > > > This is not correct IMO. From the spec "omitting components when possible without changing the meaning" There is even an example that is very similar to this one. > > > > The test is correct. <position> values always use the 2- or 4-value form, so you can't omit the default <position> > > Whoops - I was only looking at <position>. You are correct that closest-side should be omitted.
Yep, the closest-side should be omitted, but that will fall under a subsequent patch. This patch only covers the <position> argument to the circle function.
Dirk Schulze
Comment 15
2014-03-03 11:28:57 PST
Comment on
attachment 225483
[details]
Updating Patch r=me then.
WebKit Commit Bot
Comment 16
2014-03-03 12:18:52 PST
Comment on
attachment 225483
[details]
Updating Patch Clearing flags on attachment: 225483 Committed
r164998
: <
http://trac.webkit.org/changeset/164998
>
WebKit Commit Bot
Comment 17
2014-03-03 12:18:56 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug