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

Unified Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 2763043002: Implement BrowserAccessibility accLocation in terms of AXPlatformNodeWin. (Closed)
Patch Set: Implement BrowserAccessibility accLocation in terms of AXPlatformNodeWin. Created 3 years, 8 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 | « content/browser/accessibility/browser_accessibility_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index 920eab33a1edc00cc8c56aba59841d2e8b19b018..d4a8d1fa4c3d11eaf568b897239c305326c4c4c1 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -483,20 +483,8 @@ STDMETHODIMP BrowserAccessibilityWin::accLocation(LONG* x_left,
if (!instance_active())
return E_FAIL;
- if (!x_left || !y_top || !width || !height)
- return E_INVALIDARG;
-
- BrowserAccessibilityWin* target = GetTargetFromChildID(var_id);
- if (!target)
- return E_INVALIDARG;
-
- gfx::Rect bounds = target->GetScreenBoundsRect();
- *x_left = bounds.x();
- *y_top = bounds.y();
- *width = bounds.width();
- *height = bounds.height();
-
- return S_OK;
+ return GetPlatformNodeWin()->accLocation(x_left, y_top, width, height,
+ var_id);
}
STDMETHODIMP BrowserAccessibilityWin::accNavigate(LONG nav_dir,
@@ -5037,6 +5025,11 @@ void BrowserAccessibilityWin::FireNativeEvent(LONG win_event_type) const {
this))->Fire();
}
+ui::AXPlatformNodeWin* BrowserAccessibilityWin::GetPlatformNodeWin() const {
+ DCHECK(platform_node_);
+ return static_cast<ui::AXPlatformNodeWin*>(platform_node_);
+}
+
void BrowserAccessibilityWin::InitRoleAndState() {
int32_t ia_role = 0;
int32_t ia_state = 0;
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698