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

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

Issue 1541443002: Fix small bugs in new CSS Property parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 11 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 | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 92b2c77e83eb49eeff4901eb3b69b5d3ce031fdd..8bec77e00555030c8d0840ee3c3a43f33291948a 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -648,20 +648,24 @@ void StyleBuilderFunctions::applyInheritCSSPropertyWillChange(StyleResolverState
void StyleBuilderFunctions::applyValueCSSPropertyWillChange(StyleResolverState& state, CSSValue* value)
{
- ASSERT(value->isValueList());
bool willChangeContents = false;
bool willChangeScrollPosition = false;
Vector<CSSPropertyID> willChangeProperties;
- for (auto& willChangeValue : toCSSValueList(*value)) {
- if (willChangeValue->isCustomIdentValue())
- willChangeProperties.append(toCSSCustomIdentValue(*willChangeValue).valueAsPropertyID());
- else if (toCSSPrimitiveValue(*willChangeValue).getValueID() == CSSValueContents)
- willChangeContents = true;
- else if (toCSSPrimitiveValue(*willChangeValue).getValueID() == CSSValueScrollPosition)
- willChangeScrollPosition = true;
- else
- ASSERT_NOT_REACHED();
+ if (value->isPrimitiveValue()) {
+ ASSERT(toCSSPrimitiveValue(value)->getValueID() == CSSValueAuto);
+ } else {
+ ASSERT(value->isValueList());
+ for (auto& willChangeValue : toCSSValueList(*value)) {
+ if (willChangeValue->isCustomIdentValue())
+ willChangeProperties.append(toCSSCustomIdentValue(*willChangeValue).valueAsPropertyID());
+ else if (toCSSPrimitiveValue(*willChangeValue).getValueID() == CSSValueContents)
+ willChangeContents = true;
+ else if (toCSSPrimitiveValue(*willChangeValue).getValueID() == CSSValueScrollPosition)
+ willChangeScrollPosition = true;
+ else
+ ASSERT_NOT_REACHED();
+ }
}
state.style()->setWillChangeContents(willChangeContents);
state.style()->setWillChangeScrollPosition(willChangeScrollPosition);
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698