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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 dst->role == ui::AX_ROLE_SCROLL_BAR || | 518 dst->role == ui::AX_ROLE_SCROLL_BAR || |
519 dst->role == ui::AX_ROLE_SLIDER || | 519 dst->role == ui::AX_ROLE_SLIDER || |
520 dst->role == ui::AX_ROLE_SPIN_BUTTON) { | 520 dst->role == ui::AX_ROLE_SPIN_BUTTON) { |
521 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange()); | 521 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange()); |
522 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE, | 522 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE, |
523 src.maxValueForRange()); | 523 src.maxValueForRange()); |
524 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE, | 524 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE, |
525 src.minValueForRange()); | 525 src.minValueForRange()); |
526 } | 526 } |
527 | 527 |
528 if (dst->role == ui::AX_ROLE_WEB_AREA) | 528 if (dst->role == ui::AX_ROLE_WEB_AREA) { |
529 dst->AddStringAttribute(ui::AX_ATTR_HTML_TAG, "#document"); | 529 dst->AddStringAttribute(ui::AX_ATTR_HTML_TAG, "#document"); |
| 530 dst->transform.reset( |
| 531 new gfx::Transform(src.transformFromLocalParentFrame())); |
| 532 } |
530 | 533 |
531 if (dst->role == ui::AX_ROLE_TABLE) { | 534 if (dst->role == ui::AX_ROLE_TABLE) { |
532 int column_count = src.columnCount(); | 535 int column_count = src.columnCount(); |
533 int row_count = src.rowCount(); | 536 int row_count = src.rowCount(); |
534 if (column_count > 0 && row_count > 0) { | 537 if (column_count > 0 && row_count > 0) { |
535 std::set<int32_t> unique_cell_id_set; | 538 std::set<int32_t> unique_cell_id_set; |
536 std::vector<int32_t> cell_ids; | 539 std::vector<int32_t> cell_ids; |
537 std::vector<int32_t> unique_cell_ids; | 540 std::vector<int32_t> unique_cell_ids; |
538 dst->AddIntAttribute(ui::AX_ATTR_TABLE_COLUMN_COUNT, column_count); | 541 dst->AddIntAttribute(ui::AX_ATTR_TABLE_COLUMN_COUNT, column_count); |
539 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_COUNT, row_count); | 542 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_COUNT, row_count); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 } | 632 } |
630 } | 633 } |
631 | 634 |
632 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 635 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
633 if (render_frame_ && render_frame_->GetWebFrame()) | 636 if (render_frame_ && render_frame_->GetWebFrame()) |
634 return render_frame_->GetWebFrame()->document(); | 637 return render_frame_->GetWebFrame()->document(); |
635 return WebDocument(); | 638 return WebDocument(); |
636 } | 639 } |
637 | 640 |
638 } // namespace content | 641 } // namespace content |
OLD | NEW |