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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowScriptFromSource(url)) | 493 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowScriptFromSource(url)) |
494 return false; | 494 return false; |
495 break; | 495 break; |
496 case Resource::Script: | 496 case Resource::Script: |
497 case Resource::ImportResource: | 497 case Resource::ImportResource: |
498 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowScriptFromSource(url)) | 498 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowScriptFromSource(url)) |
499 return false; | 499 return false; |
500 | 500 |
501 if (frame()) { | 501 if (frame()) { |
502 Settings* settings = frame()->settings(); | 502 Settings* settings = frame()->settings(); |
503 if (!frame()->loader().client()->allowScriptFromSource(!settings ||
settings->isScriptEnabled(), url)) { | 503 if (!frame()->loader().client()->allowScriptFromSource(!settings ||
settings->scriptEnabled(), url)) { |
504 frame()->loader().client()->didNotAllowScript(); | 504 frame()->loader().client()->didNotAllowScript(); |
505 return false; | 505 return false; |
506 } | 506 } |
507 } | 507 } |
508 break; | 508 break; |
509 case Resource::Shader: | 509 case Resource::Shader: |
510 // Since shaders are referenced from CSS Styles use the same rules here. | 510 // Since shaders are referenced from CSS Styles use the same rules here. |
511 case Resource::CSSStyleSheet: | 511 case Resource::CSSStyleSheet: |
512 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowStyleFromSource(url)) | 512 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowStyleFromSource(url)) |
513 return false; | 513 return false; |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 } | 1347 } |
1348 #endif | 1348 #endif |
1349 | 1349 |
1350 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() | 1350 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() |
1351 { | 1351 { |
1352 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SniffContent, BufferDat
a, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCr
edentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentContext)); | 1352 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SniffContent, BufferDat
a, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCr
edentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentContext)); |
1353 return options; | 1353 return options; |
1354 } | 1354 } |
1355 | 1355 |
1356 } | 1356 } |
OLD | NEW |