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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 1373433002: Split out CSSPrimitiveValue's PropertyID into CSSCustomIdentValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_string
Patch Set: Created 5 years, 3 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
Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index a674a752eb404361f5a73001ecf50e5689237a14..175041f8c8a18819c6a9b856f640b149ad9c2304 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -671,10 +671,13 @@ void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState&
Vector<CSSPropertyID> willChangeProperties;
for (auto& willChangeValue : toCSSValueList(*value)) {
+ if (willChangeValue->isCustomIdentValue()) {
+ willChangeProperties.append(toCSSCustomIdentValue(*willChangeValue).id());
+ continue;
+ }
+
CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(willChangeValue.get());
- if (primitiveValue->isPropertyID())
- willChangeProperties.append(primitiveValue->getPropertyID());
- else if (primitiveValue->getValueID() == CSSValueContents)
+ if (primitiveValue->getValueID() == CSSValueContents)
willChangeContents = true;
else if (primitiveValue->getValueID() == CSSValueScrollPosition)
willChangeScrollPosition = true;
@@ -737,7 +740,7 @@ void StyleBuilderFunctions::applyValueCSSPropertyContent(StyleResolverState& sta
state.style()->setUnique();
else
state.parentStyle()->setUnique();
- QualifiedName attr(nullAtom, AtomicString(toCSSCustomIdentValue(functionValue->item(0))->value()), nullAtom);
+ QualifiedName attr(nullAtom, AtomicString(toCSSCustomIdentValue(functionValue->item(0))->string()), nullAtom);
const AtomicString& value = state.element()->getAttribute(attr);
state.style()->setContent(value.isNull() ? emptyString() : value.string(), didSet);
didSet = true;

Powered by Google App Engine
This is Rietveld 408576698