[webkit-changes] [WebKit/WebKit] 2cf26b: Merge 254518 at main - Location.replace() is missing ...

Simon Fraser noreply at github.com
Thu Sep 15 13:58:45 PDT 2022


  Branch: refs/heads/webkitgtk/2.36
  Home:   https://github.com/WebKit/WebKit
  Commit: 2cf26b64d39f1f411ba81103f54c0228d94c2cd4
      https://github.com/WebKit/WebKit/commit/2cf26b64d39f1f411ba81103f54c0228d94c2cd4
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/child-navigates-parent-cross-origin.window-expected.txt
    M Source/WebCore/page/Location.cpp

  Log Message:
  -----------
  Merge 254518 at main - Location.replace() is missing canNavigate() check
https://bugs.webkit.org/show_bug.cgi?id=245203

Reviewed by Darin Adler.

Location.replace() is missing canNavigate() check, unlike other Location functions.

* LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/child-navigates-parent-cross-origin.window-expected.txt:
* Source/WebCore/page/Location.cpp:
(WebCore::Location::replace):

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

(cherry picked from commit f1a9daf23ad9d05a9ff6cf7929389786ddcb5fb0)


  Commit: 1c22fa62c12df5861444d731561f2e2fd215aedc
      https://github.com/WebKit/WebKit/commit/1c22fa62c12df5861444d731561f2e2fd215aedc
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M Source/WebCore/platform/graphics/GraphicsLayer.cpp
    M Source/WebCore/platform/graphics/GraphicsLayer.h
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

  Log Message:
  -----------
  Merge 253606 at main - Add a way to have GraphicsLayerCA create a single CATransformLayer https://bugs.webkit.org/show_bug.cgi?id=244127

Reviewed by Tim Horton.

In a future patch I need to make a GraphicsLayerCA that just creates a single CATransformLayer in
the CALayer tree. Currently, setting preserves3D() does create a CATransformLayer, but also creates
a child CALayer for any rendered content.

Fix by adding GraphicsLayer::Type::Structural. A GraphicsLayer of this type will always have
`preserves3D == true` behavior, and does not support any kind of rendered content or effect (filters
or opacity); add some assertions to catch common misuses.

* Source/WebCore/platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::supportsLayerType):
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::setPreserves3D):
(WebCore::GraphicsLayer::setMasksToBounds):
(WebCore::GraphicsLayer::setDrawsContent):
(WebCore::GraphicsLayer::setFilters):
(WebCore::GraphicsLayer::setOpacity):
(WebCore::GraphicsLayer::setBackgroundColor):
* Source/WebCore/platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::platformLayer const):
(WebCore::GraphicsLayer::setPreserves3D): Deleted.
(WebCore::GraphicsLayer::setMasksToBounds): Deleted.
(WebCore::GraphicsLayer::setDrawsContent): Deleted.
(WebCore::GraphicsLayer::setOpacity): Deleted.
(WebCore::GraphicsLayer::setFilters): Deleted.
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::supportsLayerType):
(WebCore::GraphicsLayerCA::initialize):
(WebCore::GraphicsLayerCA::structuralLayerPurpose const):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::isStructuralLayer const):

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

(cherry picked from commit 6ca6aad73c5b205af1070332ff2a3faba9db5627)


  Commit: ac41592c55a66176271e3d1839a9a2ff1dd127de
      https://github.com/WebKit/WebKit/commit/ac41592c55a66176271e3d1839a9a2ff1dd127de
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M Source/WebCore/rendering/RenderLayerBacking.cpp

  Log Message:
  -----------
  Merge 253582 at main - Simplify RenderLayerBacking::updateInternalHierarchy() https://bugs.webkit.org/show_bug.cgi?id=244102

Reviewed by Alan Bujtas.

This function had some complicated conditional logic based on which layers exit.
It's mostly building a linear hierarchy of layers, so we can simplify by building
a list of layers in parent-child order, and then just looping over the list.

`m_contentsContainmentLayer` is special because it will have two children; the
`m_backgroundLayer`, and the `m_graphicsLayer`; we manually parent the first,
and let the loop append the second.

* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateInternalHierarchy):

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

