Commit 57f1e42e authored by tkent@chromium.org's avatar tkent@chromium.org

Mac: Do not call PopupMenuClient::popupDidHide in ExternalPopupMenu:show.

Replace hide() in ExternalPopupMenu:show() with
m_webExternalPopupMenu->close(). It means we remove
PopupMenuClient::popupDidHide() call.

We should not call it because the client changes its state to "no popup" state
by the popupDidHide call, and it won't call PopupMenu::hide() even if it's
necessary.

BUG=30550,145658

Review URL: https://codereview.chromium.org/208243012

git-svn-id: svn://svn.chromium.org/blink/trunk@169901 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 16efb600
......@@ -3,7 +3,7 @@ Test for http://bugs.webkit.org/show_bug.cgi?id=113220: ensures select popup clo
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
FAIL internals.isSelectPopupVisible(popup) should be true. Was false.
PASS internals.isSelectPopupVisible(popup) is true
PASS internals.isSelectPopupVisible(popup) is false
PASS successfullyParsed is true
......
......@@ -12,7 +12,7 @@ PASS select2.value is "b"
PASS select2.value is "b"
PASS select2.value is "b"
Tests on select disable, popup menu is hidden
FAIL internals.isSelectPopupVisible(select3) should be true. Was false.
PASS internals.isSelectPopupVisible(select3) is true
PASS internals.isSelectPopupVisible(select3) is false
Tests on select disable, value cannot be changed
PASS select4.value is "b"
......
......@@ -64,9 +64,12 @@ ExternalPopupMenu::~ExternalPopupMenu()
void ExternalPopupMenu::show(const FloatQuad& controlPosition, const IntSize&, int index)
{
IntRect rect(controlPosition.enclosingBoundingBox());
// WebCore reuses the PopupMenu of a page.
// WebCore reuses the PopupMenu of an element.
// For simplicity, we do recreate the actual external popup everytime.
hide();
if (m_webExternalPopupMenu) {
m_webExternalPopupMenu->close();
m_webExternalPopupMenu = 0;
}
WebPopupMenuInfo info;
getPopupMenuInfo(&info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment