Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4599e0a66d9da81ba6b2d138b825e72da0f4bc81
      
https://github.com/WebKit/WebKit/commit/4599e0a66d9da81ba6b2d138b825e72da0f4bc81
  Author: Matt Woodrow <[email protected]>
  Date:   2024-07-12 (Fri, 12 Jul 2024)

  Changed paths:
    A 
LayoutTests/compositing/visibility/visibility-image-layers-dynamic-composited-expected.txt
    A 
LayoutTests/compositing/visibility/visibility-image-layers-dynamic-composited.html
    A 
LayoutTests/platform/glib/compositing/visibility/visibility-image-layers-dynamic-composited-expected.txt
    M LayoutTests/platform/glib/fast/block/basic/020-expected.txt
    M LayoutTests/platform/glib/fast/dynamic/012-expected.txt
    M LayoutTests/platform/glib/fast/layers/layer-visibility-expected.txt
    M 
LayoutTests/platform/glib/fast/layers/layer-visibility-sublayer-expected.txt
    M LayoutTests/platform/glib/fast/text/whitespace/028-expected.txt
    M 
LayoutTests/platform/gtk/editing/input/caret-at-the-edge-of-contenteditable-expected.txt
    M 
LayoutTests/platform/gtk/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt
    M LayoutTests/platform/gtk/fast/css/text-overflow-input-expected.txt
    M LayoutTests/platform/gtk/fast/forms/box-shadow-override-expected.txt
    M LayoutTests/platform/gtk/fast/forms/input-appearance-height-expected.txt
    M LayoutTests/platform/gtk/fast/forms/placeholder-position-expected.txt
    M LayoutTests/platform/gtk/fast/forms/search-rtl-expected.txt
    M 
LayoutTests/platform/gtk/fast/forms/search/search-size-with-decorations-expected.txt
    A 
LayoutTests/platform/ios/compositing/visibility/visibility-image-layers-dynamic-composited-expected.txt
    M 
LayoutTests/platform/ios/editing/input/caret-at-the-edge-of-contenteditable-expected.txt
    M 
LayoutTests/platform/ios/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt
    M LayoutTests/platform/ios/fast/block/basic/020-expected.txt
    M LayoutTests/platform/ios/fast/dynamic/012-expected.txt
    M LayoutTests/platform/ios/fast/layers/layer-visibility-expected.txt
    M 
LayoutTests/platform/ios/fast/layers/layer-visibility-sublayer-expected.txt
    M LayoutTests/platform/ios/fast/text/whitespace/028-expected.txt
    M 
LayoutTests/platform/mac-ventura-wk2/editing/input/caret-at-the-edge-of-contenteditable-expected.txt
    A 
LayoutTests/platform/mac-ventura-wk2/fast/dynamic/layer-hit-test-crash-expected.txt
    A 
LayoutTests/platform/mac-wk1/fast/dynamic/layer-hit-test-crash-expected.txt
    M 
LayoutTests/platform/mac-wk2/editing/input/caret-at-the-edge-of-contenteditable-expected.txt
    M 
LayoutTests/platform/mac-wk2/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt
    M LayoutTests/platform/mac-wk2/fast/block/basic/020-expected.txt
    M LayoutTests/platform/mac-wk2/fast/dynamic/012-expected.txt
    M 
LayoutTests/platform/mac-wk2/fast/dynamic/layer-hit-test-crash-expected.txt
    M LayoutTests/platform/mac-wk2/fast/layers/layer-visibility-expected.txt
    M 
LayoutTests/platform/mac-wk2/fast/layers/layer-visibility-sublayer-expected.txt
    M LayoutTests/platform/mac-wk2/fast/text/whitespace/028-expected.txt
    A 
LayoutTests/platform/wincairo/compositing/visibility/visibility-image-layers-dynamic-composited-expected.txt
    M LayoutTests/platform/wpe/fast/css/text-overflow-input-expected.txt
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayer.h
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h

  Log Message:
  -----------
  RenderLayer::collectLayers uses compositing state which isn't valid yet.
https://bugs.webkit.org/show_bug.cgi?id=276451
<rdar://131491132>

Reviewed by Simon Fraser.

RenderLayer::collectLayers decides whether to include layers inside
visibility:hidden based on `compositor().usesCompositing()`, which isn't
(guaranteed to be) computed until after compositing layers have been decided.

If the compositing state does change, nothing invalidates the RenderLayer
z-order lists, so we can remain in this unexpected state.

A fix to the z-order list invalidation bug (so that all visibility:hidden 
subtrees
get included when we are compositing) is a large speedometer regression.

This instead adds new state to RenderLayer which marks if the layer is 
intrinsically
composited, which is determined from style (and thus before collectLayers). It
gets update in the same way as existing bits on RenderLayers with ancestor dirty
flags and updateDescendantDependantLayers.

It then changes collectLayers to include visibility:hidden subtrees that contain
an intrinsically composited layer (to make sure we have layers for video etc),
but continue to exclude subtrees that can be ignored.

* 
LayoutTests/compositing/visibility/visibility-image-layers-dynamic-composited-expected.txt:
 Added.
* 
LayoutTests/compositing/visibility/visibility-image-layers-dynamic-composited.html:
 Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::rebuildZOrderLists):
(WebCore::RenderLayer::collectLayers):
(WebCore::RenderLayer::setIntrinsicallyComposited):
(WebCore::RenderLayer::updateAncestorChainHasIntrinsicallyCompositedDescendants):
(WebCore::RenderLayer::dirtyAncestorChainHasIntrinsicallyCompositedDescendants):
(WebCore::RenderLayer::updateDescendantDependentFlags):
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::RenderLayerCompositor::requiresCompositingLayer const):
* Source/WebCore/rendering/RenderLayerCompositor.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to