Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Issue 1998033003: [css-grid] Simplify grid track sizes parsing (Closed)

Created:
4 years, 7 months ago by Manuel Rego
Modified:
4 years, 7 months ago
CC:
chromium-reviews, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Simplify grid track sizes parsing Previously once we saw an auto-repeat function, we passed the "FixedSizeOnly" restriction to the rest of methods. That way we were sure that all the tracks after the auto-repeat had fixed sizes. But we needed to call allTracksAreFixedSized() to be sure that the tracks before the auto-repeat had fixed sizes too. Now we're introducing a new boolean allTracksAreFixedSized, to check in advance if the declaration contains any track not fixed. If that's the case and we found an auto-repeat method, we consider it invalid. With this approach we avoid the loop to verify that all the tracks (before and after the auto-repeat) are fixed. It also allows us to simplify the code and avoid passing the restriction to all the methods parsing the track size. No new tests, no change of behavior. Committed: https://crrev.com/004c4fbec738cd7f8445fc5b8a349aea89630298 Cr-Commit-Position: refs/heads/master@{#395187}

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : New version addressing review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -44 lines) Patch
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 2 6 chunks +32 lines, -44 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
Manuel Rego
4 years, 7 months ago (2016-05-20 15:43:20 UTC) #2
rwlbuis
Seems like this is more readable, nice. https://codereview.chromium.org/1998033003/diff/1/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1998033003/diff/1/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode3453 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:3453: allTracksAreFixedSized &= ...
4 years, 7 months ago (2016-05-20 16:59:21 UTC) #3
Manuel Rego
Thanks for the quick review, new version uploaded. https://codereview.chromium.org/1998033003/diff/1/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1998033003/diff/1/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode3453 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:3453: allTracksAreFixedSized ...
4 years, 7 months ago (2016-05-20 18:44:40 UTC) #4
rwlbuis
lgtm. PS: I left two grid TODOs in case you are interested: // TODO(rob.buis): This ...
4 years, 7 months ago (2016-05-20 20:06:36 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1998033003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1998033003/40001
4 years, 7 months ago (2016-05-20 20:21:22 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-20 22:26:57 UTC) #8
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/004c4fbec738cd7f8445fc5b8a349aea89630298 Cr-Commit-Position: refs/heads/master@{#395187}
4 years, 7 months ago (2016-05-20 22:30:02 UTC) #10
Manuel Rego
On 2016/05/20 20:06:36, rwlbuis wrote: > PS: I left two grid TODOs in case you ...
4 years, 7 months ago (2016-05-23 09:46:30 UTC) #11
Manuel Rego
4 years, 7 months ago (2016-05-24 10:19:47 UTC) #12
Message was sent while issue was closed.
On 2016/05/20 20:06:36, rwlbuis wrote:
> // TODO(rob.buis): This needs a bool parameter so we can disallow
> <auto-track-list> for the grid shorthand.

This will be addressed as part of bug #614314.

> // TODO(rob.buis): <line-names> should not be able to directly precede
> <auto-repeat>.

This won't be needed and it'll be removed in the following CL:
https://codereview.chromium.org/2003223003/

Powered by Google App Engine
This is Rietveld 408576698