Skip to content

Commit

Permalink
Revert "Add onbeforeinput global event handler attribute"
Browse files Browse the repository at this point in the history
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] whatwg/html#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 <[email protected]>
> Reviewed-by: Kent Tamura <[email protected]>
> Auto-Submit: Mason Freed <[email protected]>
> Reviewed-by: Xiaocheng Hu <[email protected]>
> 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 <[email protected]>
Owners-Override: Keishi Hattori <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
Reviewed-by: Keishi Hattori <[email protected]>
Commit-Queue: Keishi Hattori <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1023523}
NOKEYCHECK=True
GitOrigin-RevId: fd399d2e58b2581fc5e72ed0d8831533a949499e
  • Loading branch information
Keishi Hattori authored and copybara-github committed Jul 13, 2022
1 parent fde4967 commit 2b76e41
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 33 deletions.
1 change: 0 additions & 1 deletion blink/renderer/core/dom/global_event_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion blink/renderer/core/dom/global_event_handlers.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion blink/renderer/core/html/html_attribute_names.json5
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@
"onauxclick",
"onbeforecopy",
"onbeforecut",
"onbeforeinput",
"onbeforepaste",
"onbeforeprint",
"onbeforeunload",
Expand Down
2 changes: 0 additions & 2 deletions blink/renderer/core/html/html_element.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This is a testharness.js-based test.
FAIL <input type="text" onbeforeinput="onBeforeInput(event)" oninput="onInput(event)"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="text"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="search" onbeforeinput="onBeforeInput(event)" oninput="onInput(event)"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="search"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="tel" onbeforeinput="onBeforeInput(event)" oninput="onInput(event)"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="tel"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="url" onbeforeinput="onBeforeInput(event)" oninput="onInput(event)"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="url"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="email" onbeforeinput="onBeforeInput(event)" oninput="onInput(event)"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="email"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="password" onbeforeinput="onBeforeInput(event)" oninput="onInput(event)"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="password"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="number" onbeforeinput="onBeforeInput(event)" oninput="onInput(event)"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <input type="number"> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <textarea onbeforeinput="onBeforeInput(event)" oninput="onInput(event)"></textarea> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
FAIL <textarea></textarea> assert_array_equals: Got expected events lengths differ, expected array ["beforeinput", "input"] length 2, got ["input"] length 1
Harness: the test ran to completion.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,6 @@ interface Document : Node
getter onauxclick
getter onbeforecopy
getter onbeforecut
getter onbeforeinput
getter onbeforematch
getter onbeforepaste
getter onbeforexrselect
Expand Down Expand Up @@ -1631,7 +1630,6 @@ interface Document : Node
setter onauxclick
setter onbeforecopy
setter onbeforecut
setter onbeforeinput
setter onbeforematch
setter onbeforepaste
setter onbeforexrselect
Expand Down Expand Up @@ -2716,7 +2714,6 @@ interface HTMLElement : Element
getter onanimationiteration
getter onanimationstart
getter onauxclick
getter onbeforeinput
getter onbeforematch
getter onbeforexrselect
getter onblur
Expand Down Expand Up @@ -2840,7 +2837,6 @@ interface HTMLElement : Element
setter onanimationiteration
setter onanimationstart
setter onauxclick
setter onbeforeinput
setter onbeforematch
setter onbeforexrselect
setter onblur
Expand Down Expand Up @@ -6359,7 +6355,6 @@ interface SVGElement : Element
getter onanimationiteration
getter onanimationstart
getter onauxclick
getter onbeforeinput
getter onbeforematch
getter onbeforexrselect
getter onblur
Expand Down Expand Up @@ -6467,7 +6462,6 @@ interface SVGElement : Element
setter onanimationiteration
setter onanimationstart
setter onauxclick
setter onbeforeinput
setter onbeforematch
setter onbeforexrselect
setter onblur
Expand Down Expand Up @@ -10336,7 +10330,6 @@ namespace CSS
getter onanimationstart
getter onappinstalled
getter onauxclick
getter onbeforeinput
getter onbeforeinstallprompt
getter onbeforematch
getter onbeforeprint
Expand Down Expand Up @@ -10551,7 +10544,6 @@ namespace CSS
setter onanimationstart
setter onappinstalled
setter onauxclick
setter onbeforeinput
setter onbeforeinstallprompt
setter onbeforematch
setter onbeforeprint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,6 @@ interface Document : Node
getter onauxclick
getter onbeforecopy
getter onbeforecut
getter onbeforeinput
getter onbeforematch
getter onbeforepaste
getter onbeforexrselect
Expand Down Expand Up @@ -2001,7 +2000,6 @@ interface Document : Node
setter onauxclick
setter onbeforecopy
setter onbeforecut
setter onbeforeinput
setter onbeforematch
setter onbeforepaste
setter onbeforexrselect
Expand Down Expand Up @@ -3197,7 +3195,6 @@ interface HTMLElement : Element
getter onanimationiteration
getter onanimationstart
getter onauxclick
getter onbeforeinput
getter onbeforematch
getter onbeforexrselect
getter onblur
Expand Down Expand Up @@ -3325,7 +3322,6 @@ interface HTMLElement : Element
setter onanimationiteration
setter onanimationstart
setter onauxclick
setter onbeforeinput
setter onbeforematch
setter onbeforexrselect
setter onblur
Expand Down Expand Up @@ -5134,7 +5130,6 @@ interface MathMLElement : Element
getter onanimationiteration
getter onanimationstart
getter onauxclick
getter onbeforeinput
getter onbeforematch
getter onbeforexrselect
getter onblur
Expand Down Expand Up @@ -5243,7 +5238,6 @@ interface MathMLElement : Element
setter onanimationiteration
setter onanimationstart
setter onauxclick
setter onbeforeinput
setter onbeforematch
setter onbeforexrselect
setter onblur
Expand Down Expand Up @@ -7348,7 +7342,6 @@ interface SVGElement : Element
getter onanimationiteration
getter onanimationstart
getter onauxclick
getter onbeforeinput
getter onbeforematch
getter onbeforexrselect
getter onblur
Expand Down Expand Up @@ -7459,7 +7452,6 @@ interface SVGElement : Element
setter onanimationiteration
setter onanimationstart
setter onauxclick
setter onbeforeinput
setter onbeforematch
setter onbeforexrselect
setter onblur
Expand Down Expand Up @@ -11611,7 +11603,6 @@ namespace CSS
getter onanimationstart
getter onappinstalled
getter onauxclick
getter onbeforeinput
getter onbeforeinstallprompt
getter onbeforematch
getter onbeforeprint
Expand Down Expand Up @@ -11833,7 +11824,6 @@ namespace CSS
setter onanimationstart
setter onappinstalled
setter onauxclick
setter onbeforeinput
setter onbeforeinstallprompt
setter onbeforematch
setter onbeforeprint
Expand Down

0 comments on commit 2b76e41

Please sign in to comment.