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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowFontFromSource(url)) | 500 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowFontFromSource(url)) |
501 return false; | 501 return false; |
502 break; | 502 break; |
503 } | 503 } |
504 case Resource::MainResource: | 504 case Resource::MainResource: |
505 case Resource::Raw: | 505 case Resource::Raw: |
506 case Resource::LinkPrefetch: | 506 case Resource::LinkPrefetch: |
507 case Resource::LinkSubresource: | 507 case Resource::LinkSubresource: |
508 break; | 508 break; |
509 case Resource::TextTrack: | 509 case Resource::TextTrack: |
510 // Cues aren't called out in the CSP spec yet, but they only work with a
media element | |
511 // so use the media policy. | |
512 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowMediaFromSource(url)) | 510 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowMediaFromSource(url)) |
513 return false; | 511 return false; |
514 break; | 512 break; |
515 } | 513 } |
516 | 514 |
517 // Last of all, check for insecure content. We do this last so that when | 515 // Last of all, check for insecure content. We do this last so that when |
518 // folks block insecure content with a CSP policy, they don't get a warning. | 516 // folks block insecure content with a CSP policy, they don't get a warning. |
519 // They'll still get a warning in the console about CSP blocking the load. | 517 // They'll still get a warning in the console about CSP blocking the load. |
520 | 518 |
521 // FIXME: Should we consider forPreload here? | 519 // FIXME: Should we consider forPreload here? |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 } | 1318 } |
1321 #endif | 1319 #endif |
1322 | 1320 |
1323 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() | 1321 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() |
1324 { | 1322 { |
1325 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon
tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF
orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, UseDefaul
tOriginRestrictionsForType, DocumentContext)); | 1323 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon
tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF
orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, UseDefaul
tOriginRestrictionsForType, DocumentContext)); |
1326 return options; | 1324 return options; |
1327 } | 1325 } |
1328 | 1326 |
1329 } | 1327 } |
OLD | NEW |