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

Unified Diff: ui/views/accessibility/native_view_accessibility_win.cc

Issue 2789963002: Accessible bounds should include device scale factor on Windows (again) (Closed)
Patch Set: Fix const 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
« no previous file with comments | « ui/views/accessibility/native_view_accessibility_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessibility/native_view_accessibility_win.cc
diff --git a/ui/views/accessibility/native_view_accessibility_win.cc b/ui/views/accessibility/native_view_accessibility_win.cc
index 6dc2911a64df802c69d38a0eff961645ef751901..12a80c6567afb4671de5571d23c16893001fc264 100644
--- a/ui/views/accessibility/native_view_accessibility_win.cc
+++ b/ui/views/accessibility/native_view_accessibility_win.cc
@@ -19,6 +19,7 @@
#include "ui/accessibility/ax_enums.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/ax_text_utils.h"
+#include "ui/base/layout.h"
#include "ui/base/win/accessibility_misc_utils.h"
#include "ui/base/win/atl_module.h"
#include "ui/views/controls/button/custom_button.h"
@@ -63,4 +64,12 @@ NativeViewAccessibilityWin::GetTargetForNativeAccessibilityEvent() {
return HWNDForView(view_);
}
+gfx::RectF NativeViewAccessibilityWin::GetBoundsInScreen() const {
+ gfx::RectF bounds = gfx::RectF(view_->GetBoundsInScreen());
+ gfx::NativeView native_view = view_->GetWidget()->GetNativeView();
+ float device_scale = ui::GetScaleFactorForNativeView(native_view);
+ bounds.Scale(device_scale);
+ return bounds;
+}
+
} // namespace views
« no previous file with comments | « ui/views/accessibility/native_view_accessibility_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698