OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2006 Rob Buis <buis@kde.org> |
3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 StyleFetchedImage* cachedImage = svgImageValue->cachedImage(load
er); | 137 StyleFetchedImage* cachedImage = svgImageValue->cachedImage(load
er); |
138 m_image = cachedImage; | 138 m_image = cachedImage; |
139 return cachedImage; | 139 return cachedImage; |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
143 if (m_imageValue->isImageValue()) | 143 if (m_imageValue->isImageValue()) |
144 m_image = toCSSImageValue(m_imageValue.get())->cachedImage(loader); | 144 m_image = toCSSImageValue(m_imageValue.get())->cachedImage(loader); |
145 } | 145 } |
146 | 146 |
147 if (m_image && m_image->isImageResource()) | 147 if (m_image && m_image->isImageResource()) { |
148 return toStyleFetchedImage(m_image); | 148 StyleFetchedImage* fetched = toStyleFetchedImage(m_image); |
| 149 ImageResource* resource = fetched->cachedImage(); |
| 150 if (resource) |
| 151 resource->setDeviceScaleFactor(deviceScaleFactor); |
| 152 return fetched; |
| 153 } |
149 return 0; | 154 return 0; |
150 } | 155 } |
151 | 156 |
152 StyleImage* CSSCursorImageValue::cachedOrPendingImage(float deviceScaleFactor) | 157 StyleImage* CSSCursorImageValue::cachedOrPendingImage(float deviceScaleFactor) |
153 { | 158 { |
154 // Need to delegate completely so that changes in device scale factor can be
handled appropriately. | 159 // Need to delegate completely so that changes in device scale factor can be
handled appropriately. |
155 if (m_imageValue->isImageSetValue()) | 160 if (m_imageValue->isImageSetValue()) |
156 return toCSSImageSetValue(m_imageValue.get())->cachedOrPendingImageSet(d
eviceScaleFactor); | 161 return toCSSImageSetValue(m_imageValue.get())->cachedOrPendingImageSet(d
eviceScaleFactor); |
157 | 162 |
158 if (!m_image) | 163 if (!m_image) |
(...skipping 30 matching lines...) Expand all Loading... |
189 m_referencedElements.remove(element); | 194 m_referencedElements.remove(element); |
190 } | 195 } |
191 | 196 |
192 bool CSSCursorImageValue::equals(const CSSCursorImageValue& other) const | 197 bool CSSCursorImageValue::equals(const CSSCursorImageValue& other) const |
193 { | 198 { |
194 return m_hasHotSpot ? other.m_hasHotSpot && m_hotSpot == other.m_hotSpot : !
other.m_hasHotSpot | 199 return m_hasHotSpot ? other.m_hasHotSpot && m_hotSpot == other.m_hotSpot : !
other.m_hasHotSpot |
195 && compareCSSValuePtr(m_imageValue, other.m_imageValue); | 200 && compareCSSValuePtr(m_imageValue, other.m_imageValue); |
196 } | 201 } |
197 | 202 |
198 } // namespace WebCore | 203 } // namespace WebCore |
OLD | NEW |