Title: [249930] trunk/Source/WebCore
- Revision
- 249930
- Author
- [email protected]
- Date
- 2019-09-16 16:58:25 -0700 (Mon, 16 Sep 2019)
Log Message
AX: USER: VO: Messages > Message > Shift-VO-M doesn't reveal correct actions
https://bugs.webkit.org/show_bug.cgi?id=201840
Patch by Eric Liang <[email protected]> on 2019-09-16
Reviewed by Chris Fleizach.
menuForEvent: expects event-position in window's space, but we pass the position in Core's space. In this case, we need to convert core's space to window's space.
Tested that existing tests passed with WK1 and WK2
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (249929 => 249930)
--- trunk/Source/WebCore/ChangeLog 2019-09-16 23:53:33 UTC (rev 249929)
+++ trunk/Source/WebCore/ChangeLog 2019-09-16 23:58:25 UTC (rev 249930)
@@ -1,3 +1,16 @@
+2019-09-16 Eric Liang <[email protected]>
+
+ AX: USER: VO: Messages > Message > Shift-VO-M doesn't reveal correct actions
+ https://bugs.webkit.org/show_bug.cgi?id=201840
+
+ Reviewed by Chris Fleizach.
+
+ menuForEvent: expects event-position in window's space, but we pass the position in Core's space. In this case, we need to convert core's space to window's space.
+ Tested that existing tests passed with WK1 and WK2
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
+
2019-09-16 Jiewen Tan <[email protected]>
[WebAuthn] Support more than two FIDO protocol versions
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (249929 => 249930)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2019-09-16 23:53:33 UTC (rev 249929)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2019-09-16 23:58:25 UTC (rev 249930)
@@ -3777,19 +3777,23 @@
IntRect rect = snappedIntRect(m_object->elementRect());
FrameView* frameView = m_object->documentFrameView();
- // On WK2, we need to account for the scroll position.
- // On WK1, this isn't necessary, it's taken care of by the attachment views.
- if (frameView && !frameView->platformWidget()) {
+ // On WK2, we need to account for the scroll position with regards to root view.
+ // On WK1, we need to convert rect to window space to match mouse clicking.
+ if (frameView) {
// Find the appropriate scroll view to use to convert the contents to the window.
for (AccessibilityObject* parent = m_object->parentObject(); parent; parent = parent->parentObject()) {
if (is<AccessibilityScrollView>(*parent)) {
- ScrollView* scrollView = downcast<AccessibilityScrollView>(*parent).scrollView();
- rect = scrollView->contentsToRootView(rect);
+ if (auto scrollView = downcast<AccessibilityScrollView>(*parent).scrollView()) {
+ if (!frameView->platformWidget())
+ rect = scrollView->contentsToRootView(rect);
+ else
+ rect = scrollView->contentsToWindow(rect);
+ }
break;
}
}
}
-
+
page->contextMenuController().showContextMenuAt(page->mainFrame(), rect.center());
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes