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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 return (!mimeType.isEmpty() && url.isEmpty()) || | 615 return (!mimeType.isEmpty() && url.isEmpty()) || |
616 !MixedContentChecker::shouldBlockFetch( | 616 !MixedContentChecker::shouldBlockFetch( |
617 frame, WebURLRequest::RequestContextObject, | 617 frame, WebURLRequest::RequestContextObject, |
618 WebURLRequest::FrameTypeNone, | 618 WebURLRequest::FrameTypeNone, |
619 ResourceRequest::RedirectStatus::NoRedirect, url); | 619 ResourceRequest::RedirectStatus::NoRedirect, url); |
620 } | 620 } |
621 | 621 |
622 bool HTMLPlugInElement::allowedToLoadPlugin(const KURL& url, | 622 bool HTMLPlugInElement::allowedToLoadPlugin(const KURL& url, |
623 const String& mimeType) { | 623 const String& mimeType) { |
624 if (document().isSandboxed(SandboxPlugins)) { | 624 if (document().isSandboxed(SandboxPlugins)) { |
625 document().addConsoleMessage(ConsoleMessage::create( | 625 document().addConsoleMessage( |
626 SecurityMessageSource, ErrorMessageLevel, | 626 ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, |
627 "Failed to load '" + url.elidedString() + "' as a plugin, because the " | 627 "Failed to load '" + url.elidedString() + |
628 "frame into which the plugin " | 628 "' as a plugin, because the " |
629 "is loading is sandboxed.")); | 629 "frame into which the plugin " |
| 630 "is loading is sandboxed.")); |
630 return false; | 631 return false; |
631 } | 632 } |
632 return true; | 633 return true; |
633 } | 634 } |
634 | 635 |
635 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot&) { | 636 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot&) { |
636 userAgentShadowRoot()->appendChild(HTMLContentElement::create(document())); | 637 userAgentShadowRoot()->appendChild(HTMLContentElement::create(document())); |
637 } | 638 } |
638 | 639 |
639 bool HTMLPlugInElement::hasFallbackContent() const { | 640 bool HTMLPlugInElement::hasFallbackContent() const { |
640 return false; | 641 return false; |
641 } | 642 } |
642 | 643 |
643 bool HTMLPlugInElement::useFallbackContent() const { | 644 bool HTMLPlugInElement::useFallbackContent() const { |
644 return false; | 645 return false; |
645 } | 646 } |
646 | 647 |
647 void HTMLPlugInElement::lazyReattachIfNeeded() { | 648 void HTMLPlugInElement::lazyReattachIfNeeded() { |
648 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && | 649 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && |
649 !isImageType()) { | 650 !isImageType()) { |
650 lazyReattachIfAttached(); | 651 lazyReattachIfAttached(); |
651 setPersistedPluginWidget(nullptr); | 652 setPersistedPluginWidget(nullptr); |
652 } | 653 } |
653 } | 654 } |
654 | 655 |
655 } // namespace blink | 656 } // namespace blink |
OLD | NEW |