|
|
Chromium Code Reviews
DescriptionPopup 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
Committed: https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da
Cr-Commit-Position: refs/heads/master@{#383271}
Committed: https://crrev.com/ae1e3ad7ec33e9e4f0d47cd37c170ef51d478752
Cr-Commit-Position: refs/heads/master@{#383691}
Patch Set 1 #
Total comments: 2
Patch Set 2 : added back the if statement #
Total comments: 2
Patch Set 3 : #Patch Set 4 : reverted m_widgetClient=0 position #Patch Set 5 : Added check #
Messages
Total messages: 28 (9 generated)
keishi@chromium.org changed reviewers: + tkent@chromium.org
The CQ bit was checked by keishi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1833843002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1833843002/1
https://codereview.chromium.org/1833843002/diff/1/third_party/WebKit/Source/w... File third_party/WebKit/Source/web/WebPagePopupImpl.cpp (right): https://codereview.chromium.org/1833843002/diff/1/third_party/WebKit/Source/w... third_party/WebKit/Source/web/WebPagePopupImpl.cpp:492: cancel(); Is it safe to call cancel() unconditionally? In the PopupMenuImpl::setValueAndClosePopup path, we call WebPagePopupImpl::closePopup, it calls then Chromium calls WebPagePopupImpl::close(). With this CL, we call WebPagePopupImpl::closePopup again, and some steps are executed again. if (m_page) cancel(); is more sane?
On 2016/03/25 at 07:30:45, tkent wrote: > In the PopupMenuImpl::setValueAndClosePopup path, we call WebPagePopupImpl::closePopup, it calls then Chromium calls WebPagePopupImpl::close(). it calls then -> it calls WebWidgetClient::closeWidgetSoon(), then
On 2016/03/25 07:32:42, tkent wrote: > On 2016/03/25 at 07:30:45, tkent wrote: > > In the PopupMenuImpl::setValueAndClosePopup path, we call > WebPagePopupImpl::closePopup, it calls then Chromium calls > WebPagePopupImpl::close(). > > it calls then -> it calls WebWidgetClient::closeWidgetSoon(), then You're right. So WebPagePopupImpl::close() can be invoked from the Blink side through WebPagePopupImpl::closePopup, or called directly from a RenderWidget.
https://codereview.chromium.org/1833843002/diff/1/third_party/WebKit/Source/w... File third_party/WebKit/Source/web/WebPagePopupImpl.cpp (right): https://codereview.chromium.org/1833843002/diff/1/third_party/WebKit/Source/w... third_party/WebKit/Source/web/WebPagePopupImpl.cpp:492: cancel(); On 2016/03/25 07:30:44, tkent wrote: > Is it safe to call cancel() unconditionally? > In the PopupMenuImpl::setValueAndClosePopup path, we call > WebPagePopupImpl::closePopup, it calls then Chromium calls > WebPagePopupImpl::close(). > With this CL, we call WebPagePopupImpl::closePopup again, and some steps are > executed again. > > if (m_page) > cancel(); > > is more sane? > Done.
lgtm https://codereview.chromium.org/1833843002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/web/WebPagePopupImpl.cpp (right): https://codereview.chromium.org/1833843002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/web/WebPagePopupImpl.cpp:494: cancel(); I'm not sure if calling closeWidgetSoon() inside close() is safe. m_widgetClient = nullptr; if (m_page) cancel(); might be safer.
https://codereview.chromium.org/1833843002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/web/WebPagePopupImpl.cpp (right): https://codereview.chromium.org/1833843002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/web/WebPagePopupImpl.cpp:494: cancel(); On 2016/03/25 08:06:51, tkent wrote: > I'm not sure if calling closeWidgetSoon() inside close() is safe. > > m_widgetClient = nullptr; > if (m_page) > cancel(); > > might be safer. Done.
The CQ bit was checked by keishi@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tkent@chromium.org Link to the patchset: https://codereview.chromium.org/1833843002/#ps40001 (title: " ")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1833843002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1833843002/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 Committed: https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da Cr-Commit-Position: refs/heads/master@{#383271} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da Cr-Commit-Position: refs/heads/master@{#383271}
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/1841623002/ by tkent@chromium.org. The reason for reverting is: Caused crashes; crbug.com/598291 .
Message was sent while issue was closed.
Changed back the position to clear m_widgetClient
Message was sent while issue was closed.
On 2016/03/29 at 04:25:16, keishi wrote: > Changed back the position to clear m_widgetClient Did you confirm that calling closeWidgetSoon() in close() is ok?
Message was sent while issue was closed.
On 2016/03/29 05:10:09, tkent wrote: > On 2016/03/29 at 04:25:16, keishi wrote: > > Changed back the position to clear m_widgetClient > > Did you confirm that calling closeWidgetSoon() in close() is ok? There are checks like RenderWidget::closing_ so I didn't see anything bad happen, but you're right. Added a check before calling closeWidgetSoon.
Message was sent while issue was closed.
lgtm
Message was sent while issue was closed.
Description was changed from ========== 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 Committed: https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da Cr-Commit-Position: refs/heads/master@{#383271} ========== to ========== 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 Committed: https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da Cr-Commit-Position: refs/heads/master@{#383271} ==========
The CQ bit was checked by keishi@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1833843002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1833843002/80001
Message was sent while issue was closed.
Description was changed from ========== 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 Committed: https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da Cr-Commit-Position: refs/heads/master@{#383271} ========== to ========== 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 Committed: https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da Cr-Commit-Position: refs/heads/master@{#383271} ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== 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 Committed: https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da Cr-Commit-Position: refs/heads/master@{#383271} ========== to ========== 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 Committed: https://crrev.com/831776ec4a98f781dc8ce20bb3346538fd59b8da Cr-Commit-Position: refs/heads/master@{#383271} Committed: https://crrev.com/ae1e3ad7ec33e9e4f0d47cd37c170ef51d478752 Cr-Commit-Position: refs/heads/master@{#383691} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/ae1e3ad7ec33e9e4f0d47cd37c170ef51d478752 Cr-Commit-Position: refs/heads/master@{#383691} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
