diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 14:21:17 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 14:21:17 +0000 |
commit | 0edf87519d5f9d754f232e2bbea91cf6ade2137d (patch) | |
tree | c0d7fdc5e03ad516b6d17d62cc975d31fbb05ad8 | |
parent | 491f3c3547c41b07b578bb8d4b3fbd6c14810d39 (diff) | |
download | chromium_src-0edf87519d5f9d754f232e2bbea91cf6ade2137d.zip chromium_src-0edf87519d5f9d754f232e2bbea91cf6ade2137d.tar.gz chromium_src-0edf87519d5f9d754f232e2bbea91cf6ade2137d.tar.bz2 |
Converts BaseView to be non-opaque, which will fix drawing of
overlapping views, including the findbar and resize widget. Three
classes currently inherit from BaseView: TabContentsViewCocoa,
RenderWidgetHostViewCocoa, and SadTabView (Mac).
BUG=http://crbug.com/10887
BUG=http://crbug.com/13150
TEST=Findbar should never disappear when searching. Resize
widget should never disappear. Clicking and dragging in a webpage should not move the window around.
Review URL: http://codereview.chromium.org/150104
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19725 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/base_view.mm | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_view_mac.mm | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/base_view.mm b/chrome/browser/cocoa/base_view.mm index 9ea74fb..5d4d563 100644 --- a/chrome/browser/cocoa/base_view.mm +++ b/chrome/browser/cocoa/base_view.mm @@ -92,10 +92,6 @@ [self keyEvent:theEvent]; } -- (BOOL)isOpaque { - return YES; -} - - (gfx::Rect)NSRectToRect:(NSRect)rect { gfx::Rect new_rect(NSRectToCGRect(rect)); new_rect.set_y([self bounds].size.height - new_rect.y() - new_rect.height()); diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm index 1d2d59a..5b89e2d 100644 --- a/chrome/browser/tab_contents/tab_contents_view_mac.mm +++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm @@ -261,6 +261,16 @@ void TabContentsViewMac::Observe(NotificationType type, } } +- (BOOL)mouseDownCanMoveWindow { + // This is needed to prevent mouseDowns from moving the window + // around. The default implementation returns YES only for opaque + // views. TabContentsViewCocoa does not draw itself in any way, but + // its subviews do paint their entire frames. Returning NO here + // saves us the effort of overriding this method in every possible + // subview. + return NO; +} + // In the Windows version, we always have cut/copy/paste enabled. This is sub- // optimal, but we do it too. TODO(avi): Plumb the "can*" methods up from // WebCore. |