Title: [106508] trunk/Source/WebKit2
- Revision
- 106508
- Author
- [email protected]
- Date
- 2012-02-01 15:54:54 -0800 (Wed, 01 Feb 2012)
Log Message
REGRESSION (r104727): Strange graphics corruption opening a new tab in Safari
https://bugs.webkit.org/show_bug.cgi?id=77578
<rdar://problem/10767174>
Reviewed by Dan Bernstein.
Resizing a window will always invalidate the window backing store, so make sure to set
_data->_windowHasValidBackingStore to NO whenever that happens.
* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
Use separate methods for the NSWindowDidMoveNotification and NSWindowDidResizeNotification notifications.
(-[WKView _windowDidMove:]):
Call -[WKView _updateWindowAndViewFrames].
(-[WKView _windowDidResize:]):
Call -[WKView _updateWindowAndViewFrames] and mark the window backing store as invalid.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (106507 => 106508)
--- trunk/Source/WebKit2/ChangeLog 2012-02-01 23:36:06 UTC (rev 106507)
+++ trunk/Source/WebKit2/ChangeLog 2012-02-01 23:54:54 UTC (rev 106508)
@@ -1,3 +1,24 @@
+2012-02-01 Anders Carlsson <[email protected]>
+
+ REGRESSION (r104727): Strange graphics corruption opening a new tab in Safari
+ https://bugs.webkit.org/show_bug.cgi?id=77578
+ <rdar://problem/10767174>
+
+ Reviewed by Dan Bernstein.
+
+ Resizing a window will always invalidate the window backing store, so make sure to set
+ _data->_windowHasValidBackingStore to NO whenever that happens.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView addWindowObserversForWindow:]):
+ Use separate methods for the NSWindowDidMoveNotification and NSWindowDidResizeNotification notifications.
+
+ (-[WKView _windowDidMove:]):
+ Call -[WKView _updateWindowAndViewFrames].
+
+ (-[WKView _windowDidResize:]):
+ Call -[WKView _updateWindowAndViewFrames] and mark the window backing store as invalid.
+
2012-02-01 Beth Dakin <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=77383
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (106507 => 106508)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2012-02-01 23:36:06 UTC (rev 106507)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2012-02-01 23:54:54 UTC (rev 106508)
@@ -1776,9 +1776,9 @@
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 @@
[self _updateWindowVisibility];
}
-- (void)_windowFrameDidChange:(NSNotification *)notification
+- (void)_windowDidMove:(NSNotification *)notification
{
+ [self _updateWindowAndViewFrames];
+}
+
+- (void)_windowDidResize:(NSNotification *)notification
+{
+ _data->_windowHasValidBackingStore = NO;
+
[self _updateWindowAndViewFrames];
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes