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

Unified Diff: ui/accessibility/ax_position.h

Issue 2692173003: Implemented SetSelection for the Web content on Windows. (Closed)
Patch Set: Fixed another compilation error on Windows. Created 3 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 | « content/browser/accessibility/browser_accessibility_win_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_position.h
diff --git a/ui/accessibility/ax_position.h b/ui/accessibility/ax_position.h
index 5186c73d5fa2bf7779a76b86194a3e9d830b47ed..8a1cf0dbffc765c3c2acebdcedaec996b7e2ea34 100644
--- a/ui/accessibility/ax_position.h
+++ b/ui/accessibility/ax_position.h
@@ -146,19 +146,18 @@ class AXPosition {
}
}
- if (!IsTextPosition() || text_offset() > MaxTextOffset())
+ if (!IsTextPosition() || text_offset_ > MaxTextOffset())
return str;
std::string text = base::UTF16ToUTF8(GetInnerText());
DCHECK_GE(text_offset_, 0);
DCHECK_LE(text_offset_, static_cast<int>(text.length()));
std::string annotated_text;
- if (text_offset() == MaxTextOffset()) {
+ if (text_offset_ == MaxTextOffset()) {
annotated_text = text + "<>";
} else {
- annotated_text = text.substr(0, text_offset()) + "<" +
- text[text_offset()] + ">" +
- text.substr(text_offset() + 1);
+ annotated_text = text.substr(0, text_offset_) + "<" + text[text_offset_] +
+ ">" + text.substr(text_offset_ + 1);
}
return str + " annotated_text=" + annotated_text;
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698