[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
darin at chromium.org
darin at chromium.org
Thu Oct 29 20:31:17 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 2cc017afca9dafa724626d0e9b38be298477fff4
Author: darin at chromium.org <darin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 21 16:06:27 2009 +0000
2009-09-21 Darin Fisher <darin at chromium.org>
Reviewed by Dimitri Glazkov.
Drop down selects fail to close when a value is selected
https://bugs.webkit.org/show_bug.cgi?id=29582
Implement PopupListBox::hidePopup, which was previously
declared but unimplemented. Removes the declaration of
showPopup since that method is not implemented.
PopupListBox::hidePopup takes care of hiding the popup,
by invoking hidePopup on its parent PopupContainer, and
then informs the PopupMenuClient that popupDidHide.
This mimics the old behavior prior to r48370.
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupListBox::handleKeyEvent):
(WebCore::PopupListBox::abandon):
(WebCore::PopupListBox::acceptIndex):
(WebCore::PopupListBox::hidePopup):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 523f975..ef4c2c1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2009-09-21 Darin Fisher <darin at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Drop down selects fail to close when a value is selected
+ https://bugs.webkit.org/show_bug.cgi?id=29582
+
+ Implement PopupListBox::hidePopup, which was previously
+ declared but unimplemented. Removes the declaration of
+ showPopup since that method is not implemented.
+
+ PopupListBox::hidePopup takes care of hiding the popup,
+ by invoking hidePopup on its parent PopupContainer, and
+ then informs the PopupMenuClient that popupDidHide.
+ This mimics the old behavior prior to r48370.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::handleKeyEvent):
+ (WebCore::PopupListBox::abandon):
+ (WebCore::PopupListBox::acceptIndex):
+ (WebCore::PopupListBox::hidePopup):
+
2009-09-21 Csaba Osztrogonac <oszi at inf.u-szeged.hu>
Rubber-stamped by Simon Hausmann.
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp
index 3b52e77..747f23e 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -104,10 +104,7 @@ public:
// PopupListBox methods
- // Shows the popup
- void showPopup();
-
- // Hides the popup. Do not call this directly: use client->hidePopup().
+ // Hides the popup.
void hidePopup();
// Updates our internal list to match the client.
@@ -635,7 +632,7 @@ bool PopupListBox::handleKeyEvent(const PlatformKeyboardEvent& event)
return true;
case VKEY_RETURN:
if (m_selectedIndex == -1) {
- m_popupClient->popupDidHide();
+ hidePopup();
// Don't eat the enter if nothing is selected.
return false;
}
@@ -871,7 +868,7 @@ void PopupListBox::abandon()
m_selectedIndex = m_originalIndex;
- m_popupClient->popupDidHide();
+ hidePopup();
if (m_acceptedIndexOnAbandon >= 0) {
m_popupClient->valueChanged(m_acceptedIndexOnAbandon);
@@ -904,7 +901,7 @@ void PopupListBox::acceptIndex(int index)
if (index < 0) {
if (m_popupClient) {
// Enter pressed with no selection, just close the popup.
- m_popupClient->popupDidHide();
+ hidePopup();
}
return;
}
@@ -913,7 +910,7 @@ void PopupListBox::acceptIndex(int index)
RefPtr<PopupListBox> keepAlive(this);
// Hide ourselves first since valueChanged may have numerous side-effects.
- m_popupClient->popupDidHide();
+ hidePopup();
// Tell the <select> PopupMenuClient what index was selected.
m_popupClient->valueChanged(index);
@@ -1059,6 +1056,13 @@ void PopupListBox::adjustSelectedIndex(int delta)
scrollToRevealSelection();
}
+void PopupListBox::hidePopup()
+{
+ if (parent())
+ static_cast<PopupContainer*>(parent())->hidePopup();
+ m_popupClient->popupDidHide();
+}
+
void PopupListBox::updateFromElement()
{
clear();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list