Commit 29bb7241 authored by dmazzoni@chromium.org's avatar dmazzoni@chromium.org

Implement support for special offset constants in IAccessibleText methods.

This allows JAWS to fully support text editing.

BUG=none
TEST=manual testing with JAWS screenreader

Review URL: http://codereview.chromium.org/6469037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75418 0039d316-1c4b-4281-b951-d872f2087c98
parent 43b07e25
......@@ -1223,9 +1223,17 @@ LONG BrowserAccessibilityWin::FindBoundary(
LONG start_offset,
LONG direction) {
LONG text_size = static_cast<LONG>(text.size());
DCHECK(start_offset >= 0 && start_offset <= text_size);
DCHECK((start_offset >= 0 && start_offset <= text_size) ||
start_offset == IA2_TEXT_OFFSET_LENGTH ||
start_offset == IA2_TEXT_OFFSET_CARET);
DCHECK(direction == 1 || direction == -1);
if (start_offset == IA2_TEXT_OFFSET_LENGTH) {
start_offset = text_size;
} else if (start_offset == IA2_TEXT_OFFSET_CARET) {
get_caretOffset(&start_offset);
}
if (boundary == IA2_TEXT_BOUNDARY_CHAR) {
if (direction == 1 && start_offset < text_size)
return start_offset + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment