* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
- */
+ */
#include "config.h"
#include "CSSCursorImageValue.h"
#include "DocLoader.h"
#include "Document.h"
#include "PlatformString.h"
-#include "RenderStyle.h"
#include <wtf/MathExtras.h>
#include <wtf/UnusedParam.h>
#if ENABLE(SVG)
static inline bool isSVGCursorIdentifier(const String& url)
{
- KURL kurl(url);
- return kurl.hasRef();
+ KURL kurl(ParsedURLString, url);
+ return kurl.hasFragmentIdentifier();
}
static inline SVGCursorElement* resourceReferencedByCursorElement(const String& fragmentId, Document* document)
}
#endif
-CSSCursorImageValue::CSSCursorImageValue(const String& url, const IntPoint& hotspot)
+CSSCursorImageValue::CSSCursorImageValue(const String& url, const IntPoint& hotSpot)
: CSSImageValue(url)
- , m_hotspot(hotspot)
+ , m_hotSpot(hotSpot)
{
}
return false;
if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, element->document())) {
+ // FIXME: This will override hot spot specified in CSS, which is probably incorrect.
float x = roundf(cursorElement->x().value(0));
- m_hotspot.setX(static_cast<int>(x));
+ m_hotSpot.setX(static_cast<int>(x));
float y = roundf(cursorElement->y().value(0));
- m_hotspot.setY(static_cast<int>(y));
+ m_hotSpot.setY(static_cast<int>(y));
if (cachedImageURL() != element->document()->completeURL(cursorElement->href()))
clearCachedImage();