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

Unified Diff: Source/core/css/parser/CSSParserTokenRange.h

Issue 790593004: CSS Parser: Implement selector parsing [1/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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: Source/core/css/parser/CSSParserTokenRange.h
diff --git a/Source/core/css/parser/CSSParserTokenRange.h b/Source/core/css/parser/CSSParserTokenRange.h
index 3d0f00232a840a989e6a3552e0ee83f9b4ea1b62..0f38f7c0882903848283bbb97652e7c263d677b8 100644
--- a/Source/core/css/parser/CSSParserTokenRange.h
+++ b/Source/core/css/parser/CSSParserTokenRange.h
@@ -43,6 +43,21 @@ public:
return *m_first++;
}
+ const CSSParserToken& consumeIncludingComments()
+ {
+ const CSSParserToken& result = consume();
+ while (peek().type() == CommentToken)
+ ++m_first;
+ return result;
+ }
+
+ const CSSParserToken& consumeIncludingWhitespaceAndComments()
+ {
+ const CSSParserToken& result = consume();
+ consumeWhitespaceAndComments();
+ return result;
+ }
+
void consumeComponentValue();
void consumeWhitespaceAndComments();

Powered by Google App Engine
This is Rietveld 408576698