Title: [118082] trunk/Source/WebCore
Revision
118082
Author
alexis.men...@openbossa.org
Date
2012-05-22 16:59:08 -0700 (Tue, 22 May 2012)

Log Message

Move some CSS regions properties to CSSParser::isValidKeywordPropertyAndValue.
https://bugs.webkit.org/show_bug.cgi?id=87169

Reviewed by Tony Chang.

Move some CSS regions properties to the fast path implemented by
CSSParser::isValidKeywordPropertyAndValue.

No new tests : Existing tests should cover.

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118081 => 118082)


--- trunk/Source/WebCore/ChangeLog	2012-05-22 23:56:58 UTC (rev 118081)
+++ trunk/Source/WebCore/ChangeLog	2012-05-22 23:59:08 UTC (rev 118082)
@@ -1,3 +1,20 @@
+2012-05-22  Alexis Menard  <alexis.men...@openbossa.org>
+
+        Move some CSS regions properties to CSSParser::isValidKeywordPropertyAndValue.
+        https://bugs.webkit.org/show_bug.cgi?id=87169
+
+        Reviewed by Tony Chang.
+
+        Move some CSS regions properties to the fast path implemented by
+        CSSParser::isValidKeywordPropertyAndValue.
+
+        No new tests : Existing tests should cover.
+
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+        (WebCore::isKeywordPropertyID):
+        (WebCore::CSSParser::parseValue):
+
 2012-05-22  Emil A Eklund  <e...@chromium.org>
 
         Represents margins as box and simplify writing mode logic

Modified: trunk/Source/WebCore/css/CSSParser.cpp (118081 => 118082)


--- trunk/Source/WebCore/css/CSSParser.cpp	2012-05-22 23:56:58 UTC (rev 118081)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2012-05-22 23:59:08 UTC (rev 118082)
@@ -578,6 +578,18 @@
         if (valueID == CSSValueVisible || valueID == CSSValueHidden || valueID == CSSValueScroll || valueID == CSSValueAuto || valueID == CSSValueOverlay || valueID == CSSValueWebkitMarquee)
             return true;
         break;
+    case CSSPropertyPageBreakAfter: // auto | always | avoid | left | right | inherit
+    case CSSPropertyPageBreakBefore:
+    case CSSPropertyWebkitColumnBreakAfter:
+    case CSSPropertyWebkitColumnBreakBefore:
+        if (valueID == CSSValueAuto || valueID == CSSValueAlways || valueID == CSSValueAvoid || valueID == CSSValueLeft || valueID == CSSValueRight)
+            return true;
+        break;
+    case CSSPropertyPageBreakInside: // avoid | auto | inherit
+    case CSSPropertyWebkitColumnBreakInside:
+        if (valueID == CSSValueAuto || valueID == CSSValueAvoid)
+            return true;
+        break;
     case CSSPropertyPointerEvents:
         // none | visiblePainted | visibleFill | visibleStroke | visible |
         // painted | fill | stroke | auto | all | inherit
@@ -746,6 +758,19 @@
         if (valueID == CSSValueExact || valueID == CSSValueEconomy)
             return true;
         break;
+    case CSSPropertyWebkitRegionBreakAfter:
+    case CSSPropertyWebkitRegionBreakBefore:
+        if (parserContext.isCSSRegionsEnabled && (valueID == CSSValueAuto || valueID == CSSValueAlways || valueID == CSSValueAvoid || valueID == CSSValueLeft || valueID == CSSValueRight))
+            return true;
+        break;
+    case CSSPropertyWebkitRegionBreakInside:
+        if (parserContext.isCSSRegionsEnabled && (valueID == CSSValueAuto || valueID == CSSValueAvoid))
+            return true;
+        break;
+    case CSSPropertyWebkitRegionOverflow:
+        if (parserContext.isCSSRegionsEnabled && (valueID == CSSValueAuto || valueID == CSSValueBreak))
+            return true;
+        break;
     case CSSPropertyWebkitRtlOrdering:
         if (valueID == CSSValueLogical || valueID == CSSValueVisual)
             return true;
@@ -840,6 +865,9 @@
     case CSSPropertyOutlineStyle:
     case CSSPropertyOverflowX:
     case CSSPropertyOverflowY:
+    case CSSPropertyPageBreakAfter:
+    case CSSPropertyPageBreakBefore:
+    case CSSPropertyPageBreakInside:
     case CSSPropertyPointerEvents:
     case CSSPropertyPosition:
     case CSSPropertyResize:
@@ -868,6 +896,9 @@
     case CSSPropertyWebkitBoxOrient:
     case CSSPropertyWebkitBoxPack:
     case CSSPropertyWebkitColorCorrection:
+    case CSSPropertyWebkitColumnBreakAfter:
+    case CSSPropertyWebkitColumnBreakBefore:
+    case CSSPropertyWebkitColumnBreakInside:
     case CSSPropertyWebkitColumnRuleStyle:
     case CSSPropertyWebkitFlexAlign:
     case CSSPropertyWebkitFlexDirection:
@@ -893,6 +924,10 @@
     case CSSPropertyWebkitOverflowScrolling:
 #endif
     case CSSPropertyWebkitPrintColorAdjust:
+    case CSSPropertyWebkitRegionBreakAfter:
+    case CSSPropertyWebkitRegionBreakBefore:
+    case CSSPropertyWebkitRegionBreakInside:
+    case CSSPropertyWebkitRegionOverflow:
     case CSSPropertyWebkitRtlOrdering:
     case CSSPropertyWebkitTextCombine:
     case CSSPropertyWebkitTextEmphasisPosition:
@@ -1504,27 +1539,6 @@
         }
         break;
 
-    case CSSPropertyPageBreakAfter:       // auto | always | avoid | left | right | inherit
-    case CSSPropertyPageBreakBefore:
-    case CSSPropertyWebkitColumnBreakAfter:
-    case CSSPropertyWebkitColumnBreakBefore:
-    case CSSPropertyWebkitRegionBreakAfter:
-    case CSSPropertyWebkitRegionBreakBefore:
-        if (id == CSSValueAuto
-            || id == CSSValueAlways
-            || id == CSSValueAvoid
-            || id == CSSValueLeft
-            || id == CSSValueRight)
-            validPrimitive = ((propId == CSSPropertyWebkitRegionBreakAfter) || (propId == CSSPropertyWebkitRegionBreakBefore)) ? cssRegionsEnabled() : true;
-        break;
-
-    case CSSPropertyPageBreakInside:     // avoid | auto | inherit
-    case CSSPropertyWebkitColumnBreakInside:
-    case CSSPropertyWebkitRegionBreakInside:
-        if (id == CSSValueAuto || id == CSSValueAvoid)
-            validPrimitive = (propId == CSSPropertyWebkitRegionBreakInside) ? cssRegionsEnabled() : true;
-        break;
-
     case CSSPropertyContent:              // [ <string> | <uri> | <counter> | attr(X) | open-quote |
         // close-quote | no-open-quote | no-close-quote ]+ | inherit
         return parseContent(propId, important);
@@ -2101,10 +2115,6 @@
         if (!cssRegionsEnabled())
             return false;
         return parseRegionThread(propId, important);
-    case CSSPropertyWebkitRegionOverflow:
-        if (cssRegionsEnabled() && (id == CSSValueAuto || id == CSSValueBreak))
-            validPrimitive = true;
-        break;
     case CSSPropertyWebkitTransform:
         if (id == CSSValueNone)
             validPrimitive = true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to