(cherry picked from commit 475727a247f83f3778e4ad7e04786d1629d7913f)


  Commit: 70bea286ac5024f6c18989a6febda6b6587b50d5
      https://github.com/WebKit/WebKit/commit/70bea286ac5024f6c18989a6febda6b6587b50d5
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M LayoutTests/compositing/absolute-inside-out-of-view-fixed-expected.txt
    M LayoutTests/compositing/backing/no-backing-for-offscreen-children-of-position-fixed-expected.txt
    M LayoutTests/compositing/contents-opaque/body-background-painted-expected.txt
    M LayoutTests/compositing/contents-opaque/body-background-skipped-expected.txt
    M LayoutTests/compositing/contents-opaque/hidden-with-visible-child-expected.txt
    M LayoutTests/compositing/contents-opaque/hidden-with-visible-text-expected.txt
    M LayoutTests/compositing/fixed-positioned-pseudo-content-no-compositing-expected.txt
    M LayoutTests/compositing/fixed-with-fixed-layout-expected.txt
    M LayoutTests/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt
    M LayoutTests/compositing/geometry/fixed-transformed-expected.txt
    M LayoutTests/compositing/geometry/limit-layer-bounds-fixed-expected.txt
    M LayoutTests/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt
    M LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-overlap-extent-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-and-transform-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-descendants-out-of-view-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-out-of-view-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-under-transform-expected.txt
    M LayoutTests/compositing/layer-creation/zoomed-clip-intersection-expected.txt
    M LayoutTests/compositing/no-compositing-when-fulll-screen-is-present-expected.txt
    A LayoutTests/compositing/transforms/3d-transformed-fixed-expected.html
    A LayoutTests/compositing/transforms/3d-transformed-fixed.html
    M LayoutTests/compositing/visibility/visibility-change-in-subframe-expected.txt
    M LayoutTests/editing/editable-region/fixed-and-absolute-contenteditable-scrolled-expected.txt
    M LayoutTests/editing/editable-region/relative-inside-fixed-contenteditable-scrolled-expected.txt
    M LayoutTests/editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables-expected.txt
    M LayoutTests/fast/repaint/iframe-on-subpixel-position-expected.txt
    M LayoutTests/fast/scrolling/mac/negative-z-index-overflow-scroll-expected.txt
    M LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt
    M LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt
    M LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt
    M LayoutTests/fullscreen/full-screen-layer-dump-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-painted-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-skipped-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/fixed-image-loading-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/geometry/fixed-position-composited-switch-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/layer-creation/no-compositing-for-sticky-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/rtl/rtl-iframe-fixed-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/visibility/visibility-change-in-subframe-expected.txt
    M LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
    M LayoutTests/platform/ios/compositing/absolute-inside-out-of-view-fixed-expected.txt
    M LayoutTests/platform/ios/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt
    M LayoutTests/platform/ios/compositing/iframes/overlapped-nested-iframes-expected.txt
    M LayoutTests/platform/ios/compositing/layer-creation/fixed-position-and-transform-expected.txt
    M LayoutTests/platform/ios/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt
    M LayoutTests/platform/ios/scrollingcoordinator/ios/fixed-in-frame-layer-reconcile-layer-position-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/fixed-image-loading-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt
    M LayoutTests/platform/mac/compositing/fixed-image-loading-expected.txt
    M LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt
    M LayoutTests/platform/mac/compositing/rtl/rtl-fixed-expected.txt
    M LayoutTests/platform/mac/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt
    M LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
    M LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt
    M LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt
    M LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt
    M LayoutTests/tiled-drawing/scrolling/sticky/sticky-layers-expected.txt
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerBacking.h
    M Source/WebCore/rendering/RenderLayerCompositor.cpp

  Log Message:
  -----------
  Merge 253865 at main - Sticky/fixed layers that are resized on the main thread can appear stretched when scrolling https://bugs.webkit.org/show_bug.cgi?id=222132 <rdar://problem/74760592>

Reviewed by Tim Horton.

On macOS, layers for position:fixed and sticky are repositioned on the scrolling thread which
may run concurrently with Core Animation commits on the main thread.  If those main thread commits
change the layer size, and the commit takes time (e.g. involves slow painting), it's possible for
the layer size change to be entrained by the scrolling thread commit, which can result in
stretched layer contents as the size change is committed before the main thread has committed new
backing store. This bug has been observed on https://www.apple.com/ipad-air/ and some Github pages
like https://github.com/WebKit/WebKit/pull/2941/files.

