|
Replace CSSParserString with StringView.
This removes the special string type the parser was using in favor of
StringView. In doing so it also makes all of the string allocations
inside the parser more explicit.
Doing this requires adding equalIgnoringASCIICase for StringView, and
also operator[], tests are included. :)
One major change is now StringView::toString() will attempt to create
an 8bit string from a 16bit StringView whenever possible. This does
mean potentially wasted work inside StringImpl::create8BitIfPossible
if callers are frequently making strings with unicode characters in
them. We should see how often this happens in practice, and probably
optimize the code in create8BitIfPossible to first scan the string
to avoid the wasted malloc.
BUG= 615174
Committed: https://crrev.com/e3c7c11bf601fc6ffbea29ac7fd02b42c283840a
Cr-Commit-Position: refs/heads/master@{#397094}
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+237 lines, -284 lines) |
Patch |
 |
M |
third_party/WebKit/Source/core/css/CSSVariableData.cpp
|
View
|
|
3 chunks |
+5 lines, -10 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/cssom/CSSKeywordValue.cpp
|
View
|
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSAtRuleID.h
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSAtRuleID.cpp
|
View
|
|
1 chunk |
+12 lines, -13 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSParser.cpp
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
|
View
|
|
3 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
|
View
|
|
8 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
D |
third_party/WebKit/Source/core/css/parser/CSSParserString.h
|
View
|
|
1 chunk |
+0 lines, -110 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSParserToken.h
|
View
|
|
4 chunks |
+14 lines, -16 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp
|
View
|
|
5 chunks |
+15 lines, -15 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSParserTokenTest.cpp
|
View
|
|
1 chunk |
+2 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
View
|
|
13 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
|
View
|
|
5 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
|
View
|
|
8 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSTokenizer.h
|
View
|
|
5 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
|
View
|
|
7 chunks |
+9 lines, -11 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
|
View
|
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp
|
View
|
|
2 chunks |
+2 lines, -8 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSTokenizerTest.cpp
|
View
|
|
4 chunks |
+10 lines, -17 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/parser/MediaQueryParser.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/wtf/text/StringView.h
|
View
|
1
2
3
|
4 chunks |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/wtf/text/StringView.cpp
|
View
|
1
2
3
|
2 chunks |
+19 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/wtf/text/StringViewTest.cpp
|
View
|
1
2
|
2 chunks |
+67 lines, -0 lines |
0 comments
|
Download
|
Total messages: 26 (13 generated)
|