diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/page/EventHandler.h')
-rw-r--r-- | src/3rdparty/webkit/WebCore/page/EventHandler.h | 76 |
1 files changed, 32 insertions, 44 deletions
diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.h b/src/3rdparty/webkit/WebCore/page/EventHandler.h index 5d51cb6..06ed956 100644 --- a/src/3rdparty/webkit/WebCore/page/EventHandler.h +++ b/src/3rdparty/webkit/WebCore/page/EventHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,33 +27,25 @@ #define EventHandler_h #include "DragActions.h" -#include "FocusDirection.h" #include "PlatformMouseEvent.h" #include "ScrollTypes.h" #include "Timer.h" #include <wtf/Forward.h> -#include <wtf/Noncopyable.h> -#include <wtf/Platform.h> #include <wtf/RefPtr.h> -#if PLATFORM(MAC) -#include "WebCoreKeyboardUIMode.h" -#ifndef __OBJC__ -class NSEvent; +#if PLATFORM(MAC) && !defined(__OBJC__) class NSView; #endif -#endif namespace WebCore { class AtomicString; class Clipboard; class Cursor; -class EventTargetNode; class Event; class FloatPoint; -class FloatRect; class Frame; +class HitTestRequest; class HitTestResult; class HTMLFrameSetElement; class KeyboardEvent; @@ -68,11 +60,8 @@ class Scrollbar; class String; class SVGElementInstance; class TextEvent; -class VisiblePosition; class Widget; -struct HitTestRequest; - extern const int LinkDragHysteresis; extern const int ImageDragHysteresis; extern const int TextDragHysteresis; @@ -97,7 +86,7 @@ public: RenderObject* autoscrollRenderer() const; void updateAutoscrollRenderer(); - HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent); + HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false); bool mousePressed() const { return m_mousePressed; } void setMousePressed(bool pressed) { m_mousePressed = pressed; } @@ -158,30 +147,27 @@ public: void capsLockStateMayHaveChanged(); - unsigned pendingFrameUnloadEventCount(); - void addPendingFrameUnloadEventCount(); - void removePendingFrameUnloadEventCount(); - void clearPendingFrameUnloadEventCount(); - unsigned pendingFrameBeforeUnloadEventCount(); - void addPendingFrameBeforeUnloadEventCount(); - void removePendingFrameBeforeUnloadEventCount(); - void clearPendingFrameBeforeUnloadEventCount(); + void sendResizeEvent(); + void sendScrollEvent(); -#if PLATFORM(MAC) +#if PLATFORM(MAC) && defined(__OBJC__) PassRefPtr<KeyboardEvent> currentKeyboardEvent() const; - void mouseDown(NSEvent*); - void mouseDragged(NSEvent*); - void mouseUp(NSEvent*); - void mouseMoved(NSEvent*); - bool keyEvent(NSEvent*); - bool wheelEvent(NSEvent*); + void mouseDown(NSEvent *); + void mouseDragged(NSEvent *); + void mouseUp(NSEvent *); + void mouseMoved(NSEvent *); + bool keyEvent(NSEvent *); + bool wheelEvent(NSEvent *); + + bool sendContextMenuEvent(NSEvent *); + bool eventMayStartDrag(NSEvent *); - void sendFakeEventsAfterWidgetTracking(NSEvent* initiatingEvent); + void sendFakeEventsAfterWidgetTracking(NSEvent *initiatingEvent); void setActivationEventNumber(int num) { m_activationEventNumber = num; } - NSEvent *currentNSEvent(); + static NSEvent *currentNSEvent(); #endif private: @@ -201,8 +187,8 @@ private: PassRefPtr<Clipboard> createDraggingClipboard() const; bool eventActivatedView(const PlatformMouseEvent&) const; - void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults& event); - void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResults& event); + void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&); + void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResults&); bool handleMouseDoubleClickEvent(const PlatformMouseEvent&); @@ -216,7 +202,9 @@ private: void handleKeyboardSelectionMovement(KeyboardEvent*); Cursor selectCursor(const MouseEventWithHitTestResults&, Scrollbar*); +#if ENABLE(PAN_SCROLLING) void setPanScrollCursor(); +#endif void hoverTimerFired(Timer<EventHandler>*); @@ -272,22 +260,25 @@ private: // The following are called at the beginning of handleMouseUp and handleDrag. // If they return true it indicates that they have consumed the event. -#if PLATFORM(MAC) bool eventLoopHandleMouseUp(const MouseEventWithHitTestResults&); bool eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&); - NSView *mouseDownViewIfStillGood(); -#else - bool eventLoopHandleMouseUp(const MouseEventWithHitTestResults&) { return false; } - bool eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&) { return false; } -#endif bool invertSenseOfTabsToLinks(KeyboardEvent*) const; void updateSelectionForMouseDrag(Node* targetNode, const IntPoint& localPoint); + bool capturesDragging() const { return m_capturesDragging; } + +#if PLATFORM(MAC) && defined(__OBJC__) + NSView *mouseDownViewIfStillGood(); + + PlatformMouseEvent currentPlatformMouseEvent() const; +#endif + Frame* m_frame; bool m_mousePressed; + bool m_capturesDragging; RefPtr<Node> m_mousePressNode; bool m_mouseDownMayStartSelect; @@ -307,6 +298,7 @@ private: bool m_autoscrollInProgress; bool m_mouseDownMayStartAutoscroll; bool m_mouseDownWasInSubframe; + #if ENABLE(SVG) bool m_svgPan; RefPtr<SVGElementInstance> m_instanceUnderMouse; @@ -335,16 +327,12 @@ private: IntPoint m_mouseDownPos; // in our view's coords double m_mouseDownTimestamp; PlatformMouseEvent m_mouseDown; - - unsigned m_pendingFrameUnloadEventCount; - unsigned m_pendingFrameBeforeUnloadEventCount; #if PLATFORM(MAC) NSView *m_mouseDownView; bool m_sendingEventToSubview; int m_activationEventNumber; #endif - }; } // namespace WebCore |