| OLD | NEW |
| 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 if (res->ignoreForRequestCount()) | 805 if (res->ignoreForRequestCount()) |
| 806 return; | 806 return; |
| 807 | 807 |
| 808 --m_requestCount; | 808 --m_requestCount; |
| 809 ASSERT(m_requestCount > -1); | 809 ASSERT(m_requestCount > -1); |
| 810 } | 810 } |
| 811 | 811 |
| 812 void CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequ
est& request, const String& charset) | 812 void CachedResourceLoader::preload(CachedResource::Type type, CachedResourceRequ
est& request, const String& charset) |
| 813 { | 813 { |
| 814 bool delaySubresourceLoad = true; | 814 bool delaySubresourceLoad = true; |
| 815 #if PLATFORM(IOS) || PLATFORM(CHROMIUM) | 815 #if PLATFORM(IOS) |
| 816 delaySubresourceLoad = false; | 816 delaySubresourceLoad = false; |
| 817 #endif | 817 #endif |
| 818 if (delaySubresourceLoad) { | 818 if (delaySubresourceLoad) { |
| 819 bool hasRendering = m_document->body() && m_document->body()->renderer()
; | 819 bool hasRendering = m_document->body() && m_document->body()->renderer()
; |
| 820 bool canBlockParser = type == CachedResource::Script || type == CachedRe
source::CSSStyleSheet; | 820 bool canBlockParser = type == CachedResource::Script || type == CachedRe
source::CSSStyleSheet; |
| 821 if (!hasRendering && !canBlockParser) { | 821 if (!hasRendering && !canBlockParser) { |
| 822 // Don't preload subresources that can't block the parser before we
have something to draw. | 822 // Don't preload subresources that can't block the parser before we
have something to draw. |
| 823 // This helps prevent preloads from delaying first display when band
width is limited. | 823 // This helps prevent preloads from delaying first display when band
width is limited. |
| 824 PendingPreload pendingPreload = { type, request, charset }; | 824 PendingPreload pendingPreload = { type, request, charset }; |
| 825 m_pendingPreloads.append(pendingPreload); | 825 m_pendingPreloads.append(pendingPreload); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 | 977 |
| 978 } | 978 } |
| 979 | 979 |
| 980 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) | 980 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) |
| 981 { | 981 { |
| 982 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); | 982 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); |
| 983 return options; | 983 return options; |
| 984 } | 984 } |
| 985 | 985 |
| 986 } | 986 } |
| OLD | NEW |