Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b56addc7fbfd92f4d7f2ac43380703d589829fdb
https://github.com/WebKit/WebKit/commit/b56addc7fbfd92f4d7f2ac43380703d589829fdb
Author: Simon Fraser <[email protected]>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
A
LayoutTests/compositing/scrolling/transformed-clipping-inside-scroller-expected.html
A
LayoutTests/compositing/scrolling/transformed-clipping-inside-scroller.html
M LayoutTests/compositing/transforms/3d-transformed-fixed.html
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderLayer.h
Log Message:
-----------
Overflow:hidden fails on a transformed element inside overflow scroll
(affects motionpictures.org, www.bogleheads.org)
https://bugs.webkit.org/show_bug.cgi?id=281073
rdar://66751438
Reviewed by Alan Baradlay.
When `paintLayerByApplyingTransform()` paints a layer with a transform, that
layer becomes a painting
root, which means that clip rects are computed relative to it. However,
`RenderLayer::calculateRects()`
has logic that is conditional on a layer being the painting root and
`clipRectsContext.respectOverflowClip()`
being unset, resulting in the clip being ignored.
`clipRectsContext.respectOverflowClip()` is false for all descendants
of content being painted into an overflow scroller (see
`clipRectOptionsForPaintingOverflowContents`).
So a transformed and clipped element inside an overflow scroller would fail to
apply the clipping.
Fix this in `paintLayerByApplyingTransform`, since that's the only place we
reset the painting root,
by clearing the `PaintLayerFlag::PaintingOverflowContents` painting flag.
Also rename `clipRectOptionsForPaintingOverflowControls`, since it's about
painting content inside
overflow, not about overflow controls.
*
LayoutTests/compositing/scrolling/transformed-clipping-inside-scroller-expected.html:
Added.
* LayoutTests/compositing/scrolling/transformed-clipping-inside-scroller.html:
Added.
* LayoutTests/compositing/transforms/3d-transformed-fixed.html: Just add some
pixel tolerance so it passes on my machine.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerWithEffects):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
* Source/WebCore/rendering/RenderLayer.h:
Canonical link: https://commits.webkit.org/284872@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