summaryrefslogtreecommitdiffstats
path: root/WebCore/page/EventHandler.cpp
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-08 12:18:00 +0100
committerKristian Monsen <kristianm@google.com>2010-09-11 12:08:58 +0100
commit5ddde30071f639962dd557c453f2ad01f8f0fd00 (patch)
tree775803c4ab35af50aa5f5472cd1fb95fe9d5152d /WebCore/page/EventHandler.cpp
parent3e63d9b33b753ca86d0765d1b3d711114ba9e34f (diff)
downloadexternal_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.zip
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.gz
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.bz2
Merge WebKit at r66666 : Initial merge by git.
Change-Id: I57dedeb49859adc9c539e760f0e749768c66626f
Diffstat (limited to 'WebCore/page/EventHandler.cpp')
-rw-r--r--WebCore/page/EventHandler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 6263a4b..72cbe23 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -69,6 +69,7 @@
#include "Scrollbar.h"
#include "SelectionController.h"
#include "Settings.h"
+#include "StyleCachedImage.h"
#include "TextEvent.h"
#include "TextIterator.h"
#include "UserGestureIndicator.h"
@@ -1083,10 +1084,13 @@ Cursor EventHandler::selectCursor(const MouseEventWithHitTestResults& event, Scr
if (style && style->cursors()) {
const CursorList* cursors = style->cursors();
for (unsigned i = 0; i < cursors->size(); ++i) {
- const CachedImage* cimage = (*cursors)[i].image();
- IntPoint hotSpot = (*cursors)[i].hotSpot();
+ const CachedImage* cimage = 0;
+ StyleImage* image = (*cursors)[i].image();
+ if (image->isCachedImage())
+ cimage = static_cast<StyleCachedImage*>(image)->cachedImage();
if (!cimage)
continue;
+ IntPoint hotSpot = (*cursors)[i].hotSpot();
// Limit the size of cursors so that they cannot be used to cover UI elements in chrome.
IntSize size = cimage->image()->size();
if (size.width() > 128 || size.height() > 128)