Title: [138989] trunk/Source/WebCore
- Revision
- 138989
- Author
- [email protected]
- Date
- 2013-01-07 14:09:16 -0800 (Mon, 07 Jan 2013)
Log Message
AX: Regression: Contextual menu not following with VO cursor in HTML content when item is scrolled
https://bugs.webkit.org/show_bug.cgi?id=70075
Reviewed by Anders Carlsson.
On WK2 only, when accessibility opens a contextual menu, it does not honor the scroll offset.
On WK1, the attachment views handle this conversion when it's needed, but on WK2 it needs to be done manually
(similar to how the accessibility position is calculated).
No test. Cannot test the location of context menu popups on WK2 yet.
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (138988 => 138989)
--- trunk/Source/WebCore/ChangeLog 2013-01-07 22:07:45 UTC (rev 138988)
+++ trunk/Source/WebCore/ChangeLog 2013-01-07 22:09:16 UTC (rev 138989)
@@ -1,3 +1,19 @@
+2013-01-07 Chris Fleizach <[email protected]>
+
+ AX: Regression: Contextual menu not following with VO cursor in HTML content when item is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=70075
+
+ Reviewed by Anders Carlsson.
+
+ On WK2 only, when accessibility opens a contextual menu, it does not honor the scroll offset.
+ On WK1, the attachment views handle this conversion when it's needed, but on WK2 it needs to be done manually
+ (similar to how the accessibility position is calculated).
+
+ No test. Cannot test the location of context menu popups on WK2 yet.
+
+ * accessibility/mac/WebAccessibilityObjectWrapper.mm:
+ (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
+
2013-01-07 Abhishek Arya <[email protected]>
Heap-buffer-overflow in WebCore::RenderBlock::clone.
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm (138988 => 138989)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm 2013-01-07 22:07:45 UTC (rev 138988)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm 2013-01-07 22:09:16 UTC (rev 138989)
@@ -2892,16 +2892,27 @@
- (void)accessibilityShowContextMenu
{
- FrameView* frameView = m_object->documentFrameView();
- if (!frameView)
- return;
- Frame* frame = frameView->frame();
- if (!frame)
- return;
- Page* page = frame->page();
+ Page* page = m_object->page();
if (!page)
return;
- page->contextMenuController()->showContextMenuAt(frame, m_object->clickPoint());
+
+ IntRect rect = pixelSnappedIntRect(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()) {
+ // 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 (parent->isAccessibilityScrollView()) {
+ ScrollView* scrollView = toAccessibilityScrollView(parent)->scrollView();
+ rect = scrollView->contentsToRootView(rect);
+ break;
+ }
+ }
+ }
+
+ page->contextMenuController()->showContextMenuAt(page->mainFrame(), rect.center());
}
- (void)accessibilityPerformAction:(NSString*)action
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes