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

Unified Diff: Source/core/html/HTMLObjectElement.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/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLPlugInElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLObjectElement.cpp
diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp
index b92e993d5a0690df3247ac7fec4dcea7a23a6f12..43f078a639b464ec6e40f9b832229c871fd01898 100644
--- a/Source/core/html/HTMLObjectElement.cpp
+++ b/Source/core/html/HTMLObjectElement.cpp
@@ -111,8 +111,6 @@ void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicSt
} else if (name == classidAttr) {
m_classId = value;
reloadPluginOnAttributeChange(name);
- } else if (name == onbeforeloadAttr) {
- setAttributeEventListener(EventTypeNames::beforeload, createAttributeEventListener(this, name, value));
} else {
HTMLPlugInElement::parseAttribute(name, value);
}
@@ -319,12 +317,11 @@ void HTMLObjectElement::updateWidgetInternal()
bool fallbackContent = hasFallbackContent();
renderEmbeddedObject()->setHasFallbackContent(fallbackContent);
- RefPtr<HTMLObjectElement> protect(this); // beforeload and plugin loading can make arbitrary DOM mutations.
- bool beforeLoadAllowedLoad = dispatchBeforeLoadEvent(url);
- if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer.
+ // FIXME: Is it possible to get here without a renderer now that we don't have beforeload events?
+ if (!renderer())
return;
- if (!beforeLoadAllowedLoad || !hasValidClassId() || !requestObject(url, serviceType, paramNames, paramValues)) {
+ if (!hasValidClassId() || !requestObject(url, serviceType, paramNames, paramValues)) {
if (!url.isEmpty())
dispatchErrorEvent();
if (fallbackContent)
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLPlugInElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698