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

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

Issue 2694413006: Scope and clean up uses of AccessibilityMode. (Closed)
Patch Set: enum -> class Created 3 years, 10 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..c509a64d4f34c495eab71b007ef22c450e0d0050 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(AccessibilityMode::SCREEN_READER)) {
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(AccessibilityMode::HTML)) {
// 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.

Powered by Google App Engine
This is Rietveld 408576698