Compilation failure in StyleResolver.cpp (clang)
authormacpherson@chromium.org <macpherson@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 07:11:03 +0000 (07:11 +0000)
committermacpherson@chromium.org <macpherson@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 07:11:03 +0000 (07:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=89892

Reviewed by Ryosuke Niwa.

Patch adds assertions that unreachable code is in fact not reached.

Covered by fast/css/variables tests.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122700 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/StyleResolver.cpp

index b112627..c7d5543 100644 (file)
@@ -1,3 +1,19 @@
+2012-07-16  Luke Macpherson  <macpherson@chromium.org>
+
+        Compilation failure in StyleResolver.cpp (clang)
+        https://bugs.webkit.org/show_bug.cgi?id=89892
+
+        Reviewed by Ryosuke Niwa.
+
+        Patch adds assertions that unreachable code is in fact not reached.
+
+        Covered by fast/css/variables tests.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::collectMatchingRulesForList):
+
 2012-07-15  Mike Lawther  <mikelawther@chromium.org>
 
         Fix calculation of rgba's alpha in CSS custom text
index d682883..eee53cc 100644 (file)
@@ -1682,6 +1682,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
         m_valueList->next();
         return true;
     }
+    ASSERT(propId != CSSPropertyVariable);
 #endif
 
     if (isKeywordPropertyID(propId)) {
@@ -2694,11 +2695,6 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
         m_valueList->next();
         break;
 #endif
-#if ENABLE(CSS_VARIABLES)
-    case CSSPropertyVariable:
-        // FIXME: This should have an actual implementation.
-        return false;
-#endif
     case CSSPropertyBorderBottomStyle:
     case CSSPropertyBorderCollapse:
     case CSSPropertyBorderLeftStyle:
@@ -2735,6 +2731,9 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyTextTransform:
     case CSSPropertyTextUnderlineMode:
     case CSSPropertyTextUnderlineStyle:
+#if ENABLE(CSS_VARIABLES)
+    case CSSPropertyVariable:
+#endif
     case CSSPropertyVisibility:
     case CSSPropertyWebkitAppearance:
     case CSSPropertyWebkitBackfaceVisibility:
index 8bc5efe..aedb199 100644 (file)
@@ -4105,11 +4105,6 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
         m_style->setGridItemRow(row);
         return;
     }
-#if ENABLE(CSS_VARIABLES)
-    case CSSPropertyVariable:
-        // FIXME: This should have an actual implementation.
-        return;
-#endif
     // These properties are implemented in the StyleBuilder lookup table.
     case CSSPropertyBackgroundAttachment:
     case CSSPropertyBackgroundClip:
@@ -4226,6 +4221,9 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
     case CSSPropertyTextTransform:
     case CSSPropertyTop:
     case CSSPropertyUnicodeBidi:
+#if ENABLE(CSS_VARIABLES)
+    case CSSPropertyVariable:
+#endif
     case CSSPropertyVerticalAlign:
     case CSSPropertyVisibility:
     case CSSPropertyWebkitAnimationDelay: