summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/AccessibilityController.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-10-08 17:19:54 +0100
committerSteve Block <steveblock@google.com>2009-10-20 00:41:58 +0100
commit231d4e3152a9c27a73b6ac7badbe6be673aa3ddf (patch)
treea6c7e2d6cd7bfa7011cc39abbb436142d7a4a7c8 /WebKitTools/DumpRenderTree/AccessibilityController.cpp
parente196732677050bd463301566a68a643b6d14b907 (diff)
downloadexternal_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.zip
external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.gz
external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.bz2
Merge webkit.org at R49305 : Automatic merge by git.
Change-Id: I8968561bc1bfd72b8923b7118d3728579c6dbcc7
Diffstat (limited to 'WebKitTools/DumpRenderTree/AccessibilityController.cpp')
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityController.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/WebKitTools/DumpRenderTree/AccessibilityController.cpp b/WebKitTools/DumpRenderTree/AccessibilityController.cpp
index 6556f91..af1daf6 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityController.cpp
+++ b/WebKitTools/DumpRenderTree/AccessibilityController.cpp
@@ -52,8 +52,28 @@ void AccessibilityController::makeWindowObject(JSContextRef context, JSObjectRef
JSObjectSetProperty(context, windowObject, accessibilityControllerStr.get(), accessibilityControllerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
}
+static JSValueRef logFocusEventsCallback(JSContextRef ctx, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
+{
+ AccessibilityController* controller = static_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject));
+ controller->setLogFocusEvents(true);
+ return JSValueMakeUndefined(ctx);
+}
+
+static JSValueRef logScrollingStartEventsCallback(JSContextRef ctx, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
+{
+ AccessibilityController* controller = static_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject));
+ controller->setLogScrollingStartEvents(true);
+ return JSValueMakeUndefined(ctx);
+}
+
JSClassRef AccessibilityController::getJSClass()
{
+ static JSStaticFunction staticFunctions[] = {
+ { "logFocusEvents", logFocusEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "logScrollingStartEvents", logScrollingStartEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0 }
+ };
+
static JSStaticValue staticValues[] = {
{ "focusedElement", getFocusedElementCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "rootElement", getRootElementCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -61,10 +81,16 @@ JSClassRef AccessibilityController::getJSClass()
};
static JSClassDefinition classDefinition = {
- 0, kJSClassAttributeNone, "AccessibilityController", 0, staticValues, 0,
+ 0, kJSClassAttributeNone, "AccessibilityController", 0, staticValues, staticFunctions,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static JSClassRef accessibilityControllerClass = JSClassCreate(&classDefinition);
return accessibilityControllerClass;
}
+
+void AccessibilityController::resetToConsistentState()
+{
+ setLogFocusEvents(false);
+ setLogScrollingStartEvents(false);
+}