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

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

Issue 2806773002: Switched to using |AXPosition| for calculating word and line boundaries on Windows. (Closed)
Patch Set: Fixed unit tests. 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
Index: content/browser/accessibility/ax_platform_position.cc
diff --git a/content/browser/accessibility/ax_platform_position.cc b/content/browser/accessibility/ax_platform_position.cc
index 34d313929c307f958c8924b515d8eccc9621f36b..cf01ea9c69ed50d6cc74d5a2193857cfc0eb060d 100644
--- a/content/browser/accessibility/ax_platform_position.cc
+++ b/content/browser/accessibility/ax_platform_position.cc
@@ -109,6 +109,10 @@ int AXPlatformPosition::MaxTextOffsetInParent() const {
return INVALID_OFFSET;
if (GetAnchor()->IsTextOnlyObject())
return MaxTextOffset();
+ // Not all objects in the internal accessibility tree are exposed to platform
+ // APIs.
+ if (GetAnchor()->PlatformIsChildOfLeaf())
+ return MaxTextOffset();
return 1;
#else
return MaxTextOffset();
« no previous file with comments | « content/browser/accessibility/accessibility_win_browsertest.cc ('k') | content/browser/accessibility/browser_accessibility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698