Changeset 106803 in webkit
- Timestamp:
- Feb 6, 2012 6:07:27 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106802 r106803 1 2012-02-06 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 3 WebGestureEvent can not encode delta and area. 4 https://bugs.webkit.org/show_bug.cgi?id=77728 5 6 Add area field to PlatformGestureEvent. 7 8 Reviewed by Kenneth Rohde Christiansen. 9 10 * platform/PlatformGestureEvent.h: 11 (WebCore::PlatformGestureEvent::PlatformGestureEvent): 12 (WebCore::PlatformGestureEvent::area): 13 1 14 2012-02-06 Charles Wei <charles.wei@torchmobile.com.cn> 2 15 -
trunk/Source/WebCore/platform/PlatformGestureEvent.h
r103643 r106803 29 29 #if ENABLE(GESTURE_EVENTS) 30 30 31 #include "FloatPoint.h" 31 32 #include "IntPoint.h" 33 #include "IntSize.h" 32 34 #include "PlatformEvent.h" 33 35 … … 52 54 } 53 55 56 PlatformGestureEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, double timestamp, const IntSize& area, const FloatPoint& delta, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey) 57 : PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp) 58 , m_position(position) 59 , m_globalPosition(globalPosition) 60 , m_area(area) 61 , m_deltaX(delta.x()) 62 , m_deltaY(delta.y()) 63 { 64 } 65 54 66 const IntPoint& position() const { return m_position; } // PlatformWindow coordinates. 55 67 const IntPoint& globalPosition() const { return m_globalPosition; } // Screen coordinates. 68 69 const IntSize& area() const { return m_area; } 56 70 57 71 float deltaX() const { return m_deltaX; } … … 61 75 IntPoint m_position; 62 76 IntPoint m_globalPosition; 77 IntSize m_area; 63 78 float m_deltaX; 64 79 float m_deltaY; -
trunk/Source/WebKit2/ChangeLog
r106800 r106803 1 2012-02-06 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 3 WebGestureEvent can not encode delta and area. 4 https://bugs.webkit.org/show_bug.cgi?id=77728 5 6 Support delta and area fields in WebGestureEvent, and send area with Qt tap gesture. 7 8 Reviewed by Kenneth Rohde Christiansen. 9 10 * Shared/WebEvent.h: 11 (WebKit::WebGestureEvent::area): 12 (WebKit::WebGestureEvent::delta): 13 * Shared/WebEventConversion.cpp: 14 (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): 15 * Shared/WebGestureEvent.cpp: 16 (WebKit::WebGestureEvent::WebGestureEvent): 17 (WebKit::WebGestureEvent::encode): 18 (WebKit::WebGestureEvent::decode): 19 * UIProcess/qt/QtWebPageEventHandler.cpp: 20 (QtWebPageEventHandler::handleSingleTapEvent): 21 1 22 2012-02-03 Zalan Bujtas <zbujtas@gmail.com> and Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 23 -
trunk/Source/WebKit2/Shared/WebEvent.h
r106021 r106803 30 30 // we can use them as the event type. 31 31 32 #include <WebCore/FloatPoint.h> 32 33 #include <WebCore/FloatSize.h> 33 34 #include <WebCore/IntPoint.h> 35 #include <WebCore/IntSize.h> 34 36 #include <wtf/text/WTFString.h> 35 37 … … 255 257 WebGestureEvent() { } 256 258 WebGestureEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, Modifiers, double timestamp); 259 WebGestureEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, Modifiers, double timestamp, const WebCore::IntSize& area, const WebCore::FloatPoint& delta); 257 260 258 261 const WebCore::IntPoint position() const { return m_position; } 259 262 const WebCore::IntPoint globalPosition() const { return m_globalPosition; } 263 const WebCore::IntSize area() const { return m_area; } 264 const WebCore::FloatPoint delta() const { return m_delta; } 260 265 261 266 void encode(CoreIPC::ArgumentEncoder*) const; … … 267 272 WebCore::IntPoint m_position; 268 273 WebCore::IntPoint m_globalPosition; 274 WebCore::IntSize m_area; 275 WebCore::FloatPoint m_delta; 269 276 }; 270 277 #endif // ENABLE(GESTURE_EVENTS) -
trunk/Source/WebKit2/Shared/WebEventConversion.cpp
r103700 r106803 233 233 m_position = webEvent.position(); 234 234 m_globalPosition = webEvent.globalPosition(); 235 236 m_area = webEvent.area(); 237 m_deltaX = webEvent.delta().x(); 238 m_deltaY = webEvent.delta().y(); 235 239 } 236 240 }; -
trunk/Source/WebKit2/Shared/WebGestureEvent.cpp
r98943 r106803 44 44 } 45 45 46 WebGestureEvent::WebGestureEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, Modifiers modifiers, double timestamp, const IntSize& area, const FloatPoint& delta) 47 : WebEvent(type, modifiers, timestamp) 48 , m_position(position) 49 , m_globalPosition(globalPosition) 50 , m_area(area) 51 , m_delta(delta) 52 { 53 ASSERT(isGestureEventType(type)); 54 } 55 46 56 void WebGestureEvent::encode(CoreIPC::ArgumentEncoder* encoder) const 47 57 { … … 50 60 encoder->encode(m_position); 51 61 encoder->encode(m_globalPosition); 62 encoder->encode(m_area); 63 encoder->encode(m_delta); 52 64 } 53 65 … … 59 71 return false; 60 72 if (!decoder->decode(t.m_globalPosition)) 73 return false; 74 if (!decoder->decode(t.m_area)) 75 return false; 76 if (!decoder->decode(t.m_delta)) 61 77 return false; 62 78 return true; -
trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp
r106658 r106803 299 299 300 300 QTransform fromItemTransform = m_webPage->transformFromItem(); 301 WebGestureEvent gesture(WebEvent::GestureSingleTap, fromItemTransform.map(point.pos()).toPoint(), point.screenPos().toPoint(), WebEvent::Modifiers(0), 0 );301 WebGestureEvent gesture(WebEvent::GestureSingleTap, fromItemTransform.map(point.pos()).toPoint(), point.screenPos().toPoint(), WebEvent::Modifiers(0), 0, IntSize(point.rect().size().toSize()), FloatPoint(0, 0)); 302 302 m_webPageProxy->handleGestureEvent(gesture); 303 303 }
Note: See TracChangeset
for help on using the changeset viewer.