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

Unified Diff: chrome/browser/accessibility/browser_accessibility_win.cc

Issue 6469037: Implement support for special offset constants in IAccessibleText methods.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/accessibility/browser_accessibility_win.cc
===================================================================
--- chrome/browser/accessibility/browser_accessibility_win.cc (revision 75254)
+++ chrome/browser/accessibility/browser_accessibility_win.cc (working copy)
@@ -1223,9 +1223,15 @@
LONG start_offset,
LONG direction) {
LONG text_size = static_cast<LONG>(text.size());
- DCHECK(start_offset >= 0 && start_offset <= text_size);
DCHECK(direction == 1 || direction == -1);
Chris Guillory 2011/02/18 01:37:11 Nit: Can we keep these DCHECKs next to each other.
dmazzoni 2011/02/18 17:52:37 Sure. I moved the start_offset DCHECK back up to t
+ if (start_offset == IA2_TEXT_OFFSET_LENGTH) {
+ start_offset = text_size;
+ } else if (start_offset == IA2_TEXT_OFFSET_CARET) {
+ get_caretOffset(&start_offset);
+ }
+ DCHECK(start_offset >= 0 && start_offset <= text_size);
+
if (boundary == IA2_TEXT_BOUNDARY_CHAR) {
if (direction == 1 && start_offset < text_size)
return start_offset + 1;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698