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

Unified Diff: Source/core/html/HTMLPlugInElement.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/HTMLPlugInElement.h ('k') | Source/core/html/HTMLScriptElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLPlugInElement.cpp
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp
index 688309251a162a93159237e4467e164621e3e717..1b9e98d57d3d7b43f6198f4148963a43286abacd 100644
--- a/Source/core/html/HTMLPlugInElement.cpp
+++ b/Source/core/html/HTMLPlugInElement.cpp
@@ -59,7 +59,6 @@ HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document& doc
, m_isDelayingLoadEvent(false)
, m_NPObject(0)
, m_isCapturingMouseEvents(false)
- , m_inBeforeLoadEventHandler(false)
// m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay
// widget updates until after all children are parsed. For HTMLEmbedElement
// this delay is unnecessary, but it is simpler to make both classes share
@@ -225,28 +224,8 @@ SharedPersistent<v8::Object>* HTMLPlugInElement::pluginWrapper()
return m_pluginWrapper.get();
}
-bool HTMLPlugInElement::dispatchBeforeLoadEvent(const String& sourceURL)
-{
- // FIXME: Our current plug-in loading design can't guarantee the following
- // assertion is true, since plug-in loading can be initiated during layout,
- // and synchronous layout can be initiated in a beforeload event handler!
- // See <http://webkit.org/b/71264>.
- // ASSERT(!m_inBeforeLoadEventHandler);
- m_inBeforeLoadEventHandler = true;
- bool beforeLoadAllowedLoad = HTMLFrameOwnerElement::dispatchBeforeLoadEvent(sourceURL);
- m_inBeforeLoadEventHandler = false;
- return beforeLoadAllowedLoad;
-}
-
Widget* HTMLPlugInElement::pluginWidget() const
{
- if (m_inBeforeLoadEventHandler) {
- // The plug-in hasn't loaded yet, and it makes no sense to try to load
- // if beforeload handler happened to touch the plug-in element. That
- // would recursively call beforeload for the same element.
- return 0;
- }
-
if (RenderWidget* renderWidget = renderWidgetForJSBindings())
return renderWidget->widget();
return 0;
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | Source/core/html/HTMLScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698