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

Unified Diff: content/browser/accessibility/browser_accessibility.h

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/browser_accessibility.h
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h
index 74990dba8d900d2cc0603693d1b96fd469aa028a..82d898e464d87f51393b015face8921a02840674 100644
--- a/content/browser/accessibility/browser_accessibility.h
+++ b/content/browser/accessibility/browser_accessibility.h
@@ -172,25 +172,6 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate {
// be calculated from the object's inner text.
virtual base::string16 GetValue() const;
- // Starting at the given character offset, locates the start of the next or
- // previous line and returns its character offset.
- int GetLineStartBoundary(int start,
- ui::TextBoundaryDirection direction,
- ui::AXTextAffinity affinity) const;
-
- // Starting at the given character offset, locates the start of the next or
- // previous word and returns its character offset.
- // In case there is no word boundary before or after the given offset, it
- // returns one past the last character.
- // If the given offset is already at the start of a word, returns the start
- // of the next word if the search is forwards, and the given offset if it is
- // backwards.
- // If the start offset is equal to -1 and the search is in the forwards
- // direction, returns the start boundary of the first word.
- // Start offsets that are not in the range -1 to text length are invalid.
- int GetWordStartBoundary(int start,
- ui::TextBoundaryDirection direction) const;
-
// This is an approximate hit test that only uses the information in
// the browser process to compute the correct result. It will not return
// correct results in many cases of z-index, overflow, and absolute
@@ -356,11 +337,10 @@ class CONTENT_EXPORT BrowserAccessibility : public ui::AXPlatformNodeDelegate {
// to compute a name from its descendants.
std::string ComputeAccessibleNameFromDescendants();
- // Creates a position rooted at this object.
- // This is a text position on all platforms except IA2 and ATK, where tree
- // positions are created for non-text objects representing hypertext offsets.
- virtual AXPlatformPosition::AXPositionInstance CreatePositionAt(
- int offset) const;
+ // Creates a text position rooted at this object.
+ AXPlatformPosition::AXPositionInstance CreatePositionAt(
+ int offset,
+ ui::AXTextAffinity affinity = ui::AX_TEXT_AFFINITY_DOWNSTREAM) const;
// Gets the text offsets where new lines start.
std::vector<int> GetLineStartOffsets() const;

Powered by Google App Engine
This is Rietveld 408576698