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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowScriptFromSource(url)) | 499 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowScriptFromSource(url)) |
500 return false; | 500 return false; |
501 break; | 501 break; |
502 case Resource::Script: | 502 case Resource::Script: |
503 case Resource::ImportResource: | 503 case Resource::ImportResource: |
504 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowScriptFromSource(url)) | 504 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowScriptFromSource(url)) |
505 return false; | 505 return false; |
506 | 506 |
507 if (frame()) { | 507 if (frame()) { |
508 Settings* settings = frame()->settings(); | 508 Settings* settings = frame()->settings(); |
509 if (!frame()->loader().client()->allowScriptFromSource(!settings ||
settings->isScriptEnabled(), url)) { | 509 if (!frame()->loader().client()->allowScriptFromSource(!settings ||
settings->scriptEnabled(), url)) { |
510 frame()->loader().client()->didNotAllowScript(); | 510 frame()->loader().client()->didNotAllowScript(); |
511 return false; | 511 return false; |
512 } | 512 } |
513 } | 513 } |
514 break; | 514 break; |
515 case Resource::Shader: | 515 case Resource::Shader: |
516 // Since shaders are referenced from CSS Styles use the same rules here. | 516 // Since shaders are referenced from CSS Styles use the same rules here. |
517 case Resource::CSSStyleSheet: | 517 case Resource::CSSStyleSheet: |
518 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowStyleFromSource(url)) | 518 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowStyleFromSource(url)) |
519 return false; | 519 return false; |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 case Revalidate: | 1407 case Revalidate: |
1408 ++m_revalidateCount; | 1408 ++m_revalidateCount; |
1409 return; | 1409 return; |
1410 case Use: | 1410 case Use: |
1411 ++m_useCount; | 1411 ++m_useCount; |
1412 return; | 1412 return; |
1413 } | 1413 } |
1414 } | 1414 } |
1415 | 1415 |
1416 } | 1416 } |
OLD | NEW |