[webkit-changes] [WebKit/WebKit] c91af3: REGRESSION (STP): Animating image inside clipping ...

Simon Fraser noreply at github.com
Tue Nov 1 16:29:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c91af32319e79e687c345bf10927febf64d42476
      https://github.com/WebKit/WebKit/commit/c91af32319e79e687c345bf10927febf64d42476
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2022-11-01 (Tue, 01 Nov 2022)

  Changed paths:
    A LayoutTests/compositing/clipping/clip-stack-hidden-and-radius-expected.html
    A LayoutTests/compositing/clipping/clip-stack-hidden-and-radius.html
    M Source/WebCore/rendering/RenderLayerCompositor.cpp

  Log Message:
  -----------
  REGRESSION (STP): Animating image inside clipping border-radius ignores overflow hidden
https://bugs.webkit.org/show_bug.cgi?id=245769
rdar://100514998

Reviewed by Alan Baradlay.

When composited layers are clipped by non-stacking-context ancestors, we build an "ancestor clipping stack"
to represent those clips. Contiguous sets of non-scrollable, non-radius clips can be collapsed into
a single entry as the intersection of the clip rects, which is what `pushNonScrollableClip()` does
in `RenderLayerCompositor::computeAncestorClippingStack()`.

While walking up the ancestor chain, if we encounter a clip-with-radius or overflow:scroll,
we need to push any pending non-scrollable clip, but the border-radius clause here failed
to do that, resulting in an incorrect attempt to push a clip with an infinite rect at
the end.

Fix by ensuring that the `hasBorderRadius()` clause calls `pushNonScrollableClip()` just as
the `hasCompositedScrollableOverflow()` one does.

* LayoutTests/compositing/clipping/clip-stack-hidden-and-radius-expected.html: Added.
* LayoutTests/compositing/clipping/clip-stack-hidden-and-radius.html: Added.
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeAncestorClippingStack const):

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




More information about the webkit-changes mailing list