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

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: 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 | « Source/core/accessibility/AXObjectCache.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXRenderObject.cpp
diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp
index a3106b22c7cba331614e7dc8e9cbf8efd4923b1f..d55abad90fa881edd1ebdd1a511a0fc31730ce5d 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,8 @@ void AXRenderObject::textChanged()
if (!m_renderer)
return;
- if (AXObjectCache::inlineTextBoxAccessibility() && roleValue() == StaticTextRole)
+ Settings* settings = document()->settings();
+ if (settings && settings->inlineTextBoxAccessibilityEnabled() && roleValue() == StaticTextRole)
childrenChanged();
// Do this last - AXNodeObject::textChanged posts live region announcements,
@@ -1763,7 +1765,8 @@ int AXRenderObject::indexForVisiblePosition(const VisiblePosition& pos) const
void AXRenderObject::addInlineTextBoxChildren()
{
- if (!axObjectCache()->inlineTextBoxAccessibility())
+ Settings* settings = document()->settings();
+ if (!settings || !settings->inlineTextBoxAccessibilityEnabled())
return;
if (!renderer() || !renderer()->isText())
@@ -2031,6 +2034,10 @@ AXSVGRoot* AXRenderObject::remoteSVGRootElement() const
if (!doc || !doc->isSVGDocument())
return 0;
+ Settings* settings = doc->settings();
+ if (settings && !settings->accessibilityEnabled())
+ settings->setAccessibilityEnabled(true);
+
SVGSVGElement* rootElement = doc->accessSVGExtensions().rootElement();
if (!rootElement)
return 0;
« no previous file with comments | « Source/core/accessibility/AXObjectCache.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698