⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 238524 in webkit


Ignore:
Timestamp:
Nov 26, 2018, 2:48:08 PM (8 years ago)
Author:
rniwa@webkit.org
Message:

SVG use element inside a shadow tree cannot reference an element in the same tree
https://bugs.webkit.org/show_bug.cgi?id=174977
<rdar://problem/33665636>

Reviewed by Zalan Bujtas.

Source/WebCore:

Make fragment URL references used by SVGelements within a shadow tree to refer to other elements
in the same shadow tree. To do this, this patch makes targetElementFromIRIString take a TreeScope
instead of a Document, and updates its call sites.

This patch updates the most uses of targetElementFromIRIString except CSS cursor image, altGraph,
and glyphRef since the cursor image isn't really a SVG feature, and there aren't really real world
use cases in which altGraph and glyphRef are used within shadow trees.

Tests: fast/shadow-dom/svg-animate-href-change-in-shadow-tree.html

fast/shadow-dom/svg-animate-href-in-shadow-tree.html
fast/shadow-dom/svg-feimage-href-in-shadow-tree.html
fast/shadow-dom/svg-linear-gradient-href-in-shadow-tree.html
fast/shadow-dom/svg-mpath-href-change-in-shadow-tree.html
fast/shadow-dom/svg-mpath-href-in-shadow-tree.html
fast/shadow-dom/svg-radial-gradient-href-in-shadow-tree.html
fast/shadow-dom/svg-text-path-href-change-in-shadow-tree.html
fast/shadow-dom/svg-text-path-href-in-shadow-tree.html
fast/shadow-dom/svg-thref-href-change-in-shadow-tree.html
fast/shadow-dom/svg-thref-href-in-shadow-tree.html
fast/shadow-dom/svg-use-href-change-in-shadow-tree.html
fast/shadow-dom/svg-use-href-in-shadow-tree.html

  • accessibility/AccessibilitySVGElement.cpp:

(WebCore::AccessibilitySVGElement::targetForUseElement const):

  • css/CSSCursorImageValue.cpp:
  • rendering/svg/RenderSVGTextPath.cpp:

(WebCore::RenderSVGTextPath::layoutPath const):

  • svg/SVGAltGlyphElement.cpp:

(WebCore::SVGAltGlyphElement::hasValidGlyphElements const):

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::buildPendingResource):
(WebCore::SVGFEImageElement::build):

  • svg/SVGGlyphRefElement.cpp:

(WebCore::SVGGlyphRefElement::hasValidGlyphElement const):

  • svg/SVGLinearGradientElement.cpp:

(WebCore::SVGLinearGradientElement::collectGradientAttributes):

  • svg/SVGMPathElement.cpp:

(WebCore::SVGMPathElement::buildPendingResource):
(WebCore::SVGMPathElement::pathElement):

  • svg/SVGRadialGradientElement.cpp:

(WebCore::SVGRadialGradientElement::collectGradientAttributes):

  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::buildPendingResource):

  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::buildPendingResource):

  • svg/SVGURIReference.cpp:

(WebCore::SVGURIReference::targetElementFromIRIString):

  • svg/SVGURIReference.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::updateShadowTree):
(WebCore::SVGUseElement::findTarget const):

  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::buildPendingResource):
(WebCore::SVGSMILElement::insertedIntoAncestor):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImage::FEImage):
(WebCore::FEImage::createWithIRIReference):
(WebCore::FEImage::referencedRenderer const):

  • svg/graphics/filters/SVGFEImage.h:

LayoutTests:

Added tests for specifying a fragment URL to refer to other elements within shadow trees.

