Chromium Code Reviews
DescriptionAdded 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 #
Dependent Patchsets: Messages
Total messages: 37 (19 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||