Changeset 179626 in webkit


Ignore:
Timestamp:
Feb 4, 2015 12:55:21 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

When using SVG as an image, we should load datauri images when these images are not in the image cache.
https://bugs.webkit.org/show_bug.cgi?id=99677.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-02-04
Reviewed by Darin Adler.
Source/WebCore:

Data URI sub-resources are not loaded because the networking context of FrameLoader
attached to the SubResourceLoader is set to null. This is done intentionally to
disallow any resource from loading external sub-resources. For example if an <img>
tag has its 'src' attribute points to an svg file, this svg is not allowed to load
an external image through the 'xlink' attribute of an <image> element. This restriction
is not valid if the value of the 'xlink' attribute is a data URI. In this case the image
should be loaded into memory since there is no network traffic involved. All we need
to do is to decode the data part of the URI.

The fix is to pass the root FrameLoader, which has a valid NetworkingContext, through
the FrameLoaderClient, to the ResourceHandle::create() which uses the NetworkingContext
to decode the data and fire the load events of the data URI resources.

Tests: svg/as-image/svg-image-with-data-uri-background.html

svg/as-image/svg-image-with-data-uri-from-canvas.html
svg/as-image/svg-image-with-data-uri-images-disabled.html
svg/as-image/svg-image-with-data-uri-reloading.html
svg/as-image/svg-image-with-data-uri-use-data-uri.svg
svg/as-image/svg-image-with-svg-data-uri.html

  • accessibility/AccessibilityRenderObject.cpp:

Remove unreferenced header file.

  • loader/FrameLoaderClient.h:

Define the null virtual function dataProtocolLoader() which should return the FrameLoader
for loading data URI resources.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::dataProtocolFrameLoader):

  • loader/ResourceLoader.h:

Add ResourceLoader::dataProtocolFrameLoader() which returns the root FrameLoader. The
root FrameLoader is used to get a valid NetworkingContext which can be passed to
ResourceHandle::create() when url().protocolIsData().

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::load):
(WebCore::CachedImage::finishLoading):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::shouldPerformImageLoad):
(WebCore::CachedResourceLoader::shouldDeferImageLoad):

  • loader/cache/CachedResourceLoader.h:

Allow loading data URI sub-resources as long as loading images is not disabled. Also we
need to call setDataProtocolLoader() before calling setData() for the isSVGImage case,
setData() will create a page by calling Page::createPageFromBuffer() via SVGImage::dataChanged(),
and we need to pass the correct FrameLoaderClient to the created FrameLoader of the main

frame of this page.

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::SVGImage):
(WebCore::SVGImage::dataChanged):

  • svg/graphics/SVGImage.h:

Create a new FrameLoaderClient of type SVGFrameLoaderClient and set it in pageConfiguration
which is used when creating the page from the SVG data URI.

  • WebCore.xcodeproj/project.pbxproj:
  • svg/graphics/SVGImageChromeClient.h: Removed.
  • svg/graphics/SVGImageClients.h: Added.

Add a new class SVGImageChromeClient which overrides the function dataProtocolLoader().
Rename the header file SVGImageChromeClient.h to be SVGImageClients.h since it now
includes the classes SVGImageChromeClient and SVGFrameLoaderClient.

LayoutTests:

  • svg/as-image/resources/image-with-nested-data-uri-images.svg: Added.

This SVG has a tree of depth = 5 of nested data URI images. All the data URI images are
SVG images expect the innermost one which is a png data URI image.

  • svg/as-image/resources/image-with-nested-rects.svg: Added.

This SVG produces the same drawing as image-with-nested-data-uri-images.svg does but
it uses <rect> SVG elements instead.

  • svg/as-image/svg-image-with-data-uri-background-expected.html: Added.
  • svg/as-image/svg-image-with-data-uri-background.html: Added.

Test the data URI SVG as a css background image.

  • svg/as-image/svg-image-with-data-uri-from-canvas-expected.html: Added.
  • svg/as-image/svg-image-with-data-uri-from-canvas.html: Added.

Test the data URI image when it is the result of drawing an SVG image on a canvas object.

  • svg/as-image/svg-image-with-data-uri-images-disabled-expected.html: Added.
  • svg/as-image/svg-image-with-data-uri-images-disabled.html: Added.

Ensure the data uri images are not loaded if imagesEnabled is turned off.

  • svg/as-image/svg-image-with-data-uri-reloading-expected.html: Added.
  • svg/as-image/svg-image-with-data-uri-reloading.html: Added.

