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

Side by Side Diff: content/browser/accessibility/browser_accessibility.h

Issue 2191833003: Use text affinity to return correct accessible line boundaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug in browser_accessibility_win.cc Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // the role is WebAXRoleStaticText. 159 // the role is WebAXRoleStaticText.
160 gfx::Rect GetGlobalBoundsForRange(int start, int len) const; 160 gfx::Rect GetGlobalBoundsForRange(int start, int len) const;
161 161
162 // This is to handle the cases such as ARIA textbox, where the value should 162 // This is to handle the cases such as ARIA textbox, where the value should
163 // be calculated from the object's inner text. 163 // be calculated from the object's inner text.
164 virtual base::string16 GetValue() const; 164 virtual base::string16 GetValue() const;
165 165
166 // Starting at the given character offset, locates the start of the next or 166 // Starting at the given character offset, locates the start of the next or
167 // previous line and returns its character offset. 167 // previous line and returns its character offset.
168 int GetLineStartBoundary(int start, 168 int GetLineStartBoundary(int start,
169 ui::TextBoundaryDirection direction) const; 169 ui::TextBoundaryDirection direction,
170 ui::AXTextAffinity affinity) const;
170 171
171 // Starting at the given character offset, locates the start of the next or 172 // Starting at the given character offset, locates the start of the next or
172 // previous word and returns its character offset. 173 // previous word and returns its character offset.
173 // In case there is no word boundary before or after the given offset, it 174 // In case there is no word boundary before or after the given offset, it
174 // returns one past the last character. 175 // returns one past the last character.
175 // If the given offset is already at the start of a word, returns the start 176 // If the given offset is already at the start of a word, returns the start
176 // of the next word if the search is forwards, and the given offset if it is 177 // of the next word if the search is forwards, and the given offset if it is
177 // backwards. 178 // backwards.
178 // If the start offset is equal to -1 and the search is in the forwards 179 // If the start offset is equal to -1 and the search is in the forwards
179 // direction, returns the start boundary of the first word. 180 // direction, returns the start boundary of the first word.
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // its nearest scrollable ancestor) to local bounds (which are relative 370 // its nearest scrollable ancestor) to local bounds (which are relative
370 // to the top of the web accessibility tree). 371 // to the top of the web accessibility tree).
371 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; 372 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const;
372 373
373 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 374 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
374 }; 375 };
375 376
376 } // namespace content 377 } // namespace content
377 378
378 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 379 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW
« no previous file with comments | « components/test_runner/web_ax_object_proxy.cc ('k') | content/browser/accessibility/browser_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698