Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Unified Diff: Source/core/css/RuleFeature.cpp

Issue 1312543003: Split out Attribute from CSSPrimitiveValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@clean_up_get_string_value
Patch Set: Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleFeature.cpp
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp
index 3a23c477d158dd555659d59e1a6e9566d449ee4f..6aecffc6a099cd6c7527f86d4f0ecffdc5067de7 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -30,6 +30,7 @@
#include "core/css/RuleFeature.h"
#include "core/HTMLNames.h"
+#include "core/css/CSSFunctionValue.h"
#include "core/css/CSSSelector.h"
#include "core/css/CSSSelectorList.h"
#include "core/css/CSSValueList.h"
@@ -310,12 +311,12 @@ void RuleFeatureSet::updateInvalidationSetsForContentAttribute(const RuleData& r
return;
for (auto& item : toCSSValueList(*contentValue)) {
- if (!item->isPrimitiveValue())
+ if (!item->isFunctionValue())
continue;
- CSSPrimitiveValue* primitiveItem = toCSSPrimitiveValue(item.get());
- if (!primitiveItem->isAttr())
+ CSSFunctionValue* functionValue = toCSSFunctionValue(item.get());
+ if (functionValue->functionType() != CSSValueAttr)
continue;
- ensureAttributeInvalidationSet(AtomicString(primitiveItem->getStringValue()));
+ ensureAttributeInvalidationSet(AtomicString(toCSSPrimitiveValue(functionValue->item(0))->getStringValue()));
}
}
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698