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

Unified Diff: third_party/WebKit/Source/core/css/StyleSheetContents.h

Issue 2315923002: Lazy Parse CSS (Closed)
Patch Set: plug leaks 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/StyleSheetContents.h
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.h b/third_party/WebKit/Source/core/css/StyleSheetContents.h
index ae3d78c6608c4ca89226a7272d245209d69698af..3acb1a1bd4a1259ee18a8f74daf71f1b367504a8 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.h
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.h
@@ -159,6 +159,11 @@ public:
String sourceMapURL() const { return m_sourceMapURL; }
+ void takeEscapedStrings(std::unique_ptr<Vector<String>> strings)
+ {
+ m_escapedStrings.reset(strings.release());
+ }
+
DECLARE_TRACE();
private:
@@ -182,6 +187,9 @@ private:
AtomicString m_defaultNamespace;
WeakMember<CSSStyleSheetResource> m_referencedFromResource;
+ // Only initialized if using lazy parsing. Also referenced on the css resource.
+ String m_sheetText;
+
bool m_hasSyntacticallyValidCSSHeader : 1;
bool m_didLoadErrorOccur : 1;
bool m_isMutable : 1;
@@ -197,6 +205,10 @@ private:
Member<RuleSet> m_ruleSet;
String m_sourceMapURL;
+
+ // Used for retaining references to escaped strings for lazy parsing. For
+ // non-lazy parsing these are only retained in the CSSTokenizer::Scope.
+ std::unique_ptr<Vector<String>> m_escapedStrings;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698