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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp

Issue 1645433002: Basic implementation of @apply (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix expted.txt for failing test 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
Index: third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp
index f0255092bbf02a08bd8b66a4ec30268f4092c2b7..a54302eac4ea4fbd6bd498d6e4ff525bb4b30a55 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp
@@ -47,6 +47,13 @@ bool classifyBlock(CSSParserTokenRange range, bool& hasReferences, bool isTopLev
const CSSParserToken& token = range.consume();
switch (token.type()) {
+ case AtKeywordToken: {
+ // This might have false positives if the @apply doesn't actually match
+ // the syntax, but that just means we do extra computation work.
+ if (token.valueEqualsIgnoringASCIICase("apply"))
+ hasReferences = true;
+ break;
+ }
case DelimiterToken: {
if (token.delimiter() == '!' && isTopLevelBlock)
return false;

Powered by Google App Engine
This is Rietveld 408576698