WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56734
AX: showContextMenu not working in WK2
https://bugs.webkit.org/show_bug.cgi?id=56734
Summary
AX: showContextMenu not working in WK2
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+
Details
Formatted Diff
Diff
patch
(6.44 KB, patch)
2011-03-21 14:47 PDT
,
chris fleizach
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
chris fleizach
Comment 1
2011-03-20 23:45:47 PDT
rdar://9095026
chris fleizach
Comment 2
2011-03-20 23:49:21 PDT
Created
attachment 86299
[details]
patch
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
Created
attachment 86369
[details]
patch
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
http://trac.webkit.org/changeset/81619
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug