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/HTMLSelectElement.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/HTMLSelectElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLSelectElement.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/WebCore/html/HTMLSelectElement.cpp b/Source/WebCore/html/HTMLSelectElement.cpp index 9583dae5f..0527a91ca 100644 --- a/Source/WebCore/html/HTMLSelectElement.cpp +++ b/Source/WebCore/html/HTMLSelectElement.cpp @@ -90,8 +90,8 @@ PassRefPtr<HTMLSelectElement> HTMLSelectElement::create(const QualifiedName& tag const AtomicString& HTMLSelectElement::formControlType() const { - DEFINE_STATIC_LOCAL(const AtomicString, selectMultiple, ("select-multiple")); - DEFINE_STATIC_LOCAL(const AtomicString, selectOne, ("select-one")); + DEFINE_STATIC_LOCAL(const AtomicString, selectMultiple, ("select-multiple", AtomicString::ConstructFromLiteral)); + DEFINE_STATIC_LOCAL(const AtomicString, selectOne, ("select-one", AtomicString::ConstructFromLiteral)); return m_multiple ? selectMultiple : selectOne; } @@ -284,15 +284,15 @@ bool HTMLSelectElement::isPresentationAttribute(const QualifiedName& name) const return HTMLFormControlElementWithState::isPresentationAttribute(name); } -void HTMLSelectElement::parseAttribute(const Attribute& attribute) +void HTMLSelectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { - if (attribute.name() == sizeAttr) { + if (name == sizeAttr) { int oldSize = m_size; // Set the attribute value to a number. // This is important since the style rules for this attribute can determine the appearance property. - int size = attribute.value().toInt(); + int size = value.toInt(); String attrSize = String::number(size); - if (attrSize != attribute.value()) { + if (attrSize != value) { // FIXME: This is horribly factored. if (Attribute* sizeAttribute = getAttributeItem(sizeAttr)) sizeAttribute->setValue(attrSize); @@ -309,14 +309,14 @@ void HTMLSelectElement::parseAttribute(const Attribute& attribute) reattach(); setRecalcListItems(); } - } else if (attribute.name() == multipleAttr) - parseMultipleAttribute(attribute); - else if (attribute.name() == accesskeyAttr) { + } else if (name == multipleAttr) + parseMultipleAttribute(value); + else if (name == accesskeyAttr) { // FIXME: ignore for the moment. - } else if (attribute.name() == onchangeAttr) - setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, attribute)); + } else if (name == onchangeAttr) + setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, name, value)); else - HTMLFormControlElementWithState::parseAttribute(attribute); + HTMLFormControlElementWithState::parseAttribute(name, value); } bool HTMLSelectElement::isKeyboardFocusable(KeyboardEvent* event) const @@ -1000,10 +1000,10 @@ void HTMLSelectElement::restoreFormControlState(const FormControlState& state) setNeedsValidityCheck(); } -void HTMLSelectElement::parseMultipleAttribute(const Attribute& attribute) +void HTMLSelectElement::parseMultipleAttribute(const AtomicString& value) { bool oldUsesMenuList = usesMenuList(); - m_multiple = !attribute.isNull(); + m_multiple = !value.isNull(); setNeedsValidityCheck(); if (oldUsesMenuList != usesMenuList()) reattachIfAttached(); |