Changeset 142487 in webkit
- Timestamp:
- Feb 11, 2013 10:11:32 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r142479 r142487 1 2013-02-11 Tiancheng Jiang <tijiang@rim.com> 2 3 [BlackBerry] Set mouse document position for mouse event in DRT. 4 https://bugs.webkit.org/show_bug.cgi?id=109094. 5 6 Reviewed by Rob Buis. 7 8 RIM PR 246976. 9 Internally Reviewed by Nima Ghanavatian & Genevieve Mak. 10 11 Set mouse document position when we create mouse event in DRT. 12 13 * DumpRenderTree/blackberry/EventSender.cpp: 14 (setMouseEventDocumentPos): 15 (mouseDownCallback): 16 (mouseUpCallback): 17 (mouseMoveToCallback): 18 1 19 2013-02-11 Mike Lattanzio <mlattanzio@rim.com> 2 20 -
trunk/Tools/DumpRenderTree/blackberry/EventSender.cpp
r142120 r142487 27 27 #include "IntPoint.h" 28 28 #include "NotImplemented.h" 29 #include "WebKitThreadViewportAccessor.h" 29 30 #include "WebPage.h" 30 31 … … 71 72 } 72 73 74 void setMouseEventDocumentPos(BlackBerry::Platform::MouseEvent &event, const BlackBerry::WebKit::WebPage* page) 75 { 76 // We have added document viewport position and document content position as members of the mouse event, when we create the event, we should initialize them as well. 77 BlackBerry::Platform::ViewportAccessor* viewportAccessor = page->webkitThreadViewportAccessor(); 78 IntPoint documentContentPos = viewportAccessor->roundToDocumentFromPixelContents(BlackBerry::Platform::FloatPoint(viewportAccessor->pixelContentsFromViewport(lastMousePosition))); 79 IntPoint documentViewportMousePos = viewportAccessor->roundToDocumentFromPixelContents(BlackBerry::Platform::FloatPoint(lastMousePosition)); 80 event.populateDocumentPosition(documentViewportMousePos, documentContentPos); 81 } 82 73 83 static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 74 84 { 75 85 BlackBerry::WebKit::WebPage* page = BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(); 76 page->mouseEvent(BlackBerry::Platform::MouseEvent(BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, 0, lastMousePosition, IntPoint::zero(), 0, 0, 0)); 86 BlackBerry::Platform::MouseEvent event(BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, 0, lastMousePosition, IntPoint::zero(), 0, 0, 0); 87 88 setMouseEventDocumentPos(event, page); 89 90 page->mouseEvent(event); 77 91 return JSValueMakeUndefined(context); 78 92 } … … 81 95 { 82 96 BlackBerry::WebKit::WebPage* page = BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(); 83 page->mouseEvent(BlackBerry::Platform::MouseEvent(0, BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, lastMousePosition, IntPoint::zero(), 0, 0, 0)); 97 BlackBerry::Platform::MouseEvent event(0, BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, lastMousePosition, IntPoint::zero(), 0, 0, 0); 98 99 setMouseEventDocumentPos(event, page); 100 101 page->mouseEvent(event); 84 102 return JSValueMakeUndefined(context); 85 103 } … … 97 115 lastMousePosition = IntPoint(x, y); 98 116 BlackBerry::WebKit::WebPage* page = BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(); 99 page->mouseEvent(BlackBerry::Platform::MouseEvent(BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, lastMousePosition, IntPoint::zero(), 0, 0, 0)); 100 117 BlackBerry::Platform::MouseEvent event(BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, lastMousePosition, IntPoint::zero(), 0, 0, 0); 118 119 setMouseEventDocumentPos(event, page); 120 121 page->mouseEvent(event); 101 122 102 123 return JSValueMakeUndefined(context);
Note: See TracChangeset
for help on using the changeset viewer.