[CSS Parser] Fix font family parsing and add CSS region property parsing
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 17:25:01 +0000 (17:25 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 17:25:01 +0000 (17:25 +0000)
commit132fc6852c7245e10bd5c2eebc761f7f4f883900
tree56d7f8e9dc97048bb50e37c49c1c4cf0261e1508
parentbfe2ba7ac7e8ab44f32a2ef0381eca5e1ea712c4
[CSS Parser] Fix font family parsing and add CSS region property parsing
https://bugs.webkit.org/show_bug.cgi?id=163741

Reviewed by Zalan Bujtas.

* css/parser/CSSParser.cpp:
(WebCore::isKeywordPropertyID):
(WebCore::parseKeywordValue):
(WebCore::CSSParser::parseValue):
Modify the old CSSParser to have its own keyword check, since keywords were
incorrectly added to the new parser when this check was consolidated. Column
and region breaks are considered keyword properties by the old parser, but
not by the new parser, since the new parser special cases them and maps them
into the generic break property.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
Update for regions to make sure all the region properties are there. Remove the
column and region break properties, since they're not supposed to be here in the
new parser.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFamilyName):
Fix font parsing to make font family values so that fonts work.

(WebCore::consumeFlowProperty):
Add a function for handling -webkit-flow-from and -webkit-flow-into.

(WebCore::CSSPropertyParser::parseSingleValue):
Add support for the region properties.

(WebCore::mapFromRegionBreakBetween):
(WebCore::mapFromColumnRegionOrPageBreakInside):
(WebCore::mapFromLegacyBreakProperty):
(WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
(WebCore::mapFromColumnOrPageBreakInside): Deleted.
Update to handle the region break properties in the same way that column break
properties are handled.

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