| 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 dst->role == ui::AX_ROLE_SCROLL_BAR || | 526 dst->role == ui::AX_ROLE_SCROLL_BAR || |
| 527 dst->role == ui::AX_ROLE_SLIDER || | 527 dst->role == ui::AX_ROLE_SLIDER || |
| 528 dst->role == ui::AX_ROLE_SPIN_BUTTON) { | 528 dst->role == ui::AX_ROLE_SPIN_BUTTON) { |
| 529 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange()); | 529 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange()); |
| 530 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE, | 530 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE, |
| 531 src.maxValueForRange()); | 531 src.maxValueForRange()); |
| 532 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE, | 532 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE, |
| 533 src.minValueForRange()); | 533 src.minValueForRange()); |
| 534 } | 534 } |
| 535 | 535 |
| 536 if (dst->role == ui::AX_ROLE_WEB_AREA) | 536 if (dst->role == ui::AX_ROLE_WEB_AREA) { |
| 537 dst->AddStringAttribute(ui::AX_ATTR_HTML_TAG, "#document"); | 537 dst->AddStringAttribute(ui::AX_ATTR_HTML_TAG, "#document"); |
| 538 dst->transform.reset( |
| 539 new gfx::Transform(src.transformFromLocalParentFrame())); |
| 540 } |
| 538 | 541 |
| 539 if (dst->role == ui::AX_ROLE_TABLE) { | 542 if (dst->role == ui::AX_ROLE_TABLE) { |
| 540 int column_count = src.columnCount(); | 543 int column_count = src.columnCount(); |
| 541 int row_count = src.rowCount(); | 544 int row_count = src.rowCount(); |
| 542 if (column_count > 0 && row_count > 0) { | 545 if (column_count > 0 && row_count > 0) { |
| 543 std::set<int32_t> unique_cell_id_set; | 546 std::set<int32_t> unique_cell_id_set; |
| 544 std::vector<int32_t> cell_ids; | 547 std::vector<int32_t> cell_ids; |
| 545 std::vector<int32_t> unique_cell_ids; | 548 std::vector<int32_t> unique_cell_ids; |
| 546 dst->AddIntAttribute(ui::AX_ATTR_TABLE_COLUMN_COUNT, column_count); | 549 dst->AddIntAttribute(ui::AX_ATTR_TABLE_COLUMN_COUNT, column_count); |
| 547 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_COUNT, row_count); | 550 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_COUNT, row_count); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 } | 640 } |
| 638 } | 641 } |
| 639 | 642 |
| 640 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { | 643 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { |
| 641 if (render_frame_ && render_frame_->GetWebFrame()) | 644 if (render_frame_ && render_frame_->GetWebFrame()) |
| 642 return render_frame_->GetWebFrame()->document(); | 645 return render_frame_->GetWebFrame()->document(); |
| 643 return WebDocument(); | 646 return WebDocument(); |
| 644 } | 647 } |
| 645 | 648 |
| 646 } // namespace content | 649 } // namespace content |
| OLD | NEW |