diff options
author | Leon Scroggins <scroggo@google.com> | 2009-06-19 14:07:37 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2009-06-19 14:53:56 -0400 |
commit | df57cb4115f93b37f74801451102e818d17cf182 (patch) | |
tree | 9c64f36a8a519bb82071162673f841e67c47c156 /WebKit/android/jni | |
parent | 5b1dfac261b89e9bf54ece84eeac8470c9a2e22e (diff) | |
download | external_webkit-df57cb4115f93b37f74801451102e818d17cf182.zip external_webkit-df57cb4115f93b37f74801451102e818d17cf182.tar.gz external_webkit-df57cb4115f93b37f74801451102e818d17cf182.tar.bz2 |
Update our <select> to work with the latest webkit.
Remove a webkit change that makes some functions public for our
use. Instead, use a pointer to a base class where those functions
are already public. In one case where a function has been removed,
call another function which behaves the same.
Diffstat (limited to 'WebKit/android/jni')
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index ebe5d23..8b8d315 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -1449,11 +1449,12 @@ public: if (!m_select || !CacheBuilder::validNode(m_viewImpl->m_mainFrame, m_frame, m_select)) return; - // FIXME: scroggo, listToOptionIndex was made private in HTMLSelectElement. - int optionIndex = m_select->listToOptionIndex(index); + // Use a pointer to HTMLSelectElement's superclass, where + // listToOptionIndex is public. + SelectElement* selectElement = m_select; + int optionIndex = selectElement->listToOptionIndex(index); m_select->setSelectedIndex(optionIndex, true, false); - // FIXME: scroggo, onChange is removed from HTMLSelectElement. - // m_select->onChange(); + m_select->dispatchFormControlChangeEvent(); m_viewImpl->contentInvalidate(m_select->getRect()); } @@ -1492,8 +1493,7 @@ public: option->setSelectedState(false); } } - // FIXME scroggo, onChange is removed from HTMLSelectElement - // m_select->onChange(); + m_select->dispatchFormControlChangeEvent(); m_viewImpl->contentInvalidate(m_select->getRect()); } private: @@ -1697,9 +1697,12 @@ bool WebViewCore::handleMouseClick(WebCore::Frame* framePtr, WebCore::Node* node } } WebCoreReply* reply = new ListBoxReply(select, select->document()->frame(), this); + // Use a pointer to HTMLSelectElement's superclass, where + // optionToListIndex is public. + SelectElement* selectElement = select; listBoxRequest(reply, names.begin(), size, enabledArray.begin(), enabledArray.count(), multiple, selectedArray.begin(), multiple ? selectedArray.count() : - select->optionToListIndex(select->selectedIndex())); + selectElement->optionToListIndex(select->selectedIndex())); return true; } } |