OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "core/dom/shadow/ShadowRoot.h" | 32 #include "core/dom/shadow/ShadowRoot.h" |
33 #include "core/events/Event.h" | 33 #include "core/events/Event.h" |
34 #include "core/frame/FrameView.h" | 34 #include "core/frame/FrameView.h" |
35 #include "core/frame/LocalFrame.h" | 35 #include "core/frame/LocalFrame.h" |
36 #include "core/frame/Settings.h" | 36 #include "core/frame/Settings.h" |
37 #include "core/frame/csp/ContentSecurityPolicy.h" | 37 #include "core/frame/csp/ContentSecurityPolicy.h" |
38 #include "core/html/HTMLContentElement.h" | 38 #include "core/html/HTMLContentElement.h" |
39 #include "core/html/HTMLImageLoader.h" | 39 #include "core/html/HTMLImageLoader.h" |
40 #include "core/html/PluginDocument.h" | 40 #include "core/html/PluginDocument.h" |
41 #include "core/loader/FrameLoaderClient.h" | 41 #include "core/loader/FrameLoaderClient.h" |
| 42 #include "core/loader/MixedContentChecker.h" |
42 #include "core/page/EventHandler.h" | 43 #include "core/page/EventHandler.h" |
43 #include "core/page/Page.h" | 44 #include "core/page/Page.h" |
44 #include "core/plugins/PluginView.h" | 45 #include "core/plugins/PluginView.h" |
45 #include "core/rendering/RenderBlockFlow.h" | 46 #include "core/rendering/RenderBlockFlow.h" |
46 #include "core/rendering/RenderEmbeddedObject.h" | 47 #include "core/rendering/RenderEmbeddedObject.h" |
47 #include "core/rendering/RenderImage.h" | 48 #include "core/rendering/RenderImage.h" |
48 #include "core/rendering/RenderWidget.h" | 49 #include "core/rendering/RenderWidget.h" |
49 #include "platform/Logging.h" | 50 #include "platform/Logging.h" |
50 #include "platform/MIMETypeFromURL.h" | 51 #include "platform/MIMETypeFromURL.h" |
51 #include "platform/MIMETypeRegistry.h" | 52 #include "platform/MIMETypeRegistry.h" |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 | 555 |
555 AtomicString declaredMimeType = document().isPluginDocument() && document().
ownerElement() ? | 556 AtomicString declaredMimeType = document().isPluginDocument() && document().
ownerElement() ? |
556 document().ownerElement()->fastGetAttribute(HTMLNames::typeAttr) : | 557 document().ownerElement()->fastGetAttribute(HTMLNames::typeAttr) : |
557 fastGetAttribute(HTMLNames::typeAttr); | 558 fastGetAttribute(HTMLNames::typeAttr); |
558 if (!document().contentSecurityPolicy()->allowObjectFromSource(url) | 559 if (!document().contentSecurityPolicy()->allowObjectFromSource(url) |
559 || !document().contentSecurityPolicy()->allowPluginType(mimeType, declar
edMimeType, url)) { | 560 || !document().contentSecurityPolicy()->allowPluginType(mimeType, declar
edMimeType, url)) { |
560 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje
ct::PluginBlockedByContentSecurityPolicy); | 561 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje
ct::PluginBlockedByContentSecurityPolicy); |
561 return false; | 562 return false; |
562 } | 563 } |
563 | 564 |
564 return frame->loader().mixedContentChecker()->canRunInsecureContent(document
().securityOrigin(), url); | 565 return !MixedContentChecker::shouldBlockFetch(frame, WebURLRequest::RequestC
ontextObject, WebURLRequest::FrameTypeNone, url); |
565 } | 566 } |
566 | 567 |
567 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot&) | 568 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot&) |
568 { | 569 { |
569 userAgentShadowRoot()->appendChild(HTMLContentElement::create(document())); | 570 userAgentShadowRoot()->appendChild(HTMLContentElement::create(document())); |
570 } | 571 } |
571 | 572 |
572 void HTMLPlugInElement::willAddFirstAuthorShadowRoot() | 573 void HTMLPlugInElement::willAddFirstAuthorShadowRoot() |
573 { | 574 { |
574 lazyReattachIfAttached(); | 575 lazyReattachIfAttached(); |
(...skipping 11 matching lines...) Expand all Loading... |
586 | 587 |
587 void HTMLPlugInElement::setUsePlaceholderContent(bool use) | 588 void HTMLPlugInElement::setUsePlaceholderContent(bool use) |
588 { | 589 { |
589 if (use != m_usePlaceholderContent) { | 590 if (use != m_usePlaceholderContent) { |
590 m_usePlaceholderContent = use; | 591 m_usePlaceholderContent = use; |
591 lazyReattachIfAttached(); | 592 lazyReattachIfAttached(); |
592 } | 593 } |
593 } | 594 } |
594 | 595 |
595 } | 596 } |
OLD | NEW |