Changeset 182821 in webkit
- Timestamp:
- Apr 14, 2015 4:48:00 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r182820 r182821 1 2015-04-14 Brent Fulgham <bfulgham@apple.com> 2 3 Correct layering violation in DumpRenderTree Build 4 https://bugs.webkit.org/show_bug.cgi?id=143732 5 6 Reviewed by Simon Fraser. 7 8 * testing/js/WebCoreTestSupport.cpp: 9 (WebCoreTestSupport::monitorWheelEvents): Added. Provides a wrapper around 10 the internal WebCore objects needed to implement this function. 11 (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto. 12 * testing/js/WebCoreTestSupport.h: 13 1 14 2015-04-14 Brady Eidson <beidson@apple.com> 2 15 -
trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp
r182205 r182821 32 32 #include "JSDocument.h" 33 33 #include "JSInternals.h" 34 #include "MainFrame.h" 35 #include "WheelEventTestTrigger.h" 34 36 #include <JavaScriptCore/APICast.h> 37 #include <JavaScriptCore/JSValueRef.h> 35 38 #include <JavaScriptCore/Profile.h> 36 39 #include <interpreter/CallFrame.h> … … 63 66 } 64 67 68 void monitorWheelEvents(WebCore::Frame& frame) 69 { 70 frame.mainFrame().ensureTestTrigger(); 65 71 } 72 73 void setTestCallbackAndStartNotificationTimer(WebCore::Frame& frame, JSContextRef context, JSObjectRef jsCallbackFunction) 74 { 75 WheelEventTestTrigger* trigger = frame.mainFrame().ensureTestTrigger(); 76 JSValueProtect(context, jsCallbackFunction); 77 78 trigger->setTestCallbackAndStartNotificationTimer([=](void) { 79 JSObjectCallAsFunction(context, jsCallbackFunction, nullptr, 0, nullptr, nullptr); 80 JSValueUnprotect(context, jsCallbackFunction); 81 }); 82 } 83 84 } -
trunk/Source/WebCore/testing/js/WebCoreTestSupport.h
r163725 r182821 28 28 29 29 typedef const struct OpaqueJSContext* JSContextRef; 30 typedef struct OpaqueJSValue* JSObjectRef; 30 31 31 32 #if PLATFORM(COCOA) … … 35 36 #endif 36 37 38 namespace WebCore { 39 class Frame; 40 } 41 37 42 namespace WebCoreTestSupport { 38 43 39 44 void injectInternalsObject(JSContextRef) TEST_SUPPORT_EXPORT; 40 45 void resetInternalsObject(JSContextRef) TEST_SUPPORT_EXPORT; 46 void monitorWheelEvents(WebCore::Frame&) TEST_SUPPORT_EXPORT; 47 void setTestCallbackAndStartNotificationTimer(WebCore::Frame&, JSContextRef, JSObjectRef) TEST_SUPPORT_EXPORT; 41 48 42 49 } // namespace WebCore -
trunk/Tools/ChangeLog
r182808 r182821 1 2015-04-14 Brent Fulgham <bfulgham@apple.com> 2 3 Correct layering violation in DumpRenderTree Build 4 https://bugs.webkit.org/show_bug.cgi?id=143732 5 6 Reviewed by Simon Fraser. 7 8 Correct a layering violation in DumpRenderTree by calling functions on the 9 WebCoreTestSupport library, rather than attempting to work with WebCore 10 types directly. 11 12 * DumpRenderTree/mac/EventSendingController.mm: 13 (-[EventSendingController monitorWheelEvents]): Call methods on WebCoreTestSupport, rather 14 than WebCore itself., 15 (-[EventSendingController callAfterScrollingCompletes:]): Ditto. 16 1 17 2015-04-14 Benjamin Poulain <benjamin@webkit.org> 2 18 -
trunk/Tools/DumpRenderTree/mac/EventSendingController.mm
r182768 r182821 36 36 #import "DumpRenderTreeDraggingInfo.h" 37 37 #import "DumpRenderTreeFileDraggingSource.h" 38 #import "WebCoreTestSupport.h" 38 39 #import <WebKit/DOMPrivate.h> 39 40 #import <WebKit/WebKit.h> … … 43 44 #if !PLATFORM(IOS) 44 45 #import <Carbon/Carbon.h> // for GetCurrentEventTime() 45 #import <JavaScriptCore/JSRetainPtr.h>46 #import <WebCore/MainFrame.h>47 #import <WebCore/Page.h>48 #import <WebCore/WheelEventTestTrigger.h>49 46 #endif 50 47 … … 1268 1265 if (!frame) 1269 1266 return; 1270 1271 frame->mainFrame().ensureTestTrigger();1267 1268 WebCoreTestSupport::monitorWheelEvents(*frame); 1272 1269 #endif 1273 1270 } … … 1284 1281 return; 1285 1282 1286 WebCore::WheelEventTestTrigger* trigger = frame->mainFrame().ensureTestTrigger();1287 1283 JSGlobalContextRef globalContext = [mainFrame globalContext]; 1288 JSValueProtect(globalContext, jsCallbackFunction); 1289 1290 trigger->setTestCallbackAndStartNotificationTimer([=](void) { 1291 JSObjectCallAsFunction(globalContext, jsCallbackFunction, nullptr, 0, nullptr, nullptr); 1292 JSValueUnprotect(globalContext, jsCallbackFunction); 1293 }); 1284 WebCoreTestSupport::setTestCallbackAndStartNotificationTimer(*frame, globalContext, jsCallbackFunction); 1294 1285 #endif 1295 1286 }
Note: See TracChangeset
for help on using the changeset viewer.