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