Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0cb4b26572e403b8b116c5e63d5cf2f15ebac897
      
https://github.com/WebKit/WebKit/commit/0cb4b26572e403b8b116c5e63d5cf2f15ebac897
  Author: Nathan Solomon <[email protected]>
  Date:   2026-01-09 (Fri, 09 Jan 2026)

  Changed paths:
    A 
LayoutTests/compositing/filters/filter-region-translated-child-expected.html
    A LayoutTests/compositing/filters/filter-region-translated-child.html
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderBox.h

  Log Message:
  -----------
  REGRESSION (296844@main): filter region fails to cover transformed children 
of the filtered element
https://bugs.webkit.org/show_bug.cgi?id=305032
rdar://167671935

Reviewed by Simon Fraser.

If a parent element has a filter applied and contains a child element
with transforms or relative positioning, the filter region calculated
by the parent may not include the child's transformed position. If the
filter region is not included, then this causes incorrect visual
results where the filter is only applied onto the parent but not the
child (ex: a gaussian blur is only on the parent element but not on
the child element).

Fix this by modifying addOverflowWithRendererOffset() to include
children with self-painting layers in the parent's visual overflow
calculation when the parent has a filter. Previously, we assumed that
if a child has its own painting layer, the parent does not need to
track the child's visual overflow. However, this assumption is
incorrect when the parent has a filter, because the filter effect
requires accurate bounds that include all visual children regardless
of their layer status.

Additionally, fix visualOverflowRectForPropagation() to correctly
compute the visual overflow rectangle when the child element has CSS
transforms or relative positioning. The overflow rectangle must be
converted from the child's local coordinate space to the parent's
coordinate space.

Test: compositing/filters/filter-region-translated-child.html

* LayoutTests/compositing/filters/filter-region-translated-child-expected.html: 
Added.
* LayoutTests/compositing/filters/filter-region-translated-child.html: Added.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::addOverflowWithRendererOffset):
(WebCore::RenderBox::applyPaintGeometryTransformToRect const):
(WebCore::RenderBox::convertRectToParentWritingMode const):
(WebCore::RenderBox::visualOverflowRectForPropagation const):
(WebCore::RenderBox::layoutOverflowRectForPropagation const):
* Source/WebCore/rendering/RenderBox.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to