Bug 135018

Summary: Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Severity: Normal CC: andersca, benjamin, mitz, sam, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
patch simon.fraser: review+

Description Tim Horton 2014-07-17 12:05:14 PDT
Empty tiles show up as black.

To combat this, we'll make sure we immediately dispatch view state changes *from inside the resume notification* so that the UI process is blocked *before* removing the snapshot.

We'll also temporarily detach the RemoteLayerTreeHost root layer (it'll get reattached on the next commit) so that even if our waitForDidUpdateViewState times out (500 ms), we'll show white instead of black.

We could also make said timeout longer in the resume case, but that will be a different patch.

Comment 1 Tim Horton 2014-07-17 12:10:24 PDT
Created attachment 235082 [details]
Comment 2 Tim Horton 2014-07-17 12:20:18 PDT
Comment 3 Darin Adler 2014-07-19 23:08:10 PDT
Comment on attachment 235082 [details]

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

> Source/WebKit2/UIProcess/DrawingAreaProxy.h:91
> +    virtual void hideContentUntilNextUpdate() { ASSERT_NOT_REACHED(); }

Doesn’t seem right.

If WKContentView knows that its drawing area is a RemoteLayerTreeDrawingAreaProxy, then it could be written to do a safe downcast and this function could be in that class instead of here in this base class.

If WKContentView doesn’t know that its drawing area is a RemoteLayerTreeDrawingAreaProxy, then we can’t ASSERT_NOT_REACHED.