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

Issue 2938983002: Implement parseShorthand API for shorthand properties, "overflow", "font" and "font-variant" (Closed)

Created:
3 years, 6 months ago by Jia
Modified:
3 years, 6 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement parseShorthand API for shorthand properties, "overflow", "font" and "font-variant" This cl contains the following changes * API impl of the three shorthand properties (CSSShorthandPropertyAPIOverflow, CSSShorthandPropertyAPIFont, CSSShorthandPropertyAPIFontVariant). * Moved ConsumeFontVariantCSS21 from CSSPropertyParser.cpp to CSSPropertyFontUtils. - this function is being used by CSSShorthandPropertyAPIFont and also another function from CSSPropertyParser.cpp. * Changed CSSPropertyParser.cpp to use the new API parseShorthand for the three properties above. Additional changes are: - moved two helper functions (ConsumeSystemFont and ConsumeFont) to be private functions of CSSShorthandPropertyAPIFont. - removed ConsumeFontVariantShorthand that's no longer needed. * Added the properties API to BUILD file and CSSProperties.json5. * Changed AddProperty signature so that "implicit" is now an enum. - We previously passed on bool literals to this function. This change makes the function follow the style guide. Diff: https://gist.github.com/810c7e46324ff8db8efb6f34ddfdad42/revisions Review-Url: https://codereview.chromium.org/2938983002 Cr-Commit-Position: refs/heads/master@{#481037} Committed: https://chromium.googlesource.com/chromium/src/+/d061cbb5a9efad51a47fed2becf04e688ac51dea

Patch Set 1 #

Patch Set 2 : Rebase cl #

Total comments: 16

Patch Set 3 : Rebase cl. #

Patch Set 4 : Change AddProperty's "implicit" to an enum. #

Total comments: 4

Patch Set 5 : Rebase cl #

Patch Set 6 : Change implicit from enum to enum class. Also rebase cl. #

Patch Set 7 : Remove tmp file. #

Total comments: 2

Patch Set 8 : Replace ImplicitProperty by IsImplicitProperty #

Unified diffs Side-by-side diffs Delta from patch set Stats (+409 lines, -271 lines) Patch
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/BUILD.gn View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.json5 View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 4 5 6 7 7 chunks +8 lines, -251 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyFontUtils.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyFontUtils.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIBorderRadius.cpp View 1 2 3 4 5 6 7 1 chunk +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFlex.cpp View 1 2 3 4 5 6 7 1 chunk +7 lines, -5 lines 0 comments Download
A third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp View 1 2 3 4 5 6 7 1 chunk +216 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFontVariant.cpp View 1 2 3 4 5 6 7 1 chunk +86 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIOverflow.cpp View 1 2 3 4 5 6 7 1 chunk +51 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIWebkitMarginCollapse.cpp View 1 2 3 4 5 6 7 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 50 (32 generated)
Jia
3 years, 6 months ago (2017-06-15 06:54:34 UTC) #3
commit-bot: I haz the power
This CL has an open dependency (Issue 2930703005 Patch 40001). Please resolve the dependency and ...
3 years, 6 months ago (2017-06-15 06:54:55 UTC) #6
Bugs Nash
https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp File third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp (right): https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp#newcode42 third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp:42: important, false /* implicit */, properties); avoid passing literal ...
3 years, 6 months ago (2017-06-16 03:19:01 UTC) #11
Bugs Nash
https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/CSSProperties.json5 File third_party/WebKit/Source/core/css/CSSProperties.json5 (right): https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/CSSProperties.json5#newcode3291 third_party/WebKit/Source/core/css/CSSProperties.json5:3291: api_class: true, 'api_class' and 'api_methods' should go after 'name' ...
3 years, 6 months ago (2017-06-16 03:51:51 UTC) #12
Jia
Thanks Bugs. PTAL. https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/CSSProperties.json5 File third_party/WebKit/Source/core/css/CSSProperties.json5 (right): https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/CSSProperties.json5#newcode3291 third_party/WebKit/Source/core/css/CSSProperties.json5:3291: api_class: true, On 2017/06/16 03:51:50, Bugs ...
3 years, 6 months ago (2017-06-19 03:54:41 UTC) #13
Bugs Nash
https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp File third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp (right): https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp#newcode42 third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp:42: important, false /* implicit */, properties); On 2017/06/19 at ...
3 years, 6 months ago (2017-06-19 04:29:18 UTC) #14
Jia
On 2017/06/19 04:29:18, Bugs Nash wrote: > https://codereview.chromium.org/2938983002/diff/20001/third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp > File > third_party/WebKit/Source/core/css/properties/CSSShorthandPropertyAPIFont.cpp > (right): > ...
3 years, 6 months ago (2017-06-19 04:41:09 UTC) #15
Bugs Nash
On 2017/06/19 at 04:41:09, jiameng wrote: > On 2017/06/19 04:29:18, Bugs Nash wrote: > > ...
3 years, 6 months ago (2017-06-19 05:05:23 UTC) #16
Jia
Thanks for the review. I've replaced bool "implicit" by an enum. I've also updated the ...
3 years, 6 months ago (2017-06-19 07:00:58 UTC) #18
Bugs Nash
lgtm with nit https://codereview.chromium.org/2938983002/diff/60001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/2938983002/diff/60001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode71 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:71: bool implicit) { just for documentation ...
3 years, 6 months ago (2017-06-19 23:30:12 UTC) #27
Jia
Thanks for the review! PTAL. https://codereview.chromium.org/2938983002/diff/60001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/2938983002/diff/60001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode71 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:71: bool implicit) { On ...
3 years, 6 months ago (2017-06-20 01:05:51 UTC) #33
Bugs Nash
lgtm
3 years, 6 months ago (2017-06-20 01:18:41 UTC) #35
Jia
3 years, 6 months ago (2017-06-20 01:26:48 UTC) #37
alancutter (OOO until 2018)
https://codereview.chromium.org/2938983002/diff/120001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h (right): https://codereview.chromium.org/2938983002/diff/120001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h#newcode114 third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h:114: enum class ImplicitProperty { kNotImplicit, kImplicit }; Minor bikeshed: ...
3 years, 6 months ago (2017-06-20 01:50:45 UTC) #38
Jia
Thanks Alan. PTAL. https://codereview.chromium.org/2938983002/diff/120001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h File third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h (right): https://codereview.chromium.org/2938983002/diff/120001/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h#newcode114 third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h:114: enum class ImplicitProperty { kNotImplicit, kImplicit ...
3 years, 6 months ago (2017-06-20 03:29:45 UTC) #39
alancutter (OOO until 2018)
lgtm
3 years, 6 months ago (2017-06-20 23:58:38 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2938983002/140001
3 years, 6 months ago (2017-06-20 23:59:45 UTC) #47
commit-bot: I haz the power
3 years, 6 months ago (2017-06-21 00:07:35 UTC) #50
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/d061cbb5a9efad51a47fed2becf0...

Powered by Google App Engine
This is Rietveld 408576698