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 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual WrappedImagePtr data() const = 0; | 66 virtual WrappedImagePtr data() const = 0; |
67 virtual float imageScaleFactor() const { return 1; } | 67 virtual float imageScaleFactor() const { return 1; } |
68 virtual bool knownToBeOpaque(const RenderObject*) const = 0; | 68 virtual bool knownToBeOpaque(const RenderObject*) const = 0; |
69 virtual CachedImage* cachedImage() const { return 0; } | 69 virtual CachedImage* cachedImage() const { return 0; } |
70 | 70 |
71 ALWAYS_INLINE bool isCachedImage() const { return m_isCachedImage; } | 71 ALWAYS_INLINE bool isCachedImage() const { return m_isCachedImage; } |
72 ALWAYS_INLINE bool isPendingImage() const { return m_isPendingImage; } | 72 ALWAYS_INLINE bool isPendingImage() const { return m_isPendingImage; } |
73 ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; } | 73 ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; } |
74 ALWAYS_INLINE bool isCachedImageSet() const { return m_isCachedImageSet; } | 74 ALWAYS_INLINE bool isCachedImageSet() const { return m_isCachedImageSet; } |
75 | 75 |
76 static bool imagesEquivalent(StyleImage* image1, StyleImage* image2) | 76 static bool imagesEquivalent(const StyleImage* image1, const StyleImage* ima
ge2) |
77 { | 77 { |
78 if (image1 != image2) { | 78 if (image1 != image2) { |
79 if (!image1 || !image2) | 79 if (!image1 || !image2) |
80 return false; | 80 return false; |
81 return *image1 == *image2; | 81 return *image1 == *image2; |
82 } | 82 } |
83 return true; | 83 return true; |
84 } | 84 } |
85 | 85 |
86 protected: | 86 protected: |
87 StyleImage() | 87 StyleImage() |
88 : m_isCachedImage(false) | 88 : m_isCachedImage(false) |
89 , m_isPendingImage(false) | 89 , m_isPendingImage(false) |
90 , m_isGeneratedImage(false) | 90 , m_isGeneratedImage(false) |
91 , m_isCachedImageSet(false) | 91 , m_isCachedImageSet(false) |
92 { | 92 { |
93 } | 93 } |
94 bool m_isCachedImage:1; | 94 bool m_isCachedImage:1; |
95 bool m_isPendingImage:1; | 95 bool m_isPendingImage:1; |
96 bool m_isGeneratedImage:1; | 96 bool m_isGeneratedImage:1; |
97 bool m_isCachedImageSet:1; | 97 bool m_isCachedImageSet:1; |
98 }; | 98 }; |
99 | 99 |
100 } | 100 } |
101 #endif | 101 #endif |
OLD | NEW |