summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webaccessibility.cc
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-05 06:29:40 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-05 06:29:40 +0000
commit6db7b1fb49578bfb4178df6b5d6de0a80da65fc1 (patch)
tree860670d64b1871f2d9b65609c91d75b4b366af2f /webkit/glue/webaccessibility.cc
parent9329770104fc4927a9790f73009f9c28c5c43de5 (diff)
downloadchromium_src-6db7b1fb49578bfb4178df6b5d6de0a80da65fc1.zip
chromium_src-6db7b1fb49578bfb4178df6b5d6de0a80da65fc1.tar.gz
chromium_src-6db7b1fb49578bfb4178df6b5d6de0a80da65fc1.tar.bz2
Revert 108318 temporarily until the fix for WebKit bug 71561 lands
- Expose accessible text attributes for anything with an editable text role, not just <input> and <textarea> elements. BUG=none TEST=Try using pure-javascript text editor with VoiceOver on Mac OS X. Review URL: http://codereview.chromium.org/8351066 TBR=dmazzoni@chromium.org Review URL: http://codereview.chromium.org/8481020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webaccessibility.cc')
-rw-r--r--webkit/glue/webaccessibility.cc29
1 files changed, 16 insertions, 13 deletions
diff --git a/webkit/glue/webaccessibility.cc b/webkit/glue/webaccessibility.cc
index 7eea917..92de74f 100644
--- a/webkit/glue/webaccessibility.cc
+++ b/webkit/glue/webaccessibility.cc
@@ -820,19 +820,22 @@ void WebAccessibility::Init(const WebKit::WebAccessibilityObject& src,
html_attributes.push_back(std::pair<string16, string16>(name, value));
}
- 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]);
+ 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;
+
+ 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.