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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 } | 571 } |
572 case Resource::MainResource: | 572 case Resource::MainResource: |
573 case Resource::Raw: | 573 case Resource::Raw: |
574 case Resource::LinkPrefetch: | 574 case Resource::LinkPrefetch: |
575 case Resource::LinkSubresource: | 575 case Resource::LinkSubresource: |
576 break; | 576 break; |
577 case Resource::Media: | 577 case Resource::Media: |
578 case Resource::TextTrack: | 578 case Resource::TextTrack: |
579 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowMediaFromSource(url, cspReporting)) | 579 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS
ecurityPolicy()->allowMediaFromSource(url, cspReporting)) |
580 return false; | 580 return false; |
| 581 |
| 582 if (frame()) { |
| 583 if (!frame()->loader().client()->allowMedia(url)) |
| 584 return false; |
| 585 } |
581 break; | 586 break; |
582 } | 587 } |
583 | 588 |
584 // SVG Images have unique security rules that prevent all subresource reques
ts | 589 // SVG Images have unique security rules that prevent all subresource reques
ts |
585 // except for data urls. | 590 // except for data urls. |
586 if (type != Resource::MainResource) { | 591 if (type != Resource::MainResource) { |
587 if (frame() && frame()->chromeClient().isSVGImageChromeClient() && !url.
protocolIsData()) | 592 if (frame() && frame()->chromeClient().isSVGImageChromeClient() && !url.
protocolIsData()) |
588 return false; | 593 return false; |
589 } | 594 } |
590 | 595 |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 } | 1490 } |
1486 } | 1491 } |
1487 | 1492 |
1488 void ResourceFetcher::trace(Visitor* visitor) | 1493 void ResourceFetcher::trace(Visitor* visitor) |
1489 { | 1494 { |
1490 visitor->trace(m_document); | 1495 visitor->trace(m_document); |
1491 ResourceLoaderHost::trace(visitor); | 1496 ResourceLoaderHost::trace(visitor); |
1492 } | 1497 } |
1493 | 1498 |
1494 } | 1499 } |
OLD | NEW |