Implement ConsumeShorthandVia4LonghandsAPI in CSSPropertyParserHelpers

Desktop / Chromium - Jia [chromium.org] - 9 July 2017 22:41 EDT

The new function ConsumeShorthandVia4LonghandsAPI is a modified version of Consume4Values of CSSPropertyParser. They both parse shorthands consisting of 4 longhands (top, right, bottom, left). The difference between this new version and the old/existing Consume4Values 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.

This cl contains one change only, i.e. the impl of ConsumeShorthandVia4LonghandsAPI. This cl is also a use case of ParseLonghandViaAPI. The next cl will have a shorthand API impl that will use ConsumeShorthandVia4LonghandsAPI.

Bug: 668012 Change-Id: I9a638d9c654a1bb734b60dccadaf2c52ddd761f0 Reviewed-on: https://chromium-review.googlesource.com/560920 Commit-Queue: Jia Meng

51446e5 Implement ConsumeShorthandVia4LonghandsAPI in CSSPropertyParserHelpers.
.../core/css/parser/CSSPropertyParserHelpers.cpp | 52 ++++++++++++++++++++++
.../core/css/parser/CSSPropertyParserHelpers.h | 7 +++
2 files changed, 59 insertions(+)

Upstream: git.chromium.org


  • Share