| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 return ResourceLoadPriorityVeryHigh; | 114 return ResourceLoadPriorityVeryHigh; |
| 115 case Resource::CSSStyleSheet: | 115 case Resource::CSSStyleSheet: |
| 116 return ResourceLoadPriorityHigh; | 116 return ResourceLoadPriorityHigh; |
| 117 case Resource::Raw: | 117 case Resource::Raw: |
| 118 return request.options().synchronousPolicy == RequestSynchronously ? Res
ourceLoadPriorityVeryHigh : ResourceLoadPriorityMedium; | 118 return request.options().synchronousPolicy == RequestSynchronously ? Res
ourceLoadPriorityVeryHigh : ResourceLoadPriorityMedium; |
| 119 case Resource::Script: | 119 case Resource::Script: |
| 120 case Resource::Font: | 120 case Resource::Font: |
| 121 case Resource::ImportResource: | 121 case Resource::ImportResource: |
| 122 return ResourceLoadPriorityMedium; | 122 return ResourceLoadPriorityMedium; |
| 123 case Resource::Image: | 123 case Resource::Image: |
| 124 return request.forPreload() ? ResourceLoadPriorityVeryLow : ResourceLoad
PriorityLow; | 124 // We'll default images to VeryLow, and promote whatever is visible. Thi
s improves |
| 125 // speed-index by ~5% on average, ~14% at the 99th percentile. |
| 126 return ResourceLoadPriorityVeryLow; |
| 125 case Resource::XSLStyleSheet: | 127 case Resource::XSLStyleSheet: |
| 126 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); | 128 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); |
| 127 return ResourceLoadPriorityHigh; | 129 return ResourceLoadPriorityHigh; |
| 128 case Resource::SVGDocument: | 130 case Resource::SVGDocument: |
| 129 return ResourceLoadPriorityLow; | 131 return ResourceLoadPriorityLow; |
| 130 case Resource::LinkPrefetch: | 132 case Resource::LinkPrefetch: |
| 131 return ResourceLoadPriorityVeryLow; | 133 return ResourceLoadPriorityVeryLow; |
| 132 case Resource::LinkSubresource: | 134 case Resource::LinkSubresource: |
| 133 return ResourceLoadPriorityLow; | 135 return ResourceLoadPriorityLow; |
| 134 case Resource::TextTrack: | 136 case Resource::TextTrack: |
| (...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 } | 1333 } |
| 1332 #endif | 1334 #endif |
| 1333 | 1335 |
| 1334 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() | 1336 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() |
| 1335 { | 1337 { |
| 1336 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon
tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF
orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentC
ontext)); | 1338 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon
tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF
orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentC
ontext)); |
| 1337 return options; | 1339 return options; |
| 1338 } | 1340 } |
| 1339 | 1341 |
| 1340 } | 1342 } |
| OLD | NEW |