| Differences between
and this patch
- a/LayoutTests/ChangeLog +14 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2011-10-11  Kentaro Hara  <haraken@chromium.org>
2
3
        Implement a WebKitTransitionEvent constructor for JSC
4
        https://bugs.webkit.org/show_bug.cgi?id=69829
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        webkit-transition-event-constructor.html checks the behavior of the WebKitTransitionEvent constructor.
9
10
        * fast/dom/constructed-objects-prototypes-expected.txt:
11
        * fast/events/constructors/webkit-transition-event-constructor-expected.txt: Added.
12
        * fast/events/constructors/webkit-transition-event-constructor.html: Added.
13
        * platform/chromium/test_expectations.txt: Skipped webkit-transition-event-constructor.html, since V8 does not yet have the WebKitTransitionEvent constructor.
14
1
2011-10-10  Ryosuke Niwa  <rniwa@webkit.org>
15
2011-10-10  Ryosuke Niwa  <rniwa@webkit.org>
2
16
3
        REGRESSION(r96870): editing/pasteboard/smart-paste-008.html fails on non-Mac
17
        REGRESSION(r96870): editing/pasteboard/smart-paste-008.html fails on non-Mac
- a/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt +2 lines
Lines 35-40 PASS (new inner.ProgressEvent()).isInner is true a/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt_sec1
35
PASS (new inner.ProgressEvent()).constructor.isInner is true
35
PASS (new inner.ProgressEvent()).constructor.isInner is true
36
PASS (new inner.WebKitAnimationEvent()).isInner is true
36
PASS (new inner.WebKitAnimationEvent()).isInner is true
37
PASS (new inner.WebKitAnimationEvent()).constructor.isInner is true
37
PASS (new inner.WebKitAnimationEvent()).constructor.isInner is true
38
PASS (new inner.WebKitTransitionEvent()).isInner is true
39
PASS (new inner.WebKitTransitionEvent()).constructor.isInner is true
38
PASS (new inner.WebKitCSSMatrix()).isInner is true
40
PASS (new inner.WebKitCSSMatrix()).isInner is true
39
PASS (new inner.WebKitCSSMatrix()).constructor.isInner is true
41
PASS (new inner.WebKitCSSMatrix()).constructor.isInner is true
40
PASS (new inner.WebKitPoint()).isInner is true
42
PASS (new inner.WebKitPoint()).isInner is true
- a/LayoutTests/fast/events/constructors/webkit-transition-event-constructor-expected.txt +52 lines
Line 0 a/LayoutTests/fast/events/constructors/webkit-transition-event-constructor-expected.txt_sec1
1
This tests the constructor for the WebKitTransitionEvent DOM class.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
PASS new WebKitTransitionEvent('eventType').bubbles is false
7
PASS new WebKitTransitionEvent('eventType').cancelable is false
8
PASS new WebKitTransitionEvent('eventType').propertyName is ""
9
PASS new WebKitTransitionEvent('eventType').elapsedTime is 0
10
PASS new WebKitTransitionEvent('eventType', { bubbles: false }).bubbles is false
11
PASS new WebKitTransitionEvent('eventType', { bubbles: true }).bubbles is true
12
PASS new WebKitTransitionEvent('eventType', { cancelable: false }).cancelable is false
13
PASS new WebKitTransitionEvent('eventType', { cancelable: true }).cancelable is true
14
PASS new WebKitTransitionEvent('eventType', { propertyName: 'doremi' }).propertyName is "doremi"
15
PASS new WebKitTransitionEvent('eventType', { propertyName: '' }).propertyName is ""
16
PASS new WebKitTransitionEvent('eventType', { propertyName: undefined }).propertyName is "undefined"
17
PASS new WebKitTransitionEvent('eventType', { propertyName: null }).propertyName is "null"
18
PASS new WebKitTransitionEvent('eventType', { propertyName: false }).propertyName is "false"
19
PASS new WebKitTransitionEvent('eventType', { propertyName: true }).propertyName is "true"
20
PASS new WebKitTransitionEvent('eventType', { propertyName: 12345 }).propertyName is "12345"
21
PASS new WebKitTransitionEvent('eventType', { propertyName: 18446744073709551615 }).propertyName is "18446744073709552000"
22
PASS new WebKitTransitionEvent('eventType', { propertyName: NaN }).propertyName is "NaN"
23
PASS new WebKitTransitionEvent('eventType', { propertyName: [] }).propertyName is ""
24
PASS new WebKitTransitionEvent('eventType', { propertyName: [1, 2, 3] }).propertyName is "1,2,3"
25
PASS new WebKitTransitionEvent('eventType', { propertyName: {doremi: 12345} }).propertyName is "[object Object]"
26
PASS new WebKitTransitionEvent('eventType', { propertyName: {valueOf: function () { return 'doremi'; } } }).propertyName is "[object Object]"
27
PASS new WebKitTransitionEvent('eventType', { elapsedTime: 0 }).elapsedTime is 0
28
PASS new WebKitTransitionEvent('eventType', { elapsedTime: 123.45 }).elapsedTime is 123.45
29
PASS new WebKitTransitionEvent('eventType', { elapsedTime: -123.45 }).elapsedTime is -123.45
30
PASS new WebKitTransitionEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime is 18446744073709551615
31
PASS new WebKitTransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime is NaN
32
PASS new WebKitTransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime is Infinity
33
PASS new WebKitTransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime is -Infinity
34
PASS new WebKitTransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime is NaN
35
PASS new WebKitTransitionEvent('eventType', { elapsedTime: null }).elapsedTime is 0
36
PASS new WebKitTransitionEvent('eventType', { elapsedTime: false }).elapsedTime is 0
37
PASS new WebKitTransitionEvent('eventType', { elapsedTime: true }).elapsedTime is 1
38
PASS new WebKitTransitionEvent('eventType', { elapsedTime: '' }).elapsedTime is 0
39
PASS new WebKitTransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime is NaN
40
PASS new WebKitTransitionEvent('eventType', { elapsedTime: [] }).elapsedTime is 0
41
PASS new WebKitTransitionEvent('eventType', { elapsedTime: [123.45] }).elapsedTime is 123.45
42
PASS new WebKitTransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime is NaN
43
PASS new WebKitTransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime is NaN
44
PASS new WebKitTransitionEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime is 123.45
45
PASS new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45 }).bubbles is true
46
PASS new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45 }).cancelable is true
47
PASS new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45 }).propertyName is 'doremi'
48
PASS new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45 }).elapsedTime is 123.45
49
PASS successfullyParsed is true
50
51
TEST COMPLETE
52
- a/LayoutTests/fast/events/constructors/webkit-transition-event-constructor.html +79 lines
Line 0 a/LayoutTests/fast/events/constructors/webkit-transition-event-constructor.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
5
<script src="../../js/resources/js-test-pre.js"></script>
6
</head>
7
<body>
8
<p id="description"></p>
9
<div id="console"></div>
10
<script>
11
12
description("This tests the constructor for the WebKitTransitionEvent DOM class.");
13
14
// No initializer is passed.
15
shouldBe("new WebKitTransitionEvent('eventType').bubbles", "false");
16
shouldBe("new WebKitTransitionEvent('eventType').cancelable", "false");
17
shouldBeEqualToString("new WebKitTransitionEvent('eventType').propertyName", "");
18
shouldBe("new WebKitTransitionEvent('eventType').elapsedTime", "0");
19
20
// bubbles is passed.
21
shouldBe("new WebKitTransitionEvent('eventType', { bubbles: false }).bubbles", "false");
22
shouldBe("new WebKitTransitionEvent('eventType', { bubbles: true }).bubbles", "true");
23
24
// cancelable is passed.
25
shouldBe("new WebKitTransitionEvent('eventType', { cancelable: false }).cancelable", "false");
26
shouldBe("new WebKitTransitionEvent('eventType', { cancelable: true }).cancelable", "true");
27
28
// propertyName is passed.
29
// Strings.
30
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: 'doremi' }).propertyName", "doremi");
31
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: '' }).propertyName", "");
32
33
// Non-strings.
34
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: undefined }).propertyName", "undefined");
35
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: null }).propertyName", "null");
36
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: false }).propertyName", "false");
37
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: true }).propertyName", "true");
38
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: 12345 }).propertyName", "12345");
39
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: 18446744073709551615 }).propertyName", "18446744073709552000");
40
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: NaN }).propertyName", "NaN");
41
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: [] }).propertyName", "");
42
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: [1, 2, 3] }).propertyName", "1,2,3");
43
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: {doremi: 12345} }).propertyName", "[object Object]");
44
shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: {valueOf: function () { return 'doremi'; } } }).propertyName", "[object Object]");
45
46
// elapsedTime is passed.
47
// Numeric values.
48
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: 0 }).elapsedTime", "0");
49
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: 123.45 }).elapsedTime", "123.45");
50
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: -123.45 }).elapsedTime", "-123.45");
51
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime", "18446744073709551615");
52
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime", "NaN");
53
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime", "Infinity");
54
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime", "-Infinity");
55
56
// Non-numeric values.
57
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime", "NaN");
58
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: null }).elapsedTime", "0");
59
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: false }).elapsedTime", "0");
60
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: true }).elapsedTime", "1");
61
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: '' }).elapsedTime", "0");
62
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime", "NaN");
63
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: [] }).elapsedTime", "0");
64
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: [123.45] }).elapsedTime", "123.45");
65
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime", "NaN");
66
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime", "NaN");
67
shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime", "123.45");
68
69
// All initializers are passed.
70
shouldBe("new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45 }).bubbles", "true");
71
shouldBe("new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45 }).cancelable", "true");
72
shouldBe("new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45 }).propertyName", "'doremi'");
73
shouldBe("new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45 }).elapsedTime", "123.45");
74
75
var successfullyParsed = true;
76
</script>
77
<script src="../../js/resources/js-test-post.js"></script>
78
</body>
79
</html>
- a/LayoutTests/platform/chromium/test_expectations.txt +3 lines
Lines 83-88 BUGCR89468 : css3/selectors3 = PASS FAIL a/LayoutTests/platform/chromium/test_expectations.txt_sec1
83
// Tests for WebVTT parser for <track>.  Feature is not yet functional.
83
// Tests for WebVTT parser for <track>.  Feature is not yet functional.
84
BUGWK43668 SKIP : media/track/ = TIMEOUT
84
BUGWK43668 SKIP : media/track/ = TIMEOUT
85
85
86
// This will soon be fixed after implementing a WebKitTransitionEvent constructor for V8.
87
BUGWK69829 : fast/events/constructors/webkit-transition-event-constructor.html = FAIL
88
86
// Tests for MediaSource API. Feature is not yet functional.
89
// Tests for MediaSource API. Feature is not yet functional.
87
BUGWK64731 SKIP : http/tests/media/media-source/ = TIMEOUT
90
BUGWK64731 SKIP : http/tests/media/media-source/ = TIMEOUT
88
91
- a/Source/WebCore/ChangeLog +35 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-10-11  Kentaro Hara  <haraken@chromium.org>
2
3
        Implement a WebKitTransitionEvent constructor for JSC
4
        https://bugs.webkit.org/show_bug.cgi?id=69829
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        There is no spec for the WebKitTransitionEvent constructor
9
        since it is WebKit-specific. However, judging from the current
10
        IDL of initWebKitTransitionEvent(), the constructor IDL
11
        should be as follows.
12
13
        [Constructor(DOMString type, optional WebKitTransitionEventInit eventInitDict)]
14
        interface WebKitTransitionEvent : Event {
15
            ...;
16
        }
17
18
        dictionary WebKitTransitionEventInit : EventInit {
19
            DOMString propertyName;
20
            double elapsedTime;
21
        }
22
23
        Test: fast/events/constructors/webkit-transition-event-constructor.html
24
25
        * bindings/generic/EventConstructors.h: Added a definition for the WebKitTransitionEvent constructor.
26
        * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitTransitionEvent.
27
        * dom/WebKitTransitionEvent.cpp:
28
        (WebCore::WebKitTransitionEventInit::WebKitTransitionEventInit):
29
        (WebCore::WebKitTransitionEvent::WebKitTransitionEvent):
30
        (WebCore::WebKitTransitionEvent::initWebKitTransitionEvent):
31
        * dom/WebKitTransitionEvent.h: Added a definition for WebKitTransitionEventInit.
32
        (WebCore::WebKitTransitionEvent::create):
