| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2006 Rob Buis <buis@kde.org> |
| 3 * Copyright (C) 2008 Apple Inc. All right reserved. | 3 * Copyright (C) 2008 Apple Inc. All right reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "platform/geometry/IntPoint.h" | 25 #include "platform/geometry/IntPoint.h" |
| 26 #include "wtf/HashSet.h" | 26 #include "wtf/HashSet.h" |
| 27 | 27 |
| 28 namespace blink { | 28 namespace blink { |
| 29 | 29 |
| 30 class Element; | 30 class Element; |
| 31 class SVGElement; | 31 class SVGElement; |
| 32 | 32 |
| 33 class CSSCursorImageValue : public CSSValue { | 33 class CSSCursorImageValue : public CSSValue { |
| 34 public: | 34 public: |
| 35 static PassRefPtrWillBeRawPtr<CSSCursorImageValue> create(PassRefPtrWillBeRa
wPtr<CSSValue> imageValue, bool hotSpotSpecified, const IntPoint& hotSpot) | 35 static PassRefPtr<CSSCursorImageValue> create(PassRefPtr<CSSValue> imageValu
e, bool hotSpotSpecified, const IntPoint& hotSpot) |
| 36 { | 36 { |
| 37 return adoptRefWillBeNoop(new CSSCursorImageValue(imageValue, hotSpotSpe
cified, hotSpot)); | 37 return adoptRef(new CSSCursorImageValue(imageValue, hotSpotSpecified, ho
tSpot)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 ~CSSCursorImageValue(); | 40 ~CSSCursorImageValue(); |
| 41 | 41 |
| 42 bool hotSpotSpecified() const { return m_hotSpotSpecified; } | 42 bool hotSpotSpecified() const { return m_hotSpotSpecified; } |
| 43 | 43 |
| 44 IntPoint hotSpot() const { return m_hotSpot; } | 44 IntPoint hotSpot() const { return m_hotSpot; } |
| 45 | 45 |
| 46 String customCSSText() const; | 46 String customCSSText() const; |
| 47 | 47 |
| 48 bool updateIfSVGCursorIsUsed(Element*); | 48 bool updateIfSVGCursorIsUsed(Element*); |
| 49 StyleImage* cachedImage(Document*, float deviceScaleFactor); | 49 StyleImage* cachedImage(Document*, float deviceScaleFactor); |
| 50 StyleImage* cachedOrPendingImage(float deviceScaleFactor); | 50 StyleImage* cachedOrPendingImage(float deviceScaleFactor); |
| 51 | 51 |
| 52 #if !ENABLE(OILPAN) | 52 #if !ENABLE(OILPAN) |
| 53 void removeReferencedElement(SVGElement*); | 53 void removeReferencedElement(SVGElement*); |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 bool equals(const CSSCursorImageValue&) const; | 56 bool equals(const CSSCursorImageValue&) const; |
| 57 | 57 |
| 58 DECLARE_TRACE_AFTER_DISPATCH(); | |
| 59 | |
| 60 private: | 58 private: |
| 61 CSSCursorImageValue(PassRefPtrWillBeRawPtr<CSSValue> imageValue, bool hotSpo
tSpecified, const IntPoint& hotSpot); | 59 CSSCursorImageValue(PassRefPtr<CSSValue> imageValue, bool hotSpotSpecified,
const IntPoint& hotSpot); |
| 62 | 60 |
| 63 bool isSVGCursor() const; | 61 bool isSVGCursor() const; |
| 64 String cachedImageURL(); | 62 String cachedImageURL(); |
| 65 void clearImageResource(); | 63 void clearImageResource(); |
| 66 | 64 |
| 67 RefPtrWillBeMember<CSSValue> m_imageValue; | 65 RefPtr<CSSValue> m_imageValue; |
| 68 | 66 |
| 69 bool m_hotSpotSpecified; | 67 bool m_hotSpotSpecified; |
| 70 IntPoint m_hotSpot; | 68 IntPoint m_hotSpot; |
| 71 RefPtrWillBeMember<StyleImage> m_image; | 69 RefPtrWillBePersistent<StyleImage> m_image; |
| 72 bool m_accessedImage; | 70 bool m_accessedImage; |
| 73 | 71 |
| 74 #if !ENABLE(OILPAN) | 72 #if !ENABLE(OILPAN) |
| 75 HashSet<SVGElement*> m_referencedElements; | 73 HashSet<SVGElement*> m_referencedElements; |
| 76 #endif | 74 #endif |
| 77 }; | 75 }; |
| 78 | 76 |
| 79 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCursorImageValue, isCursorImageValue()); | 77 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCursorImageValue, isCursorImageValue()); |
| 80 | 78 |
| 81 } // namespace blink | 79 } // namespace blink |
| 82 | 80 |
| 83 #endif // CSSCursorImageValue_h | 81 #endif // CSSCursorImageValue_h |
| OLD | NEW |