Bug 83474 - [Chromium] External popup menus should support early cancelation
Summary: [Chromium] External popup menus should support early cancelation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jay Civelli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-09 08:57 PDT by Jay Civelli
Modified: 2012-05-23 15:27 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.60 KB, patch)
2012-04-09 09:02 PDT, Jay Civelli
no flags Details | Formatted Diff | Diff
Patch (1.60 KB, patch)
2012-05-15 10:52 PDT, Jay Civelli
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Civelli 2012-04-09 08:57:22 PDT
In Chromium for Mac and Android, we can end up in cases where we end up with 2 select popups showing (if the user presses a select and then quickly presses another before the 1st one has shown).
We need a way for the browser to cancel a select popup early to prevent that case.
Comment 1 Jay Civelli 2012-04-09 09:02:11 PDT
Created attachment 136230 [details]
Patch
Comment 2 Ilya Sherman 2012-05-14 13:25:12 PDT
Comment on attachment 136230 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=136230&action=review

> Source/WebKit/chromium/src/ExternalPopupMenu.cpp:75
> +        // The client might refuse to create a popup (when there is already one pending to be shown for example).

Hmm, can you point me to the code that might refuse to create a popup?  The implementation that I found for createExternalPopupMenu() [1] looks like it will always create a new one, but sometimes destroy the old one (if the DCHECK fails).  Does this patch assume a Chromium change as well?
[1] https://code.google.com/searchframe#OAMlx_jo-ck/src/content/renderer/render_view_impl.cc&l=1577-1583
Comment 3 Jay Civelli 2012-05-14 15:56:34 PDT
Yes there is an CL on the Chromium side to make this work:
https://chromiumcodereview.appspot.com/10392093/
Comment 4 Ilya Sherman 2012-05-14 16:27:33 PDT
Ok, looks good when coupled with the Chromium CL.

tkent, can you double check for an official review, since I'm not a reviewer?
Comment 5 Kent Tamura 2012-05-14 22:41:26 PDT
Comment on attachment 136230 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=136230&action=review

> Source/WebKit/chromium/src/ExternalPopupMenu.cpp:76
> +    else
> +        // The client might refuse to create a popup (when there is already one pending to be shown for example).
> +        didCancel();

nit: This else clause contains two physical lines.  So we need to enclose it with {}.
Comment 6 Jay Civelli 2012-05-15 10:52:19 PDT
Created attachment 142003 [details]
Patch
Comment 7 Jay Civelli 2012-05-23 10:42:19 PDT
tkent, I fixed the nit, could you R+ CQ+ this?
Thanks!
Comment 8 WebKit Review Bot 2012-05-23 15:27:39 PDT
Comment on attachment 142003 [details]
Patch

Clearing flags on attachment: 142003

Committed r118258: <http://trac.webkit.org/changeset/118258>
Comment 9 WebKit Review Bot 2012-05-23 15:27:43 PDT
All reviewed patches have been landed.  Closing bug.