Commit d49685ea authored by jbates@chromium.org's avatar jbates@chromium.org

Fix transparent crack at top of page while resizing devtools NSSplitView divider.

BUG=127652
TEST=Open devtools on http://www.webkit.org/blog-files/3d-transforms/poster-circle.html; resize divider bar; verify no transparent crack at top of page.

Review URL: https://chromiumcodereview.appspot.com/10407075

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138325 0039d316-1c4b-4281-b951-d872f2087c98
parent a480a1b7
......@@ -312,6 +312,9 @@ void RecordAppLaunch(Profile* profile, GURL url) {
}
- (void)dealloc {
// Clear delegate so it doesn't get called during stopAnimation.
[[self animatableView] setResizeDelegate:nil];
// We better stop any in-flight animation if we're being killed.
[[self animatableView] stopAnimation];
......
......@@ -30,6 +30,18 @@ const int kMinContentsSize = 50;
} // end namespace
@interface GraySplitView : NSSplitView
- (NSColor*)dividerColor;
@end
@implementation GraySplitView
- (NSColor*)dividerColor {
return [NSColor darkGrayColor];
}
@end
@interface DevToolsController (Private)
- (void)showDevToolsContents:(WebContents*)devToolsContents
withProfile:(Profile*)profile;
......@@ -43,16 +55,22 @@ const int kMinContentsSize = 50;
- (id)init {
if ((self = [super init])) {
splitView_.reset([[NSSplitView alloc] initWithFrame:NSZeroRect]);
splitView_.reset([[GraySplitView alloc] initWithFrame:NSZeroRect]);
[splitView_ setDividerStyle:NSSplitViewDividerStyleThin];
[splitView_ setVertical:NO];
[splitView_ setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
[splitView_ setDelegate:self];
dockToRight_ = NO;
}
return self;
}
- (void)dealloc {
[splitView_ setDelegate:nil];
[super dealloc];
}
- (NSView*)view {
return splitView_.get();
}
......@@ -210,4 +228,8 @@ const int kMinContentsSize = 50;
return YES;
}
-(void)splitViewWillResizeSubviews:(NSNotification *)notification {
[[splitView_ window] disableScreenUpdatesUntilFlush];
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment