[webkit-changes] [WebKit/WebKit] a6a7aa: REGRESSION(r258464): SVG use element doesn't rende...

Ryosuke Niwa noreply at github.com
Mon May 15 16:03:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a6a7aa5aca7b2269950a5a5d039aea10e314ac30
      https://github.com/WebKit/WebKit/commit/a6a7aa5aca7b2269950a5a5d039aea10e314ac30
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    A LayoutTests/svg/dom/use-element-refers-subsequent-image-element-after-style-update-expected.svg
    A LayoutTests/svg/dom/use-element-refers-subsequent-image-element-after-style-update.svg
    A LayoutTests/svg/dom/use-element-refers-subsequent-path-element-after-style-update-expected.svg
    A LayoutTests/svg/dom/use-element-refers-subsequent-path-element-after-style-update.svg
    M Source/WebCore/svg/SVGFEImageElement.cpp
    M Source/WebCore/svg/SVGFontFaceElement.cpp
    M Source/WebCore/svg/SVGImageElement.cpp
    M Source/WebCore/svg/SVGMPathElement.cpp
    M Source/WebCore/svg/SVGPathElement.cpp
    M Source/WebCore/svg/SVGScriptElement.cpp
    M Source/WebCore/svg/SVGTRefElement.cpp
    M Source/WebCore/svg/SVGTextPathElement.cpp
    M Source/WebCore/svg/SVGTitleElement.cpp
    M Source/WebCore/svg/SVGUseElement.cpp
    M Source/WebCore/svg/animation/SVGSMILElement.cpp

  Log Message:
  -----------
  REGRESSION(r258464): SVG use element doesn't render if it references a subsequent element after a style resolution
https://bugs.webkit.org/show_bug.cgi?id=216363

Reviewed by Said Abou-Hallawa.

The bug was caused by SVGPathElement::insertedIntoAncestor and a few other insertedIntoAncestor functions
ignoring the value returned by SVGElement::insertedIntoAncestor requesting a post insertion callback,
and SVGMPathElement::didFinishInsertingNode not calling SVGMPathElement::didFinishInsertingNode,
which updates SVG elements referencing the element.

This PR fixes all insertedIntoAncestor functions in SVG to respect the value returned by super class'
insertedIntoAncestor but many of them don't have any consequences at the moment.

* LayoutTests/svg/dom/use-element-refers-subsequent-image-element-after-style-update-expected.svg: Added.
* LayoutTests/svg/dom/use-element-refers-subsequent-image-element-after-style-update.svg: Added.
* LayoutTests/svg/dom/use-element-refers-subsequent-path-element-after-style-update-expected.svg: Added.
* LayoutTests/svg/dom/use-element-refers-subsequent-path-element-after-style-update.svg: Added.
* Source/WebCore/svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::didFinishInsertingNode):
* Source/WebCore/svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::insertedIntoAncestor):
* Source/WebCore/svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::insertedIntoAncestor):
* Source/WebCore/svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::insertedIntoAncestor):
(WebCore::SVGMPathElement::didFinishInsertingNode):
* Source/WebCore/svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::insertedIntoAncestor):
* Source/WebCore/svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::insertedIntoAncestor):
* Source/WebCore/svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::insertedIntoAncestor):
(WebCore::SVGTRefElement::didFinishInsertingNode):
* Source/WebCore/svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::didFinishInsertingNode):
* Source/WebCore/svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedIntoAncestor):
* Source/WebCore/svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::insertedIntoAncestor):
(WebCore::SVGUseElement::didFinishInsertingNode):
* Source/WebCore/svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::didFinishInsertingNode):

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




More information about the webkit-changes mailing list