Commit c89a9d3d authored by Andrea Iacovitti's avatar Andrea Iacovitti

Unneeded DOMString->QString conversion and check.

parent 8f85b26d
...@@ -2518,10 +2518,7 @@ bool HTMLSelectElementImpl::encoding(const QTextCodec* codec, khtml::encodingLis ...@@ -2518,10 +2518,7 @@ bool HTMLSelectElementImpl::encoding(const QTextCodec* codec, khtml::encodingLis
(items[0]->id() == ID_OPTION && !items[0]->disabled()) ) { (items[0]->id() == ID_OPTION && !items[0]->disabled()) ) {
HTMLOptionElementImpl* const option = static_cast<HTMLOptionElementImpl*>(items[0]); HTMLOptionElementImpl* const option = static_cast<HTMLOptionElementImpl*>(items[0]);
encoded_values += enc_name; encoded_values += enc_name;
if (option->value().isNull()) encoded_values += fixUpfromUnicode(codec, option->value().string());
encoded_values += fixUpfromUnicode(codec, option->text().string());
else
encoded_values += fixUpfromUnicode(codec, option->value().string());
successful = true; successful = true;
} }
...@@ -2801,7 +2798,7 @@ DOMString HTMLOptionElementImpl::value() const ...@@ -2801,7 +2798,7 @@ DOMString HTMLOptionElementImpl::value() const
if ( !m_value.isNull() ) if ( !m_value.isNull() )
return m_value; return m_value;
// Use the text if the value wasn't set. // Use the text if the value wasn't set.
return text().string(); return text();
} }
void HTMLOptionElementImpl::setValue(DOMStringImpl* value) void HTMLOptionElementImpl::setValue(DOMStringImpl* value)
......
...@@ -1856,7 +1856,7 @@ void RenderSelect::updateFromElement() ...@@ -1856,7 +1856,7 @@ void RenderSelect::updateFromElement()
// Prefer label if set // Prefer label if set
DOMString label = optElem->getAttribute(ATTR_LABEL); DOMString label = optElem->getAttribute(ATTR_LABEL);
if (!label.isEmpty()) if (!label.isEmpty())
domText = label.string(); domText = label;
domText = domText.implementation()->collapseWhiteSpace(false, false); domText = domText.implementation()->collapseWhiteSpace(false, false);
QString text; QString text;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment