[webkit-changes] [WebKit/WebKit] 43d5c1: updateAllowsBackingStoreDetaching has wrong coordi...

mattwoodrow noreply at github.com
Tue Nov 12 20:28:14 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 43d5c16a35e71576fa7967dda20546e9c186f1f1
      https://github.com/WebKit/WebKit/commit/43d5c16a35e71576fa7967dda20546e9c186f1f1
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2024-11-12 (Tue, 12 Nov 2024)

  Changed paths:
    A LayoutTests/compositing/backing/backing-store-attachment-animated-transform-inside-fixed-expected.txt
    A LayoutTests/compositing/backing/backing-store-attachment-animated-transform-inside-fixed.html
    A LayoutTests/platform/glib/compositing/backing/backing-store-attachment-animated-transform-inside-fixed-expected.txt
    A LayoutTests/platform/win/compositing/backing/backing-store-attachment-animated-transform-inside-fixed-expected.txt
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerBacking.h
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h

  Log Message:
  -----------
  updateAllowsBackingStoreDetaching has wrong coordinates when inside an animated transform.
https://bugs.webkit.org/show_bug.cgi?id=282727
<rdar://139393911>

Reviewed by Simon Fraser.

When descending through a layer that has an animated transform, the layerExtent
is computed using the post-transform animation extents and the transform itself
isn't pushed onto the geometry map.

That means for all descendants, overlap bounds are no longer 'absolute', since
they aren't transformed.

This generally works ok for overlap testing, since everything within the
transform stacking context is in the same coordinate space.

updateAllowsBackingStoreDetaching compares these untransformed coordinates
against the layout viewport though, and this is invalid, leading to backing
stores not being detached.

Actually fixing the layerExtent coordinates to be transformed (with the
transform extents) is complicated unfortunately.

This fixes the symptom by propagating the 'allow backing store detaching'
computation down to descendant layers, if they are in the same containing block
chain (and thus are a subset of the extent computed already).

* LayoutTests/compositing/backing/backing-store-attachment-animated-transform-inside-fixed-expected.txt: Added.
* LayoutTests/compositing/backing/backing-store-attachment-animated-transform-inside-fixed.html: Added.
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateCoverage):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAllowsBackingStoreDetaching):
* Source/WebCore/rendering/RenderLayerBacking.h:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::CompositingState::stateForPaintOrderChildren const):
(WebCore::RenderLayerCompositor::allowsFixedPositionBackingStoreDetaching):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
* Source/WebCore/rendering/RenderLayerCompositor.h:

Canonical link: https://commits.webkit.org/286517@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