[webkit-changes] [WebKit/WebKit] fcd3d0: REGRESSION: WebContent process terminates due to i...

mattwoodrow noreply at github.com
Wed Aug 28 20:26:02 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fcd3d0ef9ce66b6de9d6df6c8b8882683ed77b14
      https://github.com/WebKit/WebKit/commit/fcd3d0ef9ce66b6de9d6df6c8b8882683ed77b14
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    A LayoutTests/compositing/visibility/omitted-nested-hidden-layers-crash-expected.txt
    A LayoutTests/compositing/visibility/omitted-nested-hidden-layers-crash.html
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayer.h

  Log Message:
  -----------
  REGRESSION: WebContent process terminates due to invalid RemoteLayerTreeDrawingAreaProxy_CommitLayerTree message.
https://bugs.webkit.org/show_bug.cgi?id=278556
<rdar://134572916>

Reviewed by Simon Fraser.

281636 at main fixed the case where omitting a visibility:hidden layer from the RenderLayer z-order lists caused
a crash, because the compositor wasn't informed of the removal.

This is a second variant of the same issue, where the omitting happens by not
recursing into a hidden subtree instead of omitting a leaf.

The fix is to stop doing that type of omission, since it's hard to reason about.
It's possible that this is slightly slower in some cases (though only back to
how the code ran before the original optimization, not a true regression). The
real performance win comes from hiding these layers from the compositor, so it
shouldn't be noticeable.

The fix also clarifies some of the code around notifying the compositor, so that
it works in the same way as collectLayers. This prevents a visible decendant of
a non-stacking hidden layer from being removed from the compositor, only to be
added again by collectLayers.

* LayoutTests/compositing/visibility/omitted-nested-hidden-layers-crash-expected.txt: Added.
* LayoutTests/compositing/visibility/omitted-nested-hidden-layers-crash.html: Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::removeSelfFromCompositor):
(WebCore::RenderLayer::removeDescendantsFromCompositor):
(WebCore::RenderLayer::setWasOmittedFromZOrderTree):
(WebCore::RenderLayer::collectLayers):
(WebCore::RenderLayer::removeSelfAndDescendantsFromCompositor): Deleted.
* Source/WebCore/rendering/RenderLayer.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list