Changeset 20753 in webkit
- Timestamp:
- Apr 6, 2007 7:58:41 AM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r20746 r20753 1 2007-04-06 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Oliver. 4 5 Eliminate PlatformMouseEvent::currentEvent. 6 7 No test possible (no change to functionality). 8 9 * page/EventHandler.cpp: 10 (WebCore::EventHandler::handleDrag): 11 * platform/PlatformMouseEvent.h: 12 * platform/gdk/TemporaryLinkStubs.cpp: 13 * platform/mac/PlatformMouseEventMac.mm: 14 (WebCore::PlatformMouseEvent::PlatformMouseEvent): 15 * platform/qt/PlatformMouseEventQt.cpp: 16 * platform/win/TemporaryLinkStubs.cpp: 17 1 18 2007-04-05 Oliver Hunt <oliver@apple.com> 2 19 -
trunk/WebCore/page/EventHandler.cpp
r20743 r20753 1504 1504 if (!startedDrag && dragState().m_dragSrcMayBeDHTML) { 1505 1505 // Drag was canned at the last minute - we owe m_dragSrc a DRAGEND event 1506 PlatformMouseEvent event(PlatformMouseEvent::currentEvent); 1507 dispatchDragSrcEvent(dragendEvent, event); 1506 dispatchDragSrcEvent(dragendEvent, event.event()); 1508 1507 m_mouseDownMayStartDrag = false; 1509 1508 } -
trunk/WebCore/platform/PlatformMouseEvent.h
r19327 r20753 65 65 class PlatformMouseEvent { 66 66 public: 67 static const struct CurrentEventTag {} currentEvent;68 69 67 PlatformMouseEvent() 70 68 : m_button(NoButton) … … 78 76 { 79 77 } 80 81 PlatformMouseEvent(const CurrentEventTag&);82 78 83 79 PlatformMouseEvent(const IntPoint& pos, const IntPoint& globalPos, MouseButton button, MouseEventType eventType, -
trunk/WebCore/platform/gdk/TemporaryLinkStubs.cpp
r20649 r20753 99 99 void Widget::invalidateRect(const IntRect&) { notImplementedGdk(); } 100 100 101 PlatformMouseEvent::PlatformMouseEvent(const CurrentEventTag&) { notImplementedGdk(); }102 103 101 int WebCore::findNextSentenceFromIndex(UChar const*, int, int, bool) { notImplementedGdk(); return 0; } 104 102 void WebCore::findSentenceBoundary(UChar const*, int, int, int*, int*) { notImplementedGdk(); } -
trunk/WebCore/platform/mac/PlatformMouseEventMac.mm
r19392 r20753 30 30 31 31 namespace WebCore { 32 33 const PlatformMouseEvent::CurrentEventTag PlatformMouseEvent::currentEvent = {};34 32 35 33 static MouseButton mouseButtonForEvent(NSEvent *event) … … 175 173 { 176 174 } 177 178 PlatformMouseEvent::PlatformMouseEvent(const CurrentEventTag&)179 : m_button(LeftButton), m_clickCount(0), m_shiftKey(false), m_ctrlKey(false), m_altKey(false), m_metaKey(false)180 {181 //Note: [NSApp currentEvent] is not guaranteed to return a mouse event here182 //so care should be taken when accessing mouse event specific properties183 NSEvent* event = [NSApp currentEvent];184 if (event) {185 m_position = pointForEvent(event);186 m_globalPosition = globalPointForEvent(event);187 m_button = mouseButtonForEvent(event);188 m_eventType = mouseEventForNSEvent(event);189 m_clickCount = clickCountForEvent(event);190 m_shiftKey = [event modifierFlags] & NSShiftKeyMask;191 m_ctrlKey = [event modifierFlags] & NSControlKeyMask;192 m_altKey = [event modifierFlags] & NSAlternateKeyMask;193 m_metaKey = [event modifierFlags] & NSCommandKeyMask;194 m_timestamp = [event timestamp];195 m_eventNumber = eventNumberForEvent(event);196 }197 }198 175 199 176 } -
trunk/WebCore/platform/qt/PlatformMouseEventQt.cpp
r19338 r20753 34 34 35 35 namespace WebCore { 36 37 const PlatformMouseEvent::CurrentEventTag PlatformMouseEvent::currentEvent = { };38 36 39 37 PlatformMouseEvent::PlatformMouseEvent(QMouseEvent* event, int clickCount) -
trunk/WebCore/platform/win/TemporaryLinkStubs.cpp
r20565 r20753 316 316 void Path::transform(const AffineTransform&) { notImplemented(); } 317 317 318 PlatformMouseEvent::PlatformMouseEvent(const CurrentEventTag&) { notImplemented(); }319 320 318 PlatformScrollbar::PlatformScrollbar(ScrollbarClient* client, ScrollbarOrientation orientation, ScrollbarControlSize controlSize) : Scrollbar(client, orientation, controlSize) { notImplemented(); } 321 319 PlatformScrollbar::~PlatformScrollbar() { notImplemented(); }
Note: See TracChangeset
for help on using the changeset viewer.