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

Unified Diff: third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/DOMWindowCSS.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
index e2d3f91cdffbd8f02df0fbb255fce4c45b8be477..3aa0a7f6370f71a29267d4bd390484e98a145541 100644
--- a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -33,7 +33,6 @@
#include "core/css/CSSVariableData.h"
#include "core/css/ComputedStyleCSSValueMapping.h"
#include "core/css/parser/CSSParser.h"
-#include "core/css/parser/CSSVariableParser.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
@@ -640,12 +639,12 @@ CSSRule* CSSComputedStyleDeclaration::parentRule() const
String CSSComputedStyleDeclaration::getPropertyValue(const String& propertyName)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (!propertyID) {
- if (CSSVariableParser::isValidVariableName(propertyName)) {
- const CSSValue* value = getPropertyCSSValue(AtomicString(propertyName));
- if (value)
- return value->cssText();
- }
+ if (!propertyID)
+ return String();
+ if (propertyID == CSSPropertyVariable) {
+ const CSSValue* value = getPropertyCSSValue(AtomicString(propertyName));
+ if (value)
+ return value->cssText();
return String();
}
ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID));
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/DOMWindowCSS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698