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

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

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: Source/core/css/parser/CSSParserTokenRange.h
diff --git a/Source/core/css/parser/CSSParserTokenRange.h b/Source/core/css/parser/CSSParserTokenRange.h
index 6ad12750289e659b15e3a7719fe57fa7690a134d..358dea10b781d1d927cc348b2bcf04a2f623ba85 100644
--- a/Source/core/css/parser/CSSParserTokenRange.h
+++ b/Source/core/css/parser/CSSParserTokenRange.h
@@ -13,14 +13,18 @@ namespace blink {
CORE_EXPORT extern const CSSParserToken& staticEOFToken;
+class CSSTokenizer;
+class CSSTokenizerScope;
+
// A CSSParserTokenRange is an iterator over a subrange of a vector of CSSParserTokens.
// Accessing outside of the range will return an endless stream of EOF tokens.
// This class refers to half-open intervals [first, last).
class CORE_EXPORT CSSParserTokenRange {
public:
- CSSParserTokenRange(const Vector<CSSParserToken>& vector)
+ CSSParserTokenRange(const Vector<CSSParserToken>& vector, const CSSTokenizerScope* scope)
: m_first(vector.begin())
, m_last(vector.end())
+ , m_scope(scope)
{
}
@@ -64,19 +68,23 @@ public:
String serialize() const;
+ const CSSTokenizerScope* scope() const { return m_scope; }
+
// This is only for the inspector integration
const CSSParserToken* begin() const { return m_first; }
static void initStaticEOFToken();
private:
- CSSParserTokenRange(const CSSParserToken* first, const CSSParserToken* last)
+ CSSParserTokenRange(const CSSParserToken* first, const CSSParserToken* last, const CSSTokenizerScope* scope)
: m_first(first)
, m_last(last)
+ , m_scope(scope)
{ }
const CSSParserToken* m_first;
const CSSParserToken* m_last;
+ const CSSTokenizerScope* m_scope;
};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698