OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // FIXME: It should be possible to remove a number of these accessors on
ce all | 61 // FIXME: It should be possible to remove a number of these accessors on
ce all |
62 // drag logic is in WebCore. | 62 // drag logic is in WebCore. |
63 void setDidInitiateDrag(bool initiated) { m_didInitiateDrag = initiated;
} | 63 void setDidInitiateDrag(bool initiated) { m_didInitiateDrag = initiated;
} |
64 bool didInitiateDrag() const { return m_didInitiateDrag; } | 64 bool didInitiateDrag() const { return m_didInitiateDrag; } |
65 void setIsHandlingDrag(bool handling) { m_isHandlingDrag = handling; } | 65 void setIsHandlingDrag(bool handling) { m_isHandlingDrag = handling; } |
66 bool isHandlingDrag() const { return m_isHandlingDrag; } | 66 bool isHandlingDrag() const { return m_isHandlingDrag; } |
67 DragOperation sourceDragOperation() const { return m_sourceDragOperation
; } | 67 DragOperation sourceDragOperation() const { return m_sourceDragOperation
; } |
68 void setDraggingImageURL(const KURL& url) { m_draggingImageURL = url; } | 68 void setDraggingImageURL(const KURL& url) { m_draggingImageURL = url; } |
69 const KURL& draggingImageURL() const { return m_draggingImageURL; } | 69 const KURL& draggingImageURL() const { return m_draggingImageURL; } |
70 void setDragInitiator(Document* initiator) { m_dragInitiator = initiator
; m_didInitiateDrag = true; } | |
71 Document* dragInitiator() const { return m_dragInitiator; } | |
72 void setDragOffset(const IntPoint& offset) { m_dragOffset = offset; } | 70 void setDragOffset(const IntPoint& offset) { m_dragOffset = offset; } |
73 const IntPoint& dragOffset() const { return m_dragOffset; } | 71 const IntPoint& dragOffset() const { return m_dragOffset; } |
74 DragSourceAction dragSourceAction() const { return m_dragSourceAction; } | 72 DragSourceAction dragSourceAction() const { return m_dragSourceAction; } |
75 | 73 |
76 Document* documentUnderMouse() const { return m_documentUnderMouse; } | 74 Document* documentUnderMouse() const { return m_documentUnderMouse.get()
; } |
77 DragDestinationAction dragDestinationAction() const { return m_dragDesti
nationAction; } | 75 DragDestinationAction dragDestinationAction() const { return m_dragDesti
nationAction; } |
78 DragSourceAction delegateDragSourceAction(const IntPoint& pagePoint); | 76 DragSourceAction delegateDragSourceAction(const IntPoint& pagePoint); |
79 | 77 |
80 bool mayStartDragAtEventLocation(const Frame*, const IntPoint& framePos,
Node*); | 78 bool mayStartDragAtEventLocation(const Frame*, const IntPoint& framePos,
Node*); |
81 void dragEnded(); | 79 void dragEnded(); |
82 | 80 |
83 void placeDragCaret(const IntPoint&); | 81 void placeDragCaret(const IntPoint&); |
84 | 82 |
85 bool startDrag(Frame* src, Clipboard*, DragOperation srcOp, const Platfo
rmMouseEvent& dragEvent, const IntPoint& dragOrigin, bool isDHTMLDrag); | 83 bool startDrag(Frame* src, Clipboard*, DragOperation srcOp, const Platfo
rmMouseEvent& dragEvent, const IntPoint& dragOrigin, bool isDHTMLDrag); |
86 static const IntSize& maxDragImageSize(); | 84 static const IntSize& maxDragImageSize(); |
(...skipping 20 matching lines...) Expand all Loading... |
107 | 105 |
108 IntRect selectionDraggingRect(Frame*); | 106 IntRect selectionDraggingRect(Frame*); |
109 bool doDrag(Frame* src, Clipboard* clipboard, DragImageRef dragImage, co
nst KURL& linkURL, const KURL& imageURL, Node* node, IntPoint& dragLoc, IntPoint
& dragImageOffset); | 107 bool doDrag(Frame* src, Clipboard* clipboard, DragImageRef dragImage, co
nst KURL& linkURL, const KURL& imageURL, Node* node, IntPoint& dragLoc, IntPoint
& dragImageOffset); |
110 void doImageDrag(Element*, const IntPoint&, const IntRect&, Clipboard*,
Frame*, IntPoint&); | 108 void doImageDrag(Element*, const IntPoint&, const IntRect&, Clipboard*,
Frame*, IntPoint&); |
111 void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipbo
ard*, Frame*, bool forLink); | 109 void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipbo
ard*, Frame*, bool forLink); |
112 void cleanupAfterSystemDrag(); | 110 void cleanupAfterSystemDrag(); |
113 | 111 |
114 Page* m_page; | 112 Page* m_page; |
115 DragClient* m_client; | 113 DragClient* m_client; |
116 | 114 |
117 Document* m_documentUnderMouse; // The document the mouse was last dragg
ed over. | 115 RefPtr<Document> m_documentUnderMouse; // The document the mouse was las
t dragged over. |
118 Document* m_dragInitiator; // The Document (if any) that initiated the d
rag. | 116 RefPtr<Document> m_dragInitiator; // The Document (if any) that initiate
d the drag. |
119 | 117 |
120 DragDestinationAction m_dragDestinationAction; | 118 DragDestinationAction m_dragDestinationAction; |
121 DragSourceAction m_dragSourceAction; | 119 DragSourceAction m_dragSourceAction; |
122 bool m_didInitiateDrag; | 120 bool m_didInitiateDrag; |
123 bool m_isHandlingDrag; | 121 bool m_isHandlingDrag; |
124 DragOperation m_sourceDragOperation; // Set in startDrag when a drag sta
rts from a mouse down within WebKit | 122 DragOperation m_sourceDragOperation; // Set in startDrag when a drag sta
rts from a mouse down within WebKit |
125 IntPoint m_dragOffset; | 123 IntPoint m_dragOffset; |
126 KURL m_draggingImageURL; | 124 KURL m_draggingImageURL; |
127 }; | 125 }; |
128 | 126 |
129 } | 127 } |
130 | 128 |
131 #endif | 129 #endif |
OLD | NEW |