Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: content/renderer/accessibility/blink_ax_tree_source.cc

Issue 1713723002: Implement accessibility support for CSS-transformed iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another skia dependency Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 dst->role == ui::AX_ROLE_SCROLL_BAR || 510 dst->role == ui::AX_ROLE_SCROLL_BAR ||
511 dst->role == ui::AX_ROLE_SLIDER || 511 dst->role == ui::AX_ROLE_SLIDER ||
512 dst->role == ui::AX_ROLE_SPIN_BUTTON) { 512 dst->role == ui::AX_ROLE_SPIN_BUTTON) {
513 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange()); 513 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange());
514 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE, 514 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE,
515 src.maxValueForRange()); 515 src.maxValueForRange());
516 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE, 516 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE,
517 src.minValueForRange()); 517 src.minValueForRange());
518 } 518 }
519 519
520 if (dst->role == ui::AX_ROLE_WEB_AREA) 520 if (dst->role == ui::AX_ROLE_WEB_AREA) {
521 dst->AddStringAttribute(ui::AX_ATTR_HTML_TAG, "#document"); 521 dst->AddStringAttribute(ui::AX_ATTR_HTML_TAG, "#document");
522 dst->transform = gfx::Transform(src.localFrameRootTransform());
523 }
522 524
523 if (dst->role == ui::AX_ROLE_TABLE) { 525 if (dst->role == ui::AX_ROLE_TABLE) {
524 int column_count = src.columnCount(); 526 int column_count = src.columnCount();
525 int row_count = src.rowCount(); 527 int row_count = src.rowCount();
526 if (column_count > 0 && row_count > 0) { 528 if (column_count > 0 && row_count > 0) {
527 std::set<int32_t> unique_cell_id_set; 529 std::set<int32_t> unique_cell_id_set;
528 std::vector<int32_t> cell_ids; 530 std::vector<int32_t> cell_ids;
529 std::vector<int32_t> unique_cell_ids; 531 std::vector<int32_t> unique_cell_ids;
530 dst->AddIntAttribute(ui::AX_ATTR_TABLE_COLUMN_COUNT, column_count); 532 dst->AddIntAttribute(ui::AX_ATTR_TABLE_COLUMN_COUNT, column_count);
531 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_COUNT, row_count); 533 dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_COUNT, row_count);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 } 623 }
622 } 624 }
623 625
624 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { 626 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const {
625 if (render_frame_ && render_frame_->GetWebFrame()) 627 if (render_frame_ && render_frame_->GetWebFrame())
626 return render_frame_->GetWebFrame()->document(); 628 return render_frame_->GetWebFrame()->document();
627 return WebDocument(); 629 return WebDocument();
628 } 630 }
629 631
630 } // namespace content 632 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698