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

Side by Side Diff: content/renderer/accessibility/blink_ax_tree_source.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/accessibility/blink_ax_tree_source.h" 5 #include "content/renderer/accessibility/blink_ax_tree_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 } 622 }
623 dst->AddIntListAttribute(ui::AX_ATTR_MARKER_TYPES, marker_types); 623 dst->AddIntListAttribute(ui::AX_ATTR_MARKER_TYPES, marker_types);
624 dst->AddIntListAttribute(ui::AX_ATTR_MARKER_STARTS, marker_starts); 624 dst->AddIntListAttribute(ui::AX_ATTR_MARKER_STARTS, marker_starts);
625 dst->AddIntListAttribute(ui::AX_ATTR_MARKER_ENDS, marker_ends); 625 dst->AddIntListAttribute(ui::AX_ATTR_MARKER_ENDS, marker_ends);
626 } 626 }
627 627
628 if (src.IsInLiveRegion()) { 628 if (src.IsInLiveRegion()) {
629 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_ATOMIC, src.LiveRegionAtomic()); 629 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_ATOMIC, src.LiveRegionAtomic());
630 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_BUSY, src.LiveRegionBusy()); 630 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_BUSY, src.LiveRegionBusy());
631 if (src.LiveRegionBusy()) 631 if (src.LiveRegionBusy())
632 dst->state |= (1 << ui::AX_STATE_BUSY); 632 dst->AddState(ui::AX_STATE_BUSY);
633 if (!src.LiveRegionStatus().IsEmpty()) { 633 if (!src.LiveRegionStatus().IsEmpty()) {
634 dst->AddStringAttribute(ui::AX_ATTR_LIVE_STATUS, 634 dst->AddStringAttribute(ui::AX_ATTR_LIVE_STATUS,
635 src.LiveRegionStatus().Utf8()); 635 src.LiveRegionStatus().Utf8());
636 } 636 }
637 dst->AddStringAttribute(ui::AX_ATTR_LIVE_RELEVANT, 637 dst->AddStringAttribute(ui::AX_ATTR_LIVE_RELEVANT,
638 src.LiveRegionRelevant().Utf8()); 638 src.LiveRegionRelevant().Utf8());
639 // If we are not at the root of an atomic live region. 639 // If we are not at the root of an atomic live region.
640 if (src.ContainerLiveRegionAtomic() && 640 if (src.ContainerLiveRegionAtomic() &&
641 !src.LiveRegionRoot().IsDetached() && !src.LiveRegionAtomic()) { 641 !src.LiveRegionRoot().IsDetached() && !src.LiveRegionAtomic()) {
642 dst->AddIntAttribute(ui::AX_ATTR_MEMBER_OF_ID, 642 dst->AddIntAttribute(ui::AX_ATTR_MEMBER_OF_ID,
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 return WebAXObject(); 889 return WebAXObject();
890 890
891 WebDocument document = render_frame_->GetWebFrame()->GetDocument(); 891 WebDocument document = render_frame_->GetWebFrame()->GetDocument();
892 if (!document.IsNull()) 892 if (!document.IsNull())
893 return document.AccessibilityObject(); 893 return document.AccessibilityObject();
894 894
895 return WebAXObject(); 895 return WebAXObject();
896 } 896 }
897 897
898 } // namespace content 898 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698