summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webaccessibility.cc
diff options
context:
space:
mode:
authorctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 05:45:13 +0000
committerctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 05:45:13 +0000
commitfd63f8fddb02be680677289d22d4571fef5fe257 (patch)
treeb70ac7d2d3283a9be0e42cbbe894b9edf304ffc9 /webkit/glue/webaccessibility.cc
parent9d2951f6037aafcdae278d117b54027421937bac (diff)
downloadchromium_src-fd63f8fddb02be680677289d22d4571fef5fe257.zip
chromium_src-fd63f8fddb02be680677289d22d4571fef5fe257.tar.gz
chromium_src-fd63f8fddb02be680677289d22d4571fef5fe257.tar.bz2
Store lower case tag names within web accessibility.
This is similar to the behavior of firefox. BUG=none TEST=browser_tests:RendererAccessibilityBrowserTest.TestCrossPlatformAccessibilityTree TEST=interactive_ui_tests:AccessibilityWinBrowserTest.* Review URL: http://codereview.chromium.org/3435019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webaccessibility.cc')
-rw-r--r--webkit/glue/webaccessibility.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/glue/webaccessibility.cc b/webkit/glue/webaccessibility.cc
index 2e75f19..ecb7a25 100644
--- a/webkit/glue/webaccessibility.cc
+++ b/webkit/glue/webaccessibility.cc
@@ -4,6 +4,7 @@
#include "webkit/glue/webaccessibility.h"
+#include "base/string_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityCache.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityRole.h"
@@ -302,7 +303,10 @@ void WebAccessibility::Init(const WebKit::WebAccessibilityObject& src,
if (!node.isNull() && node.isElementNode()) {
WebKit::WebElement element = node.to<WebKit::WebElement>();
- attributes[ATTR_HTML_TAG] = element.tagName();
+ // TODO(ctguil): The tagName in WebKit is lower cased but
+ // HTMLElement::nodeName calls localNameUpper. Consider adding
+ // a WebElement method that returns the original lower cased tagName.
+ attributes[ATTR_HTML_TAG] = StringToLowerASCII(string16(element.tagName()));
for (unsigned i = 0; i < element.attributes().length(); i++) {
html_attributes.push_back(
std::pair<string16, string16>(