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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 m_accessedImage = true; | 125 m_accessedImage = true; |
126 | 126 |
127 // For SVG images we need to lazily substitute in the correct URL. Rathe
r than attempt | 127 // For SVG images we need to lazily substitute in the correct URL. Rathe
r than attempt |
128 // to change the URL of the CSSImageValue (which would then change behav
ior like cssText), | 128 // to change the URL of the CSSImageValue (which would then change behav
ior like cssText), |
129 // we create an alternate CSSImageValue to use. | 129 // we create an alternate CSSImageValue to use. |
130 if (isSVGCursor() && loader && loader->document()) { | 130 if (isSVGCursor() && loader && loader->document()) { |
131 RefPtrWillBeRawPtr<CSSImageValue> imageValue = toCSSImageValue(m_ima
geValue.get()); | 131 RefPtrWillBeRawPtr<CSSImageValue> imageValue = toCSSImageValue(m_ima
geValue.get()); |
132 // FIXME: This will fail if the <cursor> element is in a shadow DOM
(bug 59827) | 132 // FIXME: This will fail if the <cursor> element is in a shadow DOM
(bug 59827) |
133 if (SVGCursorElement* cursorElement = resourceReferencedByCursorElem
ent(imageValue->url(), *loader->document())) { | 133 if (SVGCursorElement* cursorElement = resourceReferencedByCursorElem
ent(imageValue->url(), *loader->document())) { |
134 RefPtrWillBeRawPtr<CSSImageValue> svgImageValue = CSSImageValue:
:create(loader->document()->completeURL(cursorElement->href()->currentValue()->v
alue())); | 134 RefPtrWillBeRawPtr<CSSImageValue> svgImageValue = CSSImageValue:
:create(loader->document()->completeURL(cursorElement->href()->currentValue()->v
alue())); |
135 svgImageValue->setReferrer(imageValue->referrer()); | |
136 StyleFetchedImage* cachedImage = svgImageValue->cachedImage(load
er); | 135 StyleFetchedImage* cachedImage = svgImageValue->cachedImage(load
er); |
137 m_image = cachedImage; | 136 m_image = cachedImage; |
138 return cachedImage; | 137 return cachedImage; |
139 } | 138 } |
140 } | 139 } |
141 | 140 |
142 if (m_imageValue->isImageValue()) | 141 if (m_imageValue->isImageValue()) |
143 m_image = toCSSImageValue(m_imageValue.get())->cachedImage(loader); | 142 m_image = toCSSImageValue(m_imageValue.get())->cachedImage(loader); |
144 } | 143 } |
145 | 144 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 return m_hasHotSpot ? other.m_hasHotSpot && m_hotSpot == other.m_hotSpot : !
other.m_hasHotSpot | 192 return m_hasHotSpot ? other.m_hasHotSpot && m_hotSpot == other.m_hotSpot : !
other.m_hasHotSpot |
194 && compareCSSValuePtr(m_imageValue, other.m_imageValue); | 193 && compareCSSValuePtr(m_imageValue, other.m_imageValue); |
195 } | 194 } |
196 | 195 |
197 void CSSCursorImageValue::traceAfterDispatch(Visitor* visitor) | 196 void CSSCursorImageValue::traceAfterDispatch(Visitor* visitor) |
198 { | 197 { |
199 CSSValue::traceAfterDispatch(visitor); | 198 CSSValue::traceAfterDispatch(visitor); |
200 } | 199 } |
201 | 200 |
202 } // namespace WebCore | 201 } // namespace WebCore |
OLD | NEW |