Changeset 108919 in webkit
- Timestamp:
- Feb 25, 2012 5:59:49 PM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r108915 r108919 1 2012-02-25 Anders Carlsson <andersca@apple.com> 2 3 Mouse tracking incorrect in Silverlight when using multi monitor with offset arrangement 4 https://bugs.webkit.org/show_bug.cgi?id=79589 5 <rdar://problem/9719592> 6 7 Reviewed by Sam Weinig. 8 9 In the Carbon event model, mouse event coordinates are flipped relative to the first screen, 10 whereas the coordinates we get from the WebMouseEvent are flipped relative to the screen where 11 the containing WKView is on. 12 13 Instead of passing the global coordinates to NPP_HandleEvent, convert them to the flipped screen coordinate 14 system that the plug-in expects. 15 16 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 17 (WebKit::NetscapePlugin::platformHandleMouseEvent): 18 1 19 2012-02-25 Sheriff Bot <webkit.review.bot@gmail.com> 2 20 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
r99449 r108919 533 533 bool NetscapePlugin::platformHandleMouseEvent(const WebMouseEvent& mouseEvent) 534 534 { 535 IntPoint eventPositionInPluginCoordinates; 536 if (!convertFromRootView(mouseEvent.position(), eventPositionInPluginCoordinates)) 537 return true; 538 535 539 switch (m_eventModel) { 536 540 case NPEventModelCocoa: { 537 IntPoint eventPositionInPluginCoordinates;538 if (!convertFromRootView(mouseEvent.position(), eventPositionInPluginCoordinates))539 return true;540 541 541 NPCocoaEvent event = initializeMouseEvent(mouseEvent, eventPositionInPluginCoordinates); 542 542 … … 580 580 EventRecord event = initializeEventRecord(eventKind); 581 581 event.modifiers = modifiersForEvent(mouseEvent); 582 event.where.h = mouseEvent.globalPosition().x(); 583 event.where.v = mouseEvent.globalPosition().y(); 582 583 double globalX, globalY; 584 if (!convertPoint(eventPositionInPluginCoordinates.x(), eventPositionInPluginCoordinates.y(), NPCoordinateSpacePlugin, globalX, globalY, NPCoordinateSpaceFlippedScreen)) 585 ASSERT_NOT_REACHED(); 586 587 event.where.h = globalX; 588 event.where.v = globalY; 584 589 585 590 NPP_HandleEvent(&event);
Note: See TracChangeset
for help on using the changeset viewer.