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

Unified Diff: Source/core/html/HTMLEmbedElement.cpp

Issue 205523003: Remove beforeload events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove more tests Created 6 years, 9 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
« no previous file with comments | « Source/core/html/HTMLAttributeNames.in ('k') | Source/core/html/HTMLFrameElementBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLEmbedElement.cpp
diff --git a/Source/core/html/HTMLEmbedElement.cpp b/Source/core/html/HTMLEmbedElement.cpp
index 5c654679df4a98658d6b5f473d6b20ab32b4b484..7a66dd00275a430490dd1c6a4bc4166c52982fa9 100644
--- a/Source/core/html/HTMLEmbedElement.cpp
+++ b/Source/core/html/HTMLEmbedElement.cpp
@@ -146,20 +146,11 @@ void HTMLEmbedElement::updateWidgetInternal()
parametersForPlugin(paramNames, paramValues);
RefPtr<HTMLEmbedElement> protect(this); // Loading the plugin might remove us from the document.
- bool beforeLoadAllowedLoad = dispatchBeforeLoadEvent(m_url);
- if (!beforeLoadAllowedLoad) {
- if (document().isPluginDocument()) {
- // Plugins inside plugin documents load differently than other plugins. By the time
- // we are here in a plugin document, the load of the plugin (which is the plugin document's
- // main resource) has already started. We need to explicitly cancel the main resource load here.
- toPluginDocument(document()).cancelManualPluginLoad();
- }
- return;
- }
- if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer.
+
+ // FIXME: Can we not have renderer here now that beforeload events are gone?
+ if (!renderer())
return;
- // FIXME: beforeLoad could have detached the renderer! Just like in the <object> case above.
requestObject(m_url, m_serviceType, paramNames, paramValues);
}
« no previous file with comments | « Source/core/html/HTMLAttributeNames.in ('k') | Source/core/html/HTMLFrameElementBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698