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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 } | 578 } |
579 case Resource::MainResource: | 579 case Resource::MainResource: |
580 case Resource::Raw: | 580 case Resource::Raw: |
581 case Resource::LinkPrefetch: | 581 case Resource::LinkPrefetch: |
582 case Resource::LinkSubresource: | 582 case Resource::LinkSubresource: |
583 break; | 583 break; |
584 case Resource::Media: | 584 case Resource::Media: |
585 case Resource::TextTrack: | 585 case Resource::TextTrack: |
586 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowMediaFromSource(url, cspReporting)) | 586 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowMediaFromSource(url, cspReporting)) |
587 return false; | 587 return false; |
| 588 |
| 589 if (frame()) { |
| 590 if (!frame()->loader().client()->allowMedia(url)) |
| 591 return false; |
| 592 } |
588 break; | 593 break; |
589 } | 594 } |
590 | 595 |
591 // Last of all, check for insecure content. We do this last so that when | 596 // Last of all, check for insecure content. We do this last so that when |
592 // folks block insecure content with a CSP policy, they don't get a warning. | 597 // folks block insecure content with a CSP policy, they don't get a warning. |
593 // They'll still get a warning in the console about CSP blocking the load. | 598 // They'll still get a warning in the console about CSP blocking the load. |
594 | 599 |
595 // FIXME: Should we consider forPreload here? | 600 // FIXME: Should we consider forPreload here? |
596 if (!checkInsecureContent(type, url, options.mixedContentBlockingTreatment)) | 601 if (!checkInsecureContent(type, url, options.mixedContentBlockingTreatment)) |
597 return false; | 602 return false; |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 } | 1497 } |
1493 } | 1498 } |
1494 | 1499 |
1495 void ResourceFetcher::trace(Visitor* visitor) | 1500 void ResourceFetcher::trace(Visitor* visitor) |
1496 { | 1501 { |
1497 visitor->trace(m_document); | 1502 visitor->trace(m_document); |
1498 ResourceLoaderHost::trace(visitor); | 1503 ResourceLoaderHost::trace(visitor); |
1499 } | 1504 } |
1500 | 1505 |
1501 } | 1506 } |
OLD | NEW |