diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-09 20:34:12 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-09 20:34:12 +0000 |
commit | 169d260383f7cba5ef4587e04500dd73410c7ce6 (patch) | |
tree | 115a179d95068f2831e69f66b4048fbbb15e3dc7 /webkit | |
parent | db0382c3ee3dc66f93cbdf7290899d448fcddc3c (diff) | |
download | chromium_src-169d260383f7cba5ef4587e04500dd73410c7ce6.zip chromium_src-169d260383f7cba5ef4587e04500dd73410c7ce6.tar.gz chromium_src-169d260383f7cba5ef4587e04500dd73410c7ce6.tar.bz2 |
Fix the readonly state in the Mac accessibility tree.
In r99161 (http://codereview.chromium.org/7745035),
WebAccessibilityObject's READONLY was changed to behave
better on Win, but that broke Mac. This change
reverts READONLY to the previous working behavior and
adds a new flag for Win that doesn't interfere with Mac.
BUG=95562
TEST=manual testing on Mac and Win
Review URL: http://codereview.chromium.org/7857026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webaccessibility.cc | 7 | ||||
-rw-r--r-- | webkit/glue/webaccessibility.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/webkit/glue/webaccessibility.cc b/webkit/glue/webaccessibility.cc index 90f956a..4626d99 100644 --- a/webkit/glue/webaccessibility.cc +++ b/webkit/glue/webaccessibility.cc @@ -292,7 +292,7 @@ uint32 ConvertState(const WebAccessibilityObject& o) { if (o.isPasswordField()) state |= (1 << WebAccessibility::STATE_PROTECTED); - if (o.isAriaReadOnly()) + if (o.isReadOnly()) state |= (1 << WebAccessibility::STATE_READONLY); if (o.isRequired()) @@ -653,6 +653,9 @@ std::string WebAccessibility::DebugString(bool recursive) { case ATTR_CONTAINER_LIVE_BUSY: result += " container_busy=" + value; break; + case ATTR_ARIA_READONLY: + result += " aria_readonly=" + value; + break; } } @@ -697,6 +700,8 @@ void WebAccessibility::Init(const WebKit::WebAccessibilityObject& src, string_attributes[ATTR_ACCESS_KEY] = src.accessKey(); if (src.actionVerb().length()) string_attributes[ATTR_ACTION] = src.actionVerb(); + if (src.isAriaReadOnly()) + bool_attributes[ATTR_ARIA_READONLY] = true; if (src.isButtonStateMixed()) bool_attributes[ATTR_BUTTON_MIXED] = true; if (src.accessibilityDescription().length()) diff --git a/webkit/glue/webaccessibility.h b/webkit/glue/webaccessibility.h index 8a4cf40..ceaa516 100644 --- a/webkit/glue/webaccessibility.h +++ b/webkit/glue/webaccessibility.h @@ -230,6 +230,9 @@ struct WebAccessibility { ATTR_CONTAINER_LIVE_BUSY, ATTR_LIVE_ATOMIC, ATTR_LIVE_BUSY, + + // ARIA readonly flag. + ATTR_ARIA_READONLY, }; // Empty constructor, for serialization. |