Chromium Code Reviews| 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 if (contentFrame() && completeURL.protocolIsJavaScript() && |
| 469 !document().getSecurityOrigin()->canAccess( | 469 !document().getSecurityOrigin()->canAccess( |
| 470 contentFrame()->securityContext()->getSecurityOrigin())) | 470 contentFrame()->securityContext()->getSecurityOrigin())) |
| 471 return false; | 471 return false; |
| 472 return document().frame()->isURLAllowed(completeURL); | 472 return true; |
|
dcheng
2017/02/12 08:34:59
Nit: it's a really long return, but the usual conv
davidsac (gone - try alexmos)
2017/02/14 00:50:03
Done.
| |
| 473 } | 473 } |
| 474 | 474 |
| 475 // We don't use m_url, or m_serviceType as they may not be the final values | 475 // 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. | 476 // that <object> uses depending on <param> values. |
| 477 bool HTMLPlugInElement::wouldLoadAsNetscapePlugin(const String& url, | 477 bool HTMLPlugInElement::wouldLoadAsNetscapePlugin(const String& url, |
| 478 const String& serviceType) { | 478 const String& serviceType) { |
| 479 DCHECK(document().frame()); | 479 DCHECK(document().frame()); |
| 480 KURL completedURL; | 480 KURL completedURL; |
| 481 if (!url.isEmpty()) | 481 if (!url.isEmpty()) |
| 482 completedURL = document().completeURL(url); | 482 completedURL = document().completeURL(url); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 648 | 648 |
| 649 void HTMLPlugInElement::lazyReattachIfNeeded() { | 649 void HTMLPlugInElement::lazyReattachIfNeeded() { |
| 650 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && | 650 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && |
| 651 !isImageType()) { | 651 !isImageType()) { |
| 652 lazyReattachIfAttached(); | 652 lazyReattachIfAttached(); |
| 653 setPersistedPluginWidget(nullptr); | 653 setPersistedPluginWidget(nullptr); |
| 654 } | 654 } |
| 655 } | 655 } |
| 656 | 656 |
| 657 } // namespace blink | 657 } // namespace blink |
| OLD | NEW |