[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml/html
From: Germain Garand <germain () ebooksfrance ! com>
Date: 2005-03-16 21:48:53
Message-ID: 20050316214853.3FDA417D06 () office ! kde ! org
[Download RAW message or body]
CVS commit by ggarand:
implementation for HTMLElementImpl::setValue() (WC merge)
M +8 -3 html_formimpl.cpp 1.429
--- kdelibs/khtml/html/html_formimpl.cpp #1.428:1.429
@@ -1947,9 +1947,14 @@ DOMString HTMLSelectElementImpl::value(
}
-void HTMLSelectElementImpl::setValue(DOMStringImpl* /*value*/)
+void HTMLSelectElementImpl::setValue(DOMStringImpl* value)
{
- // ### find the option with value() matching the given parameter
+ // find the option with value() matching the given parameter
// and make it the current selection.
- kdWarning() << "Unimplemented HTMLSelectElementImpl::setValue called" << endl;
+ QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+ for (unsigned i = 0; i < items.size(); i++)
+ if (items[i]->id() == ID_OPTION && \
static_cast<HTMLOptionElementImpl*>(items[i])->value() == value) { + \
static_cast<HTMLOptionElementImpl*>(items[i])->setSelected(true); + \
return; + }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic