summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Iacovitti <aiacovitti@libero.it>2012-05-12 14:49:47 (GMT)
committerAndrea Iacovitti <aiacovitti@libero.it>2012-05-12 14:49:47 (GMT)
commita5c79cf442b4f8875d2f8eb2ba4c7e01959986e5 (patch)
treeb0f0b805a28ced98040d95f9f490785b372eb55e
parent2cf247f4ebdee44d0620e57f9cd17fa963b36b73 (diff)
Do not render leading whitespaces in combobox label for optgroup's option.
FIXED-IN: 4.8.4
-rw-r--r--khtml/rendering/render_form.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index cd0836f..b4cf136 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -124,6 +124,7 @@ using namespace DOM;
const QStyleOptionComboBox *o = qstyleoption_cast<const QStyleOptionComboBox*>(option);
if (o) {
QStyleOptionComboBox comboOpt = *o;
+ comboOpt.currentText = comboOpt.currentText.trimmed();
// by default combobox label is drawn left justified, vertical centered
// translate it to reflect padding values
comboOpt.rect = comboOpt.rect.translated(left, (top - bottom) / 2);
@@ -1909,7 +1910,7 @@ void RenderSelect::layout( )
bool foundOption = false;
for (int i = 0; i < listItems.size() && !foundOption; i++)
- foundOption = (listItems[i]->id() == ID_OPTION);
+ foundOption = (listItems[i]->id() == ID_OPTION);
m_widget->setEnabled(foundOption && ! element()->disabled());
}