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

Unified Diff: ui/views/accessibility/ax_view_obj_wrapper.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
« no previous file with comments | « ui/accessibility/tree_generator.cc ('k') | ui/views/accessibility/ax_window_obj_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessibility/ax_view_obj_wrapper.cc
diff --git a/ui/views/accessibility/ax_view_obj_wrapper.cc b/ui/views/accessibility/ax_view_obj_wrapper.cc
index 2a22590bbb23c404de53e38a8ce868bad966e4cd..e636e34336b45fc8bb362422f408775fe4a6011f 100644
--- a/ui/views/accessibility/ax_view_obj_wrapper.cc
+++ b/ui/views/accessibility/ax_view_obj_wrapper.cc
@@ -46,15 +46,14 @@ void AXViewObjWrapper::GetChildren(
}
void AXViewObjWrapper::Serialize(ui::AXNodeData* out_node_data) {
- out_node_data->state = 0;
sky 2017/05/08 15:56:27 How come the new code doesn't need a ClearState()
Patti Lor 2017/05/09 06:03:40 The current AXNodeData class initialises its |stat
view_->GetAccessibleNodeData(out_node_data);
out_node_data->id = GetID();
if (view_->IsAccessibilityFocusable())
- out_node_data->state |= 1 << ui::AX_STATE_FOCUSABLE;
+ out_node_data->AddState(ui::AX_STATE_FOCUSABLE);
if (!view_->visible())
- out_node_data->state |= 1 << ui::AX_STATE_INVISIBLE;
+ out_node_data->AddState(ui::AX_STATE_INVISIBLE);
out_node_data->location = gfx::RectF(view_->GetBoundsInScreen());
}
« no previous file with comments | « ui/accessibility/tree_generator.cc ('k') | ui/views/accessibility/ax_window_obj_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698