Index: Source/core/css/CSSCursorImageValue.cpp |
diff --git a/Source/core/css/CSSCursorImageValue.cpp b/Source/core/css/CSSCursorImageValue.cpp |
index 5b493a28fc648a62e9e580b570b598e41ce2847c..24caef773da3770a51b37011994a0a3339594cbe 100644 |
--- a/Source/core/css/CSSCursorImageValue.cpp |
+++ b/Source/core/css/CSSCursorImageValue.cpp |
@@ -39,7 +39,7 @@ |
namespace WebCore { |
-static inline SVGCursorElement* resourceReferencedByCursorElement(const String& url, Document* document) |
+static inline SVGCursorElement* resourceReferencedByCursorElement(const String& url, Document& document) |
{ |
Element* element = SVGURIReference::targetElementFromIRIString(url, document); |
if (element && element->hasTagName(SVGNames::cursorTag)) |
@@ -69,7 +69,7 @@ CSSCursorImageValue::~CSSCursorImageValue() |
for (; it != end; ++it) { |
SVGElement* referencedElement = *it; |
referencedElement->cursorImageValueRemoved(); |
- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, &referencedElement->document())) |
+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, referencedElement->document())) |
cursorElement->removeClient(referencedElement); |
} |
} |
@@ -96,7 +96,7 @@ bool CSSCursorImageValue::updateIfSVGCursorIsUsed(Element* element) |
return false; |
String url = toCSSImageValue(m_imageValue.get())->url(); |
- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, &element->document())) { |
+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, element->document())) { |
// FIXME: This will override hot spot specified in CSS, which is probably incorrect. |
SVGLengthContext lengthContext(0); |
m_hasHotSpot = true; |
@@ -133,7 +133,7 @@ StyleImage* CSSCursorImageValue::cachedImage(ResourceFetcher* loader, float devi |
if (isSVGCursor() && loader && loader->document()) { |
RefPtr<CSSImageValue> imageValue = toCSSImageValue(m_imageValue.get()); |
// FIXME: This will fail if the <cursor> element is in a shadow DOM (bug 59827) |
- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(imageValue->url(), loader->document())) { |
+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(imageValue->url(), *loader->document())) { |
RefPtr<CSSImageValue> svgImageValue = CSSImageValue::create(cursorElement->hrefCurrentValue()); |
StyleFetchedImage* cachedImage = svgImageValue->cachedImage(loader); |
m_image = cachedImage; |