diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-17 22:04:50 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-17 22:04:50 +0000 |
commit | 98f8d9c1248dc678ef09af9436976ca5af72f42a (patch) | |
tree | 81bc7d0de54f586d15cdb978270b43c53afb64cf /chrome/browser/tab_contents | |
parent | 401efff5d553c57124790696503f0f06fff31344 (diff) | |
download | chromium_src-98f8d9c1248dc678ef09af9436976ca5af72f42a.zip chromium_src-98f8d9c1248dc678ef09af9436976ca5af72f42a.tar.gz chromium_src-98f8d9c1248dc678ef09af9436976ca5af72f42a.tar.bz2 |
Significantly rework coordinate handling for the Cocoa views. Fixes tons of redraw and scrolling issues.
Review URL: http://codereview.chromium.org/20435
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/web_contents_view_mac.h | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents_view_mac.mm | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/web_contents_view_mac.h b/chrome/browser/tab_contents/web_contents_view_mac.h index 1ea5144..d576605 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.h +++ b/chrome/browser/tab_contents/web_contents_view_mac.h @@ -9,13 +9,14 @@ #include "base/gfx/size.h" #include "base/scoped_cftyperef.h" +#include "chrome/browser/cocoa/base_view.h" #include "chrome/browser/tab_contents/web_contents_view.h" #include "chrome/common/notification_registrar.h" class FindBarMac; @class SadTabView; -@interface WebContentsViewCocoa : NSView { +@interface WebContentsViewCocoa : BaseView { } @end diff --git a/chrome/browser/tab_contents/web_contents_view_mac.mm b/chrome/browser/tab_contents/web_contents_view_mac.mm index e59338a..ba80b54 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.mm +++ b/chrome/browser/tab_contents/web_contents_view_mac.mm @@ -73,7 +73,7 @@ gfx::NativeWindow WebContentsViewMac::GetTopLevelNativeView() const { } void WebContentsViewMac::GetContainerBounds(gfx::Rect* out) const { - *out = gfx::Rect(NSRectToCGRect([cocoa_view_.get() frame])); + *out = [cocoa_view_.get() NSRectToRect:[cocoa_view_.get() bounds]]; } void WebContentsViewMac::StartDragging(const WebDropData& drop_data) { @@ -96,9 +96,7 @@ void WebContentsViewMac::Invalidate() { void WebContentsViewMac::SizeContents(const gfx::Size& size) { // TODO(brettw) this is a hack and should be removed. See web_contents_view.h. - NSRect rect = [cocoa_view_.get() frame]; - rect.size = NSSizeFromCGSize(size.ToCGSize()); - [cocoa_view_.get() setBounds:rect]; + NOTIMPLEMENTED(); // Leaving the hack unimplemented. } void WebContentsViewMac::FindInPage(const Browser& browser, |