Bug 56734

Summary: AX: showContextMenu not working in WK2
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
patch
darin: review+
patch darin: review+

chris fleizach
Reported 2011-03-20 23:40:29 PDT
showContextMenu no longer works in WK2 because the popup menu cannot be triggered directly
Attachments
patch (3.45 KB, patch)
2011-03-20 23:49 PDT, chris fleizach
darin: review+
patch (6.44 KB, patch)
2011-03-21 14:47 PDT, chris fleizach
darin: review+
chris fleizach
Comment 1 2011-03-20 23:45:47 PDT
chris fleizach
Comment 2 2011-03-20 23:49:21 PDT
Darin Adler
Comment 3 2011-03-21 06:55:21 PDT
Comment on attachment 86299 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=86299&action=review > Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm:2338 > + // In WK2 use the available crome client. Typo, "chrome". > Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm:2339 > + // In WK1, the popup menu can be triggered directly. Can’t we put this code into the chrome client for WebKit1 also? Is it important to keep the code here? It seems awkward to have different code for the two and I don’t see why. > Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm:2341 > + PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, MouseEventPressed, 1, false, false, false, false, WTF::currentTime()); Should just be able to call currentTime rather than WTF::currentTime. > Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm:2344 > + bool handled = frameView->frame()->eventHandler()->sendContextMenuEvent(mouseEvent); > + if (handled) > + frameView->frame()->page()->chrome()->showContextMenu(); Any need to null check the frame or the page?
chris fleizach
Comment 4 2011-03-21 14:47:55 PDT
chris fleizach
Comment 5 2011-03-21 14:48:43 PDT
(In reply to comment #3) > > Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm:2339 > > + // In WK1, the popup menu can be triggered directly. > > Can’t we put this code into the chrome client for WebKit1 also? Is it important to keep the code here? It seems awkward to have different code for the two and I don’t see why. > I've moved the logic used to open the context menu from the AX code into showContextMenu() in the WebKit chrome client. Previously it had been empty.
Darin Adler
Comment 6 2011-03-21 14:52:19 PDT
Comment on attachment 86369 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=86369&action=review > Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:886 > + WebCore::Page* page = [m_webView page]; Why does this need the WebCore:: prefix and nothing else in this function does? > Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:891 > + if (!controller) > + return; I don’t think this can ever be 0, so this check is not needed.
chris fleizach
Comment 7 2011-03-21 16:35:11 PDT
Note You need to log in before you can comment on or make changes to this bug.