~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebKitTools/DumpRenderTree/AccessibilityController.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-01-06 21:25:06 UTC
  • mfrom: (1.2.6 upstream) (4.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100106212506-gd0czn4zrwf1j19l
* New upstream release
- adds basic Content-Encoding support, thanks to soup
  (Closes: #529271)
- fixes over-advertising content types as supported by
  the media player (Closes: #559420)
* debian/control:
- updated libsoup build requirement (>= 2.28.2)
* debian/libwebkit-1.0-2.symbols:
- updated with new symbols
* debian/copyright:
- updated information since 1.1.17
* Imported patch from https://bugs.webkit.org/show_bug.cgi?id=30623
- I am shipping this patch because I believe it is correct, it is the
  way to go, it fixes a race, and it needs testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
 
2
 * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved.
3
3
 *
4
4
 * Redistribution and use in source and binary forms, with or without
5
5
 * modification, are permitted provided that the following conditions
48
48
void AccessibilityController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
49
49
{
50
50
    JSRetainPtr<JSStringRef> accessibilityControllerStr(Adopt, JSStringCreateWithUTF8CString("accessibilityController"));
51
 
    JSValueRef accessibilityControllerObject = JSObjectMake(context, getJSClass(), this);
 
51
    
 
52
    JSClassRef classRef = getJSClass();
 
53
    JSValueRef accessibilityControllerObject = JSObjectMake(context, classRef, this);
 
54
    JSClassRelease(classRef);
 
55
 
52
56
    JSObjectSetProperty(context, windowObject, accessibilityControllerStr.get(), accessibilityControllerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
53
57
}
54
58
 
59
63
    return JSValueMakeUndefined(ctx);
60
64
}
61
65
 
 
66
static JSValueRef logValueChangeEventsCallback(JSContextRef ctx, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
 
67
{
 
68
    AccessibilityController* controller = static_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject));
 
69
    controller->setLogValueChangeEvents(true);
 
70
    return JSValueMakeUndefined(ctx);
 
71
}
 
72
 
62
73
static JSValueRef logScrollingStartEventsCallback(JSContextRef ctx, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
63
74
{
64
75
    AccessibilityController* controller = static_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject));
70
81
{
71
82
    static JSStaticFunction staticFunctions[] = {
72
83
        { "logFocusEvents", logFocusEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
 
84
        { "logValueChangeEvents", logValueChangeEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
73
85
        { "logScrollingStartEvents", logScrollingStartEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
74
86
        { 0, 0, 0 }
75
87
    };
85
97
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
86
98
    };
87
99
 
88
 
    static JSClassRef accessibilityControllerClass = JSClassCreate(&classDefinition);
89
 
    return accessibilityControllerClass;
 
100
    return JSClassCreate(&classDefinition);
90
101
}
91
102
 
92
103
void AccessibilityController::resetToConsistentState()
93
104
{
94
105
    setLogFocusEvents(false);
 
106
    setLogValueChangeEvents(false);
95
107
    setLogScrollingStartEvents(false);
96
108
}