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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
365 (*node_to_browser_plugin_instance_id_map_)[dst->id] = | 365 (*node_to_browser_plugin_instance_id_map_)[dst->id] = |
366 browser_plugin->browser_plugin_instance_id(); | 366 browser_plugin->browser_plugin_instance_id(); |
367 dst->AddBoolAttribute(ui::AX_ATTR_IS_AX_TREE_HOST, true); | 367 dst->AddBoolAttribute(ui::AX_ATTR_IS_AX_TREE_HOST, true); |
368 } | 368 } |
369 } | 369 } |
370 } | 370 } |
371 | 371 |
372 if (src.isInLiveRegion()) { | 372 if (src.isInLiveRegion()) { |
373 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_ATOMIC, src.liveRegionAtomic()); | 373 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_ATOMIC, src.liveRegionAtomic()); |
374 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_BUSY, src.liveRegionBusy()); | 374 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_BUSY, src.liveRegionBusy()); |
375 if (src.liveRegionBusy()) | |
376 dst->state |= (1 << ui::AX_STATE_BUSY); | |
375 dst->AddStringAttribute(ui::AX_ATTR_LIVE_STATUS, | 377 dst->AddStringAttribute(ui::AX_ATTR_LIVE_STATUS, |
376 UTF16ToUTF8(src.liveRegionStatus())); | 378 UTF16ToUTF8(src.liveRegionStatus())); |
377 dst->AddStringAttribute(ui::AX_ATTR_LIVE_RELEVANT, | 379 dst->AddStringAttribute(ui::AX_ATTR_LIVE_RELEVANT, |
378 UTF16ToUTF8(src.liveRegionRelevant())); | 380 UTF16ToUTF8(src.liveRegionRelevant())); |
379 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC, | 381 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC, |
380 src.containerLiveRegionAtomic()); | 382 src.containerLiveRegionAtomic()); |
381 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY, | |
dmazzoni
2014/11/19 17:17:27
Why are you deleting this?
AX_STATE_BUSY is not t
| |
382 src.containerLiveRegionBusy()); | |
383 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_STATUS, | 383 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_STATUS, |
384 UTF16ToUTF8(src.containerLiveRegionStatus())); | 384 UTF16ToUTF8(src.containerLiveRegionStatus())); |
385 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, | 385 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, |
386 UTF16ToUTF8(src.containerLiveRegionRelevant())); | 386 UTF16ToUTF8(src.containerLiveRegionRelevant())); |
387 } | 387 } |
388 | 388 |
389 if (dst->role == ui::AX_ROLE_PROGRESS_INDICATOR || | 389 if (dst->role == ui::AX_ROLE_PROGRESS_INDICATOR || |
390 dst->role == ui::AX_ROLE_SCROLL_BAR || | 390 dst->role == ui::AX_ROLE_SCROLL_BAR || |
391 dst->role == ui::AX_ROLE_SLIDER || | 391 dst->role == ui::AX_ROLE_SLIDER || |
392 dst->role == ui::AX_ROLE_SPIN_BUTTON) { | 392 dst->role == ui::AX_ROLE_SPIN_BUTTON) { |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
549 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); | 549 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); |
550 } | 550 } |
551 | 551 |
552 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 552 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
553 if (render_frame_ && render_frame_->GetWebFrame()) | 553 if (render_frame_ && render_frame_->GetWebFrame()) |
554 return render_frame_->GetWebFrame()->document(); | 554 return render_frame_->GetWebFrame()->document(); |
555 return WebDocument(); | 555 return WebDocument(); |
556 } | 556 } |
557 | 557 |
558 } // namespace content | 558 } // namespace content |
OLD | NEW |