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

Unified Diff: ui/accessibility/platform/ax_platform_node_win.cc

Issue 2795543002: Add GetScreenBoundsRect to ui::AXPlatformNodeDelegate (Closed)
Patch Set: Remove GetGlobalCoordinateOffset Created 3 years, 9 months 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
Index: ui/accessibility/platform/ax_platform_node_win.cc
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index d811182f2f17fceaac6f803e3c159df170953c28..ae49c4cd2d84dfbe52e2b53bc788d0efdda3bdae 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -261,9 +261,10 @@ STDMETHODIMP AXPlatformNodeWin::accLocation(
LONG* x_left, LONG* y_top, LONG* width, LONG* height, VARIANT var_id) {
COM_OBJECT_VALIDATE_VAR_ID_4_ARGS(var_id, x_left, y_top, width, height);
gfx::Rect bounds = gfx::ToEnclosingRect(GetData().location);
- bounds += delegate_->GetGlobalCoordinateOffset();
- *x_left = bounds.x();
- *y_top = bounds.y();
+ gfx::Rect screen_bounds = delegate_->GetScreenBoundsRect();
dmazzoni 2017/04/04 15:05:19 Same here - it should just call GetScreenBoundsRec
+
+ *x_left = bounds.x() + screen_bounds.x();
+ *y_top = bounds.y() + screen_bounds.y();
*width = bounds.width();
*height = bounds.height();

Powered by Google App Engine
This is Rietveld 408576698