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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 return LayoutEmbeddedItem(nullptr); | 446 return LayoutEmbeddedItem(nullptr); |
447 return LayoutEmbeddedItem(toLayoutEmbeddedObject(layoutObject())); | 447 return LayoutEmbeddedItem(toLayoutEmbeddedObject(layoutObject())); |
448 } | 448 } |
449 | 449 |
450 // We don't use m_url, as it may not be the final URL that the object loads, | 450 // We don't use m_url, as it may not be the final URL that the object loads, |
451 // depending on <param> values. | 451 // depending on <param> values. |
452 bool HTMLPlugInElement::allowedToLoadFrameURL(const String& url) | 452 bool HTMLPlugInElement::allowedToLoadFrameURL(const String& url) |
453 { | 453 { |
454 KURL completeURL = document().completeURL(url); | 454 KURL completeURL = document().completeURL(url); |
455 if (contentFrame() && protocolIsJavaScript(completeURL) | 455 if (contentFrame() && protocolIsJavaScript(completeURL) |
456 && !document().securityOrigin()->canAccess(contentFrame()->securityConte
xt()->securityOrigin())) | 456 && !document().getSecurityOrigin()->canAccess(contentFrame()->securityCo
ntext()->getSecurityOrigin())) |
457 return false; | 457 return false; |
458 return document().frame()->isURLAllowed(completeURL); | 458 return document().frame()->isURLAllowed(completeURL); |
459 } | 459 } |
460 | 460 |
461 // We don't use m_url, or m_serviceType as they may not be the final values | 461 // We don't use m_url, or m_serviceType as they may not be the final values |
462 // that <object> uses depending on <param> values. | 462 // that <object> uses depending on <param> values. |
463 bool HTMLPlugInElement::wouldLoadAsNetscapePlugin(const String& url, const Strin
g& serviceType) | 463 bool HTMLPlugInElement::wouldLoadAsNetscapePlugin(const String& url, const Strin
g& serviceType) |
464 { | 464 { |
465 ASSERT(document().frame()); | 465 ASSERT(document().frame()); |
466 KURL completedURL; | 466 KURL completedURL; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 return false; | 576 return false; |
577 | 577 |
578 LocalFrame* frame = document().frame(); | 578 LocalFrame* frame = document().frame(); |
579 Settings* settings = frame->settings(); | 579 Settings* settings = frame->settings(); |
580 if (!settings) | 580 if (!settings) |
581 return false; | 581 return false; |
582 | 582 |
583 if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType)) | 583 if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType)) |
584 return false; | 584 return false; |
585 | 585 |
586 if (!document().securityOrigin()->canDisplay(url)) { | 586 if (!document().getSecurityOrigin()->canDisplay(url)) { |
587 FrameLoader::reportLocalLoadFailed(frame, url.getString()); | 587 FrameLoader::reportLocalLoadFailed(frame, url.getString()); |
588 return false; | 588 return false; |
589 } | 589 } |
590 | 590 |
591 AtomicString declaredMimeType = document().isPluginDocument() && document().
ownerElement() ? | 591 AtomicString declaredMimeType = document().isPluginDocument() && document().
ownerElement() ? |
592 document().ownerElement()->fastGetAttribute(HTMLNames::typeAttr) : | 592 document().ownerElement()->fastGetAttribute(HTMLNames::typeAttr) : |
593 fastGetAttribute(HTMLNames::typeAttr); | 593 fastGetAttribute(HTMLNames::typeAttr); |
594 if (!document().contentSecurityPolicy()->allowObjectFromSource(url) | 594 if (!document().contentSecurityPolicy()->allowObjectFromSource(url) |
595 || !document().contentSecurityPolicy()->allowPluginTypeForDocument(docum
ent(), mimeType, declaredMimeType, url)) { | 595 || !document().contentSecurityPolicy()->allowPluginTypeForDocument(docum
ent(), mimeType, declaredMimeType, url)) { |
596 layoutEmbeddedItem().setPluginUnavailabilityReason(LayoutEmbeddedObject:
:PluginBlockedByContentSecurityPolicy); | 596 layoutEmbeddedItem().setPluginUnavailabilityReason(LayoutEmbeddedObject:
:PluginBlockedByContentSecurityPolicy); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 return openShadowRoot(); | 631 return openShadowRoot(); |
632 } | 632 } |
633 | 633 |
634 void HTMLPlugInElement::lazyReattachIfNeeded() | 634 void HTMLPlugInElement::lazyReattachIfNeeded() |
635 { | 635 { |
636 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma
geType()) | 636 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma
geType()) |
637 lazyReattachIfAttached(); | 637 lazyReattachIfAttached(); |
638 } | 638 } |
639 | 639 |
640 } // namespace blink | 640 } // namespace blink |
OLD | NEW |