diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:09:45 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:10:13 +0100 |
commit | 470286ecfe79d59df14944e5b5d34630fc739391 (patch) | |
tree | 43983212872e06cebefd2ae474418fa2908ca54c /Source/WebCore/html/HTMLObjectElement.cpp | |
parent | 23037105e948c2065da5a937d3a2396b0ff45c1e (diff) | |
download | qtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz |
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/html/HTMLObjectElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLObjectElement.cpp | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/Source/WebCore/html/HTMLObjectElement.cpp b/Source/WebCore/html/HTMLObjectElement.cpp index bc2effca1..8c60445f4 100644 --- a/Source/WebCore/html/HTMLObjectElement.cpp +++ b/Source/WebCore/html/HTMLObjectElement.cpp @@ -86,27 +86,27 @@ bool HTMLObjectElement::isPresentationAttribute(const QualifiedName& name) const return HTMLPlugInImageElement::isPresentationAttribute(name); } -void HTMLObjectElement::collectStyleForAttribute(const Attribute& attribute, StylePropertySet* style) +void HTMLObjectElement::collectStyleForPresentationAttribute(const Attribute& attribute, StylePropertySet* style) { if (attribute.name() == borderAttr) applyBorderAttributeToStyle(attribute, style); else - HTMLPlugInImageElement::collectStyleForAttribute(attribute, style); + HTMLPlugInImageElement::collectStyleForPresentationAttribute(attribute, style); } -void HTMLObjectElement::parseAttribute(const Attribute& attribute) +void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { - if (attribute.name() == formAttr) + if (name == formAttr) formAttributeChanged(); - else if (attribute.name() == typeAttr) { - m_serviceType = attribute.value().lower(); + else if (name == typeAttr) { + m_serviceType = value.lower(); size_t pos = m_serviceType.find(";"); if (pos != notFound) m_serviceType = m_serviceType.left(pos); if (renderer()) setNeedsWidgetUpdate(true); - } else if (attribute.name() == dataAttr) { - m_url = stripLeadingAndTrailingHTMLSpaces(attribute.value()); + } else if (name == dataAttr) { + m_url = stripLeadingAndTrailingHTMLSpaces(value); if (renderer()) { setNeedsWidgetUpdate(true); if (isImageType()) { @@ -115,16 +115,16 @@ void HTMLObjectElement::parseAttribute(const Attribute& attribute) m_imageLoader->updateFromElementIgnoringPreviousError(); } } - } else if (attribute.name() == classidAttr) { - m_classId = attribute.value(); + } else if (name == classidAttr) { + m_classId = value; if (renderer()) setNeedsWidgetUpdate(true); - } else if (attribute.name() == onloadAttr) - setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute)); - else if (attribute.name() == onbeforeloadAttr) - setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attribute)); + } else if (name == onloadAttr) + setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); + else if (name == onbeforeloadAttr) + setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value)); else - HTMLPlugInImageElement::parseAttribute(attribute); + HTMLPlugInImageElement::parseAttribute(name, value); } static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramValues) @@ -282,7 +282,13 @@ void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption) // FIXME: This should ASSERT isFinishedParsingChildren() instead. if (!isFinishedParsingChildren()) return; - + + // FIXME: I'm not sure it's ever possible to get into updateWidget during a + // removal, but just in case we should avoid loading the frame to prevent + // security bugs. + if (!SubframeLoadingDisabler::canLoadFrame(this)) + return; + String url = this->url(); String serviceType = this->serviceType(); |