| OLD | NEW |
| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 if (src.liveRegionBusy()) | 542 if (src.liveRegionBusy()) |
| 543 dst->state |= (1 << ui::AX_STATE_BUSY); | 543 dst->state |= (1 << ui::AX_STATE_BUSY); |
| 544 if (!src.liveRegionStatus().isEmpty()) { | 544 if (!src.liveRegionStatus().isEmpty()) { |
| 545 dst->AddStringAttribute( | 545 dst->AddStringAttribute( |
| 546 ui::AX_ATTR_LIVE_STATUS, | 546 ui::AX_ATTR_LIVE_STATUS, |
| 547 src.liveRegionStatus().utf8()); | 547 src.liveRegionStatus().utf8()); |
| 548 } | 548 } |
| 549 dst->AddStringAttribute( | 549 dst->AddStringAttribute( |
| 550 ui::AX_ATTR_LIVE_RELEVANT, | 550 ui::AX_ATTR_LIVE_RELEVANT, |
| 551 src.liveRegionRelevant().utf8()); | 551 src.liveRegionRelevant().utf8()); |
| 552 // If we are not at the root of an atomic live region. |
| 553 if (src.containerLiveRegionAtomic() && !src.liveRegionRoot().isDetached() && |
| 554 !src.liveRegionAtomic()) { |
| 555 dst->AddIntAttribute(ui::AX_ATTR_MEMBER_OF_ID, |
| 556 src.liveRegionRoot().axID()); |
| 557 } |
| 552 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC, | 558 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC, |
| 553 src.containerLiveRegionAtomic()); | 559 src.containerLiveRegionAtomic()); |
| 554 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY, | 560 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY, |
| 555 src.containerLiveRegionBusy()); | 561 src.containerLiveRegionBusy()); |
| 556 dst->AddStringAttribute( | 562 dst->AddStringAttribute( |
| 557 ui::AX_ATTR_CONTAINER_LIVE_STATUS, | 563 ui::AX_ATTR_CONTAINER_LIVE_STATUS, |
| 558 src.containerLiveRegionStatus().utf8()); | 564 src.containerLiveRegionStatus().utf8()); |
| 559 dst->AddStringAttribute( | 565 dst->AddStringAttribute( |
| 560 ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, | 566 ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, |
| 561 src.containerLiveRegionRelevant().utf8()); | 567 src.containerLiveRegionRelevant().utf8()); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 } | 686 } |
| 681 } | 687 } |
| 682 | 688 |
| 683 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 689 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
| 684 if (render_frame_ && render_frame_->GetWebFrame()) | 690 if (render_frame_ && render_frame_->GetWebFrame()) |
| 685 return render_frame_->GetWebFrame()->document(); | 691 return render_frame_->GetWebFrame()->document(); |
| 686 return WebDocument(); | 692 return WebDocument(); |
| 687 } | 693 } |
| 688 | 694 |
| 689 } // namespace content | 695 } // namespace content |
| OLD | NEW |