| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 // when using fallback content. | 458 // when using fallback content. |
| 459 if (!layoutObject() || !layoutObject()->isEmbeddedObject()) | 459 if (!layoutObject() || !layoutObject()->isEmbeddedObject()) |
| 460 return LayoutEmbeddedItem(nullptr); | 460 return LayoutEmbeddedItem(nullptr); |
| 461 return LayoutEmbeddedItem(toLayoutEmbeddedObject(layoutObject())); | 461 return LayoutEmbeddedItem(toLayoutEmbeddedObject(layoutObject())); |
| 462 } | 462 } |
| 463 | 463 |
| 464 // We don't use m_url, as it may not be the final URL that the object loads, | 464 // We don't use m_url, as it may not be the final URL that the object loads, |
| 465 // depending on <param> values. | 465 // depending on <param> values. |
| 466 bool HTMLPlugInElement::allowedToLoadFrameURL(const String& url) { | 466 bool HTMLPlugInElement::allowedToLoadFrameURL(const String& url) { |
| 467 KURL completeURL = document().completeURL(url); | 467 KURL completeURL = document().completeURL(url); |
| 468 if (contentFrame() && completeURL.protocolIsJavaScript() && | 468 return !(contentFrame() && completeURL.protocolIsJavaScript() && |
| 469 !document().getSecurityOrigin()->canAccess( | 469 !document().getSecurityOrigin()->canAccess( |
| 470 contentFrame()->securityContext()->getSecurityOrigin())) | 470 contentFrame()->securityContext()->getSecurityOrigin())); |
| 471 return false; | |
| 472 return document().frame()->isURLAllowed(completeURL); | |
| 473 } | 471 } |
| 474 | 472 |
| 475 // We don't use m_url, or m_serviceType as they may not be the final values | 473 // We don't use m_url, or m_serviceType as they may not be the final values |
| 476 // that <object> uses depending on <param> values. | 474 // that <object> uses depending on <param> values. |
| 477 bool HTMLPlugInElement::wouldLoadAsNetscapePlugin(const String& url, | 475 bool HTMLPlugInElement::wouldLoadAsNetscapePlugin(const String& url, |
| 478 const String& serviceType) { | 476 const String& serviceType) { |
| 479 DCHECK(document().frame()); | 477 DCHECK(document().frame()); |
| 480 KURL completedURL; | 478 KURL completedURL; |
| 481 if (!url.isEmpty()) | 479 if (!url.isEmpty()) |
| 482 completedURL = document().completeURL(url); | 480 completedURL = document().completeURL(url); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 | 646 |
| 649 void HTMLPlugInElement::lazyReattachIfNeeded() { | 647 void HTMLPlugInElement::lazyReattachIfNeeded() { |
| 650 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && | 648 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && |
| 651 !isImageType()) { | 649 !isImageType()) { |
| 652 lazyReattachIfAttached(); | 650 lazyReattachIfAttached(); |
| 653 setPersistedPluginWidget(nullptr); | 651 setPersistedPluginWidget(nullptr); |
| 654 } | 652 } |
| 655 } | 653 } |
| 656 | 654 |
| 657 } // namespace blink | 655 } // namespace blink |
| OLD | NEW |