Summary: | Incorrect clipping of elements on Shopify page | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mic.gallego | ||||||||
Component: | Compositing | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | dino, graouts, graouts, karlcow, simon.fraser, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||||||
Version: | Safari 17 | ||||||||||
Hardware: | Mac (Apple Silicon) | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
mic.gallego
2024-03-22 03:03:25 PDT
I've been able to find the code causing the issue. It is actually the overflow-x: clip being applied on the "shopify-section" class. I am not sure though why this style prevent the animation to work correctly. I have a hunch about what this might be (related to bug 266926). Hello, In order to continue our development we had to remove the code that caused the issue on Safari so you won't be able to reproduce it on the URL I gave. To reproduce the issue again, please add the following code: .shopify-section { overflow-x: clip; } This will allow to trigger again the issue explained in this ticket. Created attachment 470616 [details]
Reduction
This is about `overflow-x: clip` also clipping in the Y axis in a compositing layer.
Created attachment 470617 [details]
Reduction
In `RenderLayer::calculateLayerBounds()` we hit the `UseLocalClipRectIfPossible` code path. RenderLayer::clipRectRelativeToAncestor() calls `calculateRects()` which does the right thing for foregroundRect, but doesn't extend in Y for the backgroundRect. I need to study foreground and background clip rects, first introduced in https://commits.webkit.org/4548@main |