From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/css/CSSCursorImageValue.h | 41 +++++++++++--------------------- 1 file changed, 14 insertions(+), 27 deletions(-) (limited to 'Source/WebCore/css/CSSCursorImageValue.h') diff --git a/Source/WebCore/css/CSSCursorImageValue.h b/Source/WebCore/css/CSSCursorImageValue.h index b1c6d1dee..d2da62df2 100644 --- a/Source/WebCore/css/CSSCursorImageValue.h +++ b/Source/WebCore/css/CSSCursorImageValue.h @@ -18,8 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#ifndef CSSCursorImageValue_h -#define CSSCursorImageValue_h +#pragma once #include "CSSImageValue.h" #include "IntPoint.h" @@ -29,13 +28,14 @@ namespace WebCore { class Document; class Element; +class SVGCursorElement; class SVGElement; -class CSSCursorImageValue : public CSSValue { +class CSSCursorImageValue final : public CSSValue { public: - static PassRef create(PassRef imageValue, bool hasHotSpot, const IntPoint& hotSpot) + static Ref create(Ref&& imageValue, bool hasHotSpot, const IntPoint& hotSpot) { - return adoptRef(*new CSSCursorImageValue(std::move(imageValue), hasHotSpot, hotSpot)); + return adoptRef(*new CSSCursorImageValue(WTFMove(imageValue), hasHotSpot, hotSpot)); } ~CSSCursorImageValue(); @@ -51,41 +51,28 @@ public: String customCSSText() const; - bool updateIfSVGCursorIsUsed(Element*); - StyleImage* cachedImage(CachedResourceLoader*); - StyleImage* cachedOrPendingImage(Document&); + std::pair loadImage(CachedResourceLoader&, const ResourceLoaderOptions&); -#if ENABLE(SVG) void removeReferencedElement(SVGElement*); -#endif bool equals(const CSSCursorImageValue&) const; -private: - CSSCursorImageValue(PassRef imageValue, bool hasHotSpot, const IntPoint& hotSpot); + void cursorElementRemoved(SVGCursorElement&); + void cursorElementChanged(SVGCursorElement&); - void detachPendingImage(); +private: + CSSCursorImageValue(Ref&& imageValue, bool hasHotSpot, const IntPoint& hotSpot); -#if ENABLE(SVG) - bool isSVGCursor() const; - String cachedImageURL(); - void clearCachedImage(); -#endif + SVGCursorElement* updateCursorElement(const Document&); + URL m_originalURL; Ref m_imageValue; bool m_hasHotSpot; IntPoint m_hotSpot; - RefPtr m_image; - bool m_accessedImage; - -#if ENABLE(SVG) - HashSet m_referencedElements; -#endif + HashSet m_cursorElements; }; -CSS_VALUE_TYPE_CASTS(CSSCursorImageValue, isCursorImageValue()) - } // namespace WebCore -#endif // CSSCursorImageValue_h +SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSCursorImageValue, isCursorImageValue()) -- cgit v1.2.1