Changeset 88702 in webkit
- Timestamp:
- Jun 13, 2011 2:58:20 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r88701 r88702 1 2011-06-13 Sangyong Park <sy302.park@gmail.com> 2 3 Reviewed by Eric Seidel. 4 5 implement to handle wheel event of plugin on x11 6 https://bugs.webkit.org/show_bug.cgi?id=62522 7 8 Implement platformHandleWheelEvent() in NetscapePluginX11.cpp 9 for to handle wheel event on plugins 10 11 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 12 (WebKit::setCommonMouseEventFields): add template argument to support WebWheelEvent 13 (WebKit::setXButtonEventFieldsByWebWheelEvent): initialize XButtonEvent by WebWheelEvent 14 (WebKit::NetscapePlugin::platformHandleWheelEvent): handle wheel event on plugin 15 1 16 2011-06-13 Eunmi Lee <eunmi15.lee@samsung.com> 2 17 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
r88244 r88702 327 327 } 328 328 329 template <typename XEventType >330 static inline void setCommonMouseEventFields(XEventType& xEvent, const Web MouseEvent& webEvent, const WebCore::IntPoint& pluginLocation)329 template <typename XEventType, typename WebEventType> 330 static inline void setCommonMouseEventFields(XEventType& xEvent, const WebEventType& webEvent, const WebCore::IntPoint& pluginLocation) 331 331 { 332 332 xEvent.root = rootWindowID(); … … 367 367 } 368 368 369 static inline void setXButtonEventFieldsByWebWheelEvent(XEvent& xEvent, const WebWheelEvent& webEvent, const WebCore::IntPoint& pluginLocation) 370 { 371 XButtonEvent& xButton = xEvent.xbutton; 372 setCommonMouseEventFields(xButton, webEvent, pluginLocation); 373 374 xButton.type = ButtonPress; 375 FloatSize ticks = webEvent.wheelTicks(); 376 if (ticks.height()) { 377 if (ticks.height() > 0) 378 xButton.button = 4; // up 379 else 380 xButton.button = 5; // down 381 } else { 382 if (ticks.width() > 0) 383 xButton.button = 6; // left 384 else 385 xButton.button = 7; // right 386 } 387 } 388 369 389 static inline void setXCrossingEventFields(XEvent& xEvent, const WebMouseEvent& webEvent, const WebCore::IntPoint& pluginLocation, int type) 370 390 { … … 406 426 const int kFocusOutType = 10; 407 427 408 bool NetscapePlugin::platformHandleWheelEvent(const WebWheelEvent&) 409 { 410 notImplemented(); 411 return false; 428 bool NetscapePlugin::platformHandleWheelEvent(const WebWheelEvent& event) 429 { 430 if (m_isWindowed) 431 return false; 432 433 XEvent xEvent; 434 initializeXEvent(xEvent); 435 setXButtonEventFieldsByWebWheelEvent(xEvent, event, m_frameRect.location()); 436 437 return NPP_HandleEvent(&xEvent); 412 438 } 413 439
Note: See TracChangeset
for help on using the changeset viewer.