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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 | 648 |
649 LocalFrame* frame = GetDocument().GetFrame(); | 649 LocalFrame* frame = GetDocument().GetFrame(); |
650 Settings* settings = frame->GetSettings(); | 650 Settings* settings = frame->GetSettings(); |
651 if (!settings) | 651 if (!settings) |
652 return false; | 652 return false; |
653 | 653 |
654 if (MIMETypeRegistry::IsJavaAppletMIMEType(mime_type)) | 654 if (MIMETypeRegistry::IsJavaAppletMIMEType(mime_type)) |
655 return false; | 655 return false; |
656 | 656 |
657 if (!GetDocument().GetSecurityOrigin()->CanDisplay(url)) { | 657 if (!GetDocument().GetSecurityOrigin()->CanDisplay(url)) { |
658 FrameLoader::ReportLocalLoadFailed(frame, url.GetString()); | 658 GetDocument().ReportLocalLoadFailed(url.GetString()); |
659 return false; | 659 return false; |
660 } | 660 } |
661 | 661 |
662 AtomicString declared_mime_type = FastGetAttribute(HTMLNames::typeAttr); | 662 AtomicString declared_mime_type = FastGetAttribute(HTMLNames::typeAttr); |
663 if (!GetDocument().GetContentSecurityPolicy()->AllowObjectFromSource(url) || | 663 if (!GetDocument().GetContentSecurityPolicy()->AllowObjectFromSource(url) || |
664 !GetDocument().GetContentSecurityPolicy()->AllowPluginTypeForDocument( | 664 !GetDocument().GetContentSecurityPolicy()->AllowPluginTypeForDocument( |
665 GetDocument(), mime_type, declared_mime_type, url)) { | 665 GetDocument(), mime_type, declared_mime_type, url)) { |
666 if (LayoutEmbeddedItem layout_item = GetLayoutEmbeddedItem()) { | 666 if (LayoutEmbeddedItem layout_item = GetLayoutEmbeddedItem()) { |
667 plugin_is_available_ = false; | 667 plugin_is_available_ = false; |
668 layout_item.SetPluginAvailability( | 668 layout_item.SetPluginAvailability( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 | 707 |
708 void HTMLPlugInElement::LazyReattachIfNeeded() { | 708 void HTMLPlugInElement::LazyReattachIfNeeded() { |
709 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && | 709 if (!UseFallbackContent() && NeedsPluginUpdate() && GetLayoutObject() && |
710 !IsImageType()) { | 710 !IsImageType()) { |
711 LazyReattachIfAttached(); | 711 LazyReattachIfAttached(); |
712 SetPersistedPlugin(nullptr); | 712 SetPersistedPlugin(nullptr); |
713 } | 713 } |
714 } | 714 } |
715 | 715 |
716 } // namespace blink | 716 } // namespace blink |
OLD | NEW |