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