RESOLVED FIXED 73272
CSS Grid Layout: Add support for parsing multiple grid-columns or grid-rows
https://bugs.webkit.org/show_bug.cgi?id=73272
Summary CSS Grid Layout: Add support for parsing multiple grid-columns or grid-rows
Julien Chaffraix
Reported 2011-11-28 17:37:11 PST
Currently we support only a subset of grid-columns and grid-rows. Let's extend it to better match the specification. My goal is to add support for the following syntax as part of this bug: <track-list> := [ <track-breadth> ]+ | 'none' <track-breadth> := <length> | <percentage> | 'auto'
Attachments
Proposed change 1: implement the new syntax. (27.42 KB, patch)
2011-11-28 18:47 PST, Julien Chaffraix
no flags
Patch for landing (28.14 KB, patch)
2011-12-05 20:12 PST, Julien Chaffraix
no flags
Patch for landing for tomorrow. (30.65 KB, patch)
2011-12-05 20:59 PST, Julien Chaffraix
webkit.review.bot: commit-queue-
Julien Chaffraix
Comment 1 2011-11-28 18:47:53 PST
Created attachment 116867 [details] Proposed change 1: implement the new syntax.
WebKit Review Bot
Comment 2 2011-11-28 18:51:33 PST
Attachment 116867 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1 Source/WebCore/css/CSSStyleSelector.cpp:2522: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tony Chang
Comment 3 2011-11-29 09:48:36 PST
Comment on attachment 116867 [details] Proposed change 1: implement the new syntax. View in context: https://bugs.webkit.org/attachment.cgi?id=116867&action=review > Source/WebCore/css/CSSStyleSelector.cpp:2520 > + if (type == CSSPrimitiveValue::CSS_PERCENTAGE) > + length = Length(primitiveValue->getDoubleValue(), Percent); > + return true; > + } Missing { here. I think that confused the style checker. > Source/WebCore/css/CSSStyleSelector.cpp:2544 > + // Handle the special property 'none'. Nit: You might want the comment to say how you 'none' is different.
Julien Chaffraix
Comment 4 2011-11-29 21:40:38 PST
Comment on attachment 116867 [details] Proposed change 1: implement the new syntax. View in context: https://bugs.webkit.org/attachment.cgi?id=116867&action=review >> Source/WebCore/css/CSSStyleSelector.cpp:2520 >> + } > > Missing { here. I think that confused the style checker. Good catch, I missed it and thought style checker was confused. >> Source/WebCore/css/CSSStyleSelector.cpp:2544 >> + // Handle the special property 'none'. > > Nit: You might want the comment to say how you 'none' is different. I am not sure I follow your nit here. Do you mind clarifying?
Tony Chang
Comment 5 2011-11-30 10:32:44 PST
Comment on attachment 116867 [details] Proposed change 1: implement the new syntax. View in context: https://bugs.webkit.org/attachment.cgi?id=116867&action=review >>> Source/WebCore/css/CSSStyleSelector.cpp:2544 >>> + // Handle the special property 'none'. >> >> Nit: You might want the comment to say how you 'none' is different. > > I am not sure I follow your nit here. Do you mind clarifying? Something like, "We use a single undefined length to specify a track-list of 'none'." Or maybe just remove the comment.
Julien Chaffraix
Comment 6 2011-11-30 13:45:47 PST
Comment on attachment 116867 [details] Proposed change 1: implement the new syntax. View in context: https://bugs.webkit.org/attachment.cgi?id=116867&action=review >>>> Source/WebCore/css/CSSStyleSelector.cpp:2544 >>>> + // Handle the special property 'none'. >>> >>> Nit: You might want the comment to say how you 'none' is different. >> >> I am not sure I follow your nit here. Do you mind clarifying? > > Something like, "We use a single undefined length to specify a track-list of 'none'." Or maybe just remove the comment. Fine enough, I will remove it in the patch to land. I have seen a couple of missing of return in the implementation. I don't understand why it was not caught by the cases but I need to investigate before landing this patch as it may mean that our current test coverage is not good enough.
Julien Chaffraix
Comment 7 2011-12-05 20:10:45 PST
> I have seen a couple of missing of return in the implementation. I don't understand why it was not caught by the cases but I need to investigate before landing this patch as it may mean that our current test coverage is not good enough. I found out the issue: some code was unneeded (basically I was trying to handle several values on a CSSPrimitiveValue which was never reached). I have extended the testing a bit and removed this dead code in the to-be-landed-soon patch.
Julien Chaffraix
Comment 8 2011-12-05 20:12:06 PST
Created attachment 117982 [details] Patch for landing
Julien Chaffraix
Comment 9 2011-12-05 20:13:17 PST
Comment on attachment 117982 [details] Patch for landing Something is fishy on this patch.
Julien Chaffraix
Comment 10 2011-12-05 20:57:40 PST
(In reply to comment #9) > (From update of attachment 117982 [details]) > Something is fishy on this patch. Actually it was fine, I just needed to double-check the logic. My comment #7 was half true: some code was unneeded and it is not because it would try to parse several values for a CSSPrimitiveValue but because the parser consider most of our input as a CSSValueList (even for 1 item).
Julien Chaffraix
Comment 11 2011-12-05 20:59:25 PST
Created attachment 117987 [details] Patch for landing for tomorrow.
WebKit Review Bot
Comment 12 2011-12-06 14:10:27 PST
Comment on attachment 117987 [details] Patch for landing for tomorrow. Rejecting attachment 117987 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: 112974 --non-interactive --force --accept theirs-conflict --ignore-externals returned non-zero exit status 1 in /mnt/git/webkit-commit-queue/Source/WebKit/chromium Error: 'depot_tools/gclient sync --force --reset --delete_unversioned_trees' failed 3 tries and returned 256 at Tools/Scripts/update-webkit-chromium line 109. Re-trying 'depot_tools/gclient sync --force --reset --delete_unversioned_trees' No such file or directory at /mnt/git/webkit-commit-queue/Tools/Scripts/webkitdirs.pm line 2078. Full output: http://queues.webkit.org/results/10736846
Julien Chaffraix
Comment 13 2011-12-06 15:11:23 PST
Note You need to log in before you can comment on or make changes to this bug.