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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 2955303002: Bounding boxes in the accessibility tree should always be relative to a box. (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/bounds-calc.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 } 1520 }
1521 1521
1522 // First compute the container. The container must be an ancestor in the 1522 // First compute the container. The container must be an ancestor in the
1523 // accessibility tree, and its LayoutObject must be an ancestor in the layout 1523 // accessibility tree, and its LayoutObject must be an ancestor in the layout
1524 // tree. Get the first such ancestor that's either scrollable or has a paint 1524 // tree. Get the first such ancestor that's either scrollable or has a paint
1525 // layer. 1525 // layer.
1526 AXObject* container = ParentObjectUnignored(); 1526 AXObject* container = ParentObjectUnignored();
1527 LayoutObject* container_layout_object = nullptr; 1527 LayoutObject* container_layout_object = nullptr;
1528 while (container) { 1528 while (container) {
1529 container_layout_object = container->GetLayoutObject(); 1529 container_layout_object = container->GetLayoutObject();
1530 if (container_layout_object && 1530 if (container_layout_object && container_layout_object->IsBox() &&
1531 container_layout_object->IsBoxModelObject() &&
1532 layout_object->IsDescendantOf(container_layout_object)) { 1531 layout_object->IsDescendantOf(container_layout_object)) {
1533 if (container->IsScrollableContainer() || 1532 if (container->IsScrollableContainer() ||
1534 container_layout_object->HasLayer()) 1533 container_layout_object->HasLayer())
1535 break; 1534 break;
1536 } 1535 }
1537 1536
1538 container = container->ParentObjectUnignored(); 1537 container = container->ParentObjectUnignored();
1539 } 1538 }
1540 1539
1541 if (!container) 1540 if (!container)
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 } 2099 }
2101 2100
2102 DEFINE_TRACE(AXObject) { 2101 DEFINE_TRACE(AXObject) {
2103 visitor->Trace(children_); 2102 visitor->Trace(children_);
2104 visitor->Trace(parent_); 2103 visitor->Trace(parent_);
2105 visitor->Trace(cached_live_region_root_); 2104 visitor->Trace(cached_live_region_root_);
2106 visitor->Trace(ax_object_cache_); 2105 visitor->Trace(ax_object_cache_);
2107 } 2106 }
2108 2107
2109 } // namespace blink 2108 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/bounds-calc.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698