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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager.cc

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: GetSimpleRelativeBounds, add failing test for fixed with transform Created 3 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/accessibility/browser_accessibility_manager.h" 5 #include "content/browser/accessibility/browser_accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 void BrowserAccessibilityManager::OnLocationChanges( 467 void BrowserAccessibilityManager::OnLocationChanges(
468 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { 468 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) {
469 for (size_t i = 0; i < params.size(); ++i) { 469 for (size_t i = 0; i < params.size(); ++i) {
470 BrowserAccessibility* obj = GetFromID(params[i].id); 470 BrowserAccessibility* obj = GetFromID(params[i].id);
471 if (!obj) 471 if (!obj)
472 continue; 472 continue;
473 ui::AXNode* node = obj->node(); 473 ui::AXNode* node = obj->node();
474 node->SetLocation(params[i].new_location.offset_container_id, 474 node->SetLocation(params[i].new_location.offset_container_id,
475 params[i].new_location.bounds, 475 params[i].new_location.bounds,
476 params[i].new_location.transform.get()); 476 params[i].new_location.transform.get(),
477 params[i].new_location.is_fixed_positioned);
477 } 478 }
478 SendLocationChangeEvents(params); 479 SendLocationChangeEvents(params);
479 } 480 }
480 481
481 void BrowserAccessibilityManager::SendLocationChangeEvents( 482 void BrowserAccessibilityManager::SendLocationChangeEvents(
482 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) { 483 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params) {
483 for (size_t i = 0; i < params.size(); ++i) { 484 for (size_t i = 0; i < params.size(); ++i) {
484 BrowserAccessibility* obj = GetFromID(params[i].id); 485 BrowserAccessibility* obj = GetFromID(params[i].id);
485 if (obj) 486 if (obj)
486 obj->OnLocationChanged(); 487 obj->OnLocationChanged();
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 hit_test_result = parent; 1313 hit_test_result = parent;
1313 parent = parent->PlatformGetParent(); 1314 parent = parent->PlatformGetParent();
1314 } 1315 }
1315 1316
1316 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); 1317 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id();
1317 last_hover_node_id_ = hit_test_result->GetId(); 1318 last_hover_node_id_ = hit_test_result->GetId();
1318 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); 1319 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect();
1319 } 1320 }
1320 1321
1321 } // namespace content 1322 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698