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

Unified Diff: third_party/WebKit/Source/core/css/DOMWindowCSS.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/DOMWindowCSS.cpp
diff --git a/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp b/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp
index 763f7b5f17f862e8f955ad0c42b6881d0d803d5a..b0eae0f5d01f81974268fd6386d8c8f1c9eeac80 100644
--- a/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp
+++ b/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp
@@ -33,7 +33,6 @@
#include "core/css/CSSPropertyMetadata.h"
#include "core/css/StylePropertySet.h"
#include "core/css/parser/CSSParser.h"
-#include "core/css/parser/CSSVariableParser.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
@@ -42,12 +41,11 @@ namespace blink {
bool DOMWindowCSS::supports(const String& property, const String& value)
{
CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property);
- if (unresolvedProperty == CSSPropertyInvalid) {
- if (CSSVariableParser::isValidVariableName(property)) {
- MutableStylePropertySet* dummyStyle = MutableStylePropertySet::create(HTMLStandardMode);
- return CSSParser::parseValueForCustomProperty(dummyStyle, "--valid", value, false, 0);
- }
+ if (unresolvedProperty == CSSPropertyInvalid)
return false;
+ if (unresolvedProperty == CSSPropertyVariable) {
+ MutableStylePropertySet* dummyStyle = MutableStylePropertySet::create(HTMLStandardMode);
+ return CSSParser::parseValueForCustomProperty(dummyStyle, "--valid", value, false, 0);
}
ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty));

Powered by Google App Engine
This is Rietveld 408576698