Implement ConsumeShorthandVia2LonghandAPIs and API for shorthand property scroll-padding-block

Desktop / Chromium - Jia [chromium.org] - 12 July 2017 04:39 EDT

ConsumeShorthandVia2LonghandAPIs is a modified version of Consume2Values of CSSPropertyParser. The difference between the two is that the new
version expects component longhands to have API impl already as it will forward parsing logic to component longhands API via ParseLonghandViaAPI.

Consume2Values will be deprecated soon, when shorthand properties are ribbonised (i.e. have their own APIs). Until then, there is a slight code duplication between the two versions, see crrev.com/c/564875 for discussions why it is necessary.

In addition to ConsumeShorthandVia2LonghandAPIs, the cl also contains the following
- Implement API for shorthand property scroll-padding-block as a use case of ConsumeShorthandVia2LonghandAPIs.
- Change ConsumeShorthandVia4LonghandsAPI to ConsumeShorthandVia4LonghandAPIs.
- Also updated "margin" API to reflect the naming change.


Bug: 668012 Change-Id: I45d1f5177c5ff3f381a24085ecde0647c5e08baf Diff: https://gist.github.com/a54354ab973c928d2717251b56caeb57/revisions Reviewed-on: https://chromium-review.googlesource.com/565662

02e0a3d Implement ConsumeShorthandVia2LonghandAPIs and API for shorthand property scroll-padding-block.
third_party/WebKit/Source/core/BUILD.gn | 1 +
third_party/WebKit/Source/core/css/BUILD.gn | 1 +
.../WebKit/Source/core/css/CSSProperties.json5 | 2 ++
.../Source/core/css/parser/CSSPropertyParser.cpp | 2 --
.../core/css/parser/CSSPropertyParserHelpers.cpp | 33 +++++++++++++++++++++-
.../core/css/parser/CSSPropertyParserHelpers.h | 24 ++++++++++------
.../properties/CSSShorthandPropertyAPIMargin.cpp | 2 +-
.../CSSShorthandPropertyAPIScrollPaddingBlock.cpp | 21 ++++++++++++++
8 files changed, 74 insertions(+), 12 deletions(-)

Upstream: git.chromium.org


  • Share