<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[205926] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/205926">205926</a></dd>
<dt>Author</dt> <dd>dbates@webkit.org</dd>
<dt>Date</dt> <dd>2016-09-14 13:46:28 -0700 (Wed, 14 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Switch CSSParser to use CSSParserFastPaths::isKeywordPropertyID()
https://bugs.webkit.org/show_bug.cgi?id=161983

Reviewed by David Hyatt.

Towards switching to the new CSS parser keyword properties validation logic,
switch over the old CSS parser logic for determining a keyword property to
use the analogous logic in the new CSS parser.

A side benefit of this change is that it is a step towards unifying CSS- and
SVG CSS- keyword properties. The new CSS parser does not make a distinction
between these kinds of properties and will allow us to have a shared code path
for validating a keyword property.

No functionality was changed. So, no new tests.

* css/parser/CSSParser.cpp: Include header CSSParserFastPaths.h.
(WebCore::isValidKeywordPropertyAndValue): Validate SVG CSS keyword properties. This
logic was moved from CSSParser::parseSVGValue(). In subsequent patches we will switch
the old CSS parser from this function to CSSParserFastPaths::isValidKeywordPropertyAndValue().
(WebCore::parseKeywordValue): Modified to call CSSParserFastPaths::isKeywordPropertyID().
(WebCore::CSSParser::parseValue): Ditto.
(WebCore::isKeywordPropertyID): Deleted. Incorporated its functionality into
CSSParserFastPaths::isKeywordPropertyID().
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isKeywordPropertyID): Incorporates the functionality
of WebCore::isKeywordPropertyID().
* css/parser/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue): Move properties that can be processed as
keyword properties from here to WebCore::isValidKeywordPropertyAndValue().</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParsercpp">trunk/Source/WebCore/css/parser/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserFastPathscpp">trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserSVGCSSParsercpp">trunk/Source/WebCore/css/parser/SVGCSSParser.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (205925 => 205926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-14 20:41:31 UTC (rev 205925)
+++ trunk/Source/WebCore/ChangeLog        2016-09-14 20:46:28 UTC (rev 205926)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-09-14  Daniel Bates  &lt;dabates@apple.com&gt;
+
+        Switch CSSParser to use CSSParserFastPaths::isKeywordPropertyID()
+        https://bugs.webkit.org/show_bug.cgi?id=161983
+
+        Reviewed by David Hyatt.
+
+        Towards switching to the new CSS parser keyword properties validation logic,
+        switch over the old CSS parser logic for determining a keyword property to
+        use the analogous logic in the new CSS parser.
+
+        A side benefit of this change is that it is a step towards unifying CSS- and
+        SVG CSS- keyword properties. The new CSS parser does not make a distinction
+        between these kinds of properties and will allow us to have a shared code path
+        for validating a keyword property.
+
+        No functionality was changed. So, no new tests.
+
+        * css/parser/CSSParser.cpp: Include header CSSParserFastPaths.h.
+        (WebCore::isValidKeywordPropertyAndValue): Validate SVG CSS keyword properties. This
+        logic was moved from CSSParser::parseSVGValue(). In subsequent patches we will switch
+        the old CSS parser from this function to CSSParserFastPaths::isValidKeywordPropertyAndValue().
+        (WebCore::parseKeywordValue): Modified to call CSSParserFastPaths::isKeywordPropertyID().
+        (WebCore::CSSParser::parseValue): Ditto.
+        (WebCore::isKeywordPropertyID): Deleted. Incorporated its functionality into
+        CSSParserFastPaths::isKeywordPropertyID().
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isKeywordPropertyID): Incorporates the functionality
+        of WebCore::isKeywordPropertyID().
+        * css/parser/SVGCSSParser.cpp:
+        (WebCore::CSSParser::parseSVGValue): Move properties that can be processed as
+        keyword properties from here to WebCore::isValidKeywordPropertyAndValue().
+
</ins><span class="cx"> 2016-09-13  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rename parseColorParameters and clean up conditional
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (205925 => 205926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-09-14 20:41:31 UTC (rev 205925)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-09-14 20:46:28 UTC (rev 205926)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> #include &quot;CSSMediaRule.h&quot;
</span><span class="cx"> #include &quot;CSSNamedImageValue.h&quot;
</span><span class="cx"> #include &quot;CSSPageRule.h&quot;
</span><ins>+#include &quot;CSSParserFastPaths.h&quot;
</ins><span class="cx"> #include &quot;CSSPrimitiveValue.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValueMappings.h&quot;
</span><span class="cx"> #include &quot;CSSPropertySourceData.h&quot;
</span><span class="lines">@@ -1075,6 +1076,69 @@
</span><span class="cx">         if (valueID == CSSValueAuto || valueID == CSSValueAvoid || valueID == CSSValueAvoidColumn || valueID == CSSValueAvoidPage || valueID == CSSValueAvoidRegion)
</span><span class="cx">             return true;
</span><span class="cx">         break;
</span><ins>+    // SVG CSS properties
+    case CSSPropertyAlignmentBaseline:
+        // auto | baseline | before-edge | text-before-edge | middle |
+        // central | after-edge | text-after-edge | ideographic | alphabetic |
+        // hanging | mathematical | inherit
+        if (valueID == CSSValueAuto || valueID == CSSValueBaseline || valueID == CSSValueMiddle || (valueID &gt;= CSSValueBeforeEdge &amp;&amp; valueID &lt;= CSSValueMathematical))
+            return true;
+        break;
+    case CSSPropertyBufferedRendering:
+        if (valueID == CSSValueAuto || valueID == CSSValueDynamic || valueID == CSSValueStatic)
+            return true;
+        break;
+    case CSSPropertyClipRule:
+    case CSSPropertyFillRule:
+        if (valueID == CSSValueNonzero || valueID == CSSValueEvenodd)
+            return true;
+        break;
+    case CSSPropertyColorInterpolation:
+    case CSSPropertyColorInterpolationFilters:
+        if (valueID == CSSValueAuto || valueID == CSSValueSrgb || valueID == CSSValueLinearrgb)
+            return true;
+        break;
+    case CSSPropertyColorRendering:
+        if (valueID == CSSValueAuto || valueID == CSSValueOptimizespeed || valueID == CSSValueOptimizequality)
+            return true;
+        break;
+    case CSSPropertyDominantBaseline:
+        // auto | use-script | no-change | reset-size | ideographic |
+        // alphabetic | hanging | mathematical | central | middle |
+        // text-after-edge | text-before-edge | inherit
+        if (valueID == CSSValueAuto || valueID == CSSValueMiddle
+            || (valueID &gt;= CSSValueUseScript &amp;&amp; valueID &lt;= CSSValueResetSize)
+            || (valueID &gt;= CSSValueCentral &amp;&amp; valueID &lt;= CSSValueMathematical))
+            return true;
+        break;
+    case CSSPropertyMaskType:
+        if (valueID == CSSValueLuminance || valueID == CSSValueAlpha)
+            return true;
+        break;
+    case CSSPropertyShapeRendering:
+        if (valueID == CSSValueAuto || valueID == CSSValueOptimizespeed || valueID == CSSValueCrispedges || valueID == CSSValueGeometricprecision)
+            return true;
+        break;
+    case CSSPropertyStrokeLinecap:
+        if (valueID == CSSValueButt || valueID == CSSValueRound || valueID == CSSValueSquare)
+            return true;
+        break;
+    case CSSPropertyStrokeLinejoin:
+        if (valueID == CSSValueMiter || valueID == CSSValueRound || valueID == CSSValueBevel)
+            return true;
+        break;
+    case CSSPropertyTextAnchor:
+        if (valueID == CSSValueStart || valueID == CSSValueMiddle || valueID == CSSValueEnd)
+            return true;
+        break;
+    case CSSPropertyVectorEffect:
+        if (valueID == CSSValueNone || valueID == CSSValueNonScalingStroke)
+            return true;
+        break;
+    case CSSPropertyWritingMode:
+        if (valueID == CSSValueLrTb || valueID == CSSValueRlTb || valueID == CSSValueTbRl || valueID == CSSValueLr || valueID == CSSValueRl || valueID == CSSValueTb)
+            return true;
+        break;
</ins><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return false;
</span><span class="lines">@@ -1085,160 +1149,6 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline bool isKeywordPropertyID(CSSPropertyID propertyId)
-{
-    switch (propertyId) {
-    case CSSPropertyBorderBottomStyle:
-    case CSSPropertyBorderCollapse:
-    case CSSPropertyBorderLeftStyle:
-    case CSSPropertyBorderRightStyle:
-    case CSSPropertyBorderTopStyle:
-    case CSSPropertyBoxSizing:
-    case CSSPropertyBreakAfter:
-    case CSSPropertyBreakBefore:
-    case CSSPropertyBreakInside:
-    case CSSPropertyCaptionSide:
-    case CSSPropertyClear:
-    case CSSPropertyColumnFill:
-    case CSSPropertyColumnProgression:
-    case CSSPropertyColumnRuleStyle:
-    case CSSPropertyDirection:
-    case CSSPropertyDisplay:
-    case CSSPropertyEmptyCells:
-    case CSSPropertyFlexDirection:
-    case CSSPropertyFlexWrap:
-    case CSSPropertyFloat:
-    case CSSPropertyFontStretch:
-    case CSSPropertyFontStyle:
-    case CSSPropertyFontVariantAlternates:
-    case CSSPropertyFontVariantCaps:
-    case CSSPropertyFontVariantPosition:
-    case CSSPropertyImageRendering:
-    case CSSPropertyListStylePosition:
-    case CSSPropertyListStyleType:
-    case CSSPropertyObjectFit:
-    case CSSPropertyOutlineStyle:
-    case CSSPropertyOverflowWrap:
-    case CSSPropertyOverflowX:
-    case CSSPropertyOverflowY:
-    case CSSPropertyPageBreakAfter:
-    case CSSPropertyPageBreakBefore:
-    case CSSPropertyPageBreakInside:
-    case CSSPropertyPointerEvents:
-    case CSSPropertyPosition:
-    case CSSPropertyResize:
-    case CSSPropertySpeak:
-    case CSSPropertyTableLayout:
-    case CSSPropertyTextAlign:
-    case CSSPropertyTextLineThroughMode:
-    case CSSPropertyTextLineThroughStyle:
-    case CSSPropertyTextOverflow:
-    case CSSPropertyTextOverlineMode:
-    case CSSPropertyTextOverlineStyle:
-    case CSSPropertyTextRendering:
-    case CSSPropertyTextTransform:
-    case CSSPropertyTextUnderlineMode:
-    case CSSPropertyTextUnderlineStyle:
-    case CSSPropertyTransformStyle:
-    case CSSPropertyUnicodeBidi:
-    case CSSPropertyVisibility:
-    case CSSPropertyWebkitAppearance:
-    case CSSPropertyWebkitBackfaceVisibility:
-    case CSSPropertyWebkitBorderAfterStyle:
-    case CSSPropertyWebkitBorderBeforeStyle:
-    case CSSPropertyWebkitBorderEndStyle:
-    case CSSPropertyWebkitBorderFit:
-    case CSSPropertyWebkitBorderStartStyle:
-    case CSSPropertyWebkitBoxAlign:
-    case CSSPropertyWebkitBoxDirection:
-    case CSSPropertyWebkitBoxLines:
-    case CSSPropertyWebkitBoxOrient:
-    case CSSPropertyWebkitBoxPack:
-    case CSSPropertyWebkitColumnAxis:
-    case CSSPropertyWebkitColumnBreakAfter:
-    case CSSPropertyWebkitColumnBreakBefore:
-    case CSSPropertyWebkitColumnBreakInside:
-    case CSSPropertyWebkitFontKerning:
-    case CSSPropertyWebkitFontSmoothing:
-    case CSSPropertyWebkitHyphens:
-    case CSSPropertyWebkitLineAlign:
-    case CSSPropertyWebkitLineBreak:
-    case CSSPropertyWebkitLineSnap:
-    case CSSPropertyWebkitMarginAfterCollapse:
-    case CSSPropertyWebkitMarginBeforeCollapse:
-    case CSSPropertyWebkitMarginBottomCollapse:
-    case CSSPropertyWebkitMarginTopCollapse:
-    case CSSPropertyWebkitMarqueeDirection:
-    case CSSPropertyWebkitMarqueeStyle:
-    case CSSPropertyWebkitNbspMode:
-    case CSSPropertyWebkitPrintColorAdjust:
-    case CSSPropertyWebkitRtlOrdering:
-    case CSSPropertyWebkitRubyPosition:
-    case CSSPropertyWebkitTextCombine:
-    case CSSPropertyWebkitTextDecorationStyle:
-    case CSSPropertyWebkitTextOrientation:
-    case CSSPropertyWebkitTextSecurity:
-    case CSSPropertyWebkitTextZoom:
-    case CSSPropertyWebkitTransformStyle:
-    case CSSPropertyWebkitUserDrag:
-    case CSSPropertyWebkitUserModify:
-    case CSSPropertyWebkitUserSelect:
-    case CSSPropertyWebkitWritingMode:
-    case CSSPropertyWhiteSpace:
-    case CSSPropertyWordBreak:
-    case CSSPropertyWordWrap:
-#if ENABLE(CSS_TRAILING_WORD)
-    case CSSPropertyAppleTrailingWord:
-#endif
-#if ENABLE(CSS_COMPOSITING)
-    case CSSPropertyIsolation:
-    case CSSPropertyMixBlendMode:
-#endif
-#if ENABLE(TOUCH_EVENTS)
-    case CSSPropertyTouchAction:
-#endif
-#if ENABLE(CSS_BOX_DECORATION_BREAK)
-    case CSSPropertyWebkitBoxDecorationBreak:
-#endif
-#if ENABLE(CURSOR_VISIBILITY)
-    case CSSPropertyWebkitCursorVisibility:
-#endif
-#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
-    case CSSPropertyWebkitOverflowScrolling:
-#endif
-#if ENABLE(CSS_REGIONS)
-    case CSSPropertyWebkitRegionBreakAfter:
-    case CSSPropertyWebkitRegionBreakBefore:
-    case CSSPropertyWebkitRegionBreakInside:
-    case CSSPropertyWebkitRegionFragment:
-#endif
-#if ENABLE(CSS3_TEXT)
-    case CSSPropertyWebkitTextAlignLast:
-    case CSSPropertyWebkitTextJustify:
-#endif
-#if PLATFORM(IOS)
-    // Apple specific property. These will never be standardized and is purely to
-    // support custom WebKit-based Apple applications.
-    case CSSPropertyWebkitTouchCallout:
-#endif
-#if ENABLE(CSS_SCROLL_SNAP)
-    case CSSPropertyWebkitScrollSnapType:
-#endif
-        return true;
-    case CSSPropertyJustifyContent:
-    case CSSPropertyAlignContent:
-    case CSSPropertyAlignItems:
-    case CSSPropertyAlignSelf:
-#if ENABLE(CSS_GRID_LAYOUT)
-        return !RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
-#else
-        return true;
-#endif
-    default:
-        return false;
-    }
-}
-
</del><span class="cx"> static bool isUniversalKeyword(const String&amp; string)
</span><span class="cx"> {
</span><span class="cx">     // These keywords can be used for all properties.
</span><span class="lines">@@ -1252,7 +1162,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!string.isEmpty());
</span><span class="cx"> 
</span><del>-    if (!isKeywordPropertyID(propertyId)) {
</del><ins>+    if (!CSSParserFastPaths::isKeywordPropertyID(propertyId)) {
</ins><span class="cx">         if (!isUniversalKeyword(string))
</span><span class="cx">             return CSSParser::ParseResult::Error;
</span><span class="cx"> 
</span><span class="lines">@@ -1964,7 +1874,7 @@
</span><span class="cx">     if (propId == CSSPropertyAll)
</span><span class="cx">         return false; // &quot;all&quot; doesn't allow you to specify anything other than inherit/initial/unset.
</span><span class="cx"> 
</span><del>-    if (isKeywordPropertyID(propId)) {
</del><ins>+    if (CSSParserFastPaths::isKeywordPropertyID(propId)) {
</ins><span class="cx">         if (!isValidKeywordPropertyAndValue(propId, id, m_context, m_styleSheet))
</span><span class="cx">             return false;
</span><span class="cx">         if (m_valueList-&gt;next() &amp;&amp; !inShorthand())
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserFastPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (205925 => 205926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp        2016-09-14 20:41:31 UTC (rev 205925)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp        2016-09-14 20:46:28 UTC (rev 205926)
</span><span class="lines">@@ -742,16 +742,11 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> }
</span><ins>+*/
</ins><span class="cx"> 
</span><span class="cx"> bool CSSParserFastPaths::isKeywordPropertyID(CSSPropertyID propertyId)
</span><span class="cx"> {
</span><span class="cx">     switch (propertyId) {
</span><del>-    case CSSPropertyAlignmentBaseline:
-    case CSSPropertyAll:
-    case CSSPropertyMixBlendMode:
-    case CSSPropertyIsolation:
-    case CSSPropertyBackgroundRepeatX:
-    case CSSPropertyBackgroundRepeatY:
</del><span class="cx">     case CSSPropertyBorderBottomStyle:
</span><span class="cx">     case CSSPropertyBorderCollapse:
</span><span class="cx">     case CSSPropertyBorderLeftStyle:
</span><span class="lines">@@ -758,108 +753,192 @@
</span><span class="cx">     case CSSPropertyBorderRightStyle:
</span><span class="cx">     case CSSPropertyBorderTopStyle:
</span><span class="cx">     case CSSPropertyBoxSizing:
</span><del>-    case CSSPropertyBufferedRendering:
</del><ins>+    case CSSPropertyBreakAfter:
+    case CSSPropertyBreakBefore:
+    case CSSPropertyBreakInside:
</ins><span class="cx">     case CSSPropertyCaptionSide:
</span><span class="cx">     case CSSPropertyClear:
</span><del>-    case CSSPropertyClipRule:
-    case CSSPropertyColorInterpolation:
-    case CSSPropertyColorInterpolationFilters:
-    case CSSPropertyColorRendering:
</del><ins>+    case CSSPropertyColumnFill:
+    case CSSPropertyColumnProgression:
+    case CSSPropertyColumnRuleStyle:
</ins><span class="cx">     case CSSPropertyDirection:
</span><span class="cx">     case CSSPropertyDisplay:
</span><del>-    case CSSPropertyDominantBaseline:
</del><span class="cx">     case CSSPropertyEmptyCells:
</span><del>-    case CSSPropertyFillRule:
</del><ins>+    case CSSPropertyFlexDirection:
+    case CSSPropertyFlexWrap:
</ins><span class="cx">     case CSSPropertyFloat:
</span><ins>+    case CSSPropertyFontStretch:
</ins><span class="cx">     case CSSPropertyFontStyle:
</span><del>-    case CSSPropertyFontStretch:
-    case CSSPropertyHyphens:
</del><ins>+    case CSSPropertyFontVariantAlternates:
+    case CSSPropertyFontVariantCaps:
+    case CSSPropertyFontVariantPosition:
</ins><span class="cx">     case CSSPropertyImageRendering:
</span><span class="cx">     case CSSPropertyListStylePosition:
</span><span class="cx">     case CSSPropertyListStyleType:
</span><del>-    case CSSPropertyMaskType:
</del><span class="cx">     case CSSPropertyObjectFit:
</span><span class="cx">     case CSSPropertyOutlineStyle:
</span><del>-    case CSSPropertyOverflowAnchor:
</del><span class="cx">     case CSSPropertyOverflowWrap:
</span><span class="cx">     case CSSPropertyOverflowX:
</span><span class="cx">     case CSSPropertyOverflowY:
</span><del>-    case CSSPropertyBreakAfter:
-    case CSSPropertyBreakBefore:
-    case CSSPropertyBreakInside:
</del><ins>+    case CSSPropertyPageBreakAfter:
+    case CSSPropertyPageBreakBefore:
+    case CSSPropertyPageBreakInside:
</ins><span class="cx">     case CSSPropertyPointerEvents:
</span><span class="cx">     case CSSPropertyPosition:
</span><span class="cx">     case CSSPropertyResize:
</span><del>-    case CSSPropertyScrollBehavior:
-    case CSSPropertyShapeRendering:
</del><span class="cx">     case CSSPropertySpeak:
</span><del>-    case CSSPropertyStrokeLinecap:
-    case CSSPropertyStrokeLinejoin:
</del><span class="cx">     case CSSPropertyTableLayout:
</span><span class="cx">     case CSSPropertyTextAlign:
</span><del>-    case CSSPropertyTextAlignLast:
-    case CSSPropertyTextAnchor:
-    case CSSPropertyTextCombineUpright:
-    case CSSPropertyTextDecorationStyle:
-    case CSSPropertyTextJustify:
-    case CSSPropertyTextOrientation:
-    case CSSPropertyWebkitTextOrientation:
</del><ins>+    case CSSPropertyTextLineThroughMode:
+    case CSSPropertyTextLineThroughStyle:
</ins><span class="cx">     case CSSPropertyTextOverflow:
</span><ins>+    case CSSPropertyTextOverlineMode:
+    case CSSPropertyTextOverlineStyle:
</ins><span class="cx">     case CSSPropertyTextRendering:
</span><span class="cx">     case CSSPropertyTextTransform:
</span><ins>+    case CSSPropertyTextUnderlineMode:
+    case CSSPropertyTextUnderlineStyle:
+    case CSSPropertyTransformStyle:
</ins><span class="cx">     case CSSPropertyUnicodeBidi:
</span><del>-    case CSSPropertyVectorEffect:
</del><span class="cx">     case CSSPropertyVisibility:
</span><span class="cx">     case CSSPropertyWebkitAppearance:
</span><del>-    case CSSPropertyBackfaceVisibility:
</del><ins>+    case CSSPropertyWebkitBackfaceVisibility:
</ins><span class="cx">     case CSSPropertyWebkitBorderAfterStyle:
</span><span class="cx">     case CSSPropertyWebkitBorderBeforeStyle:
</span><span class="cx">     case CSSPropertyWebkitBorderEndStyle:
</span><ins>+    case CSSPropertyWebkitBorderFit:
</ins><span class="cx">     case CSSPropertyWebkitBorderStartStyle:
</span><span class="cx">     case CSSPropertyWebkitBoxAlign:
</span><del>-    case CSSPropertyWebkitBoxDecorationBreak:
</del><span class="cx">     case CSSPropertyWebkitBoxDirection:
</span><span class="cx">     case CSSPropertyWebkitBoxLines:
</span><span class="cx">     case CSSPropertyWebkitBoxOrient:
</span><span class="cx">     case CSSPropertyWebkitBoxPack:
</span><del>-    case CSSPropertyColumnFill:
-    case CSSPropertyColumnRuleStyle:
-    case CSSPropertyFlexDirection:
-    case CSSPropertyFlexWrap:
-    case CSSPropertyFontKerning:
</del><ins>+    case CSSPropertyWebkitColumnAxis:
+    case CSSPropertyWebkitColumnBreakAfter:
+    case CSSPropertyWebkitColumnBreakBefore:
+    case CSSPropertyWebkitColumnBreakInside:
+    case CSSPropertyWebkitFontKerning:
</ins><span class="cx">     case CSSPropertyWebkitFontSmoothing:
</span><ins>+    case CSSPropertyWebkitHyphens:
+    case CSSPropertyWebkitLineAlign:
</ins><span class="cx">     case CSSPropertyWebkitLineBreak:
</span><ins>+    case CSSPropertyWebkitLineSnap:
</ins><span class="cx">     case CSSPropertyWebkitMarginAfterCollapse:
</span><span class="cx">     case CSSPropertyWebkitMarginBeforeCollapse:
</span><span class="cx">     case CSSPropertyWebkitMarginBottomCollapse:
</span><span class="cx">     case CSSPropertyWebkitMarginTopCollapse:
</span><ins>+    case CSSPropertyWebkitMarqueeDirection:
+    case CSSPropertyWebkitMarqueeStyle:
+    case CSSPropertyWebkitNbspMode:
</ins><span class="cx">     case CSSPropertyWebkitPrintColorAdjust:
</span><span class="cx">     case CSSPropertyWebkitRtlOrdering:
</span><span class="cx">     case CSSPropertyWebkitRubyPosition:
</span><span class="cx">     case CSSPropertyWebkitTextCombine:
</span><del>-    case CSSPropertyWebkitTextEmphasisPosition:
</del><ins>+    case CSSPropertyWebkitTextDecorationStyle:
+    case CSSPropertyWebkitTextOrientation:
</ins><span class="cx">     case CSSPropertyWebkitTextSecurity:
</span><del>-    case CSSPropertyTransformStyle:
</del><ins>+    case CSSPropertyWebkitTextZoom:
+    case CSSPropertyWebkitTransformStyle:
</ins><span class="cx">     case CSSPropertyWebkitUserDrag:
</span><span class="cx">     case CSSPropertyWebkitUserModify:
</span><del>-    case CSSPropertyUserSelect:
</del><ins>+    case CSSPropertyWebkitUserSelect:
</ins><span class="cx">     case CSSPropertyWebkitWritingMode:
</span><span class="cx">     case CSSPropertyWhiteSpace:
</span><span class="cx">     case CSSPropertyWordBreak:
</span><span class="cx">     case CSSPropertyWordWrap:
</span><ins>+
+    // SVG CSS properties from SVG 1.1, Appendix N: Property Index.
+    case CSSPropertyAlignmentBaseline:
+    case CSSPropertyBufferedRendering:
+    case CSSPropertyClipRule:
+    case CSSPropertyColorInterpolation:
+    case CSSPropertyColorInterpolationFilters:
+    case CSSPropertyColorRendering:
+    case CSSPropertyDominantBaseline:
+    case CSSPropertyFillRule:
+    case CSSPropertyMaskType:
+    case CSSPropertyShapeRendering:
+    case CSSPropertyStrokeLinecap:
+    case CSSPropertyStrokeLinejoin:
+    case CSSPropertyTextAnchor:
+    case CSSPropertyVectorEffect:
</ins><span class="cx">     case CSSPropertyWritingMode:
</span><del>-    case CSSPropertyScrollSnapType:
</del><ins>+
+    // FIXME-NEWPARSER: Treat all as a keyword property.
+    // case CSSPropertyAll:
+
+    // FIXME-NEWPARSER: Treat the following properties as keyword properties:
+    // case CSSPropertyBackgroundRepeatX:
+    // case CSSPropertyBackgroundRepeatY:
+    // case CSSPropertyWebkitTextEmphasisPosition:
+
+    // FIXME-NEWPARSER: Add the following unprefixed properties:
+    // case CSSPropertyBackfaceVisibility:
+    // case CSSPropertyFontKerning:
+    // case CSSPropertyHyphens:
+    // case CSSPropertyOverflowAnchor:
+    // case CSSPropertyScrollBehavior:
+    // case CSSPropertyScrollSnapType:
+    // case CSSPropertyTextAlignLast:
+    // case CSSPropertyTextCombineUpright:
+    // case CSSPropertyTextDecorationStyle:
+    // case CSSPropertyTextJustify:
+    // case CSSPropertyTextOrientation:
+    // case CSSPropertyUserSelect:
+#if ENABLE(CSS_TRAILING_WORD)
+    case CSSPropertyAppleTrailingWord:
+#endif
+#if ENABLE(CSS_COMPOSITING)
+    case CSSPropertyIsolation:
+    case CSSPropertyMixBlendMode:
+#endif
+#if ENABLE(TOUCH_EVENTS)
+    case CSSPropertyTouchAction:
+#endif
+#if ENABLE(CSS_BOX_DECORATION_BREAK)
+    case CSSPropertyWebkitBoxDecorationBreak:
+#endif
+#if ENABLE(CURSOR_VISIBILITY)
+    case CSSPropertyWebkitCursorVisibility:
+#endif
+#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
+    case CSSPropertyWebkitOverflowScrolling:
+#endif
+#if ENABLE(CSS_REGIONS)
+    case CSSPropertyWebkitRegionBreakAfter:
+    case CSSPropertyWebkitRegionBreakBefore:
+    case CSSPropertyWebkitRegionBreakInside:
+    case CSSPropertyWebkitRegionFragment:
+#endif
+#if ENABLE(CSS3_TEXT)
+    case CSSPropertyWebkitTextAlignLast:
+    case CSSPropertyWebkitTextJustify:
+#endif
+#if PLATFORM(IOS)
+    // Apple specific property. This will never be standardized and is purely to
+    // support custom WebKit-based Apple applications.
+    case CSSPropertyWebkitTouchCallout:
+#endif
+#if ENABLE(CSS_SCROLL_SNAP)
+    case CSSPropertyWebkitScrollSnapType:
+#endif
</ins><span class="cx">         return true;
</span><span class="cx">     case CSSPropertyJustifyContent:
</span><span class="cx">     case CSSPropertyAlignContent:
</span><span class="cx">     case CSSPropertyAlignItems:
</span><span class="cx">     case CSSPropertyAlignSelf:
</span><del>-        return !RuntimeEnabledFeatures::cssGridLayoutEnabled();
</del><ins>+#if ENABLE(CSS_GRID_LAYOUT)
+        return !RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
+#else
+        return true;
+#endif
</ins><span class="cx">     default:
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/* FIXME-NEWPARSER: Turn off for now.
+
</ins><span class="cx"> static CSSValue* parseKeywordValue(CSSPropertyID propertyId, const String&amp; string, CSSParserMode parserMode)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!string.isEmpty());
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserSVGCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/SVGCSSParser.cpp (205925 => 205926)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/SVGCSSParser.cpp        2016-09-14 20:41:31 UTC (rev 205925)
+++ trunk/Source/WebCore/css/parser/SVGCSSParser.cpp        2016-09-14 20:46:28 UTC (rev 205926)
</span><span class="lines">@@ -52,15 +52,6 @@
</span><span class="cx">     switch (propId) {
</span><span class="cx">     /* The comment to the right defines all valid value of these
</span><span class="cx">      * properties as defined in SVG 1.1, Appendix N. Property index */
</span><del>-    case CSSPropertyAlignmentBaseline:
-    // auto | baseline | before-edge | text-before-edge | middle |
-    // central | after-edge | text-after-edge | ideographic | alphabetic |
-    // hanging | mathematical | inherit
-        if (id == CSSValueAuto || id == CSSValueBaseline || id == CSSValueMiddle ||
-          (id &gt;= CSSValueBeforeEdge &amp;&amp; id &lt;= CSSValueMathematical))
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     case CSSPropertyBaselineShift:
</span><span class="cx">     // baseline | super | sub | &lt;percentage&gt; | &lt;length&gt; | inherit
</span><span class="cx">         if (id == CSSValueBaseline || id == CSSValueSub ||
</span><span class="lines">@@ -70,16 +61,6 @@
</span><span class="cx">             valid_primitive = validateUnit(valueWithCalculation, FLength | FPercent, SVGAttributeMode);
</span><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case CSSPropertyDominantBaseline:
-    // auto | use-script | no-change | reset-size | ideographic |
-    // alphabetic | hanging | mathematical | central | middle |
-    // text-after-edge | text-before-edge | inherit
-        if (id == CSSValueAuto || id == CSSValueMiddle ||
-          (id &gt;= CSSValueUseScript &amp;&amp; id &lt;= CSSValueResetSize) ||
-          (id &gt;= CSSValueCentral &amp;&amp; id &lt;= CSSValueMathematical))
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     case CSSPropertyEnableBackground:
</span><span class="cx">     // accumulate | new [x] [y] [width] [height] | inherit
</span><span class="cx">         if (id == CSSValueAccumulate) // TODO : new
</span><span class="lines">@@ -99,26 +80,10 @@
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case CSSPropertyClipRule:            // nonzero | evenodd | inherit
-    case CSSPropertyFillRule:
-        if (id == CSSValueNonzero || id == CSSValueEvenodd)
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     case CSSPropertyStrokeMiterlimit:   // &lt;miterlimit&gt; | inherit
</span><span class="cx">         valid_primitive = validateUnit(valueWithCalculation, FNumber | FNonNeg, SVGAttributeMode);
</span><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case CSSPropertyStrokeLinejoin:   // miter | round | bevel | inherit
-        if (id == CSSValueMiter || id == CSSValueRound || id == CSSValueBevel)
-            valid_primitive = true;
-        break;
-
-    case CSSPropertyStrokeLinecap:    // butt | round | square | inherit
-        if (id == CSSValueButt || id == CSSValueRound || id == CSSValueSquare)
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     case CSSPropertyStrokeOpacity:   // &lt;opacity-value&gt; | inherit
</span><span class="cx">     case CSSPropertyFillOpacity:
</span><span class="cx">     case CSSPropertyStopOpacity:
</span><span class="lines">@@ -126,44 +91,15 @@
</span><span class="cx">         valid_primitive = (!id &amp;&amp; validateUnit(valueWithCalculation, FNumber | FPercent, SVGAttributeMode));
</span><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case CSSPropertyShapeRendering:
-    // auto | optimizeSpeed | crispEdges | geometricPrecision | inherit
-        if (id == CSSValueAuto || id == CSSValueOptimizespeed ||
-            id == CSSValueCrispedges || id == CSSValueGeometricprecision)
-            valid_primitive = true;
-        break;
-
-    case CSSPropertyColorRendering: // auto | optimizeSpeed | optimizeQuality | inherit
-        if (id == CSSValueAuto || id == CSSValueOptimizespeed ||
-            id == CSSValueOptimizequality)
-            valid_primitive = true;
-        break;
-
-    case CSSPropertyBufferedRendering: // auto | dynamic | static
-        if (id == CSSValueAuto || id == CSSValueDynamic || id == CSSValueStatic)
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     case CSSPropertyColorProfile: // auto | sRGB | &lt;name&gt; | &lt;uri&gt; inherit
</span><span class="cx">         if (id == CSSValueAuto || id == CSSValueSrgb)
</span><span class="cx">             valid_primitive = true;
</span><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case CSSPropertyColorInterpolation:   // auto | sRGB | linearRGB | inherit
-    case CSSPropertyColorInterpolationFilters:
-        if (id == CSSValueAuto || id == CSSValueSrgb || id == CSSValueLinearrgb)
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     /* Start of supported CSS properties with validation. This is needed for parseShortHand to work
</span><span class="cx">      * correctly and allows optimization in applyRule(..)
</span><span class="cx">      */
</span><span class="cx"> 
</span><del>-    case CSSPropertyTextAnchor:    // start | middle | end | inherit
-        if (id == CSSValueStart || id == CSSValueMiddle || id == CSSValueEnd)
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     case CSSPropertyGlyphOrientationVertical: // auto | &lt;angle&gt; | inherit
</span><span class="cx">         if (id == CSSValueAuto) {
</span><span class="cx">             valid_primitive = true;
</span><span class="lines">@@ -228,17 +164,6 @@
</span><span class="cx"> 
</span><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case CSSPropertyVectorEffect: // none | non-scaling-stroke | inherit
-        if (id == CSSValueNone || id == CSSValueNonScalingStroke)
-            valid_primitive = true;
-        break;
-
-    case CSSPropertyWritingMode:
-    // lr-tb | rl_tb | tb-rl | lr | rl | tb | inherit
-        if (id == CSSValueLrTb || id == CSSValueRlTb || id == CSSValueTbRl || id == CSSValueLr || id == CSSValueRl || id == CSSValueTb)
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     case CSSPropertyStrokeWidth:         // &lt;length&gt; | inherit
</span><span class="cx">     case CSSPropertyStrokeDashoffset:
</span><span class="cx">         valid_primitive = validateUnit(valueWithCalculation, FLength | FPercent, SVGAttributeMode);
</span><span class="lines">@@ -282,11 +207,6 @@
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="cx"> 
</span><del>-    case CSSPropertyMaskType: // luminance | alpha | inherit
-        if (id == CSSValueLuminance || id == CSSValueAlpha)
-            valid_primitive = true;
-        break;
-
</del><span class="cx">     /* shorthand properties */
</span><span class="cx">     case CSSPropertyMarker:
</span><span class="cx">     {
</span></span></pre>
</div>
</div>

</body>
</html>