| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #define CursorData_h | 26 #define CursorData_h |
| 27 | 27 |
| 28 #include "core/style/StyleImage.h" | 28 #include "core/style/StyleImage.h" |
| 29 #include "platform/geometry/IntPoint.h" | 29 #include "platform/geometry/IntPoint.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 class CursorData { | 33 class CursorData { |
| 34 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 34 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 35 public: | 35 public: |
| 36 CursorData(PassRefPtrWillBeRawPtr<StyleImage> image, bool hotSpotSpecified,
const IntPoint& hotSpot) | 36 CursorData(RawPtr<StyleImage> image, bool hotSpotSpecified, const IntPoint&
hotSpot) |
| 37 : m_image(image) | 37 : m_image(image) |
| 38 , m_hotSpotSpecified(hotSpotSpecified) | 38 , m_hotSpotSpecified(hotSpotSpecified) |
| 39 , m_hotSpot(hotSpot) | 39 , m_hotSpot(hotSpot) |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool operator==(const CursorData& o) const | 43 bool operator==(const CursorData& o) const |
| 44 { | 44 { |
| 45 return m_hotSpot == o.m_hotSpot && m_image == o.m_image; | 45 return m_hotSpot == o.m_hotSpot && m_image == o.m_image; |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool operator!=(const CursorData& o) const | 48 bool operator!=(const CursorData& o) const |
| 49 { | 49 { |
| 50 return !(*this == o); | 50 return !(*this == o); |
| 51 } | 51 } |
| 52 | 52 |
| 53 StyleImage* image() const { return m_image.get(); } | 53 StyleImage* image() const { return m_image.get(); } |
| 54 void setImage(PassRefPtrWillBeRawPtr<StyleImage> image) { m_image = image; } | 54 void setImage(RawPtr<StyleImage> image) { m_image = image; } |
| 55 | 55 |
| 56 bool hotSpotSpecified() const { return m_hotSpotSpecified; } | 56 bool hotSpotSpecified() const { return m_hotSpotSpecified; } |
| 57 | 57 |
| 58 // Hot spot in the image in logical pixels. | 58 // Hot spot in the image in logical pixels. |
| 59 const IntPoint& hotSpot() const { return m_hotSpot; } | 59 const IntPoint& hotSpot() const { return m_hotSpot; } |
| 60 | 60 |
| 61 DEFINE_INLINE_TRACE() | 61 DEFINE_INLINE_TRACE() |
| 62 { | 62 { |
| 63 visitor->trace(m_image); | 63 visitor->trace(m_image); |
| 64 } | 64 } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 RefPtrWillBeMember<StyleImage> m_image; | 67 Member<StyleImage> m_image; |
| 68 bool m_hotSpotSpecified; | 68 bool m_hotSpotSpecified; |
| 69 IntPoint m_hotSpot; // for CSS3 support | 69 IntPoint m_hotSpot; // for CSS3 support |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace blink | 72 } // namespace blink |
| 73 | 73 |
| 74 WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(blink::CursorData); | 74 WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(blink::CursorData); |
| 75 | 75 |
| 76 #endif // CursorData_h | 76 #endif // CursorData_h |
| OLD | NEW |