To fix this we have to give fixed/sticky layers an additional "anchor" layer which is the one
repositioned on the scrolling thread. The main layer with painted content is then a child of that
anchor layer. This new layer has to avoid transform flattening (a perspective on the container
of the fixed or sticky layer should affect the fixed or sticky layer's 3d transform), so uses
the newly added GraphicsLayer::Type::Structural, which creates a CATransformLayer under the hood.
Additionally, the propagated perspective transform has to not be affected by the anchor layer's
position, which is achieved by giving the anchor layer a boundsOrigin equal to the fixed layer's
position (effectively negating the anchor layer position). This is tested by
compositing/transforms/3d-transformed-fixed.html.

Changing boundsOrigin on a layer that isn't clipped revealed a bug in `GraphicsLayerCA::computeVisibleAndCoverageRect()`,
which was manifested as missing backing store in `fast/css/sticky/sticky-table-row-top.html`:
the TransformState was not adjusted for the non-zero bounds origin, and instead it was just
baked into the `clipRectForSelf` and `coverageRect`. Fix by computing `clipRectForSelf` and
`clipRectFromParent` ignoring boundsOrigin (so that the `state.setSecondaryQuad()` pushes a
rect that is not affected by boundsOrigin), and then doing `state.move(-boundsOrigin)` so that
descendants see the effects of the boundsOrigin.

The anchor layer has zero size and is not visible with layer borders (since transform layers can't
show borders).

* LayoutTests/compositing/contents-opaque/body-background-painted-expected.txt:
* LayoutTests/compositing/contents-opaque/body-background-skipped-expected.txt:
* LayoutTests/compositing/absolute-inside-out-of-view-fixed-expected.txt:
* LayoutTests/compositing/backing/backing-store-columns-inside-position-fixed-expected.txt:
* LayoutTests/compositing/backing/no-backing-for-offscreen-children-of-position-fixed-expected.txt:
* LayoutTests/compositing/contents-opaque/hidden-with-visible-child-expected.txt:
* LayoutTests/compositing/contents-opaque/hidden-with-visible-text-expected.txt:
* LayoutTests/compositing/fixed-positioned-pseudo-content-no-compositing-expected.txt:
* LayoutTests/compositing/fixed-with-fixed-layout-expected.txt:
* LayoutTests/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt:
* LayoutTests/compositing/geometry/fixed-transformed-expected.txt:
* LayoutTests/compositing/geometry/limit-layer-bounds-fixed-expected.txt:
* LayoutTests/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-overlap-extent-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-and-transform-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-descendants-out-of-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-out-of-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-under-transform-expected.txt:
* LayoutTests/compositing/layer-creation/zoomed-clip-intersection-expected.txt:
* LayoutTests/compositing/no-compositing-when-fulll-screen-is-present-expected.txt:
* LayoutTests/compositing/visibility/visibility-change-in-subframe-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-skipped-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/fixed-image-loading-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/fixed-position-composited-switch-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/no-compositing-for-sticky-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-iframe-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/visibility/visibility-change-in-subframe-expected.txt:
* LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
* LayoutTests/platform/ios/compositing/absolute-inside-out-of-view-fixed-expected.txt:
* LayoutTests/platform/ios/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt:
* LayoutTests/platform/ios/compositing/iframes/overlapped-nested-iframes-expected.txt:
* LayoutTests/platform/ios/compositing/layer-creation/fixed-position-and-transform-expected.txt:
* LayoutTests/platform/ios/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* LayoutTests/platform/ios/scrollingcoordinator/ios/fixed-in-frame-layer-reconcile-layer-position-expected.txt:
* LayoutTests/platform/mac/compositing/fixed-image-loading-expected.txt:
* LayoutTests/platform/mac/compositing/rtl/rtl-fixed-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/fixed-image-loading-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt:
* LayoutTests/platform/mac/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect const):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateViewportConstrainedAnchorLayer):

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

