diff options
Diffstat (limited to 'WebCore/platform/mac')
-rw-r--r-- | WebCore/platform/mac/CursorMac.mm | 8 | ||||
-rw-r--r-- | WebCore/platform/mac/DragDataMac.mm | 8 | ||||
-rw-r--r-- | WebCore/platform/mac/WebCoreSystemInterface.h | 2 | ||||
-rw-r--r-- | WebCore/platform/mac/WebCoreSystemInterface.mm | 2 | ||||
-rw-r--r-- | WebCore/platform/mac/WheelEventMac.mm | 11 |
5 files changed, 19 insertions, 12 deletions
diff --git a/WebCore/platform/mac/CursorMac.mm b/WebCore/platform/mac/CursorMac.mm index c28f149..8cd54a1 100644 --- a/WebCore/platform/mac/CursorMac.mm +++ b/WebCore/platform/mac/CursorMac.mm @@ -43,14 +43,14 @@ namespace WebCore { // Simple NSCursor calls shouldn't need protection, // but creating a cursor with a bad image might throw. -static NSCursor* createCustomCursor(Image* image, const IntPoint& hotspot) +static NSCursor* createCustomCursor(Image* image, const IntPoint& hotSpot) { // FIXME: The cursor won't animate. Not sure if that's a big deal. NSImage* img = image->getNSImage(); if (!img) return 0; BEGIN_BLOCK_OBJC_EXCEPTIONS; - return [[NSCursor alloc] initWithImage:img hotSpot:hotspot]; + return [[NSCursor alloc] initWithImage:img hotSpot:determineHotSpot(image, hotSpot)]; END_BLOCK_OBJC_EXCEPTIONS; return 0; } @@ -76,8 +76,8 @@ static NSCursor* leakNamedCursor(const char* name, int x, int y) return nil; } -Cursor::Cursor(Image* image, const IntPoint& hotspot) - : m_impl(HardRetainWithNSRelease(createCustomCursor(image, hotspot))) +Cursor::Cursor(Image* image, const IntPoint& hotSpot) + : m_impl(HardRetainWithNSRelease(createCustomCursor(image, hotSpot))) { } diff --git a/WebCore/platform/mac/DragDataMac.mm b/WebCore/platform/mac/DragDataMac.mm index 02a6af7..fa416ed 100644 --- a/WebCore/platform/mac/DragDataMac.mm +++ b/WebCore/platform/mac/DragDataMac.mm @@ -113,13 +113,15 @@ bool DragData::containsCompatibleContent() const return [types count] != 0; } -bool DragData::containsURL() const +bool DragData::containsURL(FilenameConversionPolicy filenamePolicy) const { - return !asURL().isEmpty(); + return !asURL(filenamePolicy).isEmpty(); } -String DragData::asURL(String* title) const +String DragData::asURL(FilenameConversionPolicy filenamePolicy, String* title) const { + // FIXME: Use filenamePolicy. + (void)filenamePolicy; return m_pasteboardHelper->urlFromPasteboard([m_platformDragData draggingPasteboard], title); } diff --git a/WebCore/platform/mac/WebCoreSystemInterface.h b/WebCore/platform/mac/WebCoreSystemInterface.h index ea30023..88472da 100644 --- a/WebCore/platform/mac/WebCoreSystemInterface.h +++ b/WebCore/platform/mac/WebCoreSystemInterface.h @@ -117,7 +117,7 @@ extern ATSUFontID (*wkGetNSFontATSUFontId)(NSFont*); extern double (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response); extern NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response); extern BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response); -extern void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, float* wheelTicksX, float* wheelTicksY, BOOL* continuous); +extern void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous); extern BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point); extern void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize); extern BOOL (*wkMediaControllerThemeAvailable)(int themeStyle); diff --git a/WebCore/platform/mac/WebCoreSystemInterface.mm b/WebCore/platform/mac/WebCoreSystemInterface.mm index b63c5c2..bb54ad0 100644 --- a/WebCore/platform/mac/WebCoreSystemInterface.mm +++ b/WebCore/platform/mac/WebCoreSystemInterface.mm @@ -52,7 +52,7 @@ NSString* (*wkGetMIMETypeForExtension)(NSString*); NSTimeInterval (*wkGetNSURLResponseCalculatedExpiration)(NSURLResponse *response); NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response); BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response); -void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, float* wheelTicksX, float* wheelTicksY, BOOL* continuous); +void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous); void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*); unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void); int (*wkQTMovieDataRate)(QTMovie*); diff --git a/WebCore/platform/mac/WheelEventMac.mm b/WebCore/platform/mac/WheelEventMac.mm index d7e2934..d9663b9 100644 --- a/WebCore/platform/mac/WheelEventMac.mm +++ b/WebCore/platform/mac/WheelEventMac.mm @@ -43,9 +43,14 @@ PlatformWheelEvent::PlatformWheelEvent(NSEvent* event, NSView *windowView) , m_metaKey([event modifierFlags] & NSCommandKeyMask) { BOOL continuous; - wkGetWheelEventDeltas(event, &m_deltaX, &m_deltaY, &m_wheelTicksX, &m_wheelTicksY, &continuous); - - if (!continuous) { + + wkGetWheelEventDeltas(event, &m_deltaX, &m_deltaY, &continuous); + if (continuous) { + m_wheelTicksX = m_deltaX / static_cast<float>(Scrollbar::pixelsPerLineStep()); + m_wheelTicksY = m_deltaY / static_cast<float>(Scrollbar::pixelsPerLineStep()); + } else { + m_wheelTicksX = m_deltaX; + m_wheelTicksY = m_deltaY; m_deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep()); m_deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep()); } |