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

Unified Diff: Source/core/html/parser/HTMLResourcePreloader.cpp

Issue 14449003: Picture element initial implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@picture_after_rebase
Patch Set: Created 7 years, 8 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 | « Source/core/html/parser/HTMLResourcePreloader.h ('k') | Source/core/page/DOMWindow.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLResourcePreloader.cpp
diff --git a/Source/core/html/parser/HTMLResourcePreloader.cpp b/Source/core/html/parser/HTMLResourcePreloader.cpp
index 22ebf212b6e39d4abb77a4b21d6da6566ca707b6..64f90829ee4bf46899af7507fdca979e16c9fba8 100644
--- a/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -79,12 +79,26 @@ static bool mediaAttributeMatches(Frame* frame, RenderStyle* renderStyle, const
void HTMLResourcePreloader::preload(PassOwnPtr<PreloadRequest> preload)
{
+ if (preload->bundleStart()) {
+ m_inBundle = true;
+ return;
+ }
+ if (preload->bundleEnd()) {
+ m_inBundle = false;
+ m_foundBundleResource = false;
+ return;
+ }
ASSERT(m_document->frame());
ASSERT(m_document->renderer());
ASSERT(m_document->renderer()->style());
if (!preload->media().isEmpty() && !mediaAttributeMatches(m_document->frame(), m_document->renderer()->style(), preload->media()))
return;
+ if (m_inBundle && m_foundBundleResource)
+ return;
+
+ m_foundBundleResource = true;
+
CachedResourceRequest request = preload->resourceRequest(m_document);
m_document->cachedResourceLoader()->preload(preload->resourceType(), request, preload->charset());
}
« no previous file with comments | « Source/core/html/parser/HTMLResourcePreloader.h ('k') | Source/core/page/DOMWindow.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698