Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 359bfd90327f3b91f80398c53404a03e6a19eecd
      
https://github.com/WebKit/WebKit/commit/359bfd90327f3b91f80398c53404a03e6a19eecd
  Author: Matt Woodrow <[email protected]>
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm

  Log Message:
  -----------
  screenrant.com: webcontent blank for several seconds upon resume
https://bugs.webkit.org/show_bug.cgi?id=263614
<rdar://116530284>

Reviewed by Tim Horton.

The existing code for hideContentUntilPendingUpdate waited for 
`nextLayerTreeTransactionID()`, which is usually the
next layer tree transaction to come from the WebProcess (and may already be in 
the incoming message queue).
The exception is when we've already received the `willCommitLayerTree` message, 
but not the `commitLayerTree` one
(probably because it's still working on buffer flushing). In that case it's the 
second layer tree transaction after
the current point.

In some cases that means we hide the layer tree, only to immediately show it 
again.

This changes the code to use a DispatchAfterEnsuringDrawing() IPC message, so 
that we show the content on the
next presentation update after the current set of IPC messages being sent to 
the WebProcess have been received.

It tracks the AsyncReplyID of any request in flight, so that if we get a second 
we can cancel the existing one and
replace it, thus extending the hidden state to the new deadline.

* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
(WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilPendingUpdate):

Canonical link: https://commits.webkit.org/269776@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to