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

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

Issue 1951353002: Fixed a bug that assumed that static text object span only one line (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added back legasy logic for handling input and textarea elements. Created 4 years, 7 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index 73f13ecfa8a42f248725a85d6674e9b935658080..8c0eef30fcd756f5720642cd0c08c09b229ae064 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -2137,11 +2137,15 @@ STDMETHODIMP BrowserAccessibilityWin::get_textAtOffset(
// According to the IA2 Spec, only line boundaries should succeed when
// the offset is one past the end of the text.
- if (offset == text_len && boundary_type != IA2_TEXT_BOUNDARY_LINE) {
- *start_offset = 0;
- *end_offset = 0;
- *text = nullptr;
- return S_FALSE;
+ if (offset == text_len) {
+ if (boundary_type == IA2_TEXT_BOUNDARY_LINE) {
+ --offset;
+ } else {
+ *start_offset = 0;
+ *end_offset = 0;
+ *text = nullptr;
+ return S_FALSE;
+ }
}
*start_offset = FindBoundary(
« no previous file with comments | « content/browser/accessibility/browser_accessibility.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698