[CSS Parser] Fix region, column and page break parsing
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 18:35:56 +0000 (18:35 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 18:35:56 +0000 (18:35 +0000)
commit1728f6e65e02ba35a7e01767cfc3c5e84d566f9f
tree55c7bf314502bff562bbe9f8972fd9c0251de3c1
parent35795758c645adf5347e9e178358d8a4f9f35301
[CSS Parser] Fix region, column and page break parsing
https://bugs.webkit.org/show_bug.cgi?id=163743

Reviewed by Simon Fraser.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Add the missing values for break support.

* css/parser/CSSPropertyParser.cpp:
(WebCore::isLegacyBreakProperty):
(WebCore::CSSPropertyParser::parseValueStart):
Add a special case for handling legacy break properties. Blink treats them like
shorthands, but we can't do that without breaking the old parser, so for now
we add a special case.

(WebCore::mapFromPageBreakBetween):
(WebCore::mapFromColumnBreakBetween):
(WebCore::mapFromRegionBreakBetween):
Updated to have the AvoidXXX values (where XXX is Column/Page/Region).

(WebCore::CSSPropertyParser::parseShorthand):
Remove the consumeLegacyBreak from the shorthand function, since we can't treat
the legacy break properties as shorthands yet.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/css/parser/CSSPropertyParser.cpp