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

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

Issue 2694413006: Scope and clean up uses of AccessibilityMode. (Closed)
Patch Set: merge Created 3 years, 9 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: content/renderer/accessibility/blink_ax_tree_source.cc
diff --git a/content/renderer/accessibility/blink_ax_tree_source.cc b/content/renderer/accessibility/blink_ax_tree_source.cc
index 396a013fc845b728378c9ebaef56e17ff9831d41..99dab9b0df95bfd62094f31e1411a67c3cd517a1 100644
--- a/content/renderer/accessibility/blink_ax_tree_source.cc
+++ b/content/renderer/accessibility/blink_ax_tree_source.cc
@@ -433,7 +433,7 @@ void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src,
// The following set of attributes are only accessed when the accessibility
// mode is set to screen reader mode, otherwise only the more basic
// attributes are populated.
- if (accessibility_mode_ & ACCESSIBILITY_MODE_FLAG_SCREEN_READER) {
+ if (accessibility_mode_.has_mode(AccessibilityMode::kScreenReader)) {
blink::WebString web_placeholder = src.placeholder(nameFrom);
if (!web_placeholder.isEmpty())
dst->AddStringAttribute(ui::AX_ATTR_PLACEHOLDER, web_placeholder.utf8());
@@ -750,7 +750,7 @@ void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src,
WebElement element = node.to<WebElement>();
is_iframe = element.hasHTMLTagName("iframe");
- if (accessibility_mode_ & ACCESSIBILITY_MODE_FLAG_HTML) {
+ if (accessibility_mode_.has_mode(AccessibilityMode::kHTML)) {
// 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.
« no previous file with comments | « content/renderer/accessibility/blink_ax_tree_source.h ('k') | content/renderer/accessibility/render_accessibility_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698