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

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

Issue 2503683003: [WIP] Streaming CSS parser (Closed)
Patch Set: rebase Created 3 years, 11 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/CSSLazyPropertyParserImpl.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSLazyPropertyParserImpl.cpp b/third_party/WebKit/Source/core/css/parser/CSSLazyPropertyParserImpl.cpp
index 7431d1176b3fe0d5ec14f158b6ee2b4f09a2244d..c50b400893bf635f379d592009faa5e3f7dbf5c9 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSLazyPropertyParserImpl.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSLazyPropertyParserImpl.cpp
@@ -9,19 +9,14 @@
namespace blink {
-CSSLazyPropertyParserImpl::CSSLazyPropertyParserImpl(CSSParserTokenRange block,
+CSSLazyPropertyParserImpl::CSSLazyPropertyParserImpl(size_t startOffset,
CSSLazyParsingState* state)
- : CSSLazyPropertyParser(), m_lazyState(state) {
- // Reserve capacity to minimize heap bloat.
- size_t length = block.end() - block.begin();
- m_tokens.reserveCapacity(length);
- m_tokens.append(block.begin(), length);
-}
+ : CSSLazyPropertyParser(), m_startOffset(startOffset), m_lazyState(state) {}
StylePropertySet* CSSLazyPropertyParserImpl::parseProperties() {
m_lazyState->countRuleParsed();
return CSSParserImpl::parseDeclarationListForLazyStyle(
- m_tokens, m_lazyState->context());
+ m_lazyState->sheetText(), m_startOffset, m_lazyState->context());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698