33
        (WebCore::WebKitTransitionEvent::isWebKitTransitionEvent):
34
        * dom/WebKitTransitionEvent.idl: Makes WebKitTransitionEvent constructible.
35
1
2011-10-10  Ryosuke Niwa  <rniwa@webkit.org>
36
2011-10-10  Ryosuke Niwa  <rniwa@webkit.org>
2
37
3
        REGRESSION(r96870): editing/pasteboard/smart-paste-008.html fails on non-Mac
38
        REGRESSION(r96870): editing/pasteboard/smart-paste-008.html fails on non-Mac
- a/Source/WebCore/bindings/generic/EventConstructors.h +9 lines
Lines 110-115 namespace WebCore { a/Source/WebCore/bindings/generic/EventConstructors.h_sec1
110
        FILL_PROPERTY(ports) \
110
        FILL_PROPERTY(ports) \
111
    DICTIONARY_END(MessageEvent)
111
    DICTIONARY_END(MessageEvent)
112
112
113
#define INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_WEBKIT_TRANSITION_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
114
    \
115
    DICTIONARY_START(WebKitTransitionEvent) \
116
        FILL_PARENT_PROPERTIES(Event) \
117
        FILL_PROPERTY(propertyName) \
118
        FILL_PROPERTY(elapsedTime) \
119
    DICTIONARY_END(WebKitTransitionEvent)
120
113
121
114
#define INSTANTIATE_ALL_EVENT_INITIALIZING_CONSTRUCTORS(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
122
#define INSTANTIATE_ALL_EVENT_INITIALIZING_CONSTRUCTORS(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
115
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
123
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
Lines 122-127 namespace WebCore { a/Source/WebCore/bindings/generic/EventConstructors.h_sec2
122
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_ERROR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
130
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_ERROR_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
123
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_CLOSE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
131
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_CLOSE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
124
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_MESSAGE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
132
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_MESSAGE_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
133
    INSTANTIATE_INITIALIZING_CONSTRUCTOR_FOR_WEBKIT_TRANSITION_EVENT(DICTIONARY_START, DICTIONARY_END, FILL_PARENT_PROPERTIES, FILL_PROPERTY) \
125
134
126
} // namespace WebCore
135
} // namespace WebCore
127
136
- a/Source/WebCore/bindings/js/JSEventConstructors.cpp +2 lines
Lines 42-52 a/Source/WebCore/bindings/js/JSEventConstructors.cpp_sec1
42
#include "JSPopStateEvent.h"
42
#include "JSPopStateEvent.h"
43
#include "JSProgressEvent.h"
43
#include "JSProgressEvent.h"
44
#include "JSWebKitAnimationEvent.h"
44
#include "JSWebKitAnimationEvent.h"
45
#include "JSWebKitTransitionEvent.h"
45
#include "MessageEvent.h"
46
#include "MessageEvent.h"
46
#include "PageTransitionEvent.h"
47
#include "PageTransitionEvent.h"
47
#include "PopStateEvent.h"
48
#include "PopStateEvent.h"
48
#include "ProgressEvent.h"
49
#include "ProgressEvent.h"
49
#include "WebKitAnimationEvent.h"
50
#include "WebKitAnimationEvent.h"
51
#include "WebKitTransitionEvent.h"
50
#include <runtime/Error.h>
52
#include <runtime/Error.h>
51
53
52
using namespace JSC;
54
using namespace JSC;
- a/Source/WebCore/dom/WebKitTransitionEvent.cpp -3 / +16 lines
Lines 29-35 a/Source/WebCore/dom/WebKitTransitionEvent.cpp_sec1
29
#include "EventNames.h"
29
#include "EventNames.h"
30
30
31
namespace WebCore {
31
namespace WebCore {
32
        
32
33
WebKitTransitionEventInit::WebKitTransitionEventInit()
34
    : propertyName()
35
    , elapsedTime(0.0)
36
{
37
}
38
33
WebKitTransitionEvent::WebKitTransitionEvent()
39
WebKitTransitionEvent::WebKitTransitionEvent()
34
    : m_propertyName()
40
    : m_propertyName()
35
    , m_elapsedTime(0.0)
41
    , m_elapsedTime(0.0)
Lines 43-48 WebKitTransitionEvent::WebKitTransitionEvent(const AtomicString& type, const Str a/Source/WebCore/dom/WebKitTransitionEvent.cpp_sec2
43
{
49
{
44
}
50
}
45
51
52
WebKitTransitionEvent::WebKitTransitionEvent(const AtomicString& type, const WebKitTransitionEventInit& initializer)
53
    : Event(type, initializer)
54
    , m_propertyName(initializer.propertyName)
55
    , m_elapsedTime(initializer.elapsedTime)
56
{
57
}
58
46
WebKitTransitionEvent::~WebKitTransitionEvent()
59
WebKitTransitionEvent::~WebKitTransitionEvent()
47
{
60
{
48
}
61
}
Lines 55-63 void WebKitTransitionEvent::initWebKitTransitionEvent(const AtomicString& type, a/Source/WebCore/dom/WebKitTransitionEvent.cpp_sec3
55
{
68
{
56
    if (dispatched())
69
    if (dispatched())
57
        return;
70
        return;
58
    
71
59
    initEvent(type, canBubbleArg, cancelableArg);
72
    initEvent(type, canBubbleArg, cancelableArg);
60
    
73
61
    m_propertyName = propertyName;
74
    m_propertyName = propertyName;
62
    m_elapsedTime = elapsedTime;
75
    m_elapsedTime = elapsedTime;
63
}
76
}
- a/Source/WebCore/dom/WebKitTransitionEvent.h -31 / +43 lines
Lines 29-67 a/Source/WebCore/dom/WebKitTransitionEvent.h_sec1
29
#include "Event.h"
29
#include "Event.h"
30
30
31
namespace WebCore {
31
namespace WebCore {
32
        
33
    class WebKitTransitionEvent : public Event {
34
    public:
35
        static PassRefPtr<WebKitTransitionEvent> create()
36
        {
37
            return adoptRef(new WebKitTransitionEvent);
38
        }
39
        static PassRefPtr<WebKitTransitionEvent> create(const AtomicString& type, const String& animationName, double elapsedTime)
40
        {
41
            return adoptRef(new WebKitTransitionEvent(type, animationName, elapsedTime));
42
        }
43
32
44
        virtual ~WebKitTransitionEvent();
33
struct WebKitTransitionEventInit : public EventInit {
45
        
34
    WebKitTransitionEventInit();
46
        void initWebKitTransitionEvent(const AtomicString& type, 
35
47
                                bool canBubbleArg,
36
    String propertyName;
48
                                bool cancelableArg,
37
    double elapsedTime;
49
                                const String& propertyName,
38
};
50
                                double elapsedTime);
39
51
                        
40
class WebKitTransitionEvent : public Event {
52
        const String& propertyName() const;
41
public:
53
        double elapsedTime() const;
42
    static PassRefPtr<WebKitTransitionEvent> create()
54
        
43
    {
55
        virtual bool isWebKitTransitionEvent() const { return true; }
44
        return adoptRef(new WebKitTransitionEvent);
56
        
45
    }
57
    private:
46
    static PassRefPtr<WebKitTransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime)
58
        WebKitTransitionEvent();
47
    {
59
        WebKitTransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime);
48
        return adoptRef(new WebKitTransitionEvent(type, propertyName, elapsedTime));
49
    }
50
    static PassRefPtr<WebKitTransitionEvent> create(const AtomicString& type, const WebKitTransitionEventInit& initializer)
51
    {
52
        return adoptRef(new WebKitTransitionEvent(type, initializer));
53
    }
54
55
    virtual ~WebKitTransitionEvent();
56
57
    void initWebKitTransitionEvent(const AtomicString& type, 
58
                                   bool canBubbleArg,
59
                                   bool cancelableArg,
60
                                   const String& propertyName,
61
                                   double elapsedTime);
62
63
    const String& propertyName() const;
64
    double elapsedTime() const;
65
66
    virtual bool isWebKitTransitionEvent() const { return true; }
67
68
private:
69
    WebKitTransitionEvent();
70
    WebKitTransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime);
71
    WebKitTransitionEvent(const AtomicString& type, const WebKitTransitionEventInit& initializer);
72
73
    String m_propertyName;
74
    double m_elapsedTime;
75
};
60
76
61
        String m_propertyName;
62
        double m_elapsedTime;
63
    };
64
    
65
} // namespace WebCore
77
} // namespace WebCore
66
78
67
#endif // WebKitTransitionEvent_h
79
#endif // WebKitTransitionEvent_h
- a/Source/WebCore/dom/WebKitTransitionEvent.idl -8 / +11 lines
Lines 25-38 a/Source/WebCore/dom/WebKitTransitionEvent.idl_sec1
25
25
26
module events {
26
module events {
27
27
28
    interface WebKitTransitionEvent : Event {
28
    interface [
29
     readonly attribute DOMString          propertyName;
29
        CanBeConstructed,
30
     readonly attribute double             elapsedTime;
30
        JSCustomConstructor
31
     void               initWebKitTransitionEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
31
    ] WebKitTransitionEvent : Event {
32
                                           in [Optional=CallWithDefaultValue] boolean canBubbleArg,
32
    readonly attribute DOMString          propertyName;
33
                                           in [Optional=CallWithDefaultValue] boolean cancelableArg,
33
    readonly attribute double             elapsedTime;
34
                                           in [Optional=CallWithDefaultValue] DOMString propertyNameArg,
34
    void               initWebKitTransitionEvent(in [Optional=CallWithDefaultValue] DOMString typeArg,
35
                                           in [Optional=CallWithDefaultValue] double elapsedTimeArg);
35
                                                 in [Optional=CallWithDefaultValue] boolean canBubbleArg,
36
                                                 in [Optional=CallWithDefaultValue] boolean cancelableArg,
37
                                                 in [Optional=CallWithDefaultValue] DOMString propertyNameArg,
38
                                                 in [Optional=CallWithDefaultValue] double elapsedTimeArg);
36
};
39
};
37
40
38
}
41
}

Return to Bug 69829