Changeset 279979 in webkit
- Timestamp:
- Jul 15, 2021 11:52:15 PM (12 months ago)
- Location:
- trunk
- Files:
-
- 3 added
- 17 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/SubmitEvent.window-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/implicit-submission.optional-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt (modified) (1 diff)
-
Source/WebCore/CMakeLists.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/DerivedSources-input.xcfilelist (modified) (1 diff)
-
Source/WebCore/DerivedSources-output.xcfilelist (modified) (1 diff)
-
Source/WebCore/DerivedSources.make (modified) (1 diff)
-
Source/WebCore/Sources.txt (modified) (2 diffs)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (4 diffs)
-
Source/WebCore/dom/EventNames.in (modified) (1 diff)
-
Source/WebCore/html/HTMLFormElement.cpp (modified) (3 diffs)
-
Source/WebCore/html/SubmitEvent.cpp (added)
-
Source/WebCore/html/SubmitEvent.h (added)
-
Source/WebCore/html/SubmitEvent.idl (added)
-
Source/WebCore/html/SubmitInputType.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r279978 r279979 1 2021-07-15 Chris Dumez <cdumez@apple.com> 2 3 Implement 'SubmitEvent' interface 4 https://bugs.webkit.org/show_bug.cgi?id=202978 5 6 Reviewed by Alex Christensen. 7 8 Rebaseline WPT test now that more checks are passing. 9 10 * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 11 * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: 12 1 13 2021-07-15 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/ChangeLog
r279971 r279979 1 2021-07-15 Chris Dumez <cdumez@apple.com> 2 3 Implement 'SubmitEvent' interface 4 https://bugs.webkit.org/show_bug.cgi?id=202978 5 6 Reviewed by Alex Christensen. 7 8 Rebaseline WPT tests now that more checks are passing. 9 10 * web-platform-tests/html/semantics/forms/form-submission-0/SubmitEvent.window-expected.txt: 11 * web-platform-tests/html/semantics/forms/form-submission-0/implicit-submission.optional-expected.txt: 12 1 13 2021-07-15 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/SubmitEvent.window-expected.txt
r263987 r279979 1 1 2 FAIL Failing SubmitEvent constructor assert_throws_js: 0 arguments function "() => { new SubmitEvent() }" threw object "ReferenceError: Can't find variable: SubmitEvent" ("ReferenceError") expected instance of function "function TypeError() { 3 [native code] 4 }" ("TypeError") 5 FAIL Successful SubmitEvent constructor Can't find variable: SubmitEvent 6 FAIL Successful SubmitEvent constructor; null/undefined submitter Can't find variable: SubmitEvent 7 FAIL Successful SubmitEvent constructor; null/undefined dictionary Can't find variable: SubmitEvent 8 FAIL Successful SubmitEvent constructor; empty dictionary Can't find variable: SubmitEvent 9 FAIL Successful SubmitEvent constructor; missing dictionary Can't find variable: SubmitEvent 2 PASS Failing SubmitEvent constructor 3 PASS Successful SubmitEvent constructor 4 PASS Successful SubmitEvent constructor; null/undefined submitter 5 PASS Successful SubmitEvent constructor; null/undefined dictionary 6 PASS Successful SubmitEvent constructor; empty dictionary 7 PASS Successful SubmitEvent constructor; missing dictionary 10 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/implicit-submission.optional-expected.txt
r279427 r279979 3 3 4 4 5 FAIL Submit event with a submit button assert_equals: expected (object) Element node <input name="submitButton" type="submit"></input> but got (undefined) undefined 6 FAIL Submit event with no submit button assert_equals: expected (object) null but got (undefined) undefined 5 PASS Submit event with a submit button 6 PASS Submit event with no submit button 7 7 -
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r279978 r279979 3767 3767 PASS ValidityState interface: document.createElement("input").validity must inherit property "customError" with the proper type 3768 3768 PASS ValidityState interface: document.createElement("input").validity must inherit property "valid" with the proper type 3769 FAIL SubmitEvent interface: existence and properties of interface object assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3770 FAIL SubmitEvent interface object length assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3771 FAIL SubmitEvent interface object name assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3772 FAIL SubmitEvent interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3773 FAIL SubmitEvent interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3774 FAIL SubmitEvent interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3775 FAIL SubmitEvent interface: attribute submitter assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3769 PASS SubmitEvent interface: existence and properties of interface object 3770 PASS SubmitEvent interface object length 3771 PASS SubmitEvent interface object name 3772 PASS SubmitEvent interface: existence and properties of interface prototype object 3773 PASS SubmitEvent interface: existence and properties of interface prototype object's "constructor" property 3774 PASS SubmitEvent interface: existence and properties of interface prototype object's @@unscopables property 3775 PASS SubmitEvent interface: attribute submitter 3776 3776 FAIL FormDataEvent interface: existence and properties of interface object assert_own_property: self does not have own property "FormDataEvent" expected property "FormDataEvent" missing 3777 3777 FAIL FormDataEvent interface object length assert_own_property: self does not have own property "FormDataEvent" expected property "FormDataEvent" missing -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r279978 r279979 3777 3777 PASS ValidityState interface: document.createElement("input").validity must inherit property "customError" with the proper type 3778 3778 PASS ValidityState interface: document.createElement("input").validity must inherit property "valid" with the proper type 3779 FAIL SubmitEvent interface: existence and properties of interface object assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3780 FAIL SubmitEvent interface object length assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3781 FAIL SubmitEvent interface object name assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3782 FAIL SubmitEvent interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3783 FAIL SubmitEvent interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3784 FAIL SubmitEvent interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3785 FAIL SubmitEvent interface: attribute submitter assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3779 PASS SubmitEvent interface: existence and properties of interface object 3780 PASS SubmitEvent interface object length 3781 PASS SubmitEvent interface object name 3782 PASS SubmitEvent interface: existence and properties of interface prototype object 3783 PASS SubmitEvent interface: existence and properties of interface prototype object's "constructor" property 3784 PASS SubmitEvent interface: existence and properties of interface prototype object's @@unscopables property 3785 PASS SubmitEvent interface: attribute submitter 3786 3786 FAIL FormDataEvent interface: existence and properties of interface object assert_own_property: self does not have own property "FormDataEvent" expected property "FormDataEvent" missing 3787 3787 FAIL FormDataEvent interface object length assert_own_property: self does not have own property "FormDataEvent" expected property "FormDataEvent" missing -
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
r279978 r279979 3777 3777 PASS ValidityState interface: document.createElement("input").validity must inherit property "customError" with the proper type 3778 3778 PASS ValidityState interface: document.createElement("input").validity must inherit property "valid" with the proper type 3779 FAIL SubmitEvent interface: existence and properties of interface object assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3780 FAIL SubmitEvent interface object length assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3781 FAIL SubmitEvent interface object name assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3782 FAIL SubmitEvent interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3783 FAIL SubmitEvent interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3784 FAIL SubmitEvent interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3785 FAIL SubmitEvent interface: attribute submitter assert_own_property: self does not have own property "SubmitEvent" expected property "SubmitEvent" missing 3779 PASS SubmitEvent interface: existence and properties of interface object 3780 PASS SubmitEvent interface object length 3781 PASS SubmitEvent interface object name 3782 PASS SubmitEvent interface: existence and properties of interface prototype object 3783 PASS SubmitEvent interface: existence and properties of interface prototype object's "constructor" property 3784 PASS SubmitEvent interface: existence and properties of interface prototype object's @@unscopables property 3785 PASS SubmitEvent interface: attribute submitter 3786 3786 FAIL FormDataEvent interface: existence and properties of interface object assert_own_property: self does not have own property "FormDataEvent" expected property "FormDataEvent" missing 3787 3787 FAIL FormDataEvent interface object length assert_own_property: self does not have own property "FormDataEvent" expected property "FormDataEvent" missing -
trunk/Source/WebCore/CMakeLists.txt
r279971 r279979 1026 1026 html/OffscreenCanvas.idl 1027 1027 html/RadioNodeList.idl 1028 html/SubmitEvent.idl 1028 1029 html/TextMetrics.idl 1029 1030 html/TimeRanges.idl -
trunk/Source/WebCore/ChangeLog
r279978 r279979 1 2021-07-15 Chris Dumez <cdumez@apple.com> 2 3 Implement 'SubmitEvent' interface 4 https://bugs.webkit.org/show_bug.cgi?id=202978 5 6 Reviewed by Alex Christensen. 7 8 Implement 'SubmitEvent' interface as per: 9 - https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submitevent 10 11 Both Chrome and Firefox already ship this. 12 13 No new tests, rebaselined existing tests. 14 15 * CMakeLists.txt: 16 * DerivedSources-input.xcfilelist: 17 * DerivedSources-output.xcfilelist: 18 * DerivedSources.make: 19 * Sources.txt: 20 * WebCore.xcodeproj/project.pbxproj: 21 * dom/EventNames.in: 22 * html/HTMLFormElement.cpp: 23 (WebCore::HTMLFormElement::submitIfPossible): 24 * html/SubmitEvent.cpp: Added. 25 (WebCore::SubmitEvent::create): 26 (WebCore::SubmitEvent::SubmitEvent): 27 (WebCore::SubmitEvent::eventInterface const): 28 * html/SubmitEvent.h: Added. 29 (WebCore::SubmitEvent::submitter const): 30 * html/SubmitEvent.idl: Added. 31 32 * html/SubmitInputType.cpp: 33 (WebCore::SubmitInputType::handleDOMActivateEvent): 34 Make sure SubmitInputType::handleDOMActivateEvent() passes its element as submitter 35 when submitting the form. One of the subtests in html/semantics/forms/form-submission-0/implicit-submission.optional.html 36 covers this. 37 1 38 2021-07-15 Chris Dumez <cdumez@apple.com> 2 39 -
trunk/Source/WebCore/DerivedSources-input.xcfilelist
r279971 r279979 1052 1052 $(PROJECT_DIR)/html/OffscreenCanvas.idl 1053 1053 $(PROJECT_DIR)/html/RadioNodeList.idl 1054 $(PROJECT_DIR)/html/SubmitEvent.idl 1054 1055 $(PROJECT_DIR)/html/TextMetrics.idl 1055 1056 $(PROJECT_DIR)/html/TimeRanges.idl -
trunk/Source/WebCore/DerivedSources-output.xcfilelist
r279971 r279979 2246 2246 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSStyleSheetList.cpp 2247 2247 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSStyleSheetList.h 2248 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSSubmitEvent.cpp 2249 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSSubmitEvent.h 2248 2250 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSSubtleCrypto.cpp 2249 2251 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSSubtleCrypto.h -
trunk/Source/WebCore/DerivedSources.make
r279971 r279979 902 902 $(WebCore)/html/OffscreenCanvas.idl \ 903 903 $(WebCore)/html/RadioNodeList.idl \ 904 $(WebCore)/html/SubmitEvent.idl \ 904 905 $(WebCore)/html/TextMetrics.idl \ 905 906 $(WebCore)/html/TimeRanges.idl \ -
trunk/Source/WebCore/Sources.txt
r279971 r279979 1299 1299 html/SearchInputType.cpp 1300 1300 html/StepRange.cpp 1301 html/SubmitEvent.cpp 1301 1302 html/SubmitInputType.cpp 1302 1303 html/TelephoneInputType.cpp … … 3674 3675 JSStyleSheet.cpp 3675 3676 JSStyleSheetList.cpp 3677 JSSubmitEvent.cpp 3676 3678 JSSubtleCrypto.cpp 3677 3679 JSText.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r279971 r279979 1318 1318 46C83EFE1A9BBE2900A79A41 /* GeoNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C83EFC1A9BBE2900A79A41 /* GeoNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1319 1319 46CA9C441F97BBE9004CFC3A /* VisibilityState.h in Headers */ = {isa = PBXBuildFile; fileRef = 46CA9C411F97BBE7004CFC3A /* VisibilityState.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1320 46D0004026A0FEB300D1BF1E /* SubmitEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 46D0003E26A0FE6F00D1BF1E /* SubmitEvent.h */; }; 1320 1321 46DBB6501AB8C96F00D9A813 /* PowerObserverMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1321 1322 46DD93D7269DE756001AFD88 /* BroadcastChannelIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DD93D5269DE74B001AFD88 /* BroadcastChannelIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 8399 8400 46CA9C411F97BBE7004CFC3A /* VisibilityState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisibilityState.h; sourceTree = "<group>"; }; 8400 8401 46CA9C421F97BBE7004CFC3A /* VisibilityState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VisibilityState.idl; sourceTree = "<group>"; }; 8402 46D0003C26A0FE6F00D1BF1E /* SubmitEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubmitEvent.cpp; sourceTree = "<group>"; }; 8403 46D0003E26A0FE6F00D1BF1E /* SubmitEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubmitEvent.h; sourceTree = "<group>"; }; 8404 46D0003F26A0FE7000D1BF1E /* SubmitEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SubmitEvent.idl; sourceTree = "<group>"; }; 8401 8405 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PowerObserverMac.h; sourceTree = "<group>"; }; 8402 8406 46DD93D5269DE74B001AFD88 /* BroadcastChannelIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BroadcastChannelIdentifier.h; sourceTree = "<group>"; }; … … 24171 24175 A5AFB34D115151A700B045CB /* StepRange.cpp */, 24172 24176 A5AFB34E115151A700B045CB /* StepRange.h */, 24177 46D0003C26A0FE6F00D1BF1E /* SubmitEvent.cpp */, 24178 46D0003E26A0FE6F00D1BF1E /* SubmitEvent.h */, 24179 46D0003F26A0FE7000D1BF1E /* SubmitEvent.idl */, 24173 24180 F55B3D9F1251F12D003EF269 /* SubmitInputType.cpp */, 24174 24181 F55B3DA01251F12D003EF269 /* SubmitInputType.h */, … … 35510 35517 D000ED2811C1B9CD00C47726 /* SubframeLoader.h in Headers */, 35511 35518 1FC40FBA1655CCB90040F29E /* SubimageCacheWithTimer.h in Headers */, 35519 46D0004026A0FEB300D1BF1E /* SubmitEvent.h in Headers */, 35512 35520 F55B3DD41251F12D003EF269 /* SubmitInputType.h in Headers */, 35513 35521 656D37480ADBA5DE00A4554D /* SubresourceLoader.h in Headers */, -
trunk/Source/WebCore/dom/EventNames.in
r278630 r279979 36 36 ProgressEvent 37 37 PromiseRejectionEvent 38 SubmitEvent 38 39 TextEvent 39 40 TransitionEvent -
trunk/Source/WebCore/html/HTMLFormElement.cpp
r279401 r279979 56 56 #include "ScriptDisallowedScope.h" 57 57 #include "Settings.h" 58 #include "SubmitEvent.h" 58 59 #include "UserGestureIndicator.h" 59 60 #include <limits> … … 269 270 270 271 bool shouldValidate = document().page() && document().page()->settings().interactiveFormValidationEnabled() && !noValidate(); 271 272 272 if (shouldValidate) { 273 273 auto submitElement = makeRefPtr(submitter ? submitter : findSubmitter(event)); … … 290 290 auto protectedThis = makeRef(*this); 291 291 292 auto submitEvent = Event::create(eventNames().submitEvent, Event::CanBubble::Yes, Event::IsCancelable::Yes);292 auto submitEvent = SubmitEvent::create(submitter); 293 293 dispatchEvent(submitEvent); 294 294 -
trunk/Source/WebCore/html/SubmitInputType.cpp
r277257 r279979 76 76 protectedElement->setActivatedSubmit(true); 77 77 if (auto currentForm = makeRefPtr(protectedElement->form())) 78 currentForm->submitIfPossible(&event ); // Event handlers can run.78 currentForm->submitIfPossible(&event, element()); // Event handlers can run. 79 79 protectedElement->setActivatedSubmit(false); 80 80 event.setDefaultHandled();
Note: See TracChangeset
for help on using the changeset viewer.