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

Unified Diff: third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp

Issue 2288633002: Recognise variable names when parsing CSS property names (Closed)
Patch Set: fix long var names Created 4 years, 4 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/cssom/StylePropertyMap.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp b/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
index c33406c973e8998c1617e5931459037d39f30c35..809c48bb618defc295cd1b95a80291a5e5ab761c 100644
--- a/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/StylePropertyMap.cpp
@@ -49,7 +49,7 @@ private:
CSSStyleValue* StylePropertyMap::get(const String& propertyName, ExceptionState& exceptionState)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (propertyID == CSSPropertyInvalid) {
+ if (propertyID == CSSPropertyInvalid || propertyID == CSSPropertyVariable) {
// TODO(meade): Handle custom properties here.
exceptionState.throwTypeError("Invalid propertyName: " + propertyName);
return nullptr;
@@ -65,7 +65,7 @@ CSSStyleValue* StylePropertyMap::get(const String& propertyName, ExceptionState&
CSSStyleValueVector StylePropertyMap::getAll(const String& propertyName, ExceptionState& exceptionState)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (propertyID != CSSPropertyInvalid)
+ if (propertyID != CSSPropertyInvalid && propertyID != CSSPropertyVariable)
return getAllInternal(propertyID);
// TODO(meade): Handle custom properties here.
@@ -76,7 +76,7 @@ CSSStyleValueVector StylePropertyMap::getAll(const String& propertyName, Excepti
bool StylePropertyMap::has(const String& propertyName, ExceptionState& exceptionState)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (propertyID != CSSPropertyInvalid)
+ if (propertyID != CSSPropertyInvalid && propertyID != CSSPropertyVariable)
return !getAllInternal(propertyID).isEmpty();
// TODO(meade): Handle custom properties here.
@@ -87,7 +87,7 @@ bool StylePropertyMap::has(const String& propertyName, ExceptionState& exception
void StylePropertyMap::set(const String& propertyName, CSSStyleValueOrCSSStyleValueSequenceOrString& item, ExceptionState& exceptionState)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (propertyID != CSSPropertyInvalid) {
+ if (propertyID != CSSPropertyInvalid && propertyID != CSSPropertyVariable) {
set(propertyID, item, exceptionState);
return;
}
@@ -98,7 +98,7 @@ void StylePropertyMap::set(const String& propertyName, CSSStyleValueOrCSSStyleVa
void StylePropertyMap::append(const String& propertyName, CSSStyleValueOrCSSStyleValueSequenceOrString& item, ExceptionState& exceptionState)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (propertyID != CSSPropertyInvalid) {
+ if (propertyID != CSSPropertyInvalid && propertyID != CSSPropertyVariable) {
append(propertyID, item, exceptionState);
return;
}
@@ -109,7 +109,7 @@ void StylePropertyMap::append(const String& propertyName, CSSStyleValueOrCSSStyl
void StylePropertyMap::remove(const String& propertyName, ExceptionState& exceptionState)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (propertyID != CSSPropertyInvalid) {
+ if (propertyID != CSSPropertyInvalid && propertyID != CSSPropertyVariable) {
remove(propertyID, exceptionState);
return;
}

Powered by Google App Engine
This is Rietveld 408576698