Index: Source/core/css/CSSCursorImageValue.cpp |
diff --git a/Source/core/css/CSSCursorImageValue.cpp b/Source/core/css/CSSCursorImageValue.cpp |
index fd498ef3c66379959a62a01783ffa55c362d2130..c1ad61210531e22dcb0033d66912eec2bfb75eb4 100644 |
--- a/Source/core/css/CSSCursorImageValue.cpp |
+++ b/Source/core/css/CSSCursorImageValue.cpp |
@@ -42,10 +42,7 @@ namespace WebCore { |
static inline SVGCursorElement* resourceReferencedByCursorElement(const String& url, Document& document) |
{ |
Element* element = SVGURIReference::targetElementFromIRIString(url, document); |
- if (element && element->hasTagName(SVGNames::cursorTag)) |
- return toSVGCursorElement(element); |
- |
- return 0; |
+ return isSVGCursorElement(element) ? toSVGCursorElement(element) : 0; |
} |
CSSCursorImageValue::CSSCursorImageValue(PassRefPtrWillBeRawPtr<CSSValue> imageValue, bool hasHotSpot, const IntPoint& hotSpot) |