Bug 115334 - [WebKit2] Adopt new API for detecting window occlusion
Summary: [WebKit2] Adopt new API for detecting window occlusion
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-28 13:17 PDT by Sam Weinig
Modified: 2013-05-01 01:57 PDT (History)
1 user (show)

See Also:


Attachments
Patch (15.68 KB, patch)
2013-04-28 13:21 PDT, Sam Weinig
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?