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

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

Issue 2315923002: Lazy Parse CSS (Closed)
Patch Set: CL for src perf tryjob to run page_cycler_v2.typical_25 benchmark on all-android platform(s) Created 4 years, 3 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: 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..576d7dfdaa918bd027c5238335b2d1193a8280d8 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
@@ -18,7 +18,7 @@ namespace blink {
namespace blink {
CSSTokenizer::Scope::Scope(const String& string)
-: m_string(string)
+ : m_string(string)
{
// According to the spec, we should perform preprocessing here.
// See: http://dev.w3.org/csswg/css-syntax/#input-preprocessing
@@ -48,7 +48,7 @@ CSSTokenizer::Scope::Scope(const String& string)
}
CSSTokenizer::Scope::Scope(const String& string, CSSParserObserverWrapper& wrapper)
-: m_string(string)
+ : m_string(string)
{
if (string.isEmpty())
return;
@@ -84,6 +84,13 @@ unsigned CSSTokenizer::Scope::tokenCount()
return m_tokens.size();
}
+void CSSTokenizer::Scope::storeString(const String& string)
+{
+ if (!m_stringPool)
+ m_stringPool.reset(new Vector<String>);
+ m_stringPool->append(string);
+}
+
static bool isNewLine(UChar cc)
{
// We check \r and \f here, since we have no preprocessing stage

Powered by Google App Engine
This is Rietveld 408576698