(cherry picked from commit 69483ca1904abd5802d6aa8ed48bfdf0f2a4d798)


  Commit: 4154ed9f9a73220bb2ae1c0eb7efcce73dde4db7
      https://github.com/WebKit/WebKit/commit/4154ed9f9a73220bb2ae1c0eb7efcce73dde4db7
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/compositing/absolute-inside-out-of-view-fixed-expected.txt
    M LayoutTests/compositing/contents-opaque/hidden-with-visible-child-expected.txt
    M LayoutTests/compositing/contents-opaque/hidden-with-visible-text-expected.txt
    M LayoutTests/compositing/fixed-positioned-pseudo-content-no-compositing-expected.txt
    M LayoutTests/compositing/fixed-with-fixed-layout-expected.txt
    M LayoutTests/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt
    M LayoutTests/compositing/geometry/fixed-transformed-expected.txt
    M LayoutTests/compositing/geometry/limit-layer-bounds-fixed-expected.txt
    M LayoutTests/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt
    M LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-overlap-extent-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-and-transform-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-descendants-out-of-view-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt
    M LayoutTests/compositing/layer-creation/fixed-position-under-transform-expected.txt
    M LayoutTests/compositing/layer-creation/zoomed-clip-intersection-expected.txt
    M LayoutTests/compositing/transforms/3d-transformed-fixed-expected.html
    M LayoutTests/compositing/transforms/3d-transformed-fixed.html
    M LayoutTests/editing/editable-region/fixed-and-absolute-contenteditable-scrolled-expected.txt
    M LayoutTests/editing/editable-region/relative-inside-fixed-contenteditable-scrolled-expected.txt
    M LayoutTests/editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables-expected.txt
    M LayoutTests/fast/scrolling/mac/negative-z-index-overflow-scroll-expected.txt
    M LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt
    M LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt
    M LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-painted-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-skipped-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/fixed-image-loading-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/geometry/fixed-position-composited-switch-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/layer-creation/no-compositing-for-sticky-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/rtl/rtl-iframe-fixed-expected.txt
    M LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
    M LayoutTests/platform/ios/compositing/absolute-inside-out-of-view-fixed-expected.txt
    M LayoutTests/platform/ios/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt
    M LayoutTests/platform/ios/compositing/iframes/overlapped-nested-iframes-expected.txt
    M LayoutTests/platform/ios/compositing/layer-creation/fixed-position-and-transform-expected.txt
    M LayoutTests/platform/ios/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt
    M LayoutTests/platform/ios/scrollingcoordinator/ios/fixed-in-frame-layer-reconcile-layer-position-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/fixed-image-loading-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt
    M LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt
    M LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt
    M LayoutTests/platform/mac/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt
    M LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt
    M LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt
    M LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt
    M LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt
    M LayoutTests/tiled-drawing/scrolling/sticky/sticky-layers-expected.txt
    M Source/WebCore/rendering/RenderLayerBacking.cpp

  Log Message:
  -----------
  Merge 254304 at main - REGRESSION (253865 at main): Fixed elements jiggle when scrolling youtube.com https://bugs.webkit.org/show_bug.cgi?id=244767 <rdar://99495036>

Reviewed by Alan Bujtas.

Part of the fix in 253865 at main was based on the false premise that `perspective` on some
ancestor could affect the 3D transform on a layer with `position:fixed` behavior; that
patch fiddled with boundsOrigin on the anchor layer to allow the perspective
sublayerTransform to influence the fixed layer.

However, per spec[1], `perspective` creates a containing block for fixed position, and
indeed this was fixed in the compositing code path in 253809 at main (the lack of this fix
confused my testing when writing the original patch). So it turns out that the anchor
layer used for fixed and sticky layers doesn't need any boundsOrigin adjustment.
Removing the boundsOrigin adjustment fixes some scrolling thread jiggles that I didn't
fully debug. The anchor layer still uses `GraphicsLayer::Type::Structural` to allow
perspective to affect a `position:sticky` element and to avoid flattening by
`preserve-3d`, as tested by the
`css/css-transforms/3dtransform-and-position-sticky-002.html` WPT.

[1] https://www.w3.org/TR/css-transforms-2/#perspective-property

