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

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: Fix gn build Created 4 years, 8 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
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/test/data/accessibility/html/frame/box.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/test/data/accessibility/html/frame/box.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698