This patch doesn't add a test for updating a fragment URL of linearGradient and radialGradient
since it doesn't work at all even outside shadow trees. See webkit.org/b/191934.

  • fast/shadow-dom/svg-animate-href-change-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-animate-href-change-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-animate-href-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-animate-href-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-feimage-href-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-feimage-href-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-linear-gradient-href-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-linear-gradient-href-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-mpath-href-change-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-mpath-href-change-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-mpath-href-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-mpath-href-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-radial-gradient-href-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-radial-gradient-href-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-text-path-href-change-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-text-path-href-change-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-text-path-href-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-text-path-href-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-thref-href-change-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-thref-href-change-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-thref-href-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-thref-href-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-use-href-change-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-use-href-change-in-shadow-tree.html: Added.
  • fast/shadow-dom/svg-use-href-in-shadow-tree-expected.html: Added.
  • fast/shadow-dom/svg-use-href-in-shadow-tree.html: Added.
Location:
trunk
Files:
26 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r238522 r238524  
     12018-11-24  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        SVG use element inside a shadow tree cannot reference an element in the same tree
     4        https://bugs.webkit.org/show_bug.cgi?id=174977
     5        <rdar://problem/33665636>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Added tests for specifying a fragment URL to refer to other elements within shadow trees.
     10
     11        This patch doesn't add a test for updating a fragment URL of linearGradient and radialGradient
     12        since it doesn't work at all even outside shadow trees. See webkit.org/b/191934.
     13
     14        * fast/shadow-dom/svg-animate-href-change-in-shadow-tree-expected.html: Added.
     15        * fast/shadow-dom/svg-animate-href-change-in-shadow-tree.html: Added.
     16        * fast/shadow-dom/svg-animate-href-in-shadow-tree-expected.html: Added.
     17        * fast/shadow-dom/svg-animate-href-in-shadow-tree.html: Added.
     18        * fast/shadow-dom/svg-feimage-href-in-shadow-tree-expected.html: Added.
     19        * fast/shadow-dom/svg-feimage-href-in-shadow-tree.html: Added.
     20        * fast/shadow-dom/svg-linear-gradient-href-in-shadow-tree-expected.html: Added.
     21        * fast/shadow-dom/svg-linear-gradient-href-in-shadow-tree.html: Added.
     22        * fast/shadow-dom/svg-mpath-href-change-in-shadow-tree-expected.html: Added.
     23        * fast/shadow-dom/svg-mpath-href-change-in-shadow-tree.html: Added.
     24        * fast/shadow-dom/svg-mpath-href-in-shadow-tree-expected.html: Added.
     25        * fast/shadow-dom/svg-mpath-href-in-shadow-tree.html: Added.
     26        * fast/shadow-dom/svg-radial-gradient-href-in-shadow-tree-expected.html: Added.
     27        * fast/shadow-dom/svg-radial-gradient-href-in-shadow-tree.html: Added.
     28        * fast/shadow-dom/svg-text-path-href-change-in-shadow-tree-expected.html: Added.
     29        * fast/shadow-dom/svg-text-path-href-change-in-shadow-tree.html: Added.
     30        * fast/shadow-dom/svg-text-path-href-in-shadow-tree-expected.html: Added.
     31        * fast/shadow-dom/svg-text-path-href-in-shadow-tree.html: Added.
     32        * fast/shadow-dom/svg-thref-href-change-in-shadow-tree-expected.html: Added.
     33        * fast/shadow-dom/svg-thref-href-change-in-shadow-tree.html: Added.
     34        * fast/shadow-dom/svg-thref-href-in-shadow-tree-expected.html: Added.
     35        * fast/shadow-dom/svg-thref-href-in-shadow-tree.html: Added.
     36        * fast/shadow-dom/svg-use-href-change-in-shadow-tree-expected.html: Added.
     37        * fast/shadow-dom/svg-use-href-change-in-shadow-tree.html: Added.
     38        * fast/shadow-dom/svg-use-href-in-shadow-tree-expected.html: Added.
     39        * fast/shadow-dom/svg-use-href-in-shadow-tree.html: Added.
     40
    1412018-11-26  Daniel Bates  <dabates@apple.com>
    242
  • trunk/Source/WebCore/ChangeLog

    r238523 r238524  
     12018-11-24  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        SVG use element inside a shadow tree cannot reference an element in the same tree
     4        https://bugs.webkit.org/show_bug.cgi?id=174977
     5        <rdar://problem/33665636>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Make fragment URL references used by SVGelements within a shadow tree to refer to other elements
     10        in the same shadow tree. To do this, this patch makes targetElementFromIRIString take a TreeScope
     11        instead of a Document, and updates its call sites.
     12
     13        This patch updates the most uses of targetElementFromIRIString except CSS cursor image, altGraph,
     14        and glyphRef since the cursor image isn't really a SVG feature, and there aren't really real world
     15        use cases in which altGraph and glyphRef are used within shadow trees.
     16
     17        Tests: fast/shadow-dom/svg-animate-href-change-in-shadow-tree.html
     18               fast/shadow-dom/svg-animate-href-in-shadow-tree.html
     19               fast/shadow-dom/svg-feimage-href-in-shadow-tree.html
     20               fast/shadow-dom/svg-linear-gradient-href-in-shadow-tree.html
     21               fast/shadow-dom/svg-mpath-href-change-in-shadow-tree.html
     22               fast/shadow-dom/svg-mpath-href-in-shadow-tree.html
     23               fast/shadow-dom/svg-radial-gradient-href-in-shadow-tree.html
     24               fast/shadow-dom/svg-text-path-href-change-in-shadow-tree.html
     25               fast/shadow-dom/svg-text-path-href-in-shadow-tree.html
     26               fast/shadow-dom/svg-thref-href-change-in-shadow-tree.html
     27               fast/shadow-dom/svg-thref-href-in-shadow-tree.html
     28               fast/shadow-dom/svg-use-href-change-in-shadow-tree.html
     29               fast/shadow-dom/svg-use-href-in-shadow-tree.html
     30
     31        * accessibility/AccessibilitySVGElement.cpp:
     32        (WebCore::AccessibilitySVGElement::targetForUseElement const):
     33        * css/CSSCursorImageValue.cpp:
     34        * rendering/svg/RenderSVGTextPath.cpp:
     35        (WebCore::RenderSVGTextPath::layoutPath const):
     36        * svg/SVGAltGlyphElement.cpp:
     37        (WebCore::SVGAltGlyphElement::hasValidGlyphElements const):
     38        * svg/SVGFEImageElement.cpp:
     39        (WebCore::SVGFEImageElement::buildPendingResource):
     40        (WebCore::SVGFEImageElement::build):
     41        * svg/SVGGlyphRefElement.cpp:
     42        (WebCore::SVGGlyphRefElement::hasValidGlyphElement const):
     43        * svg/SVGLinearGradientElement.cpp:
     44        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
     45        * svg/SVGMPathElement.cpp:
     46        (WebCore::SVGMPathElement::buildPendingResource):
     47        (WebCore::SVGMPathElement::pathElement):
     48        * svg/SVGRadialGradientElement.cpp:
     49        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
     50        * svg/SVGTRefElement.cpp:
     51        (WebCore::SVGTRefElement::buildPendingResource):
     52        * svg/SVGTextPathElement.cpp:
     53        (WebCore::SVGTextPathElement::buildPendingResource):
     54        * svg/SVGURIReference.cpp:
     55        (WebCore::SVGURIReference::targetElementFromIRIString):
     56        * svg/SVGURIReference.h:
     57        * svg/SVGUseElement.cpp:
     58        (WebCore::SVGUseElement::updateShadowTree):
     59        (WebCore::SVGUseElement::findTarget const):
     60        * svg/animation/SVGSMILElement.cpp:
     61        (WebCore::SVGSMILElement::buildPendingResource):
     62        (WebCore::SVGSMILElement::insertedIntoAncestor):
     63        * svg/graphics/filters/SVGFEImage.cpp:
     64        (WebCore::FEImage::FEImage):
     65        (WebCore::FEImage::createWithIRIReference):
     66        (WebCore::FEImage::referencedRenderer const):
     67        * svg/graphics/filters/SVGFEImage.h:
     68
    1692018-11-26  Truitt Savell  <tsavell@apple.com>
    270
  • trunk/Source/WebCore/accessibility/AccessibilitySVGElement.cpp

    r238452 r238524  
    6666        href = getAttribute(HTMLNames::hrefAttr);
    6767
    68     auto target = SVGURIReference::targetElementFromIRIString(href, use.document());
     68    auto target = SVGURIReference::targetElementFromIRIString(href, use.treeScope());
    6969    if (!target.element)
    7070        return nullptr;
  • trunk/Source/WebCore/css/CSSCursorImageValue.cpp

    r238452 r238524  
    6565}
    6666
     67// FIXME: Should this function take a TreeScope instead?
    6768SVGCursorElement* CSSCursorImageValue::updateCursorElement(const Document& document)
    6869{
  • trunk/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp

    r238452 r238524  
    4747Path RenderSVGTextPath::layoutPath() const
    4848{
    49     auto target = SVGURIReference::targetElementFromIRIString(textPathElement().href(), document());
     49    auto target = SVGURIReference::targetElementFromIRIString(textPathElement().href(), textPathElement().treeScope());
    5050    if (!is<SVGPathElement>(target.element))
    5151        return Path();
  • trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp

    r238452 r238524  
    8282bool SVGAltGlyphElement::hasValidGlyphElements(Vector<String>& glyphNames) const
    8383{
     84    // No need to support altGlyph referencing another node inside a shadow tree.
    8485    auto target = targetElementFromIRIString(getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr), document());
    8586
  • trunk/Source/WebCore/svg/SVGFEImageElement.cpp

    r238452 r238524  
    9595        return;
    9696
    97     auto target = SVGURIReference::targetElementFromIRIString(href(), document());
     97    auto target = SVGURIReference::targetElementFromIRIString(href(), treeScope());
    9898    if (!target.element) {
    9999        if (target.identifier.isEmpty())
     
    190190    if (m_cachedImage)
    191191        return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(renderer()), preserveAspectRatio());
    192     return FEImage::createWithIRIReference(filter, document(), href(), preserveAspectRatio());
     192    return FEImage::createWithIRIReference(filter, treeScope(), href(), preserveAspectRatio());
    193193}
    194194
  • trunk/Source/WebCore/svg/SVGGlyphRefElement.cpp

    r238452 r238524  
    5151    // FIXME: We only support xlink:href so far.
    5252    // https://bugs.webkit.org/show_bug.cgi?id=64787
     53    // No need to support glyphRef referencing another node inside a shadow tree.
    5354    auto target = targetElementFromIRIString(getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr), document());
    5455    glyphName = target.identifier;
  • trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp

    r238452 r238524  
    150150    while (true) {
    151151        // Respect xlink:href, take attributes from referenced element
    152         auto target = SVGURIReference::targetElementFromIRIString(current->href(), document());
     152        auto target = SVGURIReference::targetElementFromIRIString(current->href(), treeScope());
    153153        if (is<SVGGradientElement>(target.element)) {
    154154            current = downcast<SVGGradientElement>(*target.element);
  • trunk/Source/WebCore/svg/SVGMPathElement.cpp

    r238452 r238524  
    5656        return;
    5757
    58     auto target = SVGURIReference::targetElementFromIRIString(href(), document());
     58    auto target = SVGURIReference::targetElementFromIRIString(href(), treeScope());
    5959    if (!target.element) {
    6060        // Do not register as pending if we are already pending this resource.
     
    122122RefPtr<SVGPathElement> SVGMPathElement::pathElement()
    123123{
    124     auto target = targetElementFromIRIString(href(), document());
     124    auto target = targetElementFromIRIString(href(), treeScope());
    125125    if (is<SVGPathElement>(target.element))
    126126        return downcast<SVGPathElement>(target.element.get());
  • trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp

    r238452 r238524  
    162162    while (true) {
    163163        // Respect xlink:href, take attributes from referenced element
    164         auto target = SVGURIReference::targetElementFromIRIString(current->href(), document());
     164        auto target = SVGURIReference::targetElementFromIRIString(current->href(), treeScope());
    165165        if (is<SVGGradientElement>(target.element)) {
    166166            current = downcast<SVGGradientElement>(target.element.get());
  • trunk/Source/WebCore/svg/SVGTRefElement.cpp

    r238452 r238524  
    231231        return;
    232232
    233     auto target = SVGURIReference::targetElementFromIRIString(href(), document());
     233    auto target = SVGURIReference::targetElementFromIRIString(href(), treeScope());
    234234    if (!target.element) {
    235235        if (target.identifier.isEmpty())
  • trunk/Source/WebCore/svg/SVGTextPathElement.cpp

    r238464 r238524  
    144144        return;
    145145
    146     auto target = SVGURIReference::targetElementFromIRIString(href(), document());
     146    auto target = SVGURIReference::targetElementFromIRIString(href(), treeScope());
    147147    if (!target.element) {
    148148        // Do not register as pending if we are already pending this resource.
  • trunk/Source/WebCore/svg/SVGURIReference.cpp

    r238452 r238524  
    8888}
    8989
    90 auto SVGURIReference::targetElementFromIRIString(const String& iri, const Document& document, RefPtr<Document> externalDocument) -> TargetElementResult
     90auto SVGURIReference::targetElementFromIRIString(const String& iri, const TreeScope& treeScope, RefPtr<Document> externalDocument) -> TargetElementResult
    9191{
    9292    // If there's no fragment identifier contained within the IRI string, we can't lookup an element.
     
    100100        return { };
    101101
     102    auto& document = treeScope.documentScope();
    102103    auto url = document.completeURL(iri);
    103104    if (externalDocument) {
     
    111112        return { nullptr, WTFMove(id) };
    112113
    113     return { document.getElementById(id), WTFMove(id) };
     114    return { treeScope.getElementById(id), WTFMove(id) };
    114115}
    115116
  • trunk/Source/WebCore/svg/SVGURIReference.h

    r238452 r238524  
    4747        String identifier;
    4848    };
    49     static TargetElementResult targetElementFromIRIString(const String&, const Document&, RefPtr<Document> externalDocument = nullptr);
     49    static TargetElementResult targetElementFromIRIString(const String&, const TreeScope&, RefPtr<Document> externalDocument = nullptr);
    5050
    5151    static bool isExternalURIReference(const String& uri, const Document& document)
  • trunk/Source/WebCore/svg/SVGUseElement.cpp

    r238452 r238524  
    238238    document().removeSVGUseElement(*this);
    239239
    240     // FIXME: Enable SVG use elements in shadow trees.
    241     if (isInShadowTree())
    242         return;
    243 
    244240    String targetID;
    245241    auto* target = findTarget(&targetID);
     
    411407    auto& original = correspondingElement ? downcast<SVGUseElement>(*correspondingElement) : *this;
    412408
    413     auto targetResult = targetElementFromIRIString(original.href(), original.document(), original.externalDocument());
     409    auto targetResult = targetElementFromIRIString(original.href(), original.treeScope(), original.externalDocument());
    414410    if (targetID) {
    415411        *targetID = WTFMove(targetResult.identifier);
  • trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp

    r238452 r238524  
    4141#include "SVGSVGElement.h"
    4242#include "SVGURIReference.h"
     43#include "SVGUseElement.h"
    4344#include "XLinkNames.h"
    4445#include <wtf/IsoMallocInlines.h>
     
    185186        target = parentElement();
    186187    else {
    187         auto result = SVGURIReference::targetElementFromIRIString(href.string(), document());
     188        auto result = SVGURIReference::targetElementFromIRIString(href.string(), treeScope());
    188189        target = WTFMove(result.element);
    189190        id = WTFMove(result.identifier);
     
    266267
    267268    // Verify we are not in <use> instance tree.
    268     ASSERT(!isInShadowTree());
     269    ASSERT(!isInShadowTree() || !is<SVGUseElement>(shadowHost()));
    269270
    270271    updateAttributeName();
  • trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp

    r238452 r238524  
    3939    : FilterEffect(filter)
    4040    , m_image(image)
    41     , m_document(nullptr)
    4241    , m_preserveAspectRatio(preserveAspectRatio)
    4342{
    4443}
    4544
    46 FEImage::FEImage(Filter& filter, Document& document, const String& href, const SVGPreserveAspectRatioValue& preserveAspectRatio)
     45FEImage::FEImage(Filter& filter, TreeScope& treeScope, const String& href, const SVGPreserveAspectRatioValue& preserveAspectRatio)
    4746    : FilterEffect(filter)
    48     , m_document(&document)
     47    , m_treeScope(&treeScope)
    4948    , m_href(href)
    5049    , m_preserveAspectRatio(preserveAspectRatio)
     
    5756}
    5857
    59 Ref<FEImage> FEImage::createWithIRIReference(Filter& filter, Document& document, const String& href, const SVGPreserveAspectRatioValue& preserveAspectRatio)
     58Ref<FEImage> FEImage::createWithIRIReference(Filter& filter, TreeScope& treeScope, const String& href, const SVGPreserveAspectRatioValue& preserveAspectRatio)
    6059{
    61     return adoptRef(*new FEImage(filter, document, href, preserveAspectRatio));
     60    return adoptRef(*new FEImage(filter, treeScope, href, preserveAspectRatio));
    6261}
    6362
     
    8180RenderElement* FEImage::referencedRenderer() const
    8281{
    83     if (!m_document)
     82    if (!m_treeScope)
    8483        return nullptr;
    85     auto target = SVGURIReference::targetElementFromIRIString(m_href, *m_document);
     84    auto target = SVGURIReference::targetElementFromIRIString(m_href, *m_treeScope);
    8685    if (!is<SVGElement>(target.element))
    8786        return nullptr;
  • trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h

    r225366 r238524  
    3535public:
    3636    static Ref<FEImage> createWithImage(Filter&, RefPtr<Image>, const SVGPreserveAspectRatioValue&);
    37     static Ref<FEImage> createWithIRIReference(Filter&, Document&, const String&, const SVGPreserveAspectRatioValue&);
     37    static Ref<FEImage> createWithIRIReference(Filter&, TreeScope&, const String&, const SVGPreserveAspectRatioValue&);
    3838
    3939private:
    4040    virtual ~FEImage() = default;
    4141    FEImage(Filter&, RefPtr<Image>, const SVGPreserveAspectRatioValue&);
    42     FEImage(Filter&, Document&, const String&, const SVGPreserveAspectRatioValue&);
     42    FEImage(Filter&, TreeScope&, const String&, const SVGPreserveAspectRatioValue&);
    4343
    4444    const char* filterName() const final { return "FEImage"; }
     
    5454    RefPtr<Image> m_image;
    5555
    56     // m_document will never be a dangling reference. See https://bugs.webkit.org/show_bug.cgi?id=99243
    57     Document* m_document;
     56    // m_treeScope will never be a dangling reference. See https://bugs.webkit.org/show_bug.cgi?id=99243
     57    TreeScope* m_treeScope { nullptr };
    5858    String m_href;
    5959    SVGPreserveAspectRatioValue m_preserveAspectRatio;
Note: See TracChangeset for help on using the changeset viewer.