* LayoutTests/compositing/absolute-inside-out-of-view-fixed-expected.txt:
* LayoutTests/compositing/absolute-inside-out-of-view-fixed-expected.txt:
* LayoutTests/compositing/backing/backing-store-columns-inside-position-fixed-expected.txt:
* LayoutTests/compositing/backing/backing-store-columns-inside-position-fixed-expected.txt:
* LayoutTests/compositing/backing/no-backing-for-offscreen-children-of-position-fixed-expected.txt:
* LayoutTests/compositing/backing/no-backing-for-offscreen-children-of-position-fixed-expected.txt:
* LayoutTests/compositing/contents-opaque/hidden-with-visible-child-expected.txt:
* LayoutTests/compositing/contents-opaque/hidden-with-visible-child-expected.txt:
* LayoutTests/compositing/contents-opaque/hidden-with-visible-text-expected.txt:
* LayoutTests/compositing/contents-opaque/hidden-with-visible-text-expected.txt:
* LayoutTests/compositing/fixed-positioned-pseudo-content-no-compositing-expected.txt:
* LayoutTests/compositing/fixed-positioned-pseudo-content-no-compositing-expected.txt:
* LayoutTests/compositing/fixed-with-fixed-layout-expected.txt:
* LayoutTests/compositing/fixed-with-fixed-layout-expected.txt:
* LayoutTests/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt:
* LayoutTests/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt:
* LayoutTests/compositing/geometry/fixed-transformed-expected.txt:
* LayoutTests/compositing/geometry/fixed-transformed-expected.txt:
* LayoutTests/compositing/geometry/limit-layer-bounds-fixed-expected.txt:
* LayoutTests/compositing/geometry/limit-layer-bounds-fixed-expected.txt:
* LayoutTests/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* LayoutTests/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt:
* LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-overlap-extent-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-overlap-extent-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-and-transform-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-and-transform-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-descendants-out-of-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-descendants-out-of-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-out-of-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-out-of-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-under-transform-expected.txt:
* LayoutTests/compositing/layer-creation/fixed-position-under-transform-expected.txt:
* LayoutTests/compositing/layer-creation/zoomed-clip-intersection-expected.txt:
* LayoutTests/compositing/layer-creation/zoomed-clip-intersection-expected.txt:
* LayoutTests/compositing/no-compositing-when-fulll-screen-is-present-expected.txt:
* LayoutTests/compositing/no-compositing-when-fulll-screen-is-present-expected.txt:
* LayoutTests/compositing/transforms/3d-transformed-fixed-expected.html:
* LayoutTests/compositing/transforms/3d-transformed-fixed.html:
* LayoutTests/compositing/visibility/visibility-change-in-subframe-expected.txt:
* LayoutTests/compositing/visibility/visibility-change-in-subframe-expected.txt:
* LayoutTests/editing/editable-region/fixed-and-absolute-contenteditable-scrolled-expected.txt:
* LayoutTests/editing/editable-region/fixed-and-absolute-contenteditable-scrolled-expected.txt:
* LayoutTests/editing/editable-region/relative-inside-fixed-contenteditable-scrolled-expected.txt:
* LayoutTests/editing/editable-region/relative-inside-fixed-contenteditable-scrolled-expected.txt:
* LayoutTests/editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables-expected.txt:
* LayoutTests/editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables-expected.txt:
* LayoutTests/fast/repaint/iframe-on-subpixel-position-expected.txt:
* LayoutTests/fast/scrolling/mac/negative-z-index-overflow-scroll-expected.txt:
* LayoutTests/fast/scrolling/mac/negative-z-index-overflow-scroll-expected.txt:
* LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt:
* LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt:
* LayoutTests/fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt:
* LayoutTests/fullscreen/full-screen-layer-dump-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-skipped-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/contents-opaque/body-background-skipped-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/fixed-image-loading-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/fixed-image-loading-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/fixed-position-composited-switch-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/fixed-position-composited-switch-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-transformed-into-view-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/no-compositing-for-sticky-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/layer-creation/no-compositing-for-sticky-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-iframe-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/rtl/rtl-iframe-fixed-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/visibility/visibility-change-in-subframe-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/visibility/visibility-change-in-subframe-expected.txt:
* LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
* LayoutTests/platform/ios/compositing/absolute-inside-out-of-view-fixed-expected.txt:
* LayoutTests/platform/ios/compositing/absolute-inside-out-of-view-fixed-expected.txt:
* LayoutTests/platform/ios/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt:
* LayoutTests/platform/ios/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt:
* LayoutTests/platform/ios/compositing/iframes/overlapped-nested-iframes-expected.txt:
* LayoutTests/platform/ios/compositing/iframes/overlapped-nested-iframes-expected.txt:
* LayoutTests/platform/ios/compositing/layer-creation/fixed-position-and-transform-expected.txt:
* LayoutTests/platform/ios/compositing/layer-creation/fixed-position-and-transform-expected.txt:
* LayoutTests/platform/ios/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* LayoutTests/platform/ios/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* LayoutTests/platform/ios/scrollingcoordinator/ios/fixed-in-frame-layer-reconcile-layer-position-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/fixed-image-loading-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/fixed-image-loading-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt:
* LayoutTests/platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt:
* LayoutTests/platform/mac/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* LayoutTests/platform/mac/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
* LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt:
* LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt:
* LayoutTests/tiled-drawing/scrolling/sticky/sticky-layers-expected.txt:
* LayoutTests/tiled-drawing/scrolling/sticky/sticky-layers-expected.txt:

* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::updateViewportConstrainedAnchorLayer):

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

(cherry picked from commit 99677e63f83398f621acad2e766fedf40d3e5fc9)


Compare: https://github.com/WebKit/WebKit/compare/e91c7be88b13...4154ed9f9a73


More information about the webkit-changes mailing list