Avoid exposing disabled CSS properties in will-change and transition

Both transition and will-change should produce string values for unknown
properties, but were producing identifiers. transition requires follow on
work as it only currently considers valid property names.

NOTRY=true

Review URL: https://codereview.chromium.org/216003002

git-svn-id: svn://svn.chromium.org/blink/trunk@170286 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b65a7083
......@@ -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"
......@@ -3080,7 +3081,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();
......@@ -7021,7 +7022,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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment