According to the latest CSS Shapes specification [1], the width arguments of inset should follow the syntax of the margin shorthand, which let us set all four insets with one, two or four values. This patch updates the behavior and updates the affected tests. [1] http://dev.w3.org/csswg/css-shapes/#funcdef-inset
Created attachment 222469 [details] Patch
Comment on attachment 222469 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=222469&action=review > Source/WebCore/css/CSSParser.cpp:5409 > + if (widthArguments.size() == 1) { I think a switch would be more readable here. > Source/WebCore/css/CSSParser.cpp:5422 > + shape->setBottom(widthArguments[2]); You need to set Left here, and double check your tests, if this passed, you missed a test.
Comment on attachment 222469 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=222469&action=review > LayoutTests/fast/shapes/parsing/parsing-test-utils.js:19 > ["inset(10px 9px 8px)", "inset(10px 9px 8px)", "inset(10px 9px 8px 0px round 0px 0px 0px 0px / 0px 0px 0px 0px)"], Here's the wrong test!
Created attachment 222483 [details] Patch (In reply to comment #2) > (From update of attachment 222469 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=222469&action=review > > > Source/WebCore/css/CSSParser.cpp:5409 > > + if (widthArguments.size() == 1) { > > I think a switch would be more readable here. I modified to use switch. > > Source/WebCore/css/CSSParser.cpp:5422 > > + shape->setBottom(widthArguments[2]); > > You need to set Left here, and double check your tests, if this passed, you missed a test. That behavior was the expected in my mind. :( I added the corrected case and I modified the affected test.
Created attachment 222505 [details] Patch - linear parsing logic and less variable assignments
Created attachment 222526 [details] Patch - linear parsing logic and less variable assignments
Comment on attachment 222526 [details] Patch - linear parsing logic and less variable assignments r=me
Comment on attachment 222526 [details] Patch - linear parsing logic and less variable assignments Clearing flags on attachment: 222526 Committed r162989: <http://trac.webkit.org/changeset/162989>
All reviewed patches have been landed. Closing bug.