From 2b76e418e56e894f7a48b3dd92cb1ae1b864916a Mon Sep 17 00:00:00 2001 From: Keishi Hattori Date: Wed, 13 Jul 2022 01:06:43 +0000 Subject: [PATCH] Revert "Add onbeforeinput global event handler attribute" This reverts commit 1771acb252e1265ba2c935e5662c912f1a40c4f4. Reason for revert: Maybe caused event-handler-attributes-body-window.html failure https://ci.chromium.org/p/chromium/builders/ci/Mac10.13%20Tests/53607 Original change's description: > Add onbeforeinput global event handler attribute > > See [1] for the landed spec PR, and [2] for the intent to ship. > > This adds `onbeforeinput` as a global event handler content attribute, > to allow easy access to the 'beforeinput' event handler. > > [1] https://github.com/whatwg/html/pull/7992 > [2] https://groups.google.com/a/chromium.org/g/blink-dev/c/hOhg-Rw6qww > > Fixed: 947408 > Change-Id: I6290253eab2bbfb652e8d3e17e4be655da9ccde5 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3749794 > Commit-Queue: Kent Tamura > Reviewed-by: Kent Tamura > Auto-Submit: Mason Freed > Reviewed-by: Xiaocheng Hu > Cr-Commit-Position: refs/heads/main@{#1023420} Change-Id: Id4fdd3887cce72d682a819c4d0d55ee1f529f2c7 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3758285 Auto-Submit: Keishi Hattori Owners-Override: Keishi Hattori Bot-Commit: Rubber Stamper Reviewed-by: Keishi Hattori Commit-Queue: Keishi Hattori Cr-Commit-Position: refs/heads/main@{#1023523} NOKEYCHECK=True GitOrigin-RevId: fd399d2e58b2581fc5e72ed0d8831533a949499e --- .../renderer/core/dom/global_event_handlers.h | 1 - .../core/dom/global_event_handlers.idl | 1 - .../core/html/html_attribute_names.json5 | 1 - blink/renderer/core/html/html_element.cc | 2 -- .../forms/beforeinput.tentative-expected.txt | 19 +++++++++++++++++++ ...-window-after-frame-navigated-expected.txt | 1 - ...-after-frame-removed-and-gced-expected.txt | 1 - ...ed-window-after-frame-removed-expected.txt | 1 - ...-window-after-frame-navigated-expected.txt | 1 - ...-after-frame-removed-and-gced-expected.txt | 1 - ...ed-window-after-frame-removed-expected.txt | 1 - ...ent-instance-property-listing-expected.txt | 2 -- .../global-interface-listing-expected.txt | 8 -------- ...ent-instance-property-listing-expected.txt | 2 -- .../global-interface-listing-expected.txt | 10 ---------- 15 files changed, 19 insertions(+), 33 deletions(-) create mode 100644 blink/web_tests/platform/generic/external/wpt/html/semantics/forms/beforeinput.tentative-expected.txt diff --git a/blink/renderer/core/dom/global_event_handlers.h b/blink/renderer/core/dom/global_event_handlers.h index 66594c0d7f7..53899f8c092 100644 --- a/blink/renderer/core/dom/global_event_handlers.h +++ b/blink/renderer/core/dom/global_event_handlers.h @@ -45,7 +45,6 @@ class GlobalEventHandlers { kAnimationiteration) DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(animationstart, kAnimationstart) DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(auxclick, kAuxclick) - DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(beforeinput, kBeforeinput) DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(beforematch, kBeforematch) DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(blur, kBlur) DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(cancel, kCancel) diff --git a/blink/renderer/core/dom/global_event_handlers.idl b/blink/renderer/core/dom/global_event_handlers.idl index d3b7570af9a..53ce16fed36 100644 --- a/blink/renderer/core/dom/global_event_handlers.idl +++ b/blink/renderer/core/dom/global_event_handlers.idl @@ -33,7 +33,6 @@ LegacyTreatAsPartialInterface ] interface mixin GlobalEventHandlers { attribute EventHandler onabort; - attribute EventHandler onbeforeinput; [RuntimeEnabled=BeforeMatchEvent] attribute EventHandler onbeforematch; attribute EventHandler onblur; attribute EventHandler oncancel; diff --git a/blink/renderer/core/html/html_attribute_names.json5 b/blink/renderer/core/html/html_attribute_names.json5 index caf9b35d142..479a25f17b4 100644 --- a/blink/renderer/core/html/html_attribute_names.json5 +++ b/blink/renderer/core/html/html_attribute_names.json5 @@ -163,7 +163,6 @@ "onauxclick", "onbeforecopy", "onbeforecut", - "onbeforeinput", "onbeforepaste", "onbeforeprint", "onbeforeunload", diff --git a/blink/renderer/core/html/html_element.cc b/blink/renderer/core/html/html_element.cc index d895ac1bc95..894697a8299 100644 --- a/blink/renderer/core/html/html_element.cc +++ b/blink/renderer/core/html/html_element.cc @@ -471,8 +471,6 @@ AttributeTriggers* HTMLElement::TriggersForAttributeName( event_type_names::kBeforecopy, nullptr}, {html_names::kOnbeforecutAttr, kNoWebFeature, event_type_names::kBeforecut, nullptr}, - {html_names::kOnbeforeinputAttr, kNoWebFeature, - event_type_names::kBeforeinput, nullptr}, {html_names::kOnbeforepasteAttr, kNoWebFeature, event_type_names::kBeforepaste, nullptr}, {html_names::kOnblurAttr, kNoWebFeature, event_type_names::kBlur, diff --git a/blink/web_tests/platform/generic/external/wpt/html/semantics/forms/beforeinput.tentative-expected.txt b/blink/web_tests/platform/generic/external/wpt/html/semantics/forms/beforeinput.tentative-expected.txt new file mode 100644 index 00000000000..faf65093abc --- /dev/null +++ b/blink/web_tests/platform/generic/external/wpt/html/semantics/forms/beforeinput.tentative-expected.txt @@ -0,0 +1,19 @@ +This is a testharness.js-based test. +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +FAIL assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1 +Harness: the test ran to completion. + diff --git a/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt b/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt index b6b82ca6ea2..0c595358157 100644 --- a/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt +++ b/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt @@ -106,7 +106,6 @@ PASS oldChildWindow.onanimationiteration is newChildWindow.onanimationiteration PASS oldChildWindow.onanimationstart is newChildWindow.onanimationstart PASS oldChildWindow.onappinstalled is newChildWindow.onappinstalled PASS oldChildWindow.onauxclick is newChildWindow.onauxclick -PASS oldChildWindow.onbeforeinput is newChildWindow.onbeforeinput PASS oldChildWindow.onbeforeinstallprompt is newChildWindow.onbeforeinstallprompt PASS oldChildWindow.onbeforematch is newChildWindow.onbeforematch PASS oldChildWindow.onbeforeprint is newChildWindow.onbeforeprint diff --git a/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt b/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt index 1983cad9160..b0eeaf208f5 100644 --- a/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt +++ b/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt @@ -51,7 +51,6 @@ PASS childWindow.onanimationiteration is null PASS childWindow.onanimationstart is null PASS childWindow.onappinstalled is null PASS childWindow.onauxclick is null -PASS childWindow.onbeforeinput is null PASS childWindow.onbeforeinstallprompt is null PASS childWindow.onbeforematch is null PASS childWindow.onbeforeprint is null diff --git a/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt b/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt index 1dcb603a657..dea95b1350c 100644 --- a/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt +++ b/blink/web_tests/platform/generic/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt @@ -51,7 +51,6 @@ PASS childWindow.onanimationiteration is null PASS childWindow.onanimationstart is null PASS childWindow.onappinstalled is null PASS childWindow.onauxclick is null -PASS childWindow.onbeforeinput is null PASS childWindow.onbeforeinstallprompt is null PASS childWindow.onbeforematch is null PASS childWindow.onbeforeprint is null diff --git a/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt b/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt index b0a4843236d..36efa30d35e 100644 --- a/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt +++ b/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt @@ -97,7 +97,6 @@ PASS oldChildWindow.onanimationiteration is newChildWindow.onanimationiteration PASS oldChildWindow.onanimationstart is newChildWindow.onanimationstart PASS oldChildWindow.onappinstalled is newChildWindow.onappinstalled PASS oldChildWindow.onauxclick is newChildWindow.onauxclick -PASS oldChildWindow.onbeforeinput is newChildWindow.onbeforeinput PASS oldChildWindow.onbeforeinstallprompt is newChildWindow.onbeforeinstallprompt PASS oldChildWindow.onbeforematch is newChildWindow.onbeforematch PASS oldChildWindow.onbeforeprint is newChildWindow.onbeforeprint diff --git a/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt b/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt index 9218d2a82b0..2668bb3e49e 100644 --- a/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt +++ b/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt @@ -49,7 +49,6 @@ PASS childWindow.onanimationiteration is null PASS childWindow.onanimationstart is null PASS childWindow.onappinstalled is null PASS childWindow.onauxclick is null -PASS childWindow.onbeforeinput is null PASS childWindow.onbeforeinstallprompt is null PASS childWindow.onbeforematch is null PASS childWindow.onbeforeprint is null diff --git a/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt b/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt index 98822b4c336..4d57870a733 100644 --- a/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt +++ b/blink/web_tests/platform/generic/virtual/stable/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt @@ -49,7 +49,6 @@ PASS childWindow.onanimationiteration is null PASS childWindow.onanimationstart is null PASS childWindow.onappinstalled is null PASS childWindow.onauxclick is null -PASS childWindow.onbeforeinput is null PASS childWindow.onbeforeinstallprompt is null PASS childWindow.onbeforematch is null PASS childWindow.onbeforeprint is null diff --git a/blink/web_tests/platform/generic/virtual/stable/webexposed/element-instance-property-listing-expected.txt b/blink/web_tests/platform/generic/virtual/stable/webexposed/element-instance-property-listing-expected.txt index a018261000b..7bbbdaa2bf4 100644 --- a/blink/web_tests/platform/generic/virtual/stable/webexposed/element-instance-property-listing-expected.txt +++ b/blink/web_tests/platform/generic/virtual/stable/webexposed/element-instance-property-listing-expected.txt @@ -164,7 +164,6 @@ namespace http://www.w3.org/1999/xhtml property onauxclick property onbeforecopy property onbeforecut - property onbeforeinput property onbeforematch property onbeforepaste property onbeforexrselect @@ -1331,7 +1330,6 @@ namespace http://www.w3.org/2000/svg property onauxclick property onbeforecopy property onbeforecut - property onbeforeinput property onbeforematch property onbeforepaste property onbeforexrselect diff --git a/blink/web_tests/platform/generic/virtual/stable/webexposed/global-interface-listing-expected.txt b/blink/web_tests/platform/generic/virtual/stable/webexposed/global-interface-listing-expected.txt index 948e1274a3e..4443e2543cf 100644 --- a/blink/web_tests/platform/generic/virtual/stable/webexposed/global-interface-listing-expected.txt +++ b/blink/web_tests/platform/generic/virtual/stable/webexposed/global-interface-listing-expected.txt @@ -1428,7 +1428,6 @@ interface Document : Node getter onauxclick getter onbeforecopy getter onbeforecut - getter onbeforeinput getter onbeforematch getter onbeforepaste getter onbeforexrselect @@ -1631,7 +1630,6 @@ interface Document : Node setter onauxclick setter onbeforecopy setter onbeforecut - setter onbeforeinput setter onbeforematch setter onbeforepaste setter onbeforexrselect @@ -2716,7 +2714,6 @@ interface HTMLElement : Element getter onanimationiteration getter onanimationstart getter onauxclick - getter onbeforeinput getter onbeforematch getter onbeforexrselect getter onblur @@ -2840,7 +2837,6 @@ interface HTMLElement : Element setter onanimationiteration setter onanimationstart setter onauxclick - setter onbeforeinput setter onbeforematch setter onbeforexrselect setter onblur @@ -6359,7 +6355,6 @@ interface SVGElement : Element getter onanimationiteration getter onanimationstart getter onauxclick - getter onbeforeinput getter onbeforematch getter onbeforexrselect getter onblur @@ -6467,7 +6462,6 @@ interface SVGElement : Element setter onanimationiteration setter onanimationstart setter onauxclick - setter onbeforeinput setter onbeforematch setter onbeforexrselect setter onblur @@ -10336,7 +10330,6 @@ namespace CSS getter onanimationstart getter onappinstalled getter onauxclick - getter onbeforeinput getter onbeforeinstallprompt getter onbeforematch getter onbeforeprint @@ -10551,7 +10544,6 @@ namespace CSS setter onanimationstart setter onappinstalled setter onauxclick - setter onbeforeinput setter onbeforeinstallprompt setter onbeforematch setter onbeforeprint diff --git a/blink/web_tests/platform/generic/webexposed/element-instance-property-listing-expected.txt b/blink/web_tests/platform/generic/webexposed/element-instance-property-listing-expected.txt index f3cd01f8440..928855bef3c 100644 --- a/blink/web_tests/platform/generic/webexposed/element-instance-property-listing-expected.txt +++ b/blink/web_tests/platform/generic/webexposed/element-instance-property-listing-expected.txt @@ -180,7 +180,6 @@ namespace http://www.w3.org/1999/xhtml property onauxclick property onbeforecopy property onbeforecut - property onbeforeinput property onbeforematch property onbeforepaste property onbeforexrselect @@ -1400,7 +1399,6 @@ namespace http://www.w3.org/2000/svg property onauxclick property onbeforecopy property onbeforecut - property onbeforeinput property onbeforematch property onbeforepaste property onbeforexrselect diff --git a/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt b/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt index 0776030783f..8731c50c966 100644 --- a/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt +++ b/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt @@ -1793,7 +1793,6 @@ interface Document : Node getter onauxclick getter onbeforecopy getter onbeforecut - getter onbeforeinput getter onbeforematch getter onbeforepaste getter onbeforexrselect @@ -2001,7 +2000,6 @@ interface Document : Node setter onauxclick setter onbeforecopy setter onbeforecut - setter onbeforeinput setter onbeforematch setter onbeforepaste setter onbeforexrselect @@ -3197,7 +3195,6 @@ interface HTMLElement : Element getter onanimationiteration getter onanimationstart getter onauxclick - getter onbeforeinput getter onbeforematch getter onbeforexrselect getter onblur @@ -3325,7 +3322,6 @@ interface HTMLElement : Element setter onanimationiteration setter onanimationstart setter onauxclick - setter onbeforeinput setter onbeforematch setter onbeforexrselect setter onblur @@ -5134,7 +5130,6 @@ interface MathMLElement : Element getter onanimationiteration getter onanimationstart getter onauxclick - getter onbeforeinput getter onbeforematch getter onbeforexrselect getter onblur @@ -5243,7 +5238,6 @@ interface MathMLElement : Element setter onanimationiteration setter onanimationstart setter onauxclick - setter onbeforeinput setter onbeforematch setter onbeforexrselect setter onblur @@ -7348,7 +7342,6 @@ interface SVGElement : Element getter onanimationiteration getter onanimationstart getter onauxclick - getter onbeforeinput getter onbeforematch getter onbeforexrselect getter onblur @@ -7459,7 +7452,6 @@ interface SVGElement : Element setter onanimationiteration setter onanimationstart setter onauxclick - setter onbeforeinput setter onbeforematch setter onbeforexrselect setter onblur @@ -11611,7 +11603,6 @@ namespace CSS getter onanimationstart getter onappinstalled getter onauxclick - getter onbeforeinput getter onbeforeinstallprompt getter onbeforematch getter onbeforeprint @@ -11833,7 +11824,6 @@ namespace CSS setter onanimationstart setter onappinstalled setter onauxclick - setter onbeforeinput setter onbeforeinstallprompt setter onbeforematch setter onbeforeprint