|
CSS Tokenizer: Add an on-stack tokenizer scope
This patch adds a CSSTokenizer::Scope class, which is currently used for
tokenizing strings and getting a token range back. In subsequent patches
this will allow us to
- Use string views (probably CSSParserString) in CSSParserToken instead
of keeping Strings directly alive. In particular, CSSParserToken will
have a trivial destructor, the Scope will keep necessary Strings (those
with escaped characters) alive and the common case won't require any
allocations.
- Store character indices and comment tokens separately from the actual
CSSParserTokens. This will be required for inspector integration.
This also removes the vector of tokens from CSSParserImpl, which didn't
really belong there anyway.
BUG= 424988
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191510
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+90 lines, -90 lines) |
Patch |
|
M |
Source/core/css/parser/CSSParser.cpp
|
View
|
|
2 chunks |
+5 lines, -7 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/CSSParserImpl.h
|
View
|
1
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/CSSParserImpl.cpp
|
View
|
1
|
4 chunks |
+17 lines, -15 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/CSSParserValuesTest.cpp
|
View
|
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/CSSSelectorParserTest.cpp
|
View
|
|
2 chunks |
+4 lines, -8 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/CSSTokenizer.h
|
View
|
|
1 chunk |
+10 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/parser/CSSTokenizer.cpp
|
View
|
|
2 chunks |
+33 lines, -27 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/CSSTokenizerTest.cpp
|
View
|
1
|
3 chunks |
+11 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/MediaConditionTest.cpp
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/MediaQueryParser.cpp
|
View
|
|
1 chunk |
+1 line, -5 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/SizesAttributeParser.h
|
View
|
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/SizesAttributeParser.cpp
|
View
|
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/css/parser/SizesCalcParserTest.cpp
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
Total messages: 6 (2 generated)
|