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

Unified Diff: Source/core/fetch/CSSStyleSheetResource.cpp

Issue 166633002: Prefetch @import files from CSS files. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Prefetching now handled just like for other resources. Created 6 years, 10 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: Source/core/fetch/CSSStyleSheetResource.cpp
diff --git a/Source/core/fetch/CSSStyleSheetResource.cpp b/Source/core/fetch/CSSStyleSheetResource.cpp
index 38dffed655f0f3b8975f979f5bb868bb7c97e4e7..973f44f01d77dc33cd1501b2021ee54267daf317 100644
--- a/Source/core/fetch/CSSStyleSheetResource.cpp
+++ b/Source/core/fetch/CSSStyleSheetResource.cpp
@@ -108,6 +108,16 @@ void CSSStyleSheetResource::checkNotify()
m_decodedSheetText = String();
}
+void CSSStyleSheetResource::appendData(const char* data, int length)
+{
+ Resource::appendData(data, length);
+
+ ResourcePtr<CSSStyleSheetResource> protect(this);
+ ResourceClientWalker<StyleSheetResourceClient> w(m_clients);
+ while (StyleSheetResourceClient* c = w.next())
+ c->dataReceived(this, data, length);
+}
+
bool CSSStyleSheetResource::isSafeToUnlock() const
{
return m_parsedStyleSheetCache;

Powered by Google App Engine
This is Rietveld 408576698