X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebKit2%2FUIProcess%2FAPI%2Fmac%2FWKView.mm;h=7d21e9b7f53375f1b82cb6b4a58495067a4f1766;hp=d8f085458943d42419cf05ceaa38bbede2585ff8;hb=8012ba1be075011eb817162f1745fc20d816a099;hpb=678c5f3d55a5a54b46aed4e68f71d16f6217f416;ds=sidebyside diff --git a/Source/WebKit2/UIProcess/API/mac/WKView.mm b/Source/WebKit2/UIProcess/API/mac/WKView.mm index d8f085458943..7d21e9b7f533 100644 --- a/Source/WebKit2/UIProcess/API/mac/WKView.mm +++ b/Source/WebKit2/UIProcess/API/mac/WKView.mm @@ -1776,9 +1776,9 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl name:NSWindowDidMiniaturizeNotification object:window]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:window]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowFrameDidChange:) + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidMove:) name:NSWindowDidMoveNotification object:window]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowFrameDidChange:) + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidResize:) name:NSWindowDidResizeNotification object:window]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidOrderOffScreen:) name:@"NSWindowDidOrderOffScreenNotification" object:window]; @@ -1906,8 +1906,15 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl [self _updateWindowVisibility]; } -- (void)_windowFrameDidChange:(NSNotification *)notification +- (void)_windowDidMove:(NSNotification *)notification { + [self _updateWindowAndViewFrames]; +} + +- (void)_windowDidResize:(NSNotification *)notification +{ + _data->_windowHasValidBackingStore = NO; + [self _updateWindowAndViewFrames]; }