<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[181866] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/181866">181866</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2015-03-23 13:42:03 -0700 (Mon, 23 Mar 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>REGRESSION (Yosemite): WKView visibility notifications are messed up
https://bugs.webkit.org/show_bug.cgi?id=142945
Reviewed by Tim Horton.
As these notifications cannot be used by NSView subclasses, create a separate
object for observing them.
Source/WebKit/mac:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView viewWillMoveToWindow:]): Make sure that observers are removed even
if -[WebView close] is called manually.
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
(-[WebWindowVisibilityObserver initWithView:]):
(-[WebWindowVisibilityObserver startObserving:]):
(-[WebWindowVisibilityObserver stopObserving:]):
(-[WebWindowVisibilityObserver _windowVisibilityChanged:]):
Source/WebKit2:
* UIProcess/API/mac/WKView.mm:
(-[WKWindowVisibilityObserver initWithView:]):
(-[WKWindowVisibilityObserver startObserving:]):
(-[WKWindowVisibilityObserver stopObserving:]):
(-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
(-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]): Also, don't try to remove NSWindowWillOrderOffScreenNotification,
which we never start to observe.
(-[WKView initWithFrame:processPool:configuration:webView:]):
* UIProcess/API/mac/WKViewInternal.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewDatah">trunk/Source/WebKit/mac/WebView/WebViewData.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewDatamm">trunk/Source/WebKit/mac/WebView/WebViewData.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewInternalh">trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (181865 => 181866)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-03-23 20:35:17 UTC (rev 181865)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-03-23 20:42:03 UTC (rev 181866)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2015-03-23 Alexey Proskuryakov <ap@apple.com>
+
+ REGRESSION (Yosemite): WKView visibility notifications are messed up
+ https://bugs.webkit.org/show_bug.cgi?id=142945
+
+ Reviewed by Tim Horton.
+
+ As these notifications cannot be used by NSView subclasses, create a separate
+ object for observing them.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
+ (-[WebView addWindowObserversForWindow:]):
+ (-[WebView removeWindowObservers]):
+ (-[WebView viewWillMoveToWindow:]): Make sure that observers are removed even
+ if -[WebView close] is called manually.
+ * WebView/WebViewData.h:
+ * WebView/WebViewData.mm:
+ (-[WebWindowVisibilityObserver initWithView:]):
+ (-[WebWindowVisibilityObserver startObserving:]):
+ (-[WebWindowVisibilityObserver stopObserving:]):
+ (-[WebWindowVisibilityObserver _windowVisibilityChanged:]):
+
</ins><span class="cx"> 2015-03-23 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Add a share item to the link action menu
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (181865 => 181866)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2015-03-23 20:35:17 UTC (rev 181865)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2015-03-23 20:42:03 UTC (rev 181866)
</span><span class="lines">@@ -879,6 +879,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = YES;
</span><span class="cx">
</span><ins>+#if PLATFORM(MAC)
+ _private->windowVisibilityObserver = adoptNS([[WebWindowVisibilityObserver alloc] initWithView:self]);
+#endif
+
</ins><span class="cx"> NSRect f = [self frame];
</span><span class="cx"> WebFrameView *frameView = [[WebFrameView alloc] initWithFrame: NSMakeRect(0,0,f.size.width,f.size.height)];
</span><span class="cx"> [frameView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
</span><span class="lines">@@ -1173,7 +1177,7 @@
</span><span class="cx"> _private->mainFrameDocumentReady = NO;
</span><span class="cx"> _private->drawsBackground = YES;
</span><span class="cx"> _private->backgroundColor = CGColorRetain(cachedCGColor(Color::white, ColorSpaceDeviceRGB));
</span><del>-
</del><ins>+
</ins><span class="cx"> WebFrameView *frameView = nil;
</span><span class="cx"> frameView = [[WebFrameView alloc] initWithFrame: CGRectMake(0,0,frame.size.width,frame.size.height)];
</span><span class="cx"> [frameView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
</span><span class="lines">@@ -5186,10 +5190,7 @@
</span><span class="cx"> name:NSWindowDidMiniaturizeNotification object:window];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowVisibilityChanged:)
</span><span class="cx"> name:NSWindowDidDeminiaturizeNotification object:window];
</span><del>- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowVisibilityChanged:)
- name:@"NSWindowDidOrderOffScreenNotification" object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowVisibilityChanged:)
- name:@"_NSWindowDidBecomeVisible" object:window];
</del><ins>+ [_private->windowVisibilityObserver startObserving:window];
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5213,10 +5214,7 @@
</span><span class="cx"> name:NSWindowDidMiniaturizeNotification object:window];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self
</span><span class="cx"> name:NSWindowDidDeminiaturizeNotification object:window];
</span><del>- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:@"NSWindowDidOrderOffScreenNotification" object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:@"_NSWindowDidBecomeVisible" object:window];
</del><ins>+ [_private->windowVisibilityObserver stopObserving:window];
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5225,9 +5223,9 @@
</span><span class="cx"> // Don't do anything if the WebView isn't initialized.
</span><span class="cx"> // This happens when decoding a WebView in a nib.
</span><span class="cx"> // FIXME: What sets up the observer of NSWindowWillCloseNotification in this case?
</span><del>- if (!_private || _private->closed)
</del><ins>+ if (!_private)
</ins><span class="cx"> return;
</span><del>-
</del><ins>+
</ins><span class="cx"> if ([self window] && [self window] != [self hostWindow])
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:[self window]];
</span><span class="cx">
</span><span class="lines">@@ -5239,7 +5237,7 @@
</span><span class="cx"> // and over, so do them when we move into a window.
</span><span class="cx"> [window setAcceptsMouseMovedEvents:YES];
</span><span class="cx"> WKSetNSWindowShouldPostEventNotifications(window, YES);
</span><del>- } else {
</del><ins>+ } else if (!_private->closed) {
</ins><span class="cx"> _private->page->setCanStartMedia(false);
</span><span class="cx"> _private->page->setIsInWindow(false);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewData.h (181865 => 181866)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewData.h        2015-03-23 20:35:17 UTC (rev 181865)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.h        2015-03-23 20:42:03 UTC (rev 181866)
</span><span class="lines">@@ -84,6 +84,10 @@
</span><span class="cx"> class WebMediaPlaybackTargetPicker;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if PLATFORM(MAC)
+@class WebWindowVisibilityObserver;
+#endif
+
</ins><span class="cx"> extern BOOL applicationIsTerminating;
</span><span class="cx"> extern int pluginDatabaseClientCount;
</span><span class="cx">
</span><span class="lines">@@ -125,6 +129,15 @@
</span><span class="cx"> WebViewLayerFlushScheduler m_layerFlushScheduler;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+@interface WebWindowVisibilityObserver : NSObject {
+ WebView *_view;
+}
+
+- (instancetype)initWithView:(WebView *)view;
+- (void)startObserving:(NSWindow *)window;
+- (void)stopObserving:(NSWindow *)window;
+@end
+
</ins><span class="cx"> // FIXME: This should be renamed to WebViewData.
</span><span class="cx"> @interface WebViewPrivate : NSObject {
</span><span class="cx"> @public
</span><span class="lines">@@ -159,6 +172,7 @@
</span><span class="cx"> #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span><span class="cx"> std::unique_ptr<WebCore::TextIndicatorWindow> textIndicatorWindow;
</span><span class="cx"> BOOL hasInitializedLookupObserver;
</span><ins>+ RetainPtr<WebWindowVisibilityObserver> windowVisibilityObserver;
</ins><span class="cx"> #endif // PLATFORM(MAC)
</span><span class="cx">
</span><span class="cx"> BOOL shouldMaintainInactiveSelection;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewDatamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewData.mm (181865 => 181866)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewData.mm        2015-03-23 20:35:17 UTC (rev 181865)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.mm        2015-03-23 20:42:03 UTC (rev 181866)
</span><span class="lines">@@ -77,6 +77,44 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if PLATFORM(MAC)
+
+@implementation WebWindowVisibilityObserver
+
+- (instancetype)initWithView:(WebView *)view
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _view = view;
+ return self;
+}
+
+- (void)startObserving:(NSWindow *)window
+{
+ // An NSView derived object such as WebView cannot observe these notifications, because NSView itself observes them.
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowVisibilityChanged:)
+ name:@"NSWindowDidOrderOffScreenNotification" object:window];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowVisibilityChanged:)
+ name:@"_NSWindowDidBecomeVisible" object:window];
+}
+
+- (void)stopObserving:(NSWindow *)window
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:@"NSWindowDidOrderOffScreenNotification" object:window];
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:@"_NSWindowDidBecomeVisible" object:window];
+}
+
+- (void)_windowVisibilityChanged:(NSNotification *)notification
+{
+ [_view _windowVisibilityChanged:notification];
+}
+
+@end
+
+#endif // PLATFORM(MAC)
+
</ins><span class="cx"> @implementation WebViewPrivate
</span><span class="cx">
</span><span class="cx"> + (void)initialize
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (181865 => 181866)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-03-23 20:35:17 UTC (rev 181865)
+++ trunk/Source/WebKit2/ChangeLog        2015-03-23 20:42:03 UTC (rev 181866)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-03-23 Alexey Proskuryakov <ap@apple.com>
+
+ REGRESSION (Yosemite): WKView visibility notifications are messed up
+ https://bugs.webkit.org/show_bug.cgi?id=142945
+
+ Reviewed by Tim Horton.
+
+ As these notifications cannot be used by NSView subclasses, create a separate
+ object for observing them.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKWindowVisibilityObserver initWithView:]):
+ (-[WKWindowVisibilityObserver startObserving:]):
+ (-[WKWindowVisibilityObserver stopObserving:]):
+ (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
+ (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
+ (-[WKView addWindowObserversForWindow:]):
+ (-[WKView removeWindowObservers]): Also, don't try to remove NSWindowWillOrderOffScreenNotification,
+ which we never start to observe.
+ (-[WKView initWithFrame:processPool:configuration:webView:]):
+ * UIProcess/API/mac/WKViewInternal.h:
+
</ins><span class="cx"> 2015-03-23 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (181865 => 181866)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-03-23 20:35:17 UTC (rev 181865)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-03-23 20:42:03 UTC (rev 181866)
</span><span class="lines">@@ -170,6 +170,8 @@
</span><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+@class WKWindowVisibilityObserver;
+
</ins><span class="cx"> @interface WKViewData : NSObject {
</span><span class="cx"> @public
</span><span class="cx"> std::unique_ptr<PageClientImpl> _pageClient;
</span><span class="lines">@@ -252,6 +254,8 @@
</span><span class="cx"> BOOL _useContentPreparationRectForVisibleRect;
</span><span class="cx"> BOOL _windowOcclusionDetectionEnabled;
</span><span class="cx">
</span><ins>+ RetainPtr<WKWindowVisibilityObserver> _windowVisibilityObserver;
+
</ins><span class="cx"> std::unique_ptr<ViewGestureController> _gestureController;
</span><span class="cx"> BOOL _allowsMagnification;
</span><span class="cx"> BOOL _ignoresNonWheelEvents;
</span><span class="lines">@@ -283,6 +287,54 @@
</span><span class="cx"> @implementation WKViewData
</span><span class="cx"> @end
</span><span class="cx">
</span><ins>+@interface WKWindowVisibilityObserver : NSObject {
+ WKView *_view;
+}
+
+- (instancetype)initWithView:(WKView *)view;
+- (void)startObserving:(NSWindow *)window;
+- (void)stopObserving:(NSWindow *)window;
+@end
+
+@implementation WKWindowVisibilityObserver
+
+- (instancetype)initWithView:(WKView *)view
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _view = view;
+ return self;
+}
+
+- (void)startObserving:(NSWindow *)window
+{
+ // An NSView derived object such as WKView cannot observe these notifications, because NSView itself observes them.
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidOrderOffScreen:)
+ name:@"NSWindowDidOrderOffScreenNotification" object:window];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidOrderOnScreen:)
+ name:@"_NSWindowDidBecomeVisible" object:window];
+}
+
+- (void)stopObserving:(NSWindow *)window
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:@"NSWindowDidOrderOffScreenNotification" object:window];
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:@"_NSWindowDidBecomeVisible" object:window];
+}
+
+- (void)_windowDidOrderOnScreen:(NSNotification *)notification
+{
+ [_view _windowDidOrderOnScreen:notification];
+}
+
+- (void)_windowDidOrderOffScreen:(NSNotification *)notification
+{
+ [_view _windowDidOrderOffScreen:notification];
+}
+
+@end
+
</ins><span class="cx"> @interface WKResponderChainSink : NSResponder {
</span><span class="cx"> NSResponder *_lastResponderInChain;
</span><span class="cx"> bool _didReceiveUnhandledCommand;
</span><span class="lines">@@ -2546,10 +2598,6 @@
</span><span class="cx"> name:NSWindowDidMoveNotification object:window];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidResize:)
</span><span class="cx"> name:NSWindowDidResizeNotification object:window];
</span><del>- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidOrderOffScreen:)
- name:@"NSWindowDidOrderOffScreenNotification" object:window];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidOrderOnScreen:)
- name:@"_NSWindowDidBecomeVisible" object:window];
</del><span class="cx"> [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidChangeBackingProperties:)
</span><span class="cx"> name:NSWindowDidChangeBackingPropertiesNotification object:window];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowDidChangeScreen:)
</span><span class="lines">@@ -2566,6 +2614,7 @@
</span><span class="cx"> [window addObserver:self forKeyPath:@"contentLayoutRect" options:NSKeyValueObservingOptionInitial context:keyValueObservingContext];
</span><span class="cx"> [window addObserver:self forKeyPath:@"titlebarAppearsTransparent" options:NSKeyValueObservingOptionInitial context:keyValueObservingContext];
</span><span class="cx"> #endif
</span><ins>+ [_data->_windowVisibilityObserver startObserving:window];
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2581,9 +2630,6 @@
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidDeminiaturizeNotification object:window];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidMoveNotification object:window];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidResizeNotification object:window];
</span><del>- [[NSNotificationCenter defaultCenter] removeObserver:self name:@"NSWindowWillOrderOffScreenNotification" object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:@"NSWindowDidOrderOffScreenNotification" object:window];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:@"_NSWindowDidBecomeVisible" object:window];
</del><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidChangeBackingPropertiesNotification object:window];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidChangeScreenNotification object:window];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:@"_NSWindowDidChangeContentsHostedInLayerSurfaceNotification" object:window];
</span><span class="lines">@@ -2593,6 +2639,7 @@
</span><span class="cx"> [window removeObserver:self forKeyPath:@"contentLayoutRect" context:keyValueObservingContext];
</span><span class="cx"> [window removeObserver:self forKeyPath:@"titlebarAppearsTransparent" context:keyValueObservingContext];
</span><span class="cx"> #endif
</span><ins>+ [_data->_windowVisibilityObserver stopObserving:window];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)viewWillMoveToWindow:(NSWindow *)window
</span><span class="lines">@@ -3696,10 +3743,12 @@
</span><span class="cx"> _data->_useContentPreparationRectForVisibleRect = NO;
</span><span class="cx"> _data->_windowOcclusionDetectionEnabled = YES;
</span><span class="cx">
</span><ins>+ _data->_windowVisibilityObserver = adoptNS([[WKWindowVisibilityObserver alloc] initWithView:self]);
+
</ins><span class="cx"> _data->_intrinsicContentSize = NSMakeSize(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric);
</span><span class="cx">
</span><span class="cx"> _data->_needsViewFrameInWindowCoordinates = _data->_page->preferences().pluginsEnabled();
</span><del>-
</del><ins>+
</ins><span class="cx"> [self _registerDraggedTypes];
</span><span class="cx">
</span><span class="cx"> self.wantsLayer = YES;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (181865 => 181866)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2015-03-23 20:35:17 UTC (rev 181865)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2015-03-23 20:42:03 UTC (rev 181866)
</span><span class="lines">@@ -129,6 +129,9 @@
</span><span class="cx"> - (void)_reparentLayerTreeInThumbnailView;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+- (void)_windowDidOrderOnScreen:(NSNotification *)notification;
+- (void)_windowDidOrderOffScreen:(NSNotification *)notification;
+
</ins><span class="cx"> // FullScreen
</span><span class="cx">
</span><span class="cx"> @property (readonly) BOOL _hasFullScreenWindowController;
</span></span></pre>
</div>
</div>
</body>
</html>