Changeset 207215 in webkit
- Timestamp:
- Oct 12, 2016 9:23:00 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 58 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207189 r207215 1 2016-10-12 Chris Dumez <cdumez@apple.com> 2 3 Update remaining DOM events to stop using legacy [ConstructorTemplate=Event] 4 https://bugs.webkit.org/show_bug.cgi?id=163319 5 6 Reviewed by Darin Adler. 7 8 Rebaseline several existing tests to reflect minor behavior changes: 9 - We now properly use the default member value when an explicit undefined 10 is passed. 11 - We throw more exceptions when bad input is passed. 12 - Exception messages are sometimes slightly different. 13 14 * fast/events/constructors/before-load-event-constructor-expected.txt: 15 * fast/events/constructors/before-load-event-constructor.html: 16 * fast/events/constructors/composition-event-constructor-expected.txt: 17 * fast/events/constructors/composition-event-constructor.html: 18 * fast/events/constructors/error-event-constructor-expected.txt: 19 * fast/events/constructors/error-event-constructor.html: 20 * fast/events/constructors/focus-event-constructor-expected.txt: 21 * fast/events/constructors/focus-event-constructor.html: 22 * fast/events/constructors/hash-change-event-constructor-expected.txt: 23 * fast/events/constructors/hash-change-event-constructor.html: 24 * fast/events/constructors/pop-state-event-constructor-expected.txt: 25 * fast/events/constructors/pop-state-event-constructor.html: 26 * fast/events/constructors/transition-event-constructor-expected.txt: 27 * fast/events/constructors/transition-event-constructor.html: 28 * fast/events/constructors/webkit-animation-event-constructor-expected.txt: 29 * fast/events/constructors/webkit-animation-event-constructor.html: 30 * fast/events/constructors/webkit-transition-event-constructor-expected.txt: 31 * fast/events/constructors/webkit-transition-event-constructor.html: 32 1 33 2016-10-11 Gyuyoung Kim <gyuyoung.kim@webkit.org> 2 34 -
trunk/LayoutTests/fast/events/constructors/before-load-event-constructor-expected.txt
r97324 r207215 13 13 PASS new BeforeLoadEvent('eventType', { url: 'doremi' }).url is "doremi" 14 14 PASS new BeforeLoadEvent('eventType', { url: '' }).url is "" 15 PASS new BeforeLoadEvent('eventType', { url: undefined }).url is " undefined"15 PASS new BeforeLoadEvent('eventType', { url: undefined }).url is "" 16 16 PASS new BeforeLoadEvent('eventType', { url: null }).url is "null" 17 17 PASS new BeforeLoadEvent('eventType', { url: false }).url is "false" -
trunk/LayoutTests/fast/events/constructors/before-load-event-constructor.html
r155267 r207215 30 30 31 31 // Non-strings. 32 shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: undefined }).url", " undefined");32 shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: undefined }).url", ""); 33 33 shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: null }).url", "null"); 34 34 shouldBeEqualToString("new BeforeLoadEvent('eventType', { url: false }).url", "false"); -
trunk/LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt
r203950 r207215 15 15 PASS new CompositionEvent('eventType', { view: window }).view is window 16 16 PASS new CompositionEvent('eventType', { view: this }).view is this 17 PASS new CompositionEvent('eventType', { view: testObject }).view threw exception TypeError: Dictionary member is not of type Window.18 PASS new CompositionEvent('eventType', { view: document }).view threw exception TypeError: Dictionary member is not of type Window.17 PASS new CompositionEvent('eventType', { view: testObject }).view threw exception TypeError: Type error. 18 PASS new CompositionEvent('eventType', { view: document }).view threw exception TypeError: Type error. 19 19 PASS new CompositionEvent('eventType', { view: undefined }).view is null 20 20 PASS new CompositionEvent('eventType', { view: null }).view is null 21 PASS new CompositionEvent('eventType', { view: false }).view threw exception TypeError: Dictionary member is not of type Window.22 PASS new CompositionEvent('eventType', { view: true }).view threw exception TypeError: Dictionary member is not of type Window.23 PASS new CompositionEvent('eventType', { view: '' }).view threw exception TypeError: Dictionary member is not of type Window.24 PASS new CompositionEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Dictionary member is not of type Window.25 PASS new CompositionEvent('eventType', { view: 12345 }).view threw exception TypeError: Dictionary member is not of type Window.26 PASS new CompositionEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Dictionary member is not of type Window.27 PASS new CompositionEvent('eventType', { view: NaN }).view threw exception TypeError: Dictionary member is not of type Window.28 PASS new CompositionEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Dictionary member is not of type Window.29 PASS new CompositionEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Dictionary member is not of type Window.21 PASS new CompositionEvent('eventType', { view: false }).view threw exception TypeError: Type error. 22 PASS new CompositionEvent('eventType', { view: true }).view threw exception TypeError: Type error. 23 PASS new CompositionEvent('eventType', { view: '' }).view threw exception TypeError: Type error. 24 PASS new CompositionEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Type error. 25 PASS new CompositionEvent('eventType', { view: 12345 }).view threw exception TypeError: Type error. 26 PASS new CompositionEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Type error. 27 PASS new CompositionEvent('eventType', { view: NaN }).view threw exception TypeError: Type error. 28 PASS new CompositionEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Type error. 29 PASS new CompositionEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Type error. 30 30 PASS new CompositionEvent('eventType', { get view() { throw 'CompositionEvent Error'; } }) threw exception CompositionEvent Error. 31 31 PASS new CompositionEvent('eventType', { data: 'koakuma' }).data is "koakuma" 32 32 PASS new CompositionEvent('eventType', { data: '' }).data is "" 33 PASS new CompositionEvent('eventType', { data: undefined }).data is " undefined"33 PASS new CompositionEvent('eventType', { data: undefined }).data is "" 34 34 PASS new CompositionEvent('eventType', { data: null }).data is "null" 35 35 PASS new CompositionEvent('eventType', { data: false }).data is "false" -
trunk/LayoutTests/fast/events/constructors/composition-event-constructor.html
r203950 r207215 54 54 55 55 // Non-strings. 56 shouldBeEqualToString("new CompositionEvent('eventType', { data: undefined }).data", " undefined");56 shouldBeEqualToString("new CompositionEvent('eventType', { data: undefined }).data", ""); 57 57 shouldBeEqualToString("new CompositionEvent('eventType', { data: null }).data", "null"); 58 58 shouldBeEqualToString("new CompositionEvent('eventType', { data: false }).data", "false"); -
trunk/LayoutTests/fast/events/constructors/error-event-constructor-expected.txt
r202023 r207215 15 15 PASS new ErrorEvent('eventType', { message: 'melancholy' }).message is "melancholy" 16 16 PASS new ErrorEvent('eventType', { message: '' }).message is "" 17 PASS new ErrorEvent('eventType', { message: undefined }).message is " undefined"17 PASS new ErrorEvent('eventType', { message: undefined }).message is "" 18 18 PASS new ErrorEvent('eventType', { message: null }).message is "null" 19 19 PASS new ErrorEvent('eventType', { message: false }).message is "false" … … 28 28 PASS new ErrorEvent('eventType', { filename: 'melancholy' }).filename is "melancholy" 29 29 PASS new ErrorEvent('eventType', { filename: '' }).filename is "" 30 PASS new ErrorEvent('eventType', { filename: undefined }).filename is " undefined"30 PASS new ErrorEvent('eventType', { filename: undefined }).filename is "" 31 31 PASS new ErrorEvent('eventType', { filename: null }).filename is "null" 32 32 PASS new ErrorEvent('eventType', { filename: false }).filename is "false" … … 65 65 PASS new ErrorEvent('eventType', { colno: 4294967294 }).colno is 4294967294 66 66 PASS new ErrorEvent('eventType', { colno: 4294967295 }).colno is 4294967295 67 PASS new ErrorEvent('eventType', { error: undefined }).error is undefined67 PASS new ErrorEvent('eventType', { error: undefined }).error is null 68 68 PASS new ErrorEvent('eventType', { error: null }).error is null 69 69 PASS new ErrorEvent('eventType', { error: '' }).error is '' -
trunk/LayoutTests/fast/events/constructors/error-event-constructor.html
r202023 r207215 31 31 32 32 // Non-strings. 33 shouldBeEqualToString("new ErrorEvent('eventType', { " + attr + ": undefined })." + attr, " undefined");33 shouldBeEqualToString("new ErrorEvent('eventType', { " + attr + ": undefined })." + attr, ""); 34 34 shouldBeEqualToString("new ErrorEvent('eventType', { " + attr + ": null })." + attr, "null"); 35 35 shouldBeEqualToString("new ErrorEvent('eventType', { " + attr + ": false })." + attr, "false"); … … 83 83 84 84 // error is passed. 85 shouldBe("new ErrorEvent('eventType', { error: undefined }).error", " undefined");85 shouldBe("new ErrorEvent('eventType', { error: undefined }).error", "null"); 86 86 shouldBe("new ErrorEvent('eventType', { error: null }).error", "null"); 87 87 shouldBe("new ErrorEvent('eventType', { error: '' }).error", "''"); -
trunk/LayoutTests/fast/events/constructors/focus-event-constructor-expected.txt
r203950 r207215 15 15 PASS new FocusEvent('eventType', { view: window }).view is window 16 16 PASS new FocusEvent('eventType', { view: this }).view is this 17 PASS new FocusEvent('eventType', { view: testObject }).view threw exception TypeError: Dictionary member is not of type Window.18 PASS new FocusEvent('eventType', { view: document }).view threw exception TypeError: Dictionary member is not of type Window.17 PASS new FocusEvent('eventType', { view: testObject }).view threw exception TypeError: Type error. 18 PASS new FocusEvent('eventType', { view: document }).view threw exception TypeError: Type error. 19 19 PASS new FocusEvent('eventType', { view: undefined }).view is null 20 20 PASS new FocusEvent('eventType', { view: null }).view is null 21 PASS new FocusEvent('eventType', { view: false }).view threw exception TypeError: Dictionary member is not of type Window.22 PASS new FocusEvent('eventType', { view: true }).view threw exception TypeError: Dictionary member is not of type Window.23 PASS new FocusEvent('eventType', { view: '' }).view threw exception TypeError: Dictionary member is not of type Window.24 PASS new FocusEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Dictionary member is not of type Window.25 PASS new FocusEvent('eventType', { view: 12345 }).view threw exception TypeError: Dictionary member is not of type Window.26 PASS new FocusEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Dictionary member is not of type Window.27 PASS new FocusEvent('eventType', { view: NaN }).view threw exception TypeError: Dictionary member is not of type Window.28 PASS new FocusEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Dictionary member is not of type Window.29 PASS new FocusEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Dictionary member is not of type Window.21 PASS new FocusEvent('eventType', { view: false }).view threw exception TypeError: Type error. 22 PASS new FocusEvent('eventType', { view: true }).view threw exception TypeError: Type error. 23 PASS new FocusEvent('eventType', { view: '' }).view threw exception TypeError: Type error. 24 PASS new FocusEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Type error. 25 PASS new FocusEvent('eventType', { view: 12345 }).view threw exception TypeError: Type error. 26 PASS new FocusEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Type error. 27 PASS new FocusEvent('eventType', { view: NaN }).view threw exception TypeError: Type error. 28 PASS new FocusEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Type error. 29 PASS new FocusEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Type error. 30 30 PASS new FocusEvent('eventType', { get view() { throw 'FocusEvent Error'; } }) threw exception FocusEvent Error. 31 31 PASS new FocusEvent('eventType', { relatedTarget: testDiv }).relatedTarget is testDiv … … 33 33 PASS new FocusEvent('eventType', { relatedTarget: xhr }).relatedTarget is xhr 34 34 PASS new FocusEvent('eventType', { relatedTarget: window }).relatedTarget is window 35 PASS new FocusEvent('eventType', { relatedTarget: testObject }) .relatedTarget is null35 PASS new FocusEvent('eventType', { relatedTarget: testObject }) threw exception TypeError: Type error. 36 36 PASS new FocusEvent('eventType', { relatedTarget: undefined }).relatedTarget is null 37 37 PASS new FocusEvent('eventType', { relatedTarget: null }).relatedTarget is null 38 PASS new FocusEvent('eventType', { relatedTarget: false }) .relatedTarget is null39 PASS new FocusEvent('eventType', { relatedTarget: true }) .relatedTarget is null40 PASS new FocusEvent('eventType', { relatedTarget: '' }) .relatedTarget is null41 PASS new FocusEvent('eventType', { relatedTarget: 'chocolate' }) .relatedTarget is null42 PASS new FocusEvent('eventType', { relatedTarget: 12345 }) .relatedTarget is null43 PASS new FocusEvent('eventType', { relatedTarget: 18446744073709551615 }) .relatedTarget is null44 PASS new FocusEvent('eventType', { relatedTarget: NaN }) .relatedTarget is null45 PASS new FocusEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } }) .relatedTarget == testDiv is false46 PASS new FocusEvent('eventType', { get relatedTarget() { return 123; } }) .relatedTarget is null38 PASS new FocusEvent('eventType', { relatedTarget: false }) threw exception TypeError: Type error. 39 PASS new FocusEvent('eventType', { relatedTarget: true }) threw exception TypeError: Type error. 40 PASS new FocusEvent('eventType', { relatedTarget: '' }) threw exception TypeError: Type error. 41 PASS new FocusEvent('eventType', { relatedTarget: 'chocolate' }) threw exception TypeError: Type error. 42 PASS new FocusEvent('eventType', { relatedTarget: 12345 }) threw exception TypeError: Type error. 43 PASS new FocusEvent('eventType', { relatedTarget: 18446744073709551615 }) threw exception TypeError: Type error. 44 PASS new FocusEvent('eventType', { relatedTarget: NaN }) threw exception TypeError: Type error. 45 PASS new FocusEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } }) threw exception TypeError: Type error. 46 PASS new FocusEvent('eventType', { get relatedTarget() { return 123; } }) threw exception TypeError: Type error. 47 47 PASS new FocusEvent('eventType', { get relatedTarget() { throw 'FocusEvent Error'; } }) threw exception FocusEvent Error. 48 48 PASS new FocusEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, relatedTarget: testDiv }).bubbles is true -
trunk/LayoutTests/fast/events/constructors/focus-event-constructor.html
r203950 r207215 58 58 59 59 // Invalid objects. 60 should Be("new FocusEvent('eventType', { relatedTarget: testObject }).relatedTarget", "null");60 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: testObject })", "TypeError"); 61 61 shouldBe("new FocusEvent('eventType', { relatedTarget: undefined }).relatedTarget", "null"); 62 62 shouldBe("new FocusEvent('eventType', { relatedTarget: null }).relatedTarget", "null"); 63 should Be("new FocusEvent('eventType', { relatedTarget: false }).relatedTarget", "null");64 should Be("new FocusEvent('eventType', { relatedTarget: true }).relatedTarget", "null");65 should Be("new FocusEvent('eventType', { relatedTarget: '' }).relatedTarget", "null");66 should Be("new FocusEvent('eventType', { relatedTarget: 'chocolate' }).relatedTarget", "null");67 should Be("new FocusEvent('eventType', { relatedTarget: 12345 }).relatedTarget", "null");68 should Be("new FocusEvent('eventType', { relatedTarget: 18446744073709551615 }).relatedTarget", "null");69 should Be("new FocusEvent('eventType', { relatedTarget: NaN }).relatedTarget", "null");63 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: false })", "TypeError"); 64 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: true })", "TypeError"); 65 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: '' })", "TypeError"); 66 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: 'chocolate' })", "TypeError"); 67 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: 12345 })", "TypeError"); 68 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: 18446744073709551615 })", "TypeError"); 69 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: NaN })", "TypeError"); 70 70 // Note that valueOf() is not called, when the left hand side is evaluated. 71 should BeFalse("new FocusEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } }).relatedTarget == testDiv");72 should Be("new FocusEvent('eventType', { get relatedTarget() { return 123; } }).relatedTarget", "null");71 shouldThrowErrorName("new FocusEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } })", "TypeError"); 72 shouldThrowErrorName("new FocusEvent('eventType', { get relatedTarget() { return 123; } })", "TypeError"); 73 73 shouldThrow("new FocusEvent('eventType', { get relatedTarget() { throw 'FocusEvent Error'; } })"); 74 74 -
trunk/LayoutTests/fast/events/constructors/hash-change-event-constructor-expected.txt
r94962 r207215 14 14 PASS new HashChangeEvent('eventType', { oldURL: 'doremi' }).oldURL is "doremi" 15 15 PASS new HashChangeEvent('eventType', { oldURL: '' }).oldURL is "" 16 PASS new HashChangeEvent('eventType', { oldURL: undefined }).oldURL is " undefined"16 PASS new HashChangeEvent('eventType', { oldURL: undefined }).oldURL is "" 17 17 PASS new HashChangeEvent('eventType', { oldURL: null }).oldURL is "null" 18 18 PASS new HashChangeEvent('eventType', { oldURL: false }).oldURL is "false" … … 27 27 PASS new HashChangeEvent('eventType', { newURL: 'doremi' }).newURL is "doremi" 28 28 PASS new HashChangeEvent('eventType', { newURL: '' }).newURL is "" 29 PASS new HashChangeEvent('eventType', { newURL: undefined }).newURL is " undefined"29 PASS new HashChangeEvent('eventType', { newURL: undefined }).newURL is "" 30 30 PASS new HashChangeEvent('eventType', { newURL: null }).newURL is "null" 31 31 PASS new HashChangeEvent('eventType', { newURL: false }).newURL is "false" -
trunk/LayoutTests/fast/events/constructors/hash-change-event-constructor.html
r155267 r207215 30 30 31 31 // Non-strings. 32 shouldBeEqualToString("new HashChangeEvent('eventType', { " + attr + ": undefined })." + attr, " undefined");32 shouldBeEqualToString("new HashChangeEvent('eventType', { " + attr + ": undefined })." + attr, ""); 33 33 shouldBeEqualToString("new HashChangeEvent('eventType', { " + attr + ": null })." + attr, "null"); 34 34 shouldBeEqualToString("new HashChangeEvent('eventType', { " + attr + ": false })." + attr, "false"); -
trunk/LayoutTests/fast/events/constructors/pop-state-event-constructor-expected.txt
r96073 r207215 13 13 PASS new PopStateEvent('eventType', { state: object1 }).state is object1 14 14 PASS new PopStateEvent('eventType', { state: document }).state is document 15 PASS new PopStateEvent('eventType', { state: undefined }).state is undefined15 PASS new PopStateEvent('eventType', { state: undefined }).state is null 16 16 PASS new PopStateEvent('eventType', { state: null }).state is null 17 17 PASS new PopStateEvent('eventType', { state: false }).state is false -
trunk/LayoutTests/fast/events/constructors/pop-state-event-constructor.html
r155267 r207215 26 26 shouldBe("new PopStateEvent('eventType', { state: object1 }).state", "object1"); 27 27 shouldBe("new PopStateEvent('eventType', { state: document }).state", "document"); 28 shouldBe("new PopStateEvent('eventType', { state: undefined }).state", " undefined");28 shouldBe("new PopStateEvent('eventType', { state: undefined }).state", "null"); 29 29 shouldBe("new PopStateEvent('eventType', { state: null }).state", "null"); 30 30 shouldBe("new PopStateEvent('eventType', { state: false }).state", "false"); -
trunk/LayoutTests/fast/events/constructors/transition-event-constructor-expected.txt
r141119 r207215 15 15 PASS new TransitionEvent('eventType', { propertyName: 'doremi' }).propertyName is "doremi" 16 16 PASS new TransitionEvent('eventType', { propertyName: '' }).propertyName is "" 17 PASS new TransitionEvent('eventType', { propertyName: undefined }).propertyName is " undefined"17 PASS new TransitionEvent('eventType', { propertyName: undefined }).propertyName is "" 18 18 PASS new TransitionEvent('eventType', { propertyName: null }).propertyName is "null" 19 19 PASS new TransitionEvent('eventType', { propertyName: false }).propertyName is "false" … … 30 30 PASS new TransitionEvent('eventType', { elapsedTime: -123.45 }).elapsedTime is -123.45 31 31 PASS new TransitionEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime is 18446744073709551615 32 PASS new TransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime is NaN33 PASS new TransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime is Infinity34 PASS new TransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime is -Infinity32 PASS new TransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime threw exception TypeError: The provided value is non-finite. 33 PASS new TransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime threw exception TypeError: The provided value is non-finite. 34 PASS new TransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime threw exception TypeError: The provided value is non-finite. 35 35 PASS new TransitionEvent('eventType', { pseudoElement: '::before' }).pseudoElement is "::before" 36 36 PASS new TransitionEvent('eventType', { pseudoElement: '' }).pseudoElement is "" 37 PASS new TransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime is NaN37 PASS new TransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime is 0 38 38 PASS new TransitionEvent('eventType', { elapsedTime: null }).elapsedTime is 0 39 39 PASS new TransitionEvent('eventType', { elapsedTime: false }).elapsedTime is 0 40 40 PASS new TransitionEvent('eventType', { elapsedTime: true }).elapsedTime is 1 41 41 PASS new TransitionEvent('eventType', { elapsedTime: '' }).elapsedTime is 0 42 PASS new TransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime is NaN42 PASS new TransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime threw exception TypeError: The provided value is non-finite. 43 43 PASS new TransitionEvent('eventType', { elapsedTime: [] }).elapsedTime is 0 44 44 PASS new TransitionEvent('eventType', { elapsedTime: [123.45] }).elapsedTime is 123.45 45 PASS new TransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime is NaN46 PASS new TransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime is NaN45 PASS new TransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime threw exception TypeError: The provided value is non-finite. 46 PASS new TransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime threw exception TypeError: The provided value is non-finite. 47 47 PASS new TransitionEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime is 123.45 48 48 PASS new TransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45, pseudoElement: '::after' }).bubbles is true -
trunk/LayoutTests/fast/events/constructors/transition-event-constructor.html
r155267 r207215 30 30 31 31 // Non-strings. 32 shouldBeEqualToString("new TransitionEvent('eventType', { propertyName: undefined }).propertyName", " undefined");32 shouldBeEqualToString("new TransitionEvent('eventType', { propertyName: undefined }).propertyName", ""); 33 33 shouldBeEqualToString("new TransitionEvent('eventType', { propertyName: null }).propertyName", "null"); 34 34 shouldBeEqualToString("new TransitionEvent('eventType', { propertyName: false }).propertyName", "false"); … … 48 48 shouldBe("new TransitionEvent('eventType', { elapsedTime: -123.45 }).elapsedTime", "-123.45"); 49 49 shouldBe("new TransitionEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime", "18446744073709551615"); 50 should Be("new TransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime", "NaN");51 should Be("new TransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime", "Infinity");52 should Be("new TransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime", "-Infinity");50 shouldThrowErrorName("new TransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime", "TypeError"); 51 shouldThrowErrorName("new TransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime", "TypeError"); 52 shouldThrowErrorName("new TransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime", "TypeError"); 53 53 54 54 // pseudoElement is passed. … … 58 58 59 59 // Non-numeric values. 60 shouldBe("new TransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime", " NaN");60 shouldBe("new TransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime", "0"); 61 61 shouldBe("new TransitionEvent('eventType', { elapsedTime: null }).elapsedTime", "0"); 62 62 shouldBe("new TransitionEvent('eventType', { elapsedTime: false }).elapsedTime", "0"); 63 63 shouldBe("new TransitionEvent('eventType', { elapsedTime: true }).elapsedTime", "1"); 64 64 shouldBe("new TransitionEvent('eventType', { elapsedTime: '' }).elapsedTime", "0"); 65 should Be("new TransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime", "NaN");65 shouldThrowErrorName("new TransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime", "TypeError"); 66 66 shouldBe("new TransitionEvent('eventType', { elapsedTime: [] }).elapsedTime", "0"); 67 67 shouldBe("new TransitionEvent('eventType', { elapsedTime: [123.45] }).elapsedTime", "123.45"); 68 should Be("new TransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime", "NaN");69 should Be("new TransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime", "NaN");68 shouldThrowErrorName("new TransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime", "TypeError"); 69 shouldThrowErrorName("new TransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime", "TypeError"); 70 70 shouldBe("new TransitionEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime", "123.45"); 71 71 -
trunk/LayoutTests/fast/events/constructors/webkit-animation-event-constructor-expected.txt
r94861 r207215 14 14 PASS new WebKitAnimationEvent('eventType', { animationName: 'doremi' }).animationName is "doremi" 15 15 PASS new WebKitAnimationEvent('eventType', { animationName: '' }).animationName is "" 16 PASS new WebKitAnimationEvent('eventType', { animationName: undefined }).animationName is " undefined"16 PASS new WebKitAnimationEvent('eventType', { animationName: undefined }).animationName is "" 17 17 PASS new WebKitAnimationEvent('eventType', { animationName: null }).animationName is "null" 18 18 PASS new WebKitAnimationEvent('eventType', { animationName: false }).animationName is "false" … … 29 29 PASS new WebKitAnimationEvent('eventType', { elapsedTime: -123.45 }).elapsedTime is -123.45 30 30 PASS new WebKitAnimationEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime is 18446744073709551615 31 PASS new WebKitAnimationEvent('eventType', { elapsedTime: NaN }).elapsedTime is NaN32 PASS new WebKitAnimationEvent('eventType', { elapsedTime: Infinity }).elapsedTime is Infinity33 PASS new WebKitAnimationEvent('eventType', { elapsedTime: -Infinity }).elapsedTime is -Infinity34 PASS new WebKitAnimationEvent('eventType', { elapsedTime: undefined }).elapsedTime is NaN31 PASS new WebKitAnimationEvent('eventType', { elapsedTime: NaN }).elapsedTime threw exception TypeError: The provided value is non-finite. 32 PASS new WebKitAnimationEvent('eventType', { elapsedTime: Infinity }).elapsedTime threw exception TypeError: The provided value is non-finite. 33 PASS new WebKitAnimationEvent('eventType', { elapsedTime: -Infinity }).elapsedTime threw exception TypeError: The provided value is non-finite. 34 PASS new WebKitAnimationEvent('eventType', { elapsedTime: undefined }).elapsedTime is 0 35 35 PASS new WebKitAnimationEvent('eventType', { elapsedTime: null }).elapsedTime is 0 36 36 PASS new WebKitAnimationEvent('eventType', { elapsedTime: false }).elapsedTime is 0 37 37 PASS new WebKitAnimationEvent('eventType', { elapsedTime: true }).elapsedTime is 1 38 38 PASS new WebKitAnimationEvent('eventType', { elapsedTime: '' }).elapsedTime is 0 39 PASS new WebKitAnimationEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime is NaN39 PASS new WebKitAnimationEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime threw exception TypeError: The provided value is non-finite. 40 40 PASS new WebKitAnimationEvent('eventType', { elapsedTime: [] }).elapsedTime is 0 41 41 PASS new WebKitAnimationEvent('eventType', { elapsedTime: [123.45] }).elapsedTime is 123.45 42 PASS new WebKitAnimationEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime is NaN43 PASS new WebKitAnimationEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime is NaN42 PASS new WebKitAnimationEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime threw exception TypeError: The provided value is non-finite. 43 PASS new WebKitAnimationEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime threw exception TypeError: The provided value is non-finite. 44 44 PASS new WebKitAnimationEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime is 123.45 45 45 PASS new WebKitAnimationEvent('eventType', { bubbles: true, cancelable: true, animationName: 'doremi', elapsedTime: 123.45 }).bubbles is true -
trunk/LayoutTests/fast/events/constructors/webkit-animation-event-constructor.html
r155267 r207215 29 29 30 30 // Non-strings. 31 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: undefined }).animationName", " undefined");31 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: undefined }).animationName", ""); 32 32 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: null }).animationName", "null"); 33 33 shouldBeEqualToString("new WebKitAnimationEvent('eventType', { animationName: false }).animationName", "false"); … … 47 47 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: -123.45 }).elapsedTime", "-123.45"); 48 48 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime", "18446744073709551615"); 49 should Be("new WebKitAnimationEvent('eventType', { elapsedTime: NaN }).elapsedTime", "NaN");50 should Be("new WebKitAnimationEvent('eventType', { elapsedTime: Infinity }).elapsedTime", "Infinity");51 should Be("new WebKitAnimationEvent('eventType', { elapsedTime: -Infinity }).elapsedTime", "-Infinity");49 shouldThrowErrorName("new WebKitAnimationEvent('eventType', { elapsedTime: NaN }).elapsedTime", "TypeError"); 50 shouldThrowErrorName("new WebKitAnimationEvent('eventType', { elapsedTime: Infinity }).elapsedTime", "TypeError"); 51 shouldThrowErrorName("new WebKitAnimationEvent('eventType', { elapsedTime: -Infinity }).elapsedTime", "TypeError"); 52 52 53 53 // Non-numeric values. 54 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: undefined }).elapsedTime", " NaN");54 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: undefined }).elapsedTime", "0"); 55 55 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: null }).elapsedTime", "0"); 56 56 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: false }).elapsedTime", "0"); 57 57 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: true }).elapsedTime", "1"); 58 58 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: '' }).elapsedTime", "0"); 59 should Be("new WebKitAnimationEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime", "NaN");59 shouldThrowErrorName("new WebKitAnimationEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime", "TypeError"); 60 60 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [] }).elapsedTime", "0"); 61 61 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45] }).elapsedTime", "123.45"); 62 should Be("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime", "NaN");63 should Be("new WebKitAnimationEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime", "NaN");62 shouldThrowErrorName("new WebKitAnimationEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime", "TypeError"); 63 shouldThrowErrorName("new WebKitAnimationEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime", "TypeError"); 64 64 shouldBe("new WebKitAnimationEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime", "123.45"); 65 65 -
trunk/LayoutTests/fast/events/constructors/webkit-transition-event-constructor-expected.txt
r141119 r207215 15 15 PASS new WebKitTransitionEvent('eventType', { propertyName: 'doremi' }).propertyName is "doremi" 16 16 PASS new WebKitTransitionEvent('eventType', { propertyName: '' }).propertyName is "" 17 PASS new WebKitTransitionEvent('eventType', { propertyName: undefined }).propertyName is " undefined"17 PASS new WebKitTransitionEvent('eventType', { propertyName: undefined }).propertyName is "" 18 18 PASS new WebKitTransitionEvent('eventType', { propertyName: null }).propertyName is "null" 19 19 PASS new WebKitTransitionEvent('eventType', { propertyName: false }).propertyName is "false" … … 30 30 PASS new WebKitTransitionEvent('eventType', { elapsedTime: -123.45 }).elapsedTime is -123.45 31 31 PASS new WebKitTransitionEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime is 18446744073709551615 32 PASS new WebKitTransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime is NaN33 PASS new WebKitTransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime is Infinity34 PASS new WebKitTransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime is -Infinity32 PASS new WebKitTransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime threw exception TypeError: The provided value is non-finite. 33 PASS new WebKitTransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime threw exception TypeError: The provided value is non-finite. 34 PASS new WebKitTransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime threw exception TypeError: The provided value is non-finite. 35 35 PASS new WebKitTransitionEvent('eventType', { pseudoElement: '::before' }).pseudoElement is "::before" 36 36 PASS new WebKitTransitionEvent('eventType', { pseudoElement: '' }).pseudoElement is "" 37 PASS new WebKitTransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime is NaN37 PASS new WebKitTransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime is 0 38 38 PASS new WebKitTransitionEvent('eventType', { elapsedTime: null }).elapsedTime is 0 39 39 PASS new WebKitTransitionEvent('eventType', { elapsedTime: false }).elapsedTime is 0 40 40 PASS new WebKitTransitionEvent('eventType', { elapsedTime: true }).elapsedTime is 1 41 41 PASS new WebKitTransitionEvent('eventType', { elapsedTime: '' }).elapsedTime is 0 42 PASS new WebKitTransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime is NaN42 PASS new WebKitTransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime threw exception TypeError: The provided value is non-finite. 43 43 PASS new WebKitTransitionEvent('eventType', { elapsedTime: [] }).elapsedTime is 0 44 44 PASS new WebKitTransitionEvent('eventType', { elapsedTime: [123.45] }).elapsedTime is 123.45 45 PASS new WebKitTransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime is NaN46 PASS new WebKitTransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime is NaN45 PASS new WebKitTransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime threw exception TypeError: The provided value is non-finite. 46 PASS new WebKitTransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime threw exception TypeError: The provided value is non-finite. 47 47 PASS new WebKitTransitionEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime is 123.45 48 48 PASS new WebKitTransitionEvent('eventType', { bubbles: true, cancelable: true, propertyName: 'doremi', elapsedTime: 123.45, pseudoElement: '::after' }).bubbles is true -
trunk/LayoutTests/fast/events/constructors/webkit-transition-event-constructor.html
r155267 r207215 30 30 31 31 // Non-strings. 32 shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: undefined }).propertyName", " undefined");32 shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: undefined }).propertyName", ""); 33 33 shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: null }).propertyName", "null"); 34 34 shouldBeEqualToString("new WebKitTransitionEvent('eventType', { propertyName: false }).propertyName", "false"); … … 48 48 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: -123.45 }).elapsedTime", "-123.45"); 49 49 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: 18446744073709551615 }).elapsedTime", "18446744073709551615"); 50 should Be("new WebKitTransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime", "NaN");51 should Be("new WebKitTransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime", "Infinity");52 should Be("new WebKitTransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime", "-Infinity");50 shouldThrowErrorName("new WebKitTransitionEvent('eventType', { elapsedTime: NaN }).elapsedTime", "TypeError"); 51 shouldThrowErrorName("new WebKitTransitionEvent('eventType', { elapsedTime: Infinity }).elapsedTime", "TypeError"); 52 shouldThrowErrorName("new WebKitTransitionEvent('eventType', { elapsedTime: -Infinity }).elapsedTime", "TypeError"); 53 53 54 54 // pseudoElement is passed. … … 58 58 59 59 // Non-numeric values. 60 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime", " NaN");60 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: undefined }).elapsedTime", "0"); 61 61 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: null }).elapsedTime", "0"); 62 62 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: false }).elapsedTime", "0"); 63 63 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: true }).elapsedTime", "1"); 64 64 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: '' }).elapsedTime", "0"); 65 should Be("new WebKitTransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime", "NaN");65 shouldThrowErrorName("new WebKitTransitionEvent('eventType', { elapsedTime: 'doremi' }).elapsedTime", "TypeError"); 66 66 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: [] }).elapsedTime", "0"); 67 67 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: [123.45] }).elapsedTime", "123.45"); 68 should Be("new WebKitTransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime", "NaN");69 should Be("new WebKitTransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime", "NaN");68 shouldThrowErrorName("new WebKitTransitionEvent('eventType', { elapsedTime: [123.45, 678.90] }).elapsedTime", "TypeError"); 69 shouldThrowErrorName("new WebKitTransitionEvent('eventType', { elapsedTime: {doremi: 123.45} }).elapsedTime", "TypeError"); 70 70 shouldBe("new WebKitTransitionEvent('eventType', { elapsedTime: {valueOf: function () { return 123.45 } } }).elapsedTime", "123.45"); 71 71 -
trunk/Source/WebCore/ChangeLog
r207214 r207215 1 2016-10-12 Chris Dumez <cdumez@apple.com> 2 3 Update remaining DOM events to stop using legacy [ConstructorTemplate=Event] 4 https://bugs.webkit.org/show_bug.cgi?id=163319 5 6 Reviewed by Darin Adler. 7 8 Update remaining DOM events to stop using legacy [ConstructorTemplate=Event] 9 and use regular constructors instead. 10 11 No new tests, updated existing tests. 12 13 * dom/AutocompleteErrorEvent.h: 14 * dom/AutocompleteErrorEvent.idl: 15 * dom/BeforeLoadEvent.h: 16 * dom/BeforeLoadEvent.idl: 17 * dom/CompositionEvent.cpp: 18 (WebCore::CompositionEvent::CompositionEvent): 19 * dom/CompositionEvent.h: 20 * dom/CompositionEvent.idl: 21 * dom/ErrorEvent.cpp: 22 (WebCore::ErrorEvent::ErrorEvent): 23 * dom/ErrorEvent.h: 24 * dom/ErrorEvent.idl: 25 * dom/FocusEvent.cpp: 26 (WebCore::FocusEvent::FocusEvent): 27 * dom/FocusEvent.h: 28 * dom/FocusEvent.idl: 29 * dom/HashChangeEvent.h: 30 * dom/HashChangeEvent.idl: 31 * dom/OverflowEvent.cpp: 32 (WebCore::OverflowEvent::OverflowEvent): 33 * dom/OverflowEvent.h: 34 * dom/OverflowEvent.idl: 35 * dom/PageTransitionEvent.cpp: 36 (WebCore::PageTransitionEvent::PageTransitionEvent): 37 * dom/PageTransitionEvent.h: 38 * dom/PageTransitionEvent.idl: 39 * dom/PopStateEvent.cpp: 40 (WebCore::PopStateEvent::PopStateEvent): 41 (WebCore::PopStateEvent::create): 42 * dom/PopStateEvent.h: 43 * dom/PopStateEvent.idl: 44 * dom/SecurityPolicyViolationEvent.h: 45 * dom/SecurityPolicyViolationEvent.idl: 46 * dom/TouchEvent.cpp: 47 (WebCore::TouchEvent::TouchEvent): 48 * dom/TouchEvent.h: 49 * dom/TouchEvent.idl: 50 * dom/TransitionEvent.cpp: 51 (WebCore::TransitionEvent::TransitionEvent): 52 * dom/TransitionEvent.h: 53 * dom/TransitionEvent.idl: 54 * dom/WebKitAnimationEvent.cpp: 55 (WebCore::WebKitAnimationEvent::WebKitAnimationEvent): 56 * dom/WebKitAnimationEvent.h: 57 * dom/WebKitAnimationEvent.idl: 58 * dom/WebKitTransitionEvent.cpp: 59 (WebCore::WebKitTransitionEvent::WebKitTransitionEvent): 60 * dom/WebKitTransitionEvent.h: 61 * dom/WebKitTransitionEvent.idl: 62 1 63 2016-10-12 Chris Dumez <cdumez@apple.com> 2 64 -
trunk/Source/WebCore/dom/AutocompleteErrorEvent.h
r184225 r207215 33 33 namespace WebCore { 34 34 35 struct AutocompleteErrorEventInit : public EventInit {36 String reason;37 };38 39 35 class AutocompleteErrorEvent final : public Event { 40 36 public: … … 49 45 } 50 46 51 static Ref<AutocompleteErrorEvent> create(const AtomicString& eventType, const AutocompleteErrorEventInit& initializer) 47 struct Init : EventInit { 48 String reason; 49 }; 50 51 static Ref<AutocompleteErrorEvent> create(const AtomicString& eventType, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 52 52 { 53 return adoptRef(*new AutocompleteErrorEvent(eventType, initializer ));53 return adoptRef(*new AutocompleteErrorEvent(eventType, initializer, isTrusted)); 54 54 } 55 55 … … 67 67 } 68 68 69 AutocompleteErrorEvent(const AtomicString& eventType, const AutocompleteErrorEventInit& initializer)70 : Event(eventType, initializer )69 AutocompleteErrorEvent(const AtomicString& eventType, const Init& initializer, IsTrusted isTrusted) 70 : Event(eventType, initializer, isTrusted) 71 71 , m_reason(initializer.reason) 72 72 { -
trunk/Source/WebCore/dom/AutocompleteErrorEvent.idl
r173596 r207215 25 25 [ 26 26 Conditional=REQUEST_AUTOCOMPLETE, 27 Constructor Template=Event,27 Constructor(DOMString type, optional AutocompleteErrorEventInit eventInitDict), 28 28 JSGenerateToJSObject 29 29 ] interface AutocompleteErrorEvent : Event { 30 [InitializedByEventConstructor]readonly attribute DOMString reason;30 readonly attribute DOMString reason; 31 31 }; 32 32 33 dictionary AutocompleteErrorEventInit : EventInit { 34 DOMString reason = ""; 35 }; -
trunk/Source/WebCore/dom/BeforeLoadEvent.h
r197563 r207215 33 33 namespace WebCore { 34 34 35 struct BeforeLoadEventInit : public EventInit {36 String url;37 };38 39 35 class BeforeLoadEvent final : public Event { 40 36 public: … … 44 40 } 45 41 46 static Ref<BeforeLoadEvent> createForBindings(const AtomicString& type, const BeforeLoadEventInit& initializer) 42 struct Init : EventInit { 43 String url; 44 }; 45 46 static Ref<BeforeLoadEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 47 47 { 48 return adoptRef(*new BeforeLoadEvent(type, initializer ));48 return adoptRef(*new BeforeLoadEvent(type, initializer, isTrusted)); 49 49 } 50 50 … … 60 60 } 61 61 62 BeforeLoadEvent(const AtomicString& type, const BeforeLoadEventInit& initializer)63 : Event(type, initializer )62 BeforeLoadEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 63 : Event(type, initializer, isTrusted) 64 64 , m_url(initializer.url) 65 65 { -
trunk/Source/WebCore/dom/BeforeLoadEvent.idl
r165676 r207215 26 26 27 27 [ 28 Constructor Template=Event28 Constructor(DOMString type, optional BeforeLoadEventInit eventInitDict) 29 29 ] interface BeforeLoadEvent : Event { 30 [InitializedByEventConstructor]readonly attribute DOMString url;30 readonly attribute DOMString url; 31 31 }; 32 32 33 dictionary BeforeLoadEventInit : EventInit { 34 DOMString url = ""; 35 }; -
trunk/Source/WebCore/dom/CompositionEvent.cpp
r204681 r207215 42 42 } 43 43 44 CompositionEvent::CompositionEvent(const AtomicString& type, const CompositionEventInit& initializer)45 : UIEvent(type, initializer )44 CompositionEvent::CompositionEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 45 : UIEvent(type, initializer, isTrusted) 46 46 , m_data(initializer.data) 47 47 { -
trunk/Source/WebCore/dom/CompositionEvent.h
r204681 r207215 32 32 namespace WebCore { 33 33 34 struct CompositionEventInit : UIEventInit {35 String data;36 };37 38 34 class CompositionEvent final : public UIEvent { 39 35 public: … … 48 44 } 49 45 50 static Ref<CompositionEvent> createForBindings(const AtomicString& type, const CompositionEventInit& initializer) 46 struct Init : UIEventInit { 47 String data; 48 }; 49 50 static Ref<CompositionEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 51 51 { 52 return adoptRef(*new CompositionEvent(type, initializer ));52 return adoptRef(*new CompositionEvent(type, initializer, isTrusted)); 53 53 } 54 54 … … 64 64 CompositionEvent(); 65 65 CompositionEvent(const AtomicString& type, DOMWindow*, const String&); 66 CompositionEvent(const AtomicString& type, const CompositionEventInit&);66 CompositionEvent(const AtomicString& type, const Init&, IsTrusted); 67 67 68 68 bool isCompositionEvent() const override; -
trunk/Source/WebCore/dom/CompositionEvent.idl
r199969 r207215 25 25 26 26 [ 27 ConstructorConditional=DOM4_EVENTS_CONSTRUCTOR, 28 ConstructorTemplate=Event, 27 Constructor(DOMString type, optional CompositionEventInit eventInitDict), 29 28 ] interface CompositionEvent : UIEvent { 30 29 31 [InitializedByEventConstructor]readonly attribute DOMString data;30 readonly attribute DOMString data; 32 31 33 32 // FIXME: Using "undefined" as default parameter value is wrong. … … 40 39 }; 41 40 41 dictionary CompositionEventInit : UIEventInit { 42 DOMString data = ""; 43 }; -
trunk/Source/WebCore/dom/ErrorEvent.cpp
r205462 r207215 41 41 namespace WebCore { 42 42 43 ErrorEvent::ErrorEvent( const AtomicString& type, const ErrorEventInit& initializer)44 : Event(type, initializer )43 ErrorEvent::ErrorEvent(ExecState& state, const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 44 : Event(type, initializer, isTrusted) 45 45 , m_message(initializer.message) 46 46 , m_fileName(initializer.filename) 47 47 , m_lineNumber(initializer.lineno) 48 48 , m_columnNumber(initializer.colno) 49 , m_error( initializer.error)49 , m_error(state.vm(), initializer.error) 50 50 { 51 51 } -
trunk/Source/WebCore/dom/ErrorEvent.h
r202023 r207215 40 40 namespace WebCore { 41 41 42 struct ErrorEventInit : public EventInit {43 String message;44 String filename;45 unsigned lineno { 0 };46 unsigned colno { 0 };47 Deprecated::ScriptValue error;48 };49 50 42 class ErrorEvent final : public Event { 51 43 public: … … 55 47 } 56 48 57 static Ref<ErrorEvent> createForBindings(const AtomicString& type, const ErrorEventInit& initializer) 49 struct Init : EventInit { 50 String message; 51 String filename; 52 unsigned lineno { 0 }; 53 unsigned colno { 0 }; 54 JSC::JSValue error; 55 }; 56 57 static Ref<ErrorEvent> create(JSC::ExecState& state, const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 58 58 { 59 return adoptRef(*new ErrorEvent( type, initializer));59 return adoptRef(*new ErrorEvent(state, type, initializer, isTrusted)); 60 60 } 61 61 … … 73 73 private: 74 74 ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber, const Deprecated::ScriptValue& error); 75 ErrorEvent( const AtomicString&, const ErrorEventInit&);75 ErrorEvent(JSC::ExecState&, const AtomicString&, const Init&, IsTrusted); 76 76 77 77 RefPtr<SerializedScriptValue> trySerializeError(JSC::ExecState&); -
trunk/Source/WebCore/dom/ErrorEvent.idl
r204215 r207215 31 31 32 32 [ 33 ConstructorTemplate=Event, 33 Constructor(DOMString type, optional ErrorEventInit eventInitDict), 34 ConstructorCallWith=ScriptState, 34 35 Exposed=(Window,Worker), 35 36 ] interface ErrorEvent : Event { 36 [InitializedByEventConstructor]readonly attribute DOMString message;37 [InitializedByEventConstructor]readonly attribute USVString filename;38 [InitializedByEventConstructor]readonly attribute unsigned long lineno;39 [InitializedByEventConstructor]readonly attribute unsigned long colno;40 [ InitializedByEventConstructor,CustomGetter] readonly attribute any error;37 readonly attribute DOMString message; 38 readonly attribute USVString filename; 39 readonly attribute unsigned long lineno; 40 readonly attribute unsigned long colno; 41 [CustomGetter] readonly attribute any error; 41 42 }; 42 43 44 dictionary ErrorEventInit : EventInit { 45 DOMString message = ""; 46 USVString filename = ""; 47 unsigned long lineno = 0; 48 unsigned long colno = 0; 49 any error = null; 50 }; -
trunk/Source/WebCore/dom/FocusEvent.cpp
r204681 r207215 47 47 } 48 48 49 FocusEvent::FocusEvent(const AtomicString& type, const FocusEventInit& initializer)50 : UIEvent(type, initializer )49 FocusEvent::FocusEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 50 : UIEvent(type, initializer, isTrusted) 51 51 , m_relatedTarget(initializer.relatedTarget) 52 52 { -
trunk/Source/WebCore/dom/FocusEvent.h
r204681 r207215 34 34 class Node; 35 35 36 struct FocusEventInit : public UIEventInit {37 RefPtr<EventTarget> relatedTarget;38 };39 40 36 class FocusEvent final : public UIEvent { 41 37 public: … … 45 41 } 46 42 47 static Ref<FocusEvent> createForBindings(const AtomicString& type, const FocusEventInit& initializer) 43 struct Init : UIEventInit { 44 RefPtr<EventTarget> relatedTarget; 45 }; 46 47 static Ref<FocusEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 48 48 { 49 return adoptRef(*new FocusEvent(type, initializer ));49 return adoptRef(*new FocusEvent(type, initializer, isTrusted)); 50 50 } 51 51 … … 57 57 private: 58 58 FocusEvent(const AtomicString& type, bool canBubble, bool cancelable, DOMWindow*, int, RefPtr<EventTarget>&&); 59 FocusEvent(const AtomicString& type, const FocusEventInit&);59 FocusEvent(const AtomicString& type, const Init&, IsTrusted); 60 60 61 61 bool isFocusEvent() const override; -
trunk/Source/WebCore/dom/FocusEvent.idl
r142205 r207215 25 25 26 26 [ 27 ConstructorConditional=DOM4_EVENTS_CONSTRUCTOR, 28 ConstructorTemplate=Event 27 Constructor(DOMString type, optional FocusEventInit eventInitDict), 29 28 ] interface FocusEvent : UIEvent { 30 [InitializedByEventConstructor] readonly attribute EventTargetrelatedTarget;29 readonly attribute EventTarget? relatedTarget; 31 30 }; 31 32 dictionary FocusEventInit : UIEventInit { 33 EventTarget? relatedTarget = null; 34 }; -
trunk/Source/WebCore/dom/HashChangeEvent.h
r197563 r207215 27 27 namespace WebCore { 28 28 29 struct HashChangeEventInit : public EventInit {30 String oldURL;31 String newURL;32 };33 34 29 class HashChangeEvent final : public Event { 35 30 public: … … 44 39 } 45 40 46 static Ref<HashChangeEvent> createForBindings(const AtomicString& type, const HashChangeEventInit& initializer) 41 struct Init : EventInit { 42 String oldURL; 43 String newURL; 44 }; 45 46 static Ref<HashChangeEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 47 47 { 48 return adoptRef(*new HashChangeEvent(type, initializer ));48 return adoptRef(*new HashChangeEvent(type, initializer, isTrusted)); 49 49 } 50 50 … … 77 77 } 78 78 79 HashChangeEvent(const AtomicString& type, const HashChangeEventInit& initializer)80 : Event(type, initializer )79 HashChangeEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 80 : Event(type, initializer, isTrusted) 81 81 , m_oldURL(initializer.oldURL) 82 82 , m_newURL(initializer.newURL) -
trunk/Source/WebCore/dom/HashChangeEvent.idl
r204215 r207215 20 20 // Introduced in http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-hashchange 21 21 [ 22 Constructor Template=Event,22 Constructor(DOMString type, optional HashChangeEventInit eventInitDict), 23 23 ] interface HashChangeEvent : Event { 24 24 // FIXME: Using "undefined" as default parameter value is wrong. … … 28 28 optional USVString oldURL = "undefined", 29 29 optional USVString newURL = "undefined"); 30 [InitializedByEventConstructor] readonly attribute USVString oldURL; 31 [InitializedByEventConstructor] readonly attribute USVString newURL; 30 31 readonly attribute USVString oldURL; 32 readonly attribute USVString newURL; 32 33 }; 33 34 35 dictionary HashChangeEventInit : EventInit { 36 USVString oldURL = ""; 37 USVString newURL = ""; 38 }; -
trunk/Source/WebCore/dom/OverflowEvent.cpp
r196400 r207215 53 53 } 54 54 55 OverflowEvent::OverflowEvent(const AtomicString& type, const OverflowEventInit& initializer)56 : Event(type, initializer )55 OverflowEvent::OverflowEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 56 : Event(type, initializer, isTrusted) 57 57 , m_orient(initializer.orient) 58 58 , m_horizontalOverflow(initializer.horizontalOverflow) -
trunk/Source/WebCore/dom/OverflowEvent.h
r204717 r207215 31 31 namespace WebCore { 32 32 33 struct OverflowEventInit : public EventInit {34 unsigned short orient { 0 };35 bool horizontalOverflow { false };36 bool verticalOverflow { false };37 };38 39 33 class OverflowEvent final : public Event { 40 34 public: … … 49 43 return adoptRef(*new OverflowEvent(horizontalOverflowChanged, horizontalOverflow, verticalOverflowChanged, verticalOverflow)); 50 44 } 45 51 46 static Ref<OverflowEvent> createForBindings() 52 47 { 53 48 return adoptRef(*new OverflowEvent); 54 49 } 55 static Ref<OverflowEvent> createForBindings(const AtomicString& type, const OverflowEventInit& initializer) 50 51 struct Init : EventInit { 52 unsigned short orient { 0 }; 53 bool horizontalOverflow { false }; 54 bool verticalOverflow { false }; 55 }; 56 57 static Ref<OverflowEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 56 58 { 57 return adoptRef(*new OverflowEvent(type, initializer ));59 return adoptRef(*new OverflowEvent(type, initializer, isTrusted)); 58 60 } 59 61 … … 69 71 OverflowEvent(); 70 72 OverflowEvent(bool horizontalOverflowChanged, bool horizontalOverflow, bool verticalOverflowChanged, bool verticalOverflow); 71 OverflowEvent(const AtomicString&, const OverflowEventInit&);73 OverflowEvent(const AtomicString&, const Init&, IsTrusted); 72 74 73 75 unsigned short m_orient; -
trunk/Source/WebCore/dom/OverflowEvent.idl
r204259 r207215 25 25 26 26 [ 27 Constructor Template=Event27 Constructor(DOMString type, optional OverflowEventInit eventInitDict), 28 28 ] interface OverflowEvent : Event { 29 29 const unsigned short HORIZONTAL = 0; … … 31 31 const unsigned short BOTH = 2; 32 32 33 [InitializedByEventConstructor]readonly attribute unsigned short orient;34 [InitializedByEventConstructor]readonly attribute boolean horizontalOverflow;35 [InitializedByEventConstructor]readonly attribute boolean verticalOverflow;33 readonly attribute unsigned short orient; 34 readonly attribute boolean horizontalOverflow; 35 readonly attribute boolean verticalOverflow; 36 36 }; 37 37 38 dictionary OverflowEventInit : EventInit { 39 unsigned short orient = 0; 40 boolean horizontalOverflow = false; 41 boolean verticalOverflow = false; 42 }; -
trunk/Source/WebCore/dom/PageTransitionEvent.cpp
r196400 r207215 37 37 } 38 38 39 PageTransitionEvent::PageTransitionEvent(const AtomicString& type, const PageTransitionEventInit& initializer)40 : Event(type, initializer )39 PageTransitionEvent::PageTransitionEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 40 : Event(type, initializer, isTrusted) 41 41 , m_persisted(initializer.persisted) 42 42 { -
trunk/Source/WebCore/dom/PageTransitionEvent.h
r197563 r207215 31 31 namespace WebCore { 32 32 33 struct PageTransitionEventInit : public EventInit {34 bool persisted { false };35 };36 37 33 class PageTransitionEvent final : public Event { 38 34 public: … … 41 37 return adoptRef(*new PageTransitionEvent(type, persisted)); 42 38 } 43 static Ref<PageTransitionEvent> createForBindings(const AtomicString& type, const PageTransitionEventInit& initializer) 39 40 struct Init : EventInit { 41 bool persisted { false }; 42 }; 43 44 static Ref<PageTransitionEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 44 45 { 45 return adoptRef(*new PageTransitionEvent(type, initializer ));46 return adoptRef(*new PageTransitionEvent(type, initializer, isTrusted)); 46 47 } 47 48 … … 54 55 private: 55 56 PageTransitionEvent(const AtomicString& type, bool persisted); 56 PageTransitionEvent(const AtomicString&, const PageTransitionEventInit&);57 PageTransitionEvent(const AtomicString&, const Init&, IsTrusted); 57 58 58 59 bool m_persisted; -
trunk/Source/WebCore/dom/PageTransitionEvent.idl
r131172 r207215 25 25 26 26 [ 27 Constructor Template=Event27 Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), 28 28 ] interface PageTransitionEvent : Event { 29 [InitializedByEventConstructor]readonly attribute boolean persisted;29 readonly attribute boolean persisted; 30 30 }; 31 31 32 dictionary PageTransitionEventInit : EventInit { 33 boolean persisted = false; 34 }; -
trunk/Source/WebCore/dom/PopStateEvent.cpp
r205138 r207215 34 34 namespace WebCore { 35 35 36 PopStateEvent::PopStateEvent( const AtomicString& type, const PopStateEventInit& initializer)37 : Event(type, initializer )38 , m_state( initializer.state)36 PopStateEvent::PopStateEvent(JSC::ExecState& state, const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 37 : Event(type, initializer, isTrusted) 38 , m_state(state.vm(), initializer.state) 39 39 { 40 40 } … … 56 56 } 57 57 58 Ref<PopStateEvent> PopStateEvent::create ForBindings(const AtomicString& type, const PopStateEventInit& initializer)58 Ref<PopStateEvent> PopStateEvent::create(JSC::ExecState& state, const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 59 59 { 60 return adoptRef(*new PopStateEvent( type, initializer));60 return adoptRef(*new PopStateEvent(state, type, initializer, isTrusted)); 61 61 } 62 62 -
trunk/Source/WebCore/dom/PopStateEvent.h
r205138 r207215 35 35 class SerializedScriptValue; 36 36 37 struct PopStateEventInit : public EventInit {38 Deprecated::ScriptValue state;39 };40 41 37 class PopStateEvent final : public Event { 42 38 public: 43 39 virtual ~PopStateEvent(); 44 40 static Ref<PopStateEvent> create(RefPtr<SerializedScriptValue>&&, PassRefPtr<History>); 45 static Ref<PopStateEvent> createForBindings(const AtomicString&, const PopStateEventInit&); 41 42 struct Init : EventInit { 43 JSC::JSValue state; 44 }; 45 46 static Ref<PopStateEvent> create(JSC::ExecState&, const AtomicString&, const Init&, IsTrusted = IsTrusted::No); 46 47 static Ref<PopStateEvent> createForBindings(); 47 48 … … 57 58 private: 58 59 PopStateEvent() = default; 59 PopStateEvent( const AtomicString&, const PopStateEventInit&);60 PopStateEvent(JSC::ExecState&, const AtomicString&, const Init&, IsTrusted); 60 61 explicit PopStateEvent(PassRefPtr<SerializedScriptValue>, PassRefPtr<History>); 61 62 -
trunk/Source/WebCore/dom/PopStateEvent.idl
r165676 r207215 26 26 27 27 [ 28 ConstructorTemplate=Event 28 Constructor(DOMString type, optional PopStateEventInit eventInitDict), 29 ConstructorCallWith=ScriptState, 29 30 ] interface PopStateEvent : Event { 30 [ InitializedByEventConstructor,CachedAttribute, CustomGetter] readonly attribute any state;31 [CachedAttribute, CustomGetter] readonly attribute any state; 31 32 }; 32 33 34 dictionary PopStateEventInit : EventInit { 35 any state = null; 36 }; 37 -
trunk/Source/WebCore/dom/SecurityPolicyViolationEvent.h
r197118 r207215 31 31 namespace WebCore { 32 32 33 struct SecurityPolicyViolationEventInit : public EventInit {34 String documentURI;35 String referrer;36 String blockedURI;37 String violatedDirective;38 String effectiveDirective;39 String originalPolicy;40 String sourceFile;41 unsigned short statusCode { 0 };42 int lineNumber { 0 };43 int columnNumber { 0 };44 };45 46 33 class SecurityPolicyViolationEvent final : public Event { 47 34 public: … … 56 43 } 57 44 58 static Ref<SecurityPolicyViolationEvent> createForBindings(const AtomicString& type, const SecurityPolicyViolationEventInit& initializer) 45 struct Init : EventInit { 46 String documentURI; 47 String referrer; 48 String blockedURI; 49 String violatedDirective; 50 String effectiveDirective; 51 String originalPolicy; 52 String sourceFile; 53 unsigned short statusCode { 0 }; 54 int lineNumber { 0 }; 55 int columnNumber { 0 }; 56 }; 57 58 static Ref<SecurityPolicyViolationEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 59 59 { 60 return adoptRef(*new SecurityPolicyViolationEvent(type, initializer ));60 return adoptRef(*new SecurityPolicyViolationEvent(type, initializer, isTrusted)); 61 61 } 62 62 … … 94 94 } 95 95 96 SecurityPolicyViolationEvent(const AtomicString& type, const SecurityPolicyViolationEventInit& initializer)97 : Event(type, initializer )96 SecurityPolicyViolationEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 97 : Event(type, initializer, isTrusted) 98 98 , m_documentURI(initializer.documentURI) 99 99 , m_referrer(initializer.referrer) -
trunk/Source/WebCore/dom/SecurityPolicyViolationEvent.idl
r197118 r207215 25 25 26 26 [ 27 Constructor Template=Event,27 Constructor(DOMString type, optional SecurityPolicyViolationEventInit eventInitDict), 28 28 ] interface SecurityPolicyViolationEvent : Event { 29 [InitializedByEventConstructor] readonly attribute DOMString documentURI;30 [InitializedByEventConstructor]readonly attribute DOMString referrer;31 [InitializedByEventConstructor] readonly attribute DOMString blockedURI;32 [InitializedByEventConstructor]readonly attribute DOMString violatedDirective;33 [InitializedByEventConstructor]readonly attribute DOMString effectiveDirective;34 [InitializedByEventConstructor]readonly attribute DOMString originalPolicy;35 [InitializedByEventConstructor] readonly attribute DOMString sourceFile;36 [InitializedByEventConstructor]readonly attribute unsigned short statusCode;37 [InitializedByEventConstructor]readonly attribute long lineNumber;38 [InitializedByEventConstructor]readonly attribute long columnNumber;29 readonly attribute USVString documentURI; 30 readonly attribute DOMString referrer; 31 readonly attribute USVString blockedURI; 32 readonly attribute DOMString violatedDirective; 33 readonly attribute DOMString effectiveDirective; 34 readonly attribute DOMString originalPolicy; 35 readonly attribute USVString sourceFile; 36 readonly attribute unsigned short statusCode; 37 readonly attribute long lineNumber; 38 readonly attribute long columnNumber; 39 39 }; 40 41 dictionary SecurityPolicyViolationEventInit : EventInit { 42 USVString documentURI = ""; 43 DOMString referrer = ""; 44 USVString blockedURI = ""; 45 DOMString violatedDirective = ""; 46 DOMString effectiveDirective = ""; 47 DOMString originalPolicy = ""; 48 USVString sourceFile = ""; 49 unsigned short statusCode = 0; 50 long lineNumber = 0; 51 long columnNumber = 0; 52 }; -
trunk/Source/WebCore/dom/TouchEvent.cpp
r204681 r207215 56 56 } 57 57 58 TouchEvent::TouchEvent(const AtomicString& type, const TouchEventInit& initializer)59 : MouseRelatedEvent(type, initializer )58 TouchEvent::TouchEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 59 : MouseRelatedEvent(type, initializer, isTrusted) 60 60 , m_touches(initializer.touches ? initializer.touches : TouchList::create()) 61 61 , m_targetTouches(initializer.targetTouches ? initializer.targetTouches : TouchList::create()) -
trunk/Source/WebCore/dom/TouchEvent.h
r204681 r207215 37 37 namespace WebCore { 38 38 39 struct TouchEventInit : public MouseRelatedEventInit {40 RefPtr<TouchList> touches;41 RefPtr<TouchList> targetTouches;42 RefPtr<TouchList> changedTouches;43 };44 45 39 class TouchEvent final : public MouseRelatedEvent { 46 40 public: … … 61 55 return adoptRef(*new TouchEvent); 62 56 } 63 static Ref<TouchEvent> createForBindings(const AtomicString& type, const TouchEventInit& initializer) 57 58 struct Init : MouseRelatedEventInit { 59 RefPtr<TouchList> touches; 60 RefPtr<TouchList> targetTouches; 61 RefPtr<TouchList> changedTouches; 62 }; 63 64 static Ref<TouchEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 64 65 { 65 return adoptRef(*new TouchEvent(type, initializer ));66 return adoptRef(*new TouchEvent(type, initializer, isTrusted)); 66 67 } 67 68 … … 91 92 int pageY, 92 93 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 93 TouchEvent(const AtomicString&, const TouchEventInit&);94 TouchEvent(const AtomicString&, const Init&, IsTrusted); 94 95 95 96 RefPtr<TouchList> m_touches; -
trunk/Source/WebCore/dom/TouchEvent.idl
r202178 r207215 26 26 [ 27 27 Conditional=TOUCH_EVENTS, 28 Constructor Template=Event,28 Constructor(DOMString type, optional TouchEventInit eventInitDict), 29 29 ] interface TouchEvent : UIEvent { 30 [InitializedByEventConstructor]readonly attribute TouchList touches;31 [InitializedByEventConstructor]readonly attribute TouchList targetTouches;32 [InitializedByEventConstructor]readonly attribute TouchList changedTouches;30 readonly attribute TouchList touches; 31 readonly attribute TouchList targetTouches; 32 readonly attribute TouchList changedTouches; 33 33 readonly attribute boolean ctrlKey; 34 34 readonly attribute boolean shiftKey; … … 51 51 optional boolean metaKey = false); 52 52 }; 53 54 dictionary TouchEventInit : UIEventInit { 55 TouchList? touches = null; 56 TouchList? targetTouches = null; 57 TouchList? changedTouches = null; 58 }; -
trunk/Source/WebCore/dom/TransitionEvent.cpp
r196400 r207215 40 40 } 41 41 42 TransitionEvent::TransitionEvent(const AtomicString& type, const TransitionEventInit& initializer)43 : Event(type, initializer )42 TransitionEvent::TransitionEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 43 : Event(type, initializer, isTrusted) 44 44 , m_propertyName(initializer.propertyName) 45 45 , m_elapsedTime(initializer.elapsedTime) -
trunk/Source/WebCore/dom/TransitionEvent.h
r197563 r207215 32 32 namespace WebCore { 33 33 34 struct TransitionEventInit : public EventInit {35 String propertyName;36 double elapsedTime { 0 };37 String pseudoElement;38 };39 40 34 class TransitionEvent final : public Event { 41 35 public: … … 44 38 return adoptRef(*new TransitionEvent(type, propertyName, elapsedTime, pseudoElement)); 45 39 } 46 static Ref<TransitionEvent> createForBindings(const AtomicString& type, const TransitionEventInit& initializer) 40 41 struct Init : EventInit { 42 String propertyName; 43 double elapsedTime { 0 }; 44 String pseudoElement; 45 }; 46 47 static Ref<TransitionEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 47 48 { 48 return adoptRef(*new TransitionEvent(type, initializer ));49 return adoptRef(*new TransitionEvent(type, initializer, isTrusted)); 49 50 } 50 51 … … 59 60 private: 60 61 TransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement); 61 TransitionEvent(const AtomicString& type, const TransitionEventInit& initializer);62 TransitionEvent(const AtomicString& type, const Init& initializer, IsTrusted); 62 63 63 64 String m_propertyName; -
trunk/Source/WebCore/dom/TransitionEvent.idl
r168302 r207215 26 26 27 27 [ 28 Constructor Template=Event28 Constructor(DOMString type, optional TransitionEventInit transitionEventInitDict), 29 29 ] interface TransitionEvent : Event { 30 [InitializedByEventConstructor]readonly attribute DOMString propertyName;31 [InitializedByEventConstructor] readonly attribute unrestricteddouble elapsedTime;32 [InitializedByEventConstructor]readonly attribute DOMString pseudoElement;30 readonly attribute DOMString propertyName; 31 readonly attribute double elapsedTime; 32 readonly attribute DOMString pseudoElement; 33 33 }; 34 34 35 dictionary TransitionEventInit : EventInit { 36 DOMString propertyName = ""; 37 double elapsedTime = 0.0; 38 DOMString pseudoElement = ""; 39 }; -
trunk/Source/WebCore/dom/WebKitAnimationEvent.cpp
r196400 r207215 31 31 namespace WebCore { 32 32 33 WebKitAnimationEvent::WebKitAnimationEvent(const AtomicString& type, const WebKitAnimationEventInit& initializer)34 : Event(type, initializer )33 WebKitAnimationEvent::WebKitAnimationEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 34 : Event(type, initializer, isTrusted) 35 35 , m_animationName(initializer.animationName) 36 36 , m_elapsedTime(initializer.elapsedTime) -
trunk/Source/WebCore/dom/WebKitAnimationEvent.h
r197563 r207215 31 31 namespace WebCore { 32 32 33 struct WebKitAnimationEventInit : public EventInit {34 String animationName;35 double elapsedTime { 0.0 };36 };37 38 33 class WebKitAnimationEvent final : public Event { 39 34 public: … … 42 37 return adoptRef(*new WebKitAnimationEvent(type, animationName, elapsedTime)); 43 38 } 44 static Ref<WebKitAnimationEvent> createForBindings(const AtomicString& type, const WebKitAnimationEventInit& initializer) 39 40 struct Init : EventInit { 41 String animationName; 42 double elapsedTime { 0.0 }; 43 }; 44 45 static Ref<WebKitAnimationEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 45 46 { 46 return adoptRef(*new WebKitAnimationEvent(type, initializer ));47 return adoptRef(*new WebKitAnimationEvent(type, initializer, isTrusted)); 47 48 } 48 49 … … 56 57 private: 57 58 WebKitAnimationEvent(const AtomicString& type, const String& animationName, double elapsedTime); 58 WebKitAnimationEvent(const AtomicString&, const WebKitAnimationEventInit&);59 WebKitAnimationEvent(const AtomicString&, const Init&, IsTrusted); 59 60 60 61 String m_animationName; -
trunk/Source/WebCore/dom/WebKitAnimationEvent.idl
r168302 r207215 25 25 26 26 [ 27 Constructor Template=Event27 Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict), 28 28 ] interface WebKitAnimationEvent : Event { 29 [InitializedByEventConstructor]readonly attribute DOMString animationName;30 [InitializedByEventConstructor] readonly attribute unrestricteddouble elapsedTime;29 readonly attribute DOMString animationName; 30 readonly attribute double elapsedTime; 31 31 }; 32 32 33 dictionary WebKitAnimationEventInit : EventInit { 34 DOMString animationName = ""; 35 double elapsedTime = 0; 36 }; -
trunk/Source/WebCore/dom/WebKitTransitionEvent.cpp
r196400 r207215 39 39 } 40 40 41 WebKitTransitionEvent::WebKitTransitionEvent(const AtomicString& type, const WebKitTransitionEventInit& initializer)42 : Event(type, initializer )41 WebKitTransitionEvent::WebKitTransitionEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted) 42 : Event(type, initializer, isTrusted) 43 43 , m_propertyName(initializer.propertyName) 44 44 , m_elapsedTime(initializer.elapsedTime) -
trunk/Source/WebCore/dom/WebKitTransitionEvent.h
r197563 r207215 31 31 namespace WebCore { 32 32 33 struct WebKitTransitionEventInit : public EventInit {34 String propertyName;35 double elapsedTime { 0 };36 String pseudoElement;37 };38 39 33 class WebKitTransitionEvent final : public Event { 40 34 public: … … 43 37 return adoptRef(*new WebKitTransitionEvent(type, propertyName, elapsedTime, pseudoElement)); 44 38 } 45 static Ref<WebKitTransitionEvent> createForBindings(const AtomicString& type, const WebKitTransitionEventInit& initializer) 39 40 struct Init : EventInit { 41 String propertyName; 42 double elapsedTime { 0 }; 43 String pseudoElement; 44 }; 45 46 static Ref<WebKitTransitionEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) 46 47 { 47 return adoptRef(*new WebKitTransitionEvent(type, initializer ));48 return adoptRef(*new WebKitTransitionEvent(type, initializer, isTrusted)); 48 49 } 49 50 … … 58 59 private: 59 60 WebKitTransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement); 60 WebKitTransitionEvent(const AtomicString& type, const WebKitTransitionEventInit& initializer);61 WebKitTransitionEvent(const AtomicString& type, const Init& initializer, IsTrusted); 61 62 62 63 String m_propertyName; -
trunk/Source/WebCore/dom/WebKitTransitionEvent.idl
r168302 r207215 25 25 26 26 [ 27 Constructor Template=Event27 Constructor(DOMString type, optional WebKitTransitionEventInit eventInitDict), 28 28 ] interface WebKitTransitionEvent : Event { 29 [InitializedByEventConstructor]readonly attribute DOMString propertyName;30 [InitializedByEventConstructor] readonly attribute unrestricteddouble elapsedTime;31 [InitializedByEventConstructor]readonly attribute DOMString pseudoElement;29 readonly attribute DOMString propertyName; 30 readonly attribute double elapsedTime; 31 readonly attribute DOMString pseudoElement; 32 32 }; 33 33 34 dictionary WebKitTransitionEventInit : EventInit { 35 DOMString propertyName = ""; 36 double elapsedTime = 0; 37 DOMString pseudoElement = ""; 38 };
Note: See TracChangeset
for help on using the changeset viewer.