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

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

Issue 1837413002: Ensure that we don't allow 'none' alongside other values in content property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 54440bfe70f0364eecdda6eb159c20f3dbdadbd4..ed48836dc7f8eeb62a6bd91673d73c2638d8d47a 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -658,7 +658,7 @@ void StyleBuilderFunctions::applyInheritCSSPropertyContent(StyleResolverState&)
void StyleBuilderFunctions::applyValueCSSPropertyContent(StyleResolverState& state, CSSValue* value)
{
if (value->isPrimitiveValue()) {
- ASSERT(toCSSPrimitiveValue(*value).getValueID() == CSSValueNormal);
+ ASSERT(toCSSPrimitiveValue(*value).getValueID() == CSSValueNormal || toCSSPrimitiveValue(*value).getValueID() == CSSValueNone);
state.style()->clearContent();
return;
}
@@ -730,13 +730,11 @@ void StyleBuilderFunctions::applyValueCSSPropertyContent(StyleResolverState& sta
didSet = true;
break;
default:
- // none does not have any effect.
- { }
+ ASSERT_NOT_REACHED();
}
}
}
- if (!didSet)
- state.style()->clearContent();
+ ASSERT(didSet);
}
void StyleBuilderFunctions::applyValueCSSPropertyWebkitLocale(StyleResolverState& state, CSSValue* value)
« 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