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

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 line boundaries. 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..a41ed050051ba1adb2b74aaf7b5e3d19a437af05 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();
+ // Objects in the shadow DOM are not visible to platform APIs and thus should
dmazzoni 2017/04/10 22:39:49 Shadow DOM isn't necessarily the correct term here
+ // be excluded.
+ if (GetAnchor()->PlatformIsChildOfLeaf())
+ return MaxTextOffset();
return 1;
#else
return MaxTextOffset();

Powered by Google App Engine
This is Rietveld 408576698