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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 src.containerLiveRegionAtomic()); | 400 src.containerLiveRegionAtomic()); |
401 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY, | 401 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY, |
402 src.containerLiveRegionBusy()); | 402 src.containerLiveRegionBusy()); |
403 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_STATUS, | 403 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_STATUS, |
404 UTF16ToUTF8(src.containerLiveRegionStatus())); | 404 UTF16ToUTF8(src.containerLiveRegionStatus())); |
405 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, | 405 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, |
406 UTF16ToUTF8(src.containerLiveRegionRelevant())); | 406 UTF16ToUTF8(src.containerLiveRegionRelevant())); |
407 } | 407 } |
408 | 408 |
409 if (dst->role == ui::AX_ROLE_PROGRESS_INDICATOR || | 409 if (dst->role == ui::AX_ROLE_PROGRESS_INDICATOR || |
| 410 dst->role == ui::AX_ROLE_METER || |
410 dst->role == ui::AX_ROLE_SCROLL_BAR || | 411 dst->role == ui::AX_ROLE_SCROLL_BAR || |
411 dst->role == ui::AX_ROLE_SLIDER || | 412 dst->role == ui::AX_ROLE_SLIDER || |
412 dst->role == ui::AX_ROLE_SPIN_BUTTON) { | 413 dst->role == ui::AX_ROLE_SPIN_BUTTON) { |
413 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange()); | 414 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange()); |
414 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE, | 415 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE, |
415 src.maxValueForRange()); | 416 src.maxValueForRange()); |
416 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE, | 417 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE, |
417 src.minValueForRange()); | 418 src.minValueForRange()); |
418 } | 419 } |
419 | 420 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); | 570 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); |
570 } | 571 } |
571 | 572 |
572 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 573 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
573 if (render_frame_ && render_frame_->GetWebFrame()) | 574 if (render_frame_ && render_frame_->GetWebFrame()) |
574 return render_frame_->GetWebFrame()->document(); | 575 return render_frame_->GetWebFrame()->document(); |
575 return WebDocument(); | 576 return WebDocument(); |
576 } | 577 } |
577 | 578 |
578 } // namespace content | 579 } // namespace content |
OLD | NEW |