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

Unified Diff: third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp

Issue 1752773003: Check @apply syntax in custom properties declarations at parse time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
index 135aa410f9e1223815539e0e5c39295eab218ecb..936cb2d86bac8bfa013b6839cf01a7486b08df71 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
@@ -15,7 +15,6 @@
#include "core/css/parser/CSSParserTokenRange.h"
#include "core/css/parser/CSSParserValues.h"
#include "core/css/parser/CSSPropertyParser.h"
-#include "core/css/parser/CSSVariableParser.h"
#include "core/css/resolver/StyleBuilder.h"
#include "core/css/resolver/StyleResolverState.h"
#include "core/style/StyleVariableData.h"
@@ -92,16 +91,9 @@ void CSSVariableResolver::resolveApplyAtRule(CSSParserTokenRange& range,
Vector<CSSParserToken>& result)
{
ASSERT(range.peek().type() == AtKeywordToken && range.peek().valueEqualsIgnoringASCIICase("apply"));
- CSSParserTokenRange originalRange = range;
-
range.consumeIncludingWhitespace();
const CSSParserToken& variableName = range.consumeIncludingWhitespace();
- if (!CSSVariableParser::isValidVariableName(variableName)
- || !(range.atEnd() || range.peek().type() == SemicolonToken || range.peek().type() == RightBraceToken)) {
- range = originalRange;
- result.append(range.consume());
- return;
- }
+ // TODO(timloh): Should we actually be consuming this?
if (range.peek().type() == SemicolonToken)
range.consume();
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698