Skip to content

Commit 050ca00

Browse files
Clean up type parameter for Event idl
https://bugs.webkit.org/show_bug.cgi?id=217013 Patch by Rob Buis <[email protected]> on 2020-09-27 Reviewed by Chris Dumez. LayoutTests/imported/w3c: Update improved test result. * web-platform-tests/html/dom/idlharness.https-expected.txt: Source/WebCore: Clean up type parameter for Event idl files, there is no need to pass "undefined" default value. * dom/CompositionEvent.idl: * dom/HashChangeEvent.idl: * dom/KeyboardEvent.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * storage/StorageEvent.idl: LayoutTests: Update improved test results. * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@267652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 82d21b6 commit 050ca00

File tree

18 files changed

+61
-24
lines changed

18 files changed

+61
-24
lines changed

LayoutTests/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2020-09-27 Rob Buis <[email protected]>
2+
3+
Clean up type parameter for Event idl
4+
https://bugs.webkit.org/show_bug.cgi?id=217013
5+
6+
Reviewed by Chris Dumez.
7+
8+
Update improved test results.
9+
10+
* platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
11+
* platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
12+
* platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
13+
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
14+
* platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
15+
116
2020-09-26 Wenson Hsieh <[email protected]>
217

318
Remove support for setting CMYKA fill and stroke colors in 2D canvas

LayoutTests/imported/w3c/ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2020-09-27 Rob Buis <[email protected]>
2+
3+
Clean up type parameter for Event idl
4+
https://bugs.webkit.org/show_bug.cgi?id=217013
5+
6+
Reviewed by Chris Dumez.
7+
8+
Update improved test result.
9+
10+
* web-platform-tests/html/dom/idlharness.https-expected.txt:
11+
112
2020-09-26 Darin Adler <[email protected]>
213

314
Remove trailing spaces from expected.txt files in web-platform-tests/[A-Za-h] minus css, dom, encoding, and html

LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4881,7 +4881,7 @@ PASS StorageEvent interface: attribute oldValue
48814881
PASS StorageEvent interface: attribute newValue
48824882
PASS StorageEvent interface: attribute url
48834883
PASS StorageEvent interface: attribute storageArea
4884-
FAIL StorageEvent interface: operation initStorageEvent(DOMString, boolean, boolean, DOMString, DOMString, DOMString, USVString, Storage) assert_equals: property has wrong .length expected 1 but got 0
4884+
PASS StorageEvent interface: operation initStorageEvent(DOMString, boolean, boolean, DOMString, DOMString, DOMString, USVString, Storage)
48854885
PASS HTMLMarqueeElement interface: existence and properties of interface object
48864886
PASS HTMLMarqueeElement interface object length
48874887
PASS HTMLMarqueeElement interface object name

LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5054,7 +5054,7 @@ PASS StorageEvent interface: attribute oldValue
50545054
PASS StorageEvent interface: attribute newValue
50555055
PASS StorageEvent interface: attribute url
50565056
PASS StorageEvent interface: attribute storageArea
5057-
FAIL StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?) assert_equals: property has wrong .length expected 1 but got 0
5057+
PASS StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?)
50585058
PASS HTMLMarqueeElement interface: existence and properties of interface object
50595059
PASS HTMLMarqueeElement interface object length
50605060
PASS HTMLMarqueeElement interface object name

LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5044,7 +5044,7 @@ PASS StorageEvent interface: attribute oldValue
50445044
PASS StorageEvent interface: attribute newValue
50455045
PASS StorageEvent interface: attribute url
50465046
PASS StorageEvent interface: attribute storageArea
5047-
FAIL StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?) assert_equals: property has wrong .length expected 1 but got 0
5047+
PASS StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?)
50485048
PASS HTMLMarqueeElement interface: existence and properties of interface object
50495049
PASS HTMLMarqueeElement interface object length
50505050
PASS HTMLMarqueeElement interface object name

LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5054,7 +5054,7 @@ PASS StorageEvent interface: attribute oldValue
50545054
PASS StorageEvent interface: attribute newValue
50555055
PASS StorageEvent interface: attribute url
50565056
PASS StorageEvent interface: attribute storageArea
5057-
FAIL StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?) assert_equals: property has wrong .length expected 1 but got 0
5057+
PASS StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?)
50585058
PASS HTMLMarqueeElement interface: existence and properties of interface object
50595059
PASS HTMLMarqueeElement interface object length
50605060
PASS HTMLMarqueeElement interface object name

LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5054,7 +5054,7 @@ PASS StorageEvent interface: attribute oldValue
50545054
PASS StorageEvent interface: attribute newValue
50555055
PASS StorageEvent interface: attribute url
50565056
PASS StorageEvent interface: attribute storageArea
5057-
FAIL StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?) assert_equals: property has wrong .length expected 1 but got 0
5057+
PASS StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?)
50585058
PASS HTMLMarqueeElement interface: existence and properties of interface object
50595059
PASS HTMLMarqueeElement interface object length
50605060
PASS HTMLMarqueeElement interface object name

LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5054,7 +5054,7 @@ PASS StorageEvent interface: attribute oldValue
50545054
PASS StorageEvent interface: attribute newValue
50555055
PASS StorageEvent interface: attribute url
50565056
PASS StorageEvent interface: attribute storageArea
5057-
FAIL StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?) assert_equals: property has wrong .length expected 1 but got 0
5057+
PASS StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?)
50585058
PASS HTMLMarqueeElement interface: existence and properties of interface object
50595059
PASS HTMLMarqueeElement interface object length
50605060
PASS HTMLMarqueeElement interface object name

Source/WebCore/ChangeLog

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
2020-09-27 Rob Buis <[email protected]>
2+
3+
Clean up type parameter for Event idl
4+
https://bugs.webkit.org/show_bug.cgi?id=217013
5+
6+
Reviewed by Chris Dumez.
7+
8+
Clean up type parameter for Event idl files, there is no need to
9+
pass "undefined" default value.
10+
11+
* dom/CompositionEvent.idl:
12+
* dom/HashChangeEvent.idl:
13+
* dom/KeyboardEvent.idl:
14+
* dom/MouseEvent.idl:
15+
* dom/MutationEvent.idl:
16+
* dom/TextEvent.idl:
17+
* dom/TouchEvent.idl:
18+
* dom/UIEvent.idl:
19+
* storage/StorageEvent.idl:
20+
121
2020-09-26 Zalan Bujtas <[email protected]>
222

323
[LFC] Add <wbr> to showLayoutTree

