Bug 159036 - Mail snapshot has black webview in multitasking switcher
Summary: Mail snapshot has black webview in multitasking switcher
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-22 13:10 PDT by Tim Horton
Modified: 2016-06-22 13:40 PDT (History)
4 users (show)

See Also:


Attachments
Patch (13.91 KB, patch)
2016-06-22 13:10 PDT, Tim Horton
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 Tim Horton 2016-06-22 13:10:00 PDT
Mail snapshot has black webview in multitasking switcher
Comment 1 Tim Horton 2016-06-22 13:10:14 PDT
Created attachment 281866 [details]
Patch
Comment 2 Simon Fraser (smfr) 2016-06-22 13:18:06 PDT
Comment on attachment 281866 [details]
Patch

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

> Source/WebKit2/ChangeLog:18
> +        UIKit suggested instead waiting for the window context teardown notification,
> +        which does indeed seem to fire after the snapshotting is complete. I have a small
> +        change to WebCore::IOSurface and RemoteLayerBackingStore that makes the problem
> +        much more reproducible, and this fixes it perfectly, while the layers still
> +        eventually end up being made volatile.

A bit too much story-telling here.

> Source/WebKit2/UIProcess/ApplicationStateTracker.mm:76
> -ApplicationStateTracker::ApplicationStateTracker(UIView *view, SEL didEnterBackgroundSelector, SEL willEnterForegroundSelector)
> +ApplicationStateTracker::ApplicationStateTracker(UIView *view, SEL didEnterBackgroundSelector, SEL didFinishSnapshottingAfterEnteringBackgroundSelector, SEL willEnterForegroundSelector)

Why all this selector magic, rather than just an Obj-C protocol or something?
Comment 3 Tim Horton 2016-06-22 13:40:12 PDT
http://trac.webkit.org/changeset/202347