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

Unified Diff: content/browser/accessibility/browser_accessibility_cocoa.mm

Issue 8746022: Split accessible bounds calculation into two methods for Mac & Win (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/accessibility/browser_accessibility_cocoa.mm
===================================================================
--- content/browser/accessibility/browser_accessibility_cocoa.mm (revision 111700)
+++ content/browser/accessibility/browser_accessibility_cocoa.mm (working copy)
@@ -477,8 +477,8 @@
// This is relative to webkit's top-left origin, not Cocoa's
// bottom-left origin.
- (NSPoint)origin {
- return NSMakePoint(browserAccessibility_->location().x(),
- browserAccessibility_->location().y());
+ gfx::Rect bounds = browserAccessibility_->GetLocalBoundsRect();
+ return NSMakePoint(bounds.x(), bounds.y());
}
- (id)parent {
@@ -567,9 +567,8 @@
// Returns the size of this object.
- (NSValue*)size {
- return [NSValue valueWithSize:NSMakeSize(
- browserAccessibility_->location().width(),
- browserAccessibility_->location().height())];
+ gfx::Rect bounds = browserAccessibility_->GetLocalBoundsRect();
+ return [NSValue valueWithSize:NSMakeSize(bounds.width(), bounds.height())];
}
// Returns a subrole based upon the role.
« no previous file with comments | « content/browser/accessibility/browser_accessibility.cc ('k') | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698