Test the data URI SVG when reloading the page.

  • svg/as-image/svg-image-with-data-uri-use-data-uri-expected.svg: Added.
  • svg/as-image/svg-image-with-data-uri-use-data-uri.svg: Added.

Test the data URI image when it is referenced from an SVG <use> tag.

  • svg/as-image/svg-image-with-svg-data-uri-expected.html: Added.
  • svg/as-image/svg-image-with-svg-data-uri.html: Added.

Test the data URI image when it is referenced from an HTML <img> tag.

Location:
trunk
Files:
14 added
12 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r179625 r179626  
     12015-02-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        When using SVG as an image, we should load datauri images when these images are not in the image cache.
     4        https://bugs.webkit.org/show_bug.cgi?id=99677.
     5
     6        Reviewed by Darin Adler.
     7
     8        * svg/as-image/resources/image-with-nested-data-uri-images.svg: Added.
     9        This SVG has a tree of depth = 5 of nested data URI images. All the data URI images are
     10        SVG images expect the innermost one which is a png data URI image.
     11       
     12        * svg/as-image/resources/image-with-nested-rects.svg: Added.
     13        This SVG produces the same drawing as image-with-nested-data-uri-images.svg does but
     14        it uses <rect> SVG elements instead.
     15       
     16        * svg/as-image/svg-image-with-data-uri-background-expected.html: Added.
     17        * svg/as-image/svg-image-with-data-uri-background.html: Added.
     18        Test the data URI SVG as a css background image.
     19       
     20        * svg/as-image/svg-image-with-data-uri-from-canvas-expected.html: Added.
     21        * svg/as-image/svg-image-with-data-uri-from-canvas.html: Added.
     22        Test the data URI image when it is the result of drawing an SVG image on a canvas object.
     23       
     24        * svg/as-image/svg-image-with-data-uri-images-disabled-expected.html: Added.
     25        * svg/as-image/svg-image-with-data-uri-images-disabled.html: Added.
     26        Ensure the data uri images are not loaded if imagesEnabled is turned off.
     27       
     28        * svg/as-image/svg-image-with-data-uri-reloading-expected.html: Added.
     29        * svg/as-image/svg-image-with-data-uri-reloading.html: Added.
     30        Test the data URI SVG when reloading the page.
     31       
     32        * svg/as-image/svg-image-with-data-uri-use-data-uri-expected.svg: Added.
     33        * svg/as-image/svg-image-with-data-uri-use-data-uri.svg: Added.
     34        Test the data URI image when it is referenced from an SVG <use> tag.
     35       
     36        * svg/as-image/svg-image-with-svg-data-uri-expected.html: Added.
     37        * svg/as-image/svg-image-with-svg-data-uri.html: Added.
     38        Test the data URI image when it is referenced from an HTML <img> tag.
     39
    1402015-02-04  Zalan Bujtas  <zalan@apple.com>
    241
  • trunk/Source/WebCore/ChangeLog

    r179624 r179626  
     12015-02-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        When using SVG as an image, we should load datauri images when these images are not in the image cache.
     4        https://bugs.webkit.org/show_bug.cgi?id=99677.
     5
     6        Reviewed by Darin Adler.
     7       
     8        Data URI sub-resources are not loaded because the networking context of FrameLoader
     9        attached to the SubResourceLoader is set to null. This is done intentionally to
     10        disallow any resource from loading external sub-resources. For example if an <img>
     11        tag has its 'src' attribute points to an svg file, this svg is not allowed to load
     12        an external image through the 'xlink' attribute of an <image> element. This restriction
     13        is not valid if the value of the 'xlink' attribute is a data URI. In this case the image
     14        should be loaded into memory since there is no network traffic involved. All we need
     15        to do is to decode the data part of the URI.
     16       
     17        The fix is to pass the root FrameLoader, which has a valid NetworkingContext, through
     18        the FrameLoaderClient, to the ResourceHandle::create() which uses the NetworkingContext
     19        to decode the data and fire the load events of the data URI resources.
     20
     21        Tests:  svg/as-image/svg-image-with-data-uri-background.html
     22                svg/as-image/svg-image-with-data-uri-from-canvas.html
     23                svg/as-image/svg-image-with-data-uri-images-disabled.html
     24                svg/as-image/svg-image-with-data-uri-reloading.html
     25                svg/as-image/svg-image-with-data-uri-use-data-uri.svg
     26                svg/as-image/svg-image-with-svg-data-uri.html
     27
     28        * accessibility/AccessibilityRenderObject.cpp:
     29        Remove unreferenced header file.
     30
     31        * loader/FrameLoaderClient.h:
     32        Define the null virtual function dataProtocolLoader() which should return the FrameLoader
     33        for loading data URI resources.
     34
     35        * loader/ResourceLoader.cpp:
     36        (WebCore::ResourceLoader::start):
     37        (WebCore::ResourceLoader::dataProtocolFrameLoader):
     38        * loader/ResourceLoader.h:
     39        Add ResourceLoader::dataProtocolFrameLoader() which returns the root FrameLoader. The
     40        root FrameLoader is used to get a valid NetworkingContext which can be passed to
     41        ResourceHandle::create() when url().protocolIsData().
     42
     43        * loader/cache/CachedImage.cpp:
     44        (WebCore::CachedImage::load):
     45        (WebCore::CachedImage::finishLoading):
     46        * loader/cache/CachedResourceLoader.cpp:
     47        (WebCore::CachedResourceLoader::shouldPerformImageLoad):
     48        (WebCore::CachedResourceLoader::shouldDeferImageLoad):
     49        * loader/cache/CachedResourceLoader.h:
     50        Allow loading data URI sub-resources as long as loading images is not disabled. Also we
     51        need to call setDataProtocolLoader() before calling setData() for the isSVGImage case,
     52        setData() will create a page by calling Page::createPageFromBuffer() via SVGImage::dataChanged(),
     53        and we need to pass the correct FrameLoaderClient to the created FrameLoader of the main
     54         frame of this page.
     55
     56        * svg/graphics/SVGImage.cpp:
     57        (WebCore::SVGImage::SVGImage):
     58        (WebCore::SVGImage::dataChanged):
     59        * svg/graphics/SVGImage.h:
     60        Create a new FrameLoaderClient of type SVGFrameLoaderClient and set it in pageConfiguration
     61        which is used when creating the page from the SVG data URI.
     62
     63        * WebCore.xcodeproj/project.pbxproj:
     64        * svg/graphics/SVGImageChromeClient.h: Removed.
     65        * svg/graphics/SVGImageClients.h: Added.
     66        Add a new class SVGImageChromeClient which overrides the function dataProtocolLoader().
     67        Rename the header file SVGImageChromeClient.h to be SVGImageClients.h since it now
     68        includes the classes SVGImageChromeClient and SVGFrameLoaderClient.
     69
    1702015-02-04  Timothy Horton  <timothy_horton@apple.com>
    271
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r179534 r179626  
    43374337                AAA728F816D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AAA728F216D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm */; };
    43384338                AAA728F916D1D8BC00D3BBC6 /* AXObjectCacheIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AAA728F316D1D8BC00D3BBC6 /* AXObjectCacheIOS.mm */; };
    4339                 AAC08CEF15F933D600F1E188 /* SVGImageChromeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = AAC08CED15F933D600F1E188 /* SVGImageChromeClient.h */; };
    43404339                AAC08CF315F941FD00F1E188 /* AccessibilitySVGRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = AAC08CF115F941FC00F1E188 /* AccessibilitySVGRoot.h */; };
    43414340                AAF5B7B71524B6C50004CB49 /* WebSocketFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAF5B7B11524B4BD0004CB49 /* WebSocketFrame.cpp */; };
     
    92229221                550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    92239222                550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
     9223                55D408F71A7C631800C78450 /* SVGImageClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageClients.h; sourceTree = "<group>"; };
    92249224                57B7919F14C6A62900F202D1 /* ContentDistributor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentDistributor.cpp; sourceTree = "<group>"; };
    92259225                57B791A014C6A62900F202D1 /* ContentDistributor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentDistributor.h; sourceTree = "<group>"; };
     
    1158811588                AAA728F216D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebAccessibilityObjectWrapperIOS.mm; sourceTree = "<group>"; };
    1158911589                AAA728F316D1D8BC00D3BBC6 /* AXObjectCacheIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AXObjectCacheIOS.mm; sourceTree = "<group>"; };
    11590                 AAC08CED15F933D600F1E188 /* SVGImageChromeClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageChromeClient.h; sourceTree = "<group>"; };
    1159111590                AAC08CF015F941FC00F1E188 /* AccessibilitySVGRoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilitySVGRoot.cpp; sourceTree = "<group>"; };
    1159211591                AAC08CF115F941FC00F1E188 /* AccessibilitySVGRoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilitySVGRoot.h; sourceTree = "<group>"; };
     
    2037720376                                08F859D21463F9CD0067D933 /* SVGImageCache.cpp */,
    2037820377                                08F859D31463F9CD0067D933 /* SVGImageCache.h */,
    20379                                 AAC08CED15F933D600F1E188 /* SVGImageChromeClient.h */,
     20378                                55D408F71A7C631800C78450 /* SVGImageClients.h */,
    2038020379                                08F859D21463F9CD0067D934 /* SVGImageForContainer.cpp */,
    2038120380                                08F859D31463F9CD0067D934 /* SVGImageForContainer.h */,
     
    2634426343                                B25599A40D00D8BA00BB825C /* SVGImage.h in Headers */,
    2634526344                                08F859D51463F9CD0067D933 /* SVGImageCache.h in Headers */,
    26346                                 AAC08CEF15F933D600F1E188 /* SVGImageChromeClient.h in Headers */,
    2634726345                                B2227A2D0D00BF220071B782 /* SVGImageElement.h in Headers */,
    2634826346                                08F859D51463F9CD0067D934 /* SVGImageForContainer.h in Headers */,
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r179253 r179626  
    9797#include "SVGDocument.h"
    9898#include "SVGImage.h"
    99 #include "SVGImageChromeClient.h"
    10099#include "SVGNames.h"
    101100#include "SVGSVGElement.h"
  • trunk/Source/WebCore/loader/FrameLoaderClient.h

    r177941 r179626  
    333333        virtual bool isEmptyFrameLoaderClient() { return false; }
    334334
     335        virtual FrameLoader* dataProtocolLoader() const { return nullptr; }
     336
    335337#if USE(QUICK_LOOK)
    336338        virtual void didCreateQuickLookHandle(QuickLookHandle&) { }
  • trunk/Source/WebCore/loader/ResourceLoader.cpp

    r179533 r179626  
    162162    ASSERT(!m_request.isNull());
    163163    ASSERT(m_deferredRequest.isNull());
     164    ASSERT(frameLoader());
    164165
    165166#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
     
    176177    }
    177178
    178     if (!m_reachedTerminalState)
    179         m_handle = ResourceHandle::create(m_frame->loader().networkingContext(), m_request, this, m_defersLoading, m_options.sniffContent() == SniffContent);
     179    if (!m_reachedTerminalState) {
     180        FrameLoader& loader = m_request.url().protocolIsData() ? dataProtocolFrameLoader() : *frameLoader();
     181        m_handle = ResourceHandle::create(loader.networkingContext(), m_request, this, m_defersLoading, m_options.sniffContent() == SniffContent);
     182    }
    180183}
    181184
     
    199202        return 0;
    200203    return &m_frame->loader();
     204}
     205
     206// This function should only be called when frameLoader() is non-null.
     207FrameLoader& ResourceLoader::dataProtocolFrameLoader() const
     208{
     209    FrameLoader* loader = frameLoader();
     210    ASSERT(loader);
     211    FrameLoader* dataProtocolLoader = loader->client().dataProtocolLoader();
     212    return *(dataProtocolLoader ? dataProtocolLoader : loader);
    201213}
    202214
  • trunk/Source/WebCore/loader/ResourceLoader.h

    r176626 r179626  
    7272
    7373    WEBCORE_EXPORT FrameLoader* frameLoader() const;
     74    FrameLoader& dataProtocolFrameLoader() const;
    7475    DocumentLoader* documentLoader() const { return m_documentLoader.get(); }
    7576    WEBCORE_EXPORT const ResourceRequest& originalRequest() const { return m_originalRequest; }
  • trunk/Source/WebCore/loader/cache/CachedImage.cpp

    r179489 r179626  
    110110void CachedImage::load(CachedResourceLoader& cachedResourceLoader, const ResourceLoaderOptions& options)
    111111{
    112     if (cachedResourceLoader.autoLoadImages())
     112    if (cachedResourceLoader.shouldPerformImageLoad(resourceRequest().url()))
    113113        CachedResource::load(cachedResourceLoader, options);
    114114    else
     
    416416        createImage();
    417417
    418     if (m_image)
     418    if (m_image) {
     419        if (m_loader && m_image->isSVGImage())
     420            downcast<SVGImage>(*m_image).setDataProtocolLoader(&m_loader->dataProtocolFrameLoader());
    419421        m_image->setData(data, true);
     422    }
    420423
    421424    if (!m_image || m_image->isNull()) {
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp

    r179584 r179626  
    755755}
    756756
     757bool CachedResourceLoader::shouldPerformImageLoad(const URL& url) const
     758{
     759    return m_autoLoadImages || url.protocolIsData();
     760}
     761
    757762bool CachedResourceLoader::shouldDeferImageLoad(const URL& url) const
    758763{
    759     return clientDefersImage(url) || !m_autoLoadImages;
     764    return clientDefersImage(url) || !shouldPerformImageLoad(url);
    760765}
    761766
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.h

    r179421 r179626  
    105105
    106106    bool shouldDeferImageLoad(const URL&) const;
     107    bool shouldPerformImageLoad(const URL&) const;
    107108   
    108109    CachePolicy cachePolicy(CachedResource::Type) const;
  • trunk/Source/WebCore/svg/graphics/SVGImage.cpp

    r179335 r179626  
    3232#include "DocumentLoader.h"
    3333#include "ElementIterator.h"
     34#include "FrameLoader.h"
    3435#include "FrameView.h"
    3536#include "ImageBuffer.h"
     
    4243#include "SVGDocument.h"
    4344#include "SVGForeignObjectElement.h"
    44 #include "SVGImageChromeClient.h"
     45#include "SVGImageClients.h"
    4546#include "SVGSVGElement.h"
    4647#include "Settings.h"
     
    345346        m_chromeClient = std::make_unique<SVGImageChromeClient>(this);
    346347        pageConfiguration.chromeClient = m_chromeClient.get();
     348        m_loaderClient = std::make_unique<SVGFrameLoaderClient>(m_dataProtocolLoader);
     349        pageConfiguration.loaderClientForMainFrame = m_loaderClient.get();
     350
    347351        bool canHaveScrollbars = false; // SVG Images will always synthesize a viewBox, if it's not available, and thus never see scrollbars.
    348352        bool transparent = true; // SVG Images are transparent.
  • trunk/Source/WebCore/svg/graphics/SVGImage.h

    r174623 r179626  
    3434
    3535class Element;
     36class FrameLoader;
    3637class FrameView;
    3738class ImageBuffer;
     
    3940class RenderBox;
    4041class SVGSVGElement;
     42class SVGFrameLoaderClient;
    4143class SVGImageChromeClient;
    4244class SVGImageForContainer;
     
    5658
    5759    void setURL(const URL& url) { m_url = url; }
     60    void setDataProtocolLoader(FrameLoader* dataProtocolLoader) { m_dataProtocolLoader = dataProtocolLoader; }
    5861
    5962    virtual bool hasSingleSecurityOrigin() const override;
     
    99102    SVGSVGElement* rootElement() const;
    100103
     104    std::unique_ptr<SVGFrameLoaderClient> m_loaderClient;
    101105    std::unique_ptr<SVGImageChromeClient> m_chromeClient;
    102106    std::unique_ptr<Page> m_page;
    103107    FloatSize m_intrinsicSize;
    104108    URL m_url;
     109    FrameLoader* m_dataProtocolLoader { nullptr };
    105110};
    106111
  • trunk/Source/WebCore/svg/graphics/SVGImageClients.h

    r179625 r179626  
    11/*
    2  * Copyright (C) 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727 */
    2828
    29 #ifndef SVGImageChromeClient_h
    30 #define SVGImageChromeClient_h
     29#ifndef SVGImageClients_h
     30#define SVGImageClients_h
    3131
    3232#include "EmptyClients.h"
     
    3434namespace WebCore {
    3535
    36 class SVGImageChromeClient : public EmptyChromeClient {
     36class SVGImageChromeClient final : public EmptyChromeClient {
    3737    WTF_MAKE_NONCOPYABLE(SVGImageChromeClient); WTF_MAKE_FAST_ALLOCATED;
    3838public:
     
    4848    virtual void chromeDestroyed() override
    4949    {
    50         m_image = 0;
     50        m_image = nullptr;
    5151    }
    5252   
     
    6161};
    6262
    63 inline SVGImageChromeClient* toSVGImageChromeClient(ChromeClient* client)
    64 {
    65     ASSERT_WITH_SECURITY_IMPLICATION(!client || client->isSVGImageChromeClient());
    66     return static_cast<SVGImageChromeClient*>(client);
    67 }
    68    
     63class SVGFrameLoaderClient final : public EmptyFrameLoaderClient {
     64public:
     65    SVGFrameLoaderClient(FrameLoader* dataProtocolLoader)
     66        : m_dataProtocolLoader(dataProtocolLoader)
     67    {
     68    }
     69
     70    virtual FrameLoader* dataProtocolLoader() const override { return m_dataProtocolLoader; }
     71private:
     72    FrameLoader* m_dataProtocolLoader;
     73};
     74
    6975}
    7076
    71 #endif // SVGImageChromeClient_h
     77#endif // SVGImageClients_h
Note: See TracChangeset for help on using the changeset viewer.