summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkeishi <keishi@chromium.org>2016-03-25 04:39:01 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 11:40:12 +0000
commit831776ec4a98f781dc8ce20bb3346538fd59b8da (patch)
treee169bfd01b33c3c811170efcce85270a45c62970
parent0a12065802b0e17322d8e26e7e81b2e1999d4544 (diff)
downloadchromium_src-831776ec4a98f781dc8ce20bb3346538fd59b8da.zip
chromium_src-831776ec4a98f781dc8ce20bb3346538fd59b8da.tar.gz
chromium_src-831776ec4a98f781dc8ce20bb3346538fd59b8da.tar.bz2
Popup loosing focus through keyboard events should update HTMLSelectElement display
Ctrl-N while a popup menu is open, causes the window to loose focus, and ViewMsg_Close is sent to the popup widget. This causes WebPagePopupImpl::close to be called. Right now this causes the popup to close without updating the display from the provisional selection (ie HTMLSelectElement::indexToSelectOnCancel) to the actual selection. WebPagePopupImpl::close should use WebPagePopupImpl::cancel to handle that case properly. Loosing focus through mouse clicks were working because we manually call cancel from the mouse event handler. Regression caused by r193034 BUG=597206 Review URL: https://codereview.chromium.org/1833843002 Cr-Commit-Position: refs/heads/master@{#383271}
-rw-r--r--third_party/WebKit/Source/web/WebPagePopupImpl.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/third_party/WebKit/Source/web/WebPagePopupImpl.cpp b/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
index 74dce75..44e0710 100644
--- a/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
@@ -489,14 +489,10 @@ void WebPagePopupImpl::setFocus(bool enable)
void WebPagePopupImpl::close()
{
- m_closing = true;
- // In case closePopup() was not called.
- if (m_page) {
- destroyPage();
- m_popupClient->didClosePopup();
- m_webView->cleanupPagePopup();
- }
m_widgetClient = 0;
+ // In case closePopup() was not called.
+ if (m_page)
+ cancel();
deref();
}