Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed const changes and some gratuitous checks Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
index 9c3e5a948a0cb28dd1e21f5d12af8e3e60db8419..dbf2143fc4f62efaa21d3b11b648570c68f20247 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -534,8 +534,8 @@ bool HTMLPlugInElement::shouldUsePlugin(const KURL& url, const String& mimeType,
void HTMLPlugInElement::dispatchErrorEvent()
{
- if (document().isPluginDocument() && document().ownerElement())
- document().ownerElement()->dispatchEvent(Event::create(EventTypeNames::error));
+ if (document().isPluginDocument() && document().localOwner())
+ document().localOwner()->dispatchEvent(Event::create(EventTypeNames::error));
else
dispatchEvent(Event::create(EventTypeNames::error));
}
@@ -558,8 +558,8 @@ bool HTMLPlugInElement::allowedToLoadObject(const KURL& url, const String& mimeT
return false;
}
- AtomicString declaredMimeType = document().isPluginDocument() && document().ownerElement() ?
- document().ownerElement()->fastGetAttribute(HTMLNames::typeAttr) :
+ AtomicString declaredMimeType = document().isPluginDocument() && document().localOwner() ?
+ document().localOwner()->fastGetAttribute(HTMLNames::typeAttr) :
fastGetAttribute(HTMLNames::typeAttr);
if (!document().contentSecurityPolicy()->allowObjectFromSource(url)
|| !document().contentSecurityPolicy()->allowPluginTypeForDocument(document(), mimeType, declaredMimeType, url)) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp ('k') | third_party/WebKit/Source/core/html/ImageDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698