Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REGRESSION(r258464): SVG use element doesn't render if it references a subsequent element after a style resolution #13857

Merged
merged 1 commit into from May 15, 2023

Commits on May 15, 2023

  1. 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
    rniwa committed May 15, 2023
    Copy the full SHA
    a6a7aa5 View commit details
    Browse the repository at this point in the history