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

Unified Diff: webkit/glue/webaccessibility.cc

Issue 8351066: Expose accessible text attributes for anything with an... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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: webkit/glue/webaccessibility.cc
===================================================================
--- webkit/glue/webaccessibility.cc (revision 107227)
+++ webkit/glue/webaccessibility.cc (working copy)
@@ -820,22 +820,19 @@
html_attributes.push_back(std::pair<string16, string16>(name, value));
}
- if (element.isFormControlElement()) {
- WebKit::WebFormControlElement form_element =
- element.to<WebKit::WebFormControlElement>();
- if (form_element.formControlType() == ASCIIToUTF16("text") ||
- form_element.formControlType() == ASCIIToUTF16("textarea")) {
- // Jaws gets confused by children of text fields, so we ignore them.
- include_children = false;
+ if (role == ROLE_EDITABLE_TEXT ||
+ role == ROLE_TEXTAREA ||
+ role == ROLE_TEXT_FIELD) {
+ // Jaws gets confused by children of text fields, so we ignore them.
+ include_children = false;
- int_attributes[ATTR_TEXT_SEL_START] = src.selectionStart();
- int_attributes[ATTR_TEXT_SEL_END] = src.selectionEnd();
- WebKit::WebVector<int> src_line_breaks;
- src.lineBreaks(src_line_breaks);
- line_breaks.reserve(src_line_breaks.size());
- for (size_t i = 0; i < src_line_breaks.size(); ++i)
- line_breaks.push_back(src_line_breaks[i]);
- }
+ int_attributes[ATTR_TEXT_SEL_START] = src.selectionStart();
+ int_attributes[ATTR_TEXT_SEL_END] = src.selectionEnd();
+ WebKit::WebVector<int> src_line_breaks;
+ src.lineBreaks(src_line_breaks);
+ line_breaks.reserve(src_line_breaks.size());
+ for (size_t i = 0; i < src_line_breaks.size(); ++i)
+ line_breaks.push_back(src_line_breaks[i]);
}
// ARIA role.
« 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