Sending AXShowMenu often fails.
<rdar://problem/15375692>
Created attachment 215953 [details] Patch for discussion. Attached is a patch that fixes the described issue. We let the mouse event handler take a crack at the platform event before the context menu machinery. This is more inline with what actually happens during a right click event. Therefore, the targeted accessibility element will actually get focus as expected. The problem I'd like feedback on is the test. testRunner.notifyDone is never called (inside finishJSTest) because the actual context menu shows and doesn't let things finish. I've looked at the non accessibility code path for testing context menus and noticed they don't actually show the context menu like we're trying to do in accessibility land. Instead, they return an array of what WOULD show. Should we be doing something similar to avoid this platform level lockup? Any thoughts/help here would be great. Thanks!
To elaborate a bit more, this test currently works, but it simply isn't terminated correctly. Output: stopping DumpRenderTree(pid 34298) timed out, killing it The test ran as expected. Again, notifyDone isn't completing as expected.
Comment on attachment 215953 [details] Patch for discussion. View in context: https://bugs.webkit.org/attachment.cgi?id=215953&action=review > LayoutTests/platform/mac/accessibility/show-context-menu.html:29 > + setTimeout(function() { I think we want to call setTimeout before showMenu (maybe)
(In reply to comment #4) > (From update of attachment 215953 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=215953&action=review > > > LayoutTests/platform/mac/accessibility/show-context-menu.html:29 > > + setTimeout(function() { > > I think we want to call setTimeout before showMenu (maybe) Sadly, doesn't help.
Comment on attachment 215953 [details] Patch for discussion. Attachment 215953 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/19568841 New failing tests: platform/mac/accessibility/show-context-menu.html
Created attachment 215959 [details] Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-10 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Confirmed the DRT function showMenu caused the exact same issue before this patch.
Comment on attachment 215953 [details] Patch for discussion. Attachment 215953 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/19618851 New failing tests: platform/mac/accessibility/show-context-menu.html
Created attachment 215964 [details] Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Created attachment 215966 [details] Patch. Please see the detailed comments I've put in the Changelogs.
Comment on attachment 215966 [details] Patch. Attachment 215966 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/19618871 New failing tests: platform/mac/accessibility/show-context-menu.html
Created attachment 215976 [details] Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Created attachment 215977 [details] Patch for review Removing useless testing and supplementing with better comments on the why and how.
Comment on attachment 215977 [details] Patch for review Clearing flags on attachment: 215977 Committed r158629: <http://trac.webkit.org/changeset/158629>
All reviewed patches have been landed. Closing bug.