Source/WebCore/dom/CompositionEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ interface CompositionEvent : UIEvent {
2828

2929
readonly attribute DOMString data;
3030

31-
// FIXME: Using "undefined" as default parameter value is wrong.
32-
undefined initCompositionEvent(optional DOMString typeArg = "undefined",
31+
undefined initCompositionEvent(DOMString typeArg,
3332
optional boolean canBubbleArg = false,
3433
optional boolean cancelableArg = false,
3534
optional WindowProxy? viewArg = null,

Source/WebCore/dom/HashChangeEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
interface HashChangeEvent : Event {
2222
constructor(DOMString type, optional HashChangeEventInit eventInitDict);
2323

24-
// FIXME: Using "undefined" as default parameter value is wrong.
25-
undefined initHashChangeEvent(optional DOMString type = "undefined",
24+
undefined initHashChangeEvent(DOMString type,
2625
optional boolean canBubble = false,
2726
optional boolean cancelable = false,
2827
optional USVString oldURL = "undefined",

Source/WebCore/dom/KeyboardEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ interface KeyboardEvent : UIEvent {
4949
readonly attribute unsigned long which;
5050

5151
// FIXME: this does not match the version in the DOM spec.
52-
// FIXME: Using "undefined" as default parameter value is wrong.
53-
undefined initKeyboardEvent(optional DOMString type = "undefined", optional boolean canBubble = false, optional boolean cancelable = false,
52+
undefined initKeyboardEvent(DOMString type, optional boolean canBubble = false, optional boolean cancelable = false,
5453
optional WindowProxy? view = null, optional DOMString keyIdentifier = "undefined", optional unsigned long location = 0,
5554
optional boolean ctrlKey = false, optional boolean altKey = false, optional boolean shiftKey = false, optional boolean metaKey = false, optional boolean altGraphKey = false);
5655
};

Source/WebCore/dom/MouseEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@
4343
[Conditional=POINTER_LOCK] readonly attribute long movementY;
4444
[Conditional=MOUSE_FORCE_EVENTS, ImplementedAs=force]readonly attribute double webkitForce;
4545

46-
// FIXME: Using "undefined" as default parameter value is wrong.
4746
// FIXME: relatedTarget should be of type EventTarget? but we need to use any to support a quirk for iAd Producer (rdar://problem/30640101).
48-
[CallWith=GlobalObject&ScriptExecutionContext, ImplementedAs=initMouseEventQuirk] undefined initMouseEvent(optional DOMString type = "undefined",
47+
[CallWith=GlobalObject&ScriptExecutionContext, ImplementedAs=initMouseEventQuirk] undefined initMouseEvent(DOMString type,
4948
optional boolean canBubble = false, optional boolean cancelable = false,
5049
optional WindowProxy? view = null, optional long detail = 0,
5150
optional long screenX = 0, optional long screenY = 0, optional long clientX = 0, optional long clientY = 0,

Source/WebCore/dom/MutationEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ interface MutationEvent : Event {
2929
readonly attribute DOMString attrName;
3030
readonly attribute unsigned short attrChange;
3131

32-
// FIXME: Using "undefined" as default parameter value is wrong.
33-
undefined initMutationEvent(optional DOMString type = "undefined", optional boolean canBubble = false, optional boolean cancelable = false,
32+
undefined initMutationEvent(DOMString type, optional boolean canBubble = false, optional boolean cancelable = false,
3433
optional Node? relatedNode = null, optional DOMString prevValue = "undefined", optional DOMString newValue = "undefined",
3534
optional DOMString attrName = "undefined", optional unsigned short attrChange = 0);
3635
};

Source/WebCore/dom/TextEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ interface TextEvent : UIEvent {
2828

2929
readonly attribute DOMString data;
3030

31-
// FIXME: Using "undefined" as default parameter value is wrong.
32-
undefined initTextEvent(optional DOMString typeArg = "undefined",
31+
undefined initTextEvent(DOMString typeArg,
3332
optional boolean canBubbleArg = false,
3433
optional boolean cancelableArg = false,
3534
optional WindowProxy? viewArg = null,

Source/WebCore/dom/TouchEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@
3636
readonly attribute boolean altKey;
3737
readonly attribute boolean metaKey;
3838

39-
// FIXME: Using "undefined" as default parameter value is wrong.
4039
undefined initTouchEvent(optional TouchList? touches = null,
4140
optional TouchList? targetTouches = null,
4241
optional TouchList? changedTouches = null,
43-
optional DOMString type = "undefined",
42+
optional DOMString type,
4443
optional WindowProxy? view = null,
4544
optional long screenX = 0,
4645
optional long screenY = 0,

Source/WebCore/dom/UIEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ interface UIEvent : Event {
2323
readonly attribute WindowProxy view;
2424
readonly attribute long detail;
2525

26-
// FIXME: Using "undefined" as default parameter value is wrong.
27-
undefined initUIEvent(optional DOMString type = "undefined", optional boolean canBubble = false, optional boolean cancelable = false, optional WindowProxy? view = null, optional long detail = 0);
26+
undefined initUIEvent(DOMString type, optional boolean canBubble = false, optional boolean cancelable = false, optional WindowProxy? view = null, optional long detail = 0);
2827

2928
readonly attribute long layerX;
3029
readonly attribute long layerY;

Source/WebCore/storage/StorageEvent.idl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ interface StorageEvent : Event {
3232
readonly attribute USVString url;
3333
readonly attribute Storage? storageArea;
3434

35-
// FIXME: Using "undefined" as default parameter value is wrong.
36-
undefined initStorageEvent(optional DOMString typeArg = "undefined",
35+
undefined initStorageEvent(DOMString typeArg,
3736
optional boolean canBubbleArg = false,
3837
optional boolean cancelableArg = false,
3938
optional DOMString keyArg = "undefined",

0 commit comments

Comments
 (0)