Make action menus much more reliable
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2014 19:06:15 +0000 (19:06 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2014 19:06:15 +0000 (19:06 +0000)
commit0b80e6ec0927c4d907cf6fe699d265684a369913
tree7a7012ee131937c320b6941e48cdab5b55a4a650
parentb643a938c85e408db3acfd739704f74cfca06c4d
Make action menus much more reliable
https://bugs.webkit.org/show_bug.cgi?id=138654
<rdar://problem/18909111>

Reviewed by Anders Carlsson.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Remove MenuUpdateStage; nothing actually uses this value, we just pass it around.

(-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
Update the menu as soon as we have a reply from the Web process.

(-[WKActionMenuController menuNeedsUpdate:]):
If our sync-wait for the Web process' reply times out, we should still update
the menu to remove the placeholder separator item.

(-[WKActionMenuController _updateActionMenuItems]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]): Deleted.
If we have our final answer for this menu (_state == Ready), and the final answer
has no items in the menu, cancel tracking on the menu.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm