[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
jhoneycutt at apple.com
jhoneycutt at apple.com
Thu Dec 3 13:38:38 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit b74afa282cf0613ba8f20c8a93cd654670842bce
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 17 23:37:48 2009 +0000
DOMHTMLSelectElement is missing some implementation.
https://bugs.webkit.org/show_bug.cgi?id=31489
Reviewed by Dan Bernstein.
* DOMHTMLClasses.cpp:
(DOMHTMLSelectElement::options):
Cast m_element to an HTMLSelectElement. If it has no options, return
E_FAIL. Otherwise, create a DOMHTMLOptionsCollection to wrap the
options, and return it.
(DOMHTMLSelectElement::activateItemAtIndex):
If the index is out of bounds, return E_FAIL. Otherwise, select the
item.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 1eee4ce..b9a76c1 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,5 +1,22 @@
2009-11-12 Jon Honeycutt <jhoneycutt at apple.com>
+ DOMHTMLSelectElement is missing some implementation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31489
+
+ Reviewed by Dan Bernstein.
+
+ * DOMHTMLClasses.cpp:
+ (DOMHTMLSelectElement::options):
+ Cast m_element to an HTMLSelectElement. If it has no options, return
+ E_FAIL. Otherwise, create a DOMHTMLOptionsCollection to wrap the
+ options, and return it.
+ (DOMHTMLSelectElement::activateItemAtIndex):
+ If the index is out of bounds, return E_FAIL. Otherwise, select the
+ item.
+
+2009-11-12 Jon Honeycutt <jhoneycutt at apple.com>
+
DOMHTMLOptionsCollection is missing some implementation.
https://bugs.webkit.org/show_bug.cgi?id=31488
diff --git a/WebKit/win/DOMHTMLClasses.cpp b/WebKit/win/DOMHTMLClasses.cpp
index 5e24333..3d09b4a 100644
--- a/WebKit/win/DOMHTMLClasses.cpp
+++ b/WebKit/win/DOMHTMLClasses.cpp
@@ -695,10 +695,22 @@ HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::form(
}
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::options(
- /* [retval][out] */ IDOMHTMLOptionsCollection** /*result*/)
+ /* [retval][out] */ IDOMHTMLOptionsCollection** result)
{
- ASSERT_NOT_REACHED();
- return E_NOTIMPL;
+ if (!result)
+ return E_POINTER;
+
+ *result = 0;
+
+ ASSERT(m_element);
+ ASSERT(m_element->hasTagName(selectTag));
+ HTMLSelectElement* selectElement = static_cast<HTMLSelectElement*>(m_element);
+
+ if (!selectElement->options())
+ return E_FAIL;
+
+ *result = DOMHTMLOptionsCollection::createInstance(selectElement->options().get());
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::disabled(
@@ -789,10 +801,17 @@ HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::remove(
// DOMHTMLSelectElement - IFormsAutoFillTransitionSelect ----------------------
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::activateItemAtIndex(
- /* [in] */ int /*index*/)
+ /* [in] */ int index)
{
- ASSERT_NOT_REACHED();
- return E_NOTIMPL;
+ ASSERT(m_element);
+ ASSERT(m_element->hasTagName(selectTag));
+ HTMLSelectElement* selectElement = static_cast<HTMLSelectElement*>(m_element);
+
+ if (index >= selectElement->length())
+ return E_FAIL;
+
+ selectElement->setSelectedIndex(index);
+ return S_OK;
}
// DOMHTMLOptionElement - IUnknown --------------------------------------------
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list