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

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

Issue 2282303002: [test] lazily parse css style rules
Patch Set: use string pool Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSTokenizer.h ('k') | tools/run-perf-test.cfg » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
index 282bc3a549d9c0d555051d870bdcb76200bae74e..e2e70aa177ad6a9ace4390a37ba17a8c55e2c84e 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
@@ -18,7 +18,6 @@ namespace blink {
namespace blink {
CSSTokenizer::Scope::Scope(const String& string)
-: m_string(string)
{
// According to the spec, we should perform preprocessing here.
// See: http://dev.w3.org/csswg/css-syntax/#input-preprocessing
@@ -30,6 +29,7 @@ CSSTokenizer::Scope::Scope(const String& string)
if (string.isEmpty())
return;
+ storeString(string);
// To avoid resizing we err on the side of reserving too much space.
// Most strings we tokenize have about 3.5 to 5 characters per token.
@@ -48,10 +48,10 @@ CSSTokenizer::Scope::Scope(const String& string)
}
CSSTokenizer::Scope::Scope(const String& string, CSSParserObserverWrapper& wrapper)
-: m_string(string)
{
if (string.isEmpty())
return;
+ storeString(string);
CSSTokenizerInputStream input(string);
CSSTokenizer tokenizer(input, *this);
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSTokenizer.h ('k') | tools/run-perf-test.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698