Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1744)

Unified Diff: content/renderer/accessibility/renderer_accessibility_complete.cc

Issue 497263002: Use both APIs (WebAXObject and WebSettings) for enabling accessibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/accessibility_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/accessibility/renderer_accessibility_complete.cc
diff --git a/content/renderer/accessibility/renderer_accessibility_complete.cc b/content/renderer/accessibility/renderer_accessibility_complete.cc
index be1cde8418753012d1ee65d38d1c5dc4a35c93ae..801ca502088b64af3e8a4e5d5cb865b5d25b83cb 100644
--- a/content/renderer/accessibility/renderer_accessibility_complete.cc
+++ b/content/renderer/accessibility/renderer_accessibility_complete.cc
@@ -16,6 +16,7 @@
#include "third_party/WebKit/public/web/WebInputElement.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebNode.h"
+#include "third_party/WebKit/public/web/WebSettings.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "ui/accessibility/ax_tree.h"
@@ -24,6 +25,7 @@ using blink::WebDocument;
using blink::WebNode;
using blink::WebPoint;
using blink::WebRect;
+using blink::WebSettings;
using blink::WebView;
namespace content {
@@ -37,12 +39,16 @@ RendererAccessibilityComplete::RendererAccessibilityComplete(
last_scroll_offset_(gfx::Size()),
ack_pending_(false) {
WebAXObject::enableAccessibility();
+ WebView* web_view = render_frame_->GetRenderView()->GetWebView();
dmazzoni 2014/08/22 23:20:11 Wait - why does test_runner call this on the WebFr
aboxhall 2014/08/22 23:23:14 This doesn't have a WebFrame AFAIK. Am I missing s
+ WebSettings* settings = web_view->settings();
+ settings->setAccessibilityEnabled(true);
#if !defined(OS_ANDROID)
// Skip inline text boxes on Android - since there are no native Android
// APIs that compute the bounds of a range of text, it's a waste to
// include these in the AX tree.
WebAXObject::enableInlineTextBoxAccessibility();
+ settings->setInlineTextBoxAccessibilityEnabled(true);
#endif
const WebDocument& document = GetMainDocument();
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/accessibility_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698