summaryrefslogtreecommitdiff
path: root/Source/WebCore/loader/cache/CachedSVGDocument.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/loader/cache/CachedSVGDocument.h')
-rw-r--r--Source/WebCore/loader/cache/CachedSVGDocument.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/Source/WebCore/loader/cache/CachedSVGDocument.h b/Source/WebCore/loader/cache/CachedSVGDocument.h
index d6a6f5d4e..7981f1de0 100644
--- a/Source/WebCore/loader/cache/CachedSVGDocument.h
+++ b/Source/WebCore/loader/cache/CachedSVGDocument.h
@@ -20,10 +20,8 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef CachedSVGDocument_h
-#define CachedSVGDocument_h
+#pragma once
-#if ENABLE(SVG)
#include "CachedResource.h"
#include "CachedResourceHandle.h"
#include "SVGDocument.h"
@@ -33,24 +31,22 @@ namespace WebCore {
class CachedSVGDocument final : public CachedResource {
public:
- explicit CachedSVGDocument(const ResourceRequest&);
+ explicit CachedSVGDocument(CachedResourceRequest&&, SessionID);
virtual ~CachedSVGDocument();
SVGDocument* document() const { return m_document.get(); }
-protected:
+private:
+ bool mayTryReplaceEncodedData() const override { return true; }
+ void setEncoding(const String&) override;
+ String encoding() const override;
+ const TextResourceDecoder* textResourceDecoder() const override { return m_decoder.get(); }
+ void finishLoading(SharedBuffer*) override;
+
RefPtr<SVGDocument> m_document;
RefPtr<TextResourceDecoder> m_decoder;
-
-private:
- virtual bool mayTryReplaceEncodedData() const override { return true; }
- virtual void setEncoding(const String&) override;
- virtual String encoding() const override;
- virtual void finishLoading(ResourceBuffer*) override;
};
} // namespace WebCore
-#endif // USE(SVG)
-
-#endif // CachedSVGDocument_h
+SPECIALIZE_TYPE_TRAITS_CACHED_RESOURCE(CachedSVGDocument, CachedResource::SVGDocumentResource)