summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webaccessibility.cc
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 19:50:27 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 19:50:27 +0000
commit16b72d126c5223a43eb07753cf660b65227c4bbc (patch)
tree2b94a687d526414225a6b3803ac07d5c6bf3f928 /webkit/glue/webaccessibility.cc
parent4b0749102a6ad705e3297db11ad141ecefedac15 (diff)
downloadchromium_src-16b72d126c5223a43eb07753cf660b65227c4bbc.zip
chromium_src-16b72d126c5223a43eb07753cf660b65227c4bbc.tar.gz
chromium_src-16b72d126c5223a43eb07753cf660b65227c4bbc.tar.bz2
Retrieve the accessibility tree from an iframe's document in the renderer,
so that documents with iframes can be fully accessible. Depends on webkit patch: http://bugs.webkit.org/show_bug.cgi?id=56984 BUG=57727 TEST=Adds new browser test. Review URL: http://codereview.chromium.org/6731020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webaccessibility.cc')
-rw-r--r--webkit/glue/webaccessibility.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/webkit/glue/webaccessibility.cc b/webkit/glue/webaccessibility.cc
index a3d14c4..aef31e4 100644
--- a/webkit/glue/webaccessibility.cc
+++ b/webkit/glue/webaccessibility.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -329,9 +329,12 @@ void WebAccessibility::Init(const WebKit::WebAccessibilityObject& src,
attributes[ATTR_URL] = src.url().spec().utf16();
WebKit::WebNode node = src.node();
+ bool is_iframe = false;
if (!node.isNull() && node.isElementNode()) {
WebKit::WebElement element = node.to<WebKit::WebElement>();
+ is_iframe = (element.tagName() == ASCIIToUTF16("IFRAME"));
+
// 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.
@@ -399,7 +402,10 @@ void WebAccessibility::Init(const WebKit::WebAccessibilityObject& src,
// Only recursively add child nodes that have this node as its
// unignored parent. For child nodes that are actually parented to
// somethinng else, store only the ID.
- if (IsParentUnignoredOf(src, child)) {
+ //
+ // As an exception, also add children of an iframe element.
+ // https://bugs.webkit.org/show_bug.cgi?id=57066
+ if (is_iframe || IsParentUnignoredOf(src, child)) {
children.push_back(WebAccessibility(child, cache, include_children));
} else {
indirect_child_ids.push_back(cache->addOrGetId(child));