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

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

Issue 2745713002: WIP: Modified AXPosition to work with objects with both embedded object characters and text. (Closed)
Patch Set: 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 | « content/browser/accessibility/ax_platform_position.h ('k') | ui/accessibility/ax_node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3c8c460c529022aa4f5e9c4dd2554c4ea83a0b7d..c5ed3a87c0e86b22b4f0509aafdf6423b33d2a46 100644
--- a/content/browser/accessibility/ax_platform_position.cc
+++ b/content/browser/accessibility/ax_platform_position.cc
@@ -99,6 +99,21 @@ int AXPlatformPosition::MaxTextOffset() const {
return static_cast<int>(GetInnerText().length());
}
+#if defined(OS_WIN) || \
dmazzoni 2017/03/10 19:32:25 Nit: put the #if inside the function, not outside
+ (defined(OS_LINUX) && defined(USE_X11) && !defined(OS_CHROMEOS))
+int AXPlatformPosition::MaxTextOffsetInParent() const {
+ if (IsNullPosition())
+ return INVALID_OFFSET;
+ if (GetAnchor()->IsTextOnlyObject())
+ return MaxTextOffset();
+ return 1;
+}
+#else
+int AXPlatformPosition::MaxTextOffsetInParent() const {
+ return MaxTextOffset();
+}
+#endif
+
bool AXPlatformPosition::IsInLineBreak() const {
if (IsNullPosition())
return false;
« no previous file with comments | « content/browser/accessibility/ax_platform_position.h ('k') | ui/accessibility/ax_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698