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

Unified Diff: ui/accessibility/ax_tree.cc

Issue 2860883003: A11y: Add/refactor methods for manipulating bitfields on AXNodeData. (Closed)
Patch Set: Delete AXNodeData::Init() and clear bitfields in AXNodeData() instead. Created 3 years, 7 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: ui/accessibility/ax_tree.cc
diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index c726a4d02f5e4b0b75035a92bd4e647b6f8bd4f3..b2c0833204d2c7a415cda0442a467b8406b3a531 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -360,10 +360,8 @@ void AXTree::CallNodeChangeCallbacks(AXNode* node, const AXNodeData& new_data) {
if (old_data.state != new_data.state) {
for (int i = AX_STATE_NONE + 1; i <= AX_STATE_LAST; ++i) {
AXState state = static_cast<AXState>(i);
- if (old_data.HasStateFlag(state) != new_data.HasStateFlag(state)) {
- delegate_->OnStateChanged(this, node, state,
- new_data.HasStateFlag(state));
- }
+ if (old_data.HasState(state) != new_data.HasState(state))
+ delegate_->OnStateChanged(this, node, state, new_data.HasState(state));
}
}

Powered by Google App Engine
This is Rietveld 408576698