https://bugs.webkit.org/show_bug.cgi?id=143732
Reviewed by Simon Fraser.
Source/WebCore:
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::monitorWheelEvents): Added. Provides a wrapper around
the internal WebCore objects needed to implement this function.
(WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
* testing/js/WebCoreTestSupport.h:
Tools:
Correct a layering violation in DumpRenderTree by calling functions on the
WebCoreTestSupport library, rather than attempting to work with WebCore
types directly.
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController monitorWheelEvents]): Call methods on WebCoreTestSupport, rather
than WebCore itself.,
(-[EventSendingController callAfterScrollingCompletes:]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182821
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-04-14 Brent Fulgham <bfulgham@apple.com>
+
+ Correct layering violation in DumpRenderTree Build
+ https://bugs.webkit.org/show_bug.cgi?id=143732
+
+ Reviewed by Simon Fraser.
+
+ * testing/js/WebCoreTestSupport.cpp:
+ (WebCoreTestSupport::monitorWheelEvents): Added. Provides a wrapper around
+ the internal WebCore objects needed to implement this function.
+ (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
+ * testing/js/WebCoreTestSupport.h:
+
2015-04-14 Brady Eidson <beidson@apple.com>
Make sure media element loads hit content filter extensions.
#include "Internals.h"
#include "JSDocument.h"
#include "JSInternals.h"
+#include "MainFrame.h"
+#include "WheelEventTestTrigger.h"
#include <JavaScriptCore/APICast.h>
+#include <JavaScriptCore/JSValueRef.h>
#include <JavaScriptCore/Profile.h>
#include <interpreter/CallFrame.h>
#include <runtime/IdentifierInlines.h>
InternalSettings::from(page)->resetToConsistentState();
}
+void monitorWheelEvents(WebCore::Frame& frame)
+{
+ frame.mainFrame().ensureTestTrigger();
+}
+
+void setTestCallbackAndStartNotificationTimer(WebCore::Frame& frame, JSContextRef context, JSObjectRef jsCallbackFunction)
+{
+ WheelEventTestTrigger* trigger = frame.mainFrame().ensureTestTrigger();
+ JSValueProtect(context, jsCallbackFunction);
+
+ trigger->setTestCallbackAndStartNotificationTimer([=](void) {
+ JSObjectCallAsFunction(context, jsCallbackFunction, nullptr, 0, nullptr, nullptr);
+ JSValueUnprotect(context, jsCallbackFunction);
+ });
+}
+
}
#define WebCoreTestSupport_h
typedef const struct OpaqueJSContext* JSContextRef;
+typedef struct OpaqueJSValue* JSObjectRef;
#if PLATFORM(COCOA)
#define TEST_SUPPORT_EXPORT WTF_EXPORT_PRIVATE
#define TEST_SUPPORT_EXPORT
#endif
+namespace WebCore {
+class Frame;
+}
+
namespace WebCoreTestSupport {
void injectInternalsObject(JSContextRef) TEST_SUPPORT_EXPORT;
void resetInternalsObject(JSContextRef) TEST_SUPPORT_EXPORT;
+void monitorWheelEvents(WebCore::Frame&) TEST_SUPPORT_EXPORT;
+void setTestCallbackAndStartNotificationTimer(WebCore::Frame&, JSContextRef, JSObjectRef) TEST_SUPPORT_EXPORT;
} // namespace WebCore
+2015-04-14 Brent Fulgham <bfulgham@apple.com>
+
+ Correct layering violation in DumpRenderTree Build
+ https://bugs.webkit.org/show_bug.cgi?id=143732
+
+ Reviewed by Simon Fraser.
+
+ Correct a layering violation in DumpRenderTree by calling functions on the
+ WebCoreTestSupport library, rather than attempting to work with WebCore
+ types directly.
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (-[EventSendingController monitorWheelEvents]): Call methods on WebCoreTestSupport, rather
+ than WebCore itself.,
+ (-[EventSendingController callAfterScrollingCompletes:]): Ditto.
+
2015-04-14 Benjamin Poulain <benjamin@webkit.org>
Add a conservative DFA minimizer for the content extension matcher
#import "DumpRenderTree.h"
#import "DumpRenderTreeDraggingInfo.h"
#import "DumpRenderTreeFileDraggingSource.h"
+#import "WebCoreTestSupport.h"
#import <WebKit/DOMPrivate.h>
#import <WebKit/WebKit.h>
#import <WebKit/WebViewPrivate.h>
#if !PLATFORM(IOS)
#import <Carbon/Carbon.h> // for GetCurrentEventTime()
-#import <JavaScriptCore/JSRetainPtr.h>
-#import <WebCore/MainFrame.h>
-#import <WebCore/Page.h>
-#import <WebCore/WheelEventTestTrigger.h>
#endif
#if PLATFORM(IOS)
WebCore::Frame* frame = [[mainFrame webView] _mainCoreFrame];
if (!frame)
return;
-
- frame->mainFrame().ensureTestTrigger();
+
+ WebCoreTestSupport::monitorWheelEvents(*frame);
#endif
}
if (!frame)
return;
- WebCore::WheelEventTestTrigger* trigger = frame->mainFrame().ensureTestTrigger();
JSGlobalContextRef globalContext = [mainFrame globalContext];
- JSValueProtect(globalContext, jsCallbackFunction);
-
- trigger->setTestCallbackAndStartNotificationTimer([=](void) {
- JSObjectCallAsFunction(globalContext, jsCallbackFunction, nullptr, 0, nullptr, nullptr);
- JSValueUnprotect(globalContext, jsCallbackFunction);
- });
+ WebCoreTestSupport::setTestCallbackAndStartNotificationTimer(*frame, globalContext, jsCallbackFunction);
#endif
}