Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 25434005: Implement accessible BoundsForRange on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/accessibility/browser_accessibility_mac_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index a7b03feb3334327b818380478047a208c4664822..799adf54684602c9e8af8377c2bc818477ac7e24 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -3082,10 +3082,8 @@ void RenderWidgetHostViewMac::FrameSwapped() {
// Convert a web accessibility's location in web coordinates into a cocoa
// screen coordinate.
-- (NSPoint)accessibilityPointInScreen:
- (BrowserAccessibilityCocoa*)accessibility {
- NSPoint origin = [accessibility origin];
- NSSize size = [[accessibility size] sizeValue];
+- (NSPoint)accessibilityPointInScreen:(NSPoint)origin
+ size:(NSSize)size {
origin.y = NSHeight([self bounds]) - origin.y;
NSPoint originInWindow = [self convertPoint:origin toView:nil];
NSPoint originInScreen = [[self window] convertBaseToScreen:originInWindow];
@@ -3112,8 +3110,9 @@ void RenderWidgetHostViewMac::FrameSwapped() {
- (void)performShowMenuAction:(BrowserAccessibilityCocoa*)accessibility {
// Performs a right click copying WebKit's
// accessibilityPerformShowMenuAction.
- NSPoint location = [self accessibilityPointInScreen:accessibility];
+ NSPoint origin = [accessibility origin];
NSSize size = [[accessibility size] sizeValue];
+ NSPoint location = [self accessibilityPointInScreen:origin size:size];
location = [[self window] convertScreenToBase:location];
location.x += size.width/2;
location.y += size.height/2;
« no previous file with comments | « content/browser/accessibility/browser_accessibility_mac_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698