diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
commit | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (patch) | |
tree | cdca40d0353886b3ca52f33a2d7b8f1c0011aafc /Source/WebCore/html/HTMLEmbedElement.cpp | |
parent | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (diff) | |
download | qtwebkit-8d473cf9743f1d30a16a27114e93bd5af5648d23.tar.gz |
Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578)
Weekly snapshot
Diffstat (limited to 'Source/WebCore/html/HTMLEmbedElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLEmbedElement.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/WebCore/html/HTMLEmbedElement.cpp b/Source/WebCore/html/HTMLEmbedElement.cpp index ffaabcd2a..b9c6e41da 100644 --- a/Source/WebCore/html/HTMLEmbedElement.cpp +++ b/Source/WebCore/html/HTMLEmbedElement.cpp @@ -81,39 +81,37 @@ bool HTMLEmbedElement::isPresentationAttribute(const QualifiedName& name) const return HTMLPlugInImageElement::isPresentationAttribute(name); } -void HTMLEmbedElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style) +void HTMLEmbedElement::collectStyleForAttribute(const Attribute& attribute, StylePropertySet* style) { - if (attr->name() == hiddenAttr) { - if (equalIgnoringCase(attr->value(), "yes") || equalIgnoringCase(attr->value(), "true")) { + if (attribute.name() == hiddenAttr) { + if (equalIgnoringCase(attribute.value(), "yes") || equalIgnoringCase(attribute.value(), "true")) { addPropertyToAttributeStyle(style, CSSPropertyWidth, 0, CSSPrimitiveValue::CSS_PX); addPropertyToAttributeStyle(style, CSSPropertyHeight, 0, CSSPrimitiveValue::CSS_PX); } } else - HTMLPlugInImageElement::collectStyleForAttribute(attr, style); + HTMLPlugInImageElement::collectStyleForAttribute(attribute, style); } -void HTMLEmbedElement::parseAttribute(Attribute* attr) +void HTMLEmbedElement::parseAttribute(const Attribute& attribute) { - const AtomicString& value = attr->value(); - - if (attr->name() == typeAttr) { - m_serviceType = value.string().lower(); + if (attribute.name() == typeAttr) { + m_serviceType = attribute.value().string().lower(); size_t pos = m_serviceType.find(";"); if (pos != notFound) m_serviceType = m_serviceType.left(pos); if (!isImageType() && m_imageLoader) m_imageLoader.clear(); - } else if (attr->name() == codeAttr) - m_url = stripLeadingAndTrailingHTMLSpaces(value.string()); - else if (attr->name() == srcAttr) { - m_url = stripLeadingAndTrailingHTMLSpaces(value.string()); + } else if (attribute.name() == codeAttr) + m_url = stripLeadingAndTrailingHTMLSpaces(attribute.value()); + else if (attribute.name() == srcAttr) { + m_url = stripLeadingAndTrailingHTMLSpaces(attribute.value()); if (renderer() && isImageType()) { if (!m_imageLoader) m_imageLoader = adoptPtr(new HTMLImageLoader(this)); m_imageLoader->updateFromElementIgnoringPreviousError(); } } else - HTMLPlugInImageElement::parseAttribute(attr); + HTMLPlugInImageElement::parseAttribute(attribute); } void HTMLEmbedElement::parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramValues) |