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

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

Issue 497273002: Switch to using WebSettings only for accessibilityEnabled and inlineTextBoxAccess (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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..3fabfa4680f960f10ee4340ee4289109422404f0 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 {
@@ -36,13 +38,15 @@ RendererAccessibilityComplete::RendererAccessibilityComplete(
serializer_(&tree_source_),
last_scroll_offset_(gfx::Size()),
ack_pending_(false) {
- WebAXObject::enableAccessibility();
+ WebView* web_view = render_frame_->GetRenderView()->GetWebView();
dmazzoni 2014/08/22 23:20:23 Why does test_runner call this on the WebFrame whi
aboxhall 2014/08/22 23:24:10 How do I get a reference to a WebFrame here?
dmazzoni 2014/08/22 23:31:22 render_frame->GetWebFrame()
+ 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