[webkit-changes] [WebKit/WebKit] 0dac14: <feColorMatrix> filter doesn't work properly when ...

Kiet Ho noreply at github.com
Tue Jun 13 14:27:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0dac14ca10cb771ef13516f2a82581b832f8a1c2
      https://github.com/WebKit/WebKit/commit/0dac14ca10cb771ef13516f2a82581b832f8a1c2
  Author: Kiet Ho <tho22 at apple.com>
  Date:   2023-06-13 (Tue, 13 Jun 2023)

  Changed paths:
    A LayoutTests/svg/filters/filter-specified-on-svg-root-expected.html
    A LayoutTests/svg/filters/filter-specified-on-svg-root.html
    M Source/WebCore/rendering/RenderLayer.cpp

  Log Message:
  -----------
  <feColorMatrix> filter doesn't work properly when defined inside then set directly on the <svg> element
https://bugs.webkit.org/show_bug.cgi?id=225120
rdar://77522728

Reviewed by Said Abou-Hallawa.

When a filter is specified on an SVG root, the SVG rendering codepath applies the
filter on the SVG root. Then, the RenderLayer of that SVG applies that filter again,
resulting in the filter being applied twice. Fix this by instructing RenderLayer not
to apply filters when rendering SVG roots.

Tests: LayoutTests/svg/filters/filter-specified-on-svg-root.html

* LayoutTests/svg/filters/filter-specified-on-svg-root-expected.html: Added.
* LayoutTests/svg/filters/filter-specified-on-svg-root.html: Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintsWithFilters const):
(WebCore::RenderLayer::calculateClipRects const):

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




More information about the webkit-changes mailing list