Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b3f79b3b2e5ca72e5979b191c89c7d5ce276e0f3
      
https://github.com/WebKit/WebKit/commit/b3f79b3b2e5ca72e5979b191c89c7d5ce276e0f3
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-06 (Tue, 06 Oct 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/svg/SVGAnimationElement.h
    M Source/WebCore/svg/animation/SMILTimeContainer.cpp

  Log Message:
  -----------
  SVG animations still run when the animation element or an ancestor fails 
conditional processing
https://bugs.webkit.org/show_bug.cgi?id=325767
rdar://188780260

Reviewed by Nikolas Zimmermann.

Per the SVG 2 conditional processing rules, "conditional processing prevents 
animation
elements from playing" [1].

An animation element must therefore not contribute to its target when its own 
conditional
processing tests (systemLanguage / requiredExtensions) fail, or when those of 
any ancestor
fail. WebKit honored conditional processing for direct rendering (a failing 
element is
treated as display:none and gets no renderer), but the SMIL engine schedules 
animations by
their xlink:href target independently of where the animation element lives in 
the tree, so
an animation whose element or an ancestor failed conditional processing still 
played and
mutated its target.

Two gaps caused this:

- SVGAnimationElement inherits SVGTests but did not override isValid(), so it 
used
  SVGElement's default (always true) and ignored its own conditional processing 
attributes.

- SMILTimeContainer::updateAnimations() never consulted conditional processing 
at all.

Fix both: SVGAnimationElement::isValid() now delegates to SVGTests::isValid(), 
and
updateAnimations() skips any scheduled animation whose own isValid(), or that 
of any
ancestor SVGElement, is false. Animation elements never get renderers, so 
reflecting
SVGTests in isValid() does not affect the rendering paths that also call it.

[1] https://w3c.github.io/svgwg/svg2-draft/struct.html#ConditionalProcessing

* LayoutTests/TestExpectations: Unskip Progressed Testcases
* Source/WebCore/svg/SVGAnimationElement.h:
* Source/WebCore/svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateAnimations):

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



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

Reply via email to