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()); |
} |