Bug 115334

Summary: [WebKit2] Adopt new API for detecting window occlusion
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch simon.fraser: review+

Description Sam Weinig 2013-04-28 13:17:35 PDT
[WebKit2] Adopt new API for detecting window occlusion
Comment 1 Sam Weinig 2013-04-28 13:21:25 PDT
Created attachment 199970 [details]
Patch
Comment 2 Simon Fraser (smfr) 2013-04-28 13:25:16 PDT
Comment on attachment 199970 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=199970&action=review

> Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm:213
> +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
>      if ([m_wkView _isWindowOccluded])
>          return false;
> +#endif

It would be slightly cleaner to have _isWindowOccluded pre-10.9 and just always return false.
Comment 3 Sam Weinig 2013-04-28 13:30:17 PDT
Committed r149260: <http://trac.webkit.org/changeset/149260>
Comment 4 Tim Horton 2013-05-01 01:57:32 PDT
Comment on attachment 199970 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=199970&action=review

> Source/WebKit2/UIProcess/API/mac/WKView.mm:-1893
> -        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowWillOrderOffScreen:)
> -                                                     name:@"NSWindowWillOrderOffScreenNotification" object:window];

Did you mean to remove the call to removeObserver for this notification as well?