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

Side by Side Diff: Source/WebCore/loader/cache/CachedResourceLoader.cpp

Issue 11759004: Revert 129070 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/loader/ResourceLoadScheduler.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 --m_requestCount; 789 --m_requestCount;
790 ASSERT(m_requestCount > -1); 790 ASSERT(m_requestCount > -1);
791 } 791 }
792 792
793 void CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequ est& request, const String& charset, bool referencedFromBody) 793 void CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequ est& request, const String& charset, bool referencedFromBody)
794 { 794 {
795 // FIXME: Rip this out when we are sure it is no longer necessary (even for mobile). 795 // FIXME: Rip this out when we are sure it is no longer necessary (even for mobile).
796 UNUSED_PARAM(referencedFromBody); 796 UNUSED_PARAM(referencedFromBody);
797 797
798 bool delaySubresourceLoad = true; 798 bool delaySubresourceLoad = true;
799 #if PLATFORM(IOS) || PLATFORM(CHROMIUM) 799 #if PLATFORM(IOS)
800 delaySubresourceLoad = false; 800 delaySubresourceLoad = false;
801 #endif 801 #endif
802 if (delaySubresourceLoad) { 802 if (delaySubresourceLoad) {
803 bool hasRendering = m_document->body() && m_document->body()->renderer() ; 803 bool hasRendering = m_document->body() && m_document->body()->renderer() ;
804 bool canBlockParser = type == CachedResource::Script || type == CachedRe source::CSSStyleSheet; 804 bool canBlockParser = type == CachedResource::Script || type == CachedRe source::CSSStyleSheet;
805 if (!hasRendering && !canBlockParser) { 805 if (!hasRendering && !canBlockParser) {
806 // Don't preload subresources that can't block the parser before we have something to draw. 806 // Don't preload subresources that can't block the parser before we have something to draw.
807 // This helps prevent preloads from delaying first display when band width is limited. 807 // This helps prevent preloads from delaying first display when band width is limited.
808 PendingPreload pendingPreload = { type, request, charset }; 808 PendingPreload pendingPreload = { type, request, charset };
809 m_pendingPreloads.append(pendingPreload); 809 m_pendingPreloads.append(pendingPreload);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 info.addMember(m_pendingPreloads); 953 info.addMember(m_pendingPreloads);
954 } 954 }
955 955
956 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( ) 956 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( )
957 { 957 {
958 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); 958 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck);
959 return options; 959 return options;
960 } 960 }
961 961
962 } 962 }
OLDNEW
« no previous file with comments | « Source/WebCore/loader/ResourceLoadScheduler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698