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

Side by Side Diff: content/browser/accessibility/browser_accessibility.h

Issue 1198203002: Fix accessibility objects with zero width and height. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aria-owns-test
Patch Set: Clarify, don't assume child bounds are nonempty too Created 5 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 | « no previous file | content/browser/accessibility/browser_accessibility.cc » ('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 (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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 private: 276 private:
277 // Return the sum of the lengths of all static text descendants, 277 // Return the sum of the lengths of all static text descendants,
278 // including this object if it's static text. 278 // including this object if it's static text.
279 int GetStaticTextLenRecursive() const; 279 int GetStaticTextLenRecursive() const;
280 280
281 // Similar to GetParent(), but includes nodes that are the host of a 281 // Similar to GetParent(), but includes nodes that are the host of a
282 // subtree rather than skipping over them - because they contain important 282 // subtree rather than skipping over them - because they contain important
283 // bounds offsets. 283 // bounds offsets.
284 BrowserAccessibility* GetParentForBoundsCalculation() const; 284 BrowserAccessibility* GetParentForBoundsCalculation() const;
285 285
286 // If a bounding rectangle is empty, compute it based on the union of its
287 // children, since most accessibility APIs don't like elements with no
288 // bounds, but "virtual" elements in the accessibility tree that don't
289 // correspond to a layed-out element sometimes don't have bounds.
290 void FixEmptyBounds(gfx::Rect* bounds) const;
291
286 // Convert the bounding rectangle of an element (which is relative to 292 // Convert the bounding rectangle of an element (which is relative to
287 // its nearest scrollable ancestor) to local bounds (which are relative 293 // its nearest scrollable ancestor) to local bounds (which are relative
288 // to the top of the web accessibility tree). 294 // to the top of the web accessibility tree).
289 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; 295 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const;
290 296
291 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 297 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
292 }; 298 };
293 299
294 } // namespace content 300 } // namespace content
295 301
296 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 302 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698