Bug 61808 - REGRESSION (5.0.5-ToT, WebKit2): Flash to white when navigating between pages on wsj.com, other sites (when navigating away from composited page)
Summary: REGRESSION (5.0.5-ToT, WebKit2): Flash to white when navigating between pages...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: mitz
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2011-05-31 14:35 PDT by mitz
Modified: 2011-05-31 15:12 PDT (History)
2 users (show)

See Also:


Attachments
Patch (15.05 KB, patch)
2011-05-31 14:46 PDT, mitz
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 mitz 2011-05-31 14:35:54 PDT
REGRESSION (5.0.5-ToT, WebKit2): Flash to white when navigating between pages on wsj.com, other sites (when navigating away from composited page)
Comment 1 mitz 2011-05-31 14:36:50 PDT
<rdar://problem/9523192>
Comment 2 mitz 2011-05-31 14:46:42 PDT
Created attachment 95487 [details]
Patch
Comment 3 Darin Adler 2011-05-31 14:56:30 PDT
Comment on attachment 95487 [details]
Patch

If neither Anders nor Simon plans to review this, I would be willing to.
Comment 4 Simon Fraser (smfr) 2011-05-31 14:59:08 PDT
Comment on attachment 95487 [details]
Patch

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

> Source/WebKit2/ChangeLog:9
> +        WebKit1 has a mechanism to prevent the stale bits from the outgoing page from being erased
> +        until the incoming page has layout. Adapt this in WebKit2 to prevent the composited layer tree

Ironically the WK1 mechanism doesn't do anything with the layer tree, causing layers to get torn down prematurely.

> Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:1032
>  void WebFrameLoaderClient::frameLoadCompleted()
>  {
> -    notImplemented();
> +    WebPage* webPage = m_frame->page();
> +    if (!webPage)
> +        return;
> +
> +    if (m_frame == m_frame->page()->mainFrame())
> +        webPage->drawingArea()->setLayerTreeStateIsFrozen(false);
>  }

What's the timing of frameLoadCompleted(), relative to load events etc? Keeping the layer tree frozen until the load event fires would be bad, I think.

> Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:99
> +    if (m_layerFlushSchedulingEnabled)
> +        return;

I wonder if we should detect that a flush should have been scheduled, and schedule one here? It seems that we could have have layer changes early in the load that will never get flushed with the current code.
Comment 5 Simon Fraser (smfr) 2011-05-31 15:10:16 PDT
Comment on attachment 95487 [details]
Patch

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

>> Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:1032
>>  }
> 
> What's the timing of frameLoadCompleted(), relative to load events etc? Keeping the layer tree frozen until the load event fires would be bad, I think.

Oh, I see the above call in dispatchDidFirstLayout() now. This is OK.
Comment 6 mitz 2011-05-31 15:12:09 PDT
Fixed in r87755. <http://trac.webkit.org/changeset/87755>