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

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 216003002: Avoid exposing disabled CSS properties in will-change and transition (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move checking to transition and will-change Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index d3f7a2c6429227a6f534f06a33fb0f914e287030..c29250a7abe8d6ce2a8a4ed078a65324acae48e9 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -69,6 +69,7 @@
#include "core/css/HashTools.h"
#include "core/css/Pair.h"
#include "core/css/Rect.h"
+#include "core/css/RuntimeCSSEnabled.h"
#include "core/css/parser/CSSParserIdioms.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/inspector/InspectorInstrumentation.h"
@@ -3081,7 +3082,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty(Anima
if (value->unit != CSSPrimitiveValue::CSS_IDENT)
return nullptr;
CSSPropertyID result = cssPropertyID(value->string);
- if (result)
+ if (result && RuntimeCSSEnabled::isCSSPropertyEnabled(result))
return cssValuePool().createIdentifierValue(result);
if (equalIgnoringCase(value, "all")) {
context.sawAnimationPropertyKeyword();
@@ -7023,7 +7024,8 @@ bool CSSPropertyParser::parseWillChange(bool important)
if (currentValue->unit != CSSPrimitiveValue::CSS_IDENT)
return false;
- if (CSSPropertyID property = cssPropertyID(currentValue->string)) {
+ CSSPropertyID property = cssPropertyID(currentValue->string);
+ if (property && RuntimeCSSEnabled::isCSSPropertyEnabled(property)) {
if (property == CSSPropertyWillChange)
return false;
values->append(cssValuePool().createIdentifierValue(property));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698