summaryrefslogtreecommitdiff
path: root/chromium/ui/accessibility/ax_tree.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/accessibility/ax_tree.cc')
-rw-r--r--chromium/ui/accessibility/ax_tree.cc31
1 files changed, 0 insertions, 31 deletions
diff --git a/chromium/ui/accessibility/ax_tree.cc b/chromium/ui/accessibility/ax_tree.cc
index 81584ab35bf..f8827172a6a 100644
--- a/chromium/ui/accessibility/ax_tree.cc
+++ b/chromium/ui/accessibility/ax_tree.cc
@@ -231,37 +231,6 @@ gfx::RectF AXTree::RelativeToTreeBounds(const AXNode* node,
bounds.Offset(-scroll_x, -scroll_y);
}
- // If this is the root web area, make sure we clip the node to fit.
- if (container->data().role == ui::AX_ROLE_ROOT_WEB_AREA) {
- gfx::RectF clipped = bounds;
- clipped.Intersect(container_bounds);
- if (!clipped.IsEmpty()) {
- // We can simply clip it to the container.
- bounds = clipped;
- // No need to update |offscreen| if it is set, because it should be
- // false by default.
- } else {
- // Totally offscreen. Find the nearest edge or corner.
- // Make the minimum dimension 1 instead of 0.
- if (bounds.x() >= container_bounds.width()) {
- bounds.set_x(container_bounds.width() - 1);
- bounds.set_width(1);
- } else if (bounds.x() + bounds.width() <= 0) {
- bounds.set_x(0);
- bounds.set_width(1);
- }
- if (bounds.y() >= container_bounds.height()) {
- bounds.set_y(container_bounds.height() - 1);
- bounds.set_height(1);
- } else if (bounds.y() + bounds.height() <= 0) {
- bounds.set_y(0);
- bounds.set_height(1);
- }
- if (offscreen != nullptr)
- *offscreen |= true;
- }
- }
-
node = container;
}