diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
commit | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch) | |
tree | 8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/WebCore/html/HTMLObjectElement.cpp | |
parent | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff) | |
download | qtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz |
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/WebCore/html/HTMLObjectElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLObjectElement.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/Source/WebCore/html/HTMLObjectElement.cpp b/Source/WebCore/html/HTMLObjectElement.cpp index 3f9f77fb2..590d69b98 100644 --- a/Source/WebCore/html/HTMLObjectElement.cpp +++ b/Source/WebCore/html/HTMLObjectElement.cpp @@ -177,7 +177,7 @@ void HTMLObjectElement::parametersForPlugin(Vector<String>& paramNames, Vector<S } // Turn the attributes of the <object> element into arrays, but don't override <param> values. - NamedNodeMap* attributes = this->attributes(true); + NamedNodeMap* attributes = updatedAttributes(); if (attributes) { for (unsigned i = 0; i < attributes->length(); ++i) { Attribute* it = attributes->attributeItem(i); @@ -289,22 +289,13 @@ void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption) if (pluginCreationOption == CreateOnlyNonNetscapePlugins && wouldLoadAsNetscapePlugin(url, serviceType)) return; - ASSERT(!m_inBeforeLoadEventHandler); - m_inBeforeLoadEventHandler = true; - bool beforeLoadAllowedLoad = dispatchBeforeLoadEvent(url); - m_inBeforeLoadEventHandler = false; - - // beforeload events can modify the DOM, potentially causing - // RenderWidget::destroy() to be called. Ensure we haven't been - // destroyed before continuing. - // FIXME: Should this render fallback content? - if (!renderer()) + RefPtr<HTMLObjectElement> protect(this); // beforeload and plugin loading can make arbitrary DOM mutations. + bool beforeLoadAllowedLoad = guardedDispatchBeforeLoadEvent(url); + if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer. return; - RefPtr<HTMLObjectElement> protect(this); // Loading the plugin might remove us from the document. SubframeLoader* loader = document()->frame()->loader()->subframeLoader(); bool success = beforeLoadAllowedLoad && hasValidClassId() && loader->requestObject(this, url, getAttribute(nameAttr), serviceType, paramNames, paramValues); - if (!success && fallbackContent) renderFallbackContent(); } @@ -520,9 +511,9 @@ String HTMLObjectElement::itemValueText() const return getURLAttribute(dataAttr); } -void HTMLObjectElement::setItemValueText(const String& value, ExceptionCode& ec) +void HTMLObjectElement::setItemValueText(const String& value, ExceptionCode&) { - setAttribute(dataAttr, value, ec); + setAttribute(dataAttr, value); } #endif |