diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 18:45:22 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 18:45:22 +0000 |
commit | 93941b8f95ce6b16d8b702ef9d6544c7c7792fc6 (patch) | |
tree | 9634f767c2bdc8fd2bf5016550529b3673beb0aa /content/browser/accessibility/browser_accessibility.cc | |
parent | 7d0cb5c3def22e4d9dc957782e0ef4ca484c0d6a (diff) | |
download | chromium_src-93941b8f95ce6b16d8b702ef9d6544c7c7792fc6.zip chromium_src-93941b8f95ce6b16d8b702ef9d6544c7c7792fc6.tar.gz chromium_src-93941b8f95ce6b16d8b702ef9d6544c7c7792fc6.tar.bz2 |
Implement correct accessibility states for contenteditable.
This implements the correct MSAA states for regions that are
contenteditable and correctly marks such regions as editable
text that should bring up the Win 8 touch keyboard. Adds
coverage to one existing test, and enables for the first time
a contenteditable test that didn't pass before.
Also improves some test logging and fixes a previously failing test.
BUG=123205,128303,106957
TEST=Contenteditable brings up touch keyboard on Win 8.
TBR=brettw
Review URL: https://chromiumcodereview.appspot.com/10443014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/accessibility/browser_accessibility.cc')
-rw-r--r-- | content/browser/accessibility/browser_accessibility.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index f9718375..d9da7d4 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc @@ -296,7 +296,11 @@ bool BrowserAccessibility::HasState(WebAccessibility::State state_enum) const { } bool BrowserAccessibility::IsEditableText() const { - return (role_ == WebAccessibility::ROLE_TEXT_FIELD || + // Note: STATE_READONLY being false means it's either a text control, + // or contenteditable. We also check for editable text roles to cover + // another element that has role=textbox set on it. + return (!HasState(WebAccessibility::STATE_READONLY) || + role_ == WebAccessibility::ROLE_TEXT_FIELD || role_ == WebAccessibility::ROLE_TEXTAREA); } |