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

Unified Diff: Source/core/accessibility/AXRenderObject.cpp

Issue 495763005: Switch to using accessibilityEnabled and inlineTextBoxAccessibilityEnabled from settings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make WebAXObject methods noops 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
Index: Source/core/accessibility/AXRenderObject.cpp
diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp
index a3106b22c7cba331614e7dc8e9cbf8efd4923b1f..ca288abad207e9ef9180b339eef75250dec0634a 100644
--- a/Source/core/accessibility/AXRenderObject.cpp
+++ b/Source/core/accessibility/AXRenderObject.cpp
@@ -44,6 +44,7 @@
#include "core/editing/VisibleUnits.h"
#include "core/editing/htmlediting.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Settings.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLLabelElement.h"
#include "core/html/HTMLOptionElement.h"
@@ -1686,7 +1687,7 @@ void AXRenderObject::textChanged()
if (!m_renderer)
return;
- if (AXObjectCache::inlineTextBoxAccessibility() && roleValue() == StaticTextRole)
+ if (document()->settings() && document()->settings()->inlineTextBoxAccessibilityEnabled() && roleValue() == StaticTextRole)
childrenChanged();
// Do this last - AXNodeObject::textChanged posts live region announcements,
@@ -1763,7 +1764,7 @@ int AXRenderObject::indexForVisiblePosition(const VisiblePosition& pos) const
void AXRenderObject::addInlineTextBoxChildren()
{
- if (!axObjectCache()->inlineTextBoxAccessibility())
+ if (!document()->settings() || !document()->settings()->inlineTextBoxAccessibilityEnabled())
return;
if (!renderer() || !renderer()->isText())
@@ -2031,6 +2032,9 @@ AXSVGRoot* AXRenderObject::remoteSVGRootElement() const
if (!doc || !doc->isSVGDocument())
return 0;
+ if (doc->settings() && !doc->settings()->accessibilityEnabled())
+ doc->settings()->setAccessibilityEnabled(true);
+
SVGSVGElement* rootElement = doc->accessSVGExtensions().rootElement();
if (!rootElement)
return 0;

Powered by Google App Engine
This is Rietveld 408576698