[Webkit-unassigned] [Bug 202791] New: SMIL animations of href / xlink:href of <image> have no visual effect

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 10 03:19:44 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=202791

            Bug ID: 202791
           Summary: SMIL animations of href / xlink:href of <image> have
                    no visual effect
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zimmermann at kde.org
                CC: zimmermann at kde.org

LayoutTests/svg/W3C-SVG-1.1/animate-elem-39-t.svg shows that SMIL animations of the <image> element href / xlink:href have no effect.

A quick investigation shows that imageSourceURL() is the culprit, since it simply returns getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr) -- which is equal to the serialized baseVal of the underlying SVGAnimatedString, never reflecting the animVal.

SVGURIReference::href() returns the right value, and also correctly handles href vs. xlink:href, since the baseVal is either reflecting href, or if xlink:href (if any of them is set).

The only issue is that imageSourceURL() returns a reference to a const AtomString, and thus we cannot simply return href().

A quick hack to fix SMIL animations on the aforementioned testcase is:

const AtomString& SVGImageElement::imageSourceURL() const
{   
    static NeverDestroyed<AtomString> tempAtom("tempAtom", AtomString::ConstructFromLiteral);
    AtomString& mutableAtom = tempAtom;
    mutableAtom = href();
    return tempAtom;
}

We either have to give up the "const AtomString&" return value, or add a new AtomString m_imageSourceURL member to SVGImageElement.
And obviously we need more test coverage!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191010/3562a3ae/attachment.html>


More information about the webkit-unassigned mailing list