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

Issue 2653733005: Added parseShorthand method from the parser to CSSPropertyAPI.h. (Closed)

Created:
3 years, 11 months ago by aazzam
Modified:
3 years, 10 months ago
Reviewers:
meade_UTC10, nainar, sashab
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added parseShorthand method from the parser to CSSPropertyAPI.h. A part of Project Ribbon, separating the parsing logic for CSS properties from the parser into an API. This patch adds a new method to CSSPropertyAPI.h, parseShorthand, and provides a default NOTREACHED() implementation for this method. When a property implements parseShorthand in it's API implementation in CSSPropertyAPI(.*).cpp, a function pointer to the parse function from the API for this property is stored in a CSSPropertyDescriptor, and is called from CSSPropertyParser. If parseShorthand is not yet implemented for a property, the existing switch statement handles this property. This patch: - Modifies CSSPropertyDescriptor.cpp.tmpl so that the parseShorthand method is added to the generated descriptors. - Adds parseShorthand to CSSPropertyAPI.h. - Adds a function pointer for parseShorthand to the struct in CSSPropertyDescriptor.h. Also removes temporaryCanReadValue from this struct. - Modifies parseShorthand in CSSPropertyDescriptor.h so that the API is called if an implementation exists. BUG=668012 Review-Url: https://codereview.chromium.org/2653733005 Cr-Commit-Position: refs/heads/master@{#448174} Committed: https://chromium.googlesource.com/chromium/src/+/23da976a5a8354e876e523c942aa0350f404bd74

Patch Set 1 #

Patch Set 2 : Removed temporaryCanReadValue #

Patch Set 3 : Updated out of date comments in CSSPropertyAPI.h #

Patch Set 4 : Moved implementation check into macro in CSSPropertyDescriptor.h #

Total comments: 4

Patch Set 5 : rebase #

Patch Set 6 : rebase #

Patch Set 7 : Added parseShorthand to valid_methods #

Patch Set 8 : rebase #

Total comments: 10

Patch Set 9 : rebase #

Total comments: 3

Patch Set 10 : Neatened up code #

Patch Set 11 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -6 lines) Patch
M third_party/WebKit/Source/build/scripts/make_css_property_apis.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPIFiles.h.tmpl View 1 2 3 4 5 6 7 8 10 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.json5 View 1 2 3 4 5 6 7 8 9 10 3 chunks +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 37 (19 generated)
aazzam
hey eddy! ptal :) especially would like feedback on the FUNCTION_IMPLEMENTED_FOR_PROPERTY macro (it's name, paramaters, ...
3 years, 11 months ago (2017-01-24 05:45:43 UTC) #3
meade_UTC10
lgtm The CL description and macro names seem fine to me, the only thing I ...
3 years, 11 months ago (2017-01-25 04:28:18 UTC) #8
aazzam
eddy ptal at comment reply :) https://codereview.chromium.org/2653733005/diff/60001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl (right): https://codereview.chromium.org/2653733005/diff/60001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl#newcode24 third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl:24: { {{api_class.classname}}::parseSingleValue, {{api_class.classname}}::parseShorthand ...
3 years, 11 months ago (2017-01-25 04:35:19 UTC) #9
meade_UTC10
https://codereview.chromium.org/2653733005/diff/60001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl (right): https://codereview.chromium.org/2653733005/diff/60001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl#newcode24 third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl:24: { {{api_class.classname}}::parseSingleValue, {{api_class.classname}}::parseShorthand }, On 2017/01/25 04:35:19, aazzam wrote: ...
3 years, 11 months ago (2017-01-25 05:26:27 UTC) #10
aazzam
On 2017/01/25 at 05:26:27, meade wrote: > https://codereview.chromium.org/2653733005/diff/60001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl > File third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl (right): > > https://codereview.chromium.org/2653733005/diff/60001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl#newcode24 ...
3 years, 11 months ago (2017-01-25 06:11:10 UTC) #11
aazzam
PTAL sasha! :)
3 years, 11 months ago (2017-01-26 22:36:29 UTC) #13
sashab
This looks great, and I'm happy to go ahead with this approach if you'd like ...
3 years, 10 months ago (2017-01-27 22:06:00 UTC) #18
aazzam
please take a look naina! :)
3 years, 10 months ago (2017-01-31 03:10:34 UTC) #20
nainar
lgtm
3 years, 10 months ago (2017-01-31 03:24:11 UTC) #21
aazzam
ptal sasha! :)
3 years, 10 months ago (2017-01-31 03:46:39 UTC) #22
sashab
Hmm, some design choices here to think about :) Overall looking on the right track ...
3 years, 10 months ago (2017-01-31 22:58:14 UTC) #23
aazzam
ptal sasha :) changed a bit now that there's a rebase with https://codereview.chromium.org/2670433002 https://codereview.chromium.org/2653733005/diff/140001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py File ...
3 years, 10 months ago (2017-02-01 00:30:05 UTC) #24
sashab
Storing nullptr makes this so much nicer!! We should store this patch as an example ...
3 years, 10 months ago (2017-02-01 18:21:46 UTC) #25
sashab
Actually once you fix those LGTM :)
3 years, 10 months ago (2017-02-01 18:22:02 UTC) #26
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/2653733005/180001
3 years, 10 months ago (2017-02-05 02:11:38 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/147486) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-02-05 02:13:12 UTC) #31
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/2653733005/200001
3 years, 10 months ago (2017-02-05 02:49:55 UTC) #34
commit-bot: I haz the power
3 years, 10 months ago (2017-02-05 04:33:25 UTC) #37
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/23da976a5a8354e876e523c942aa...

Powered by Google App Engine
This is Rietveld 408576698