Skip to content

Commit 005a921

Browse files
committed
Bug 1878207 [wpt PR 44370] - Always call superclass in HTMLLabelElement::DefaultEventHandler, a=testonly
Automatic update from web-platform-tests Always call superclass in HTMLLabelElement::DefaultEventHandler HTMLLabelElement::DefaultEventHandler does not currently call up to HTMLElement::DefaultEventHandler in many cases. This patch makes sure that HTMLLabelElement always calls up to HTMLElement, which makes <label>s in <button>s work. WebKit's HTMLLabelElement already does this in all branches of HTMLLabelElement::defaultEventHandler since 2017: WebKit/WebKit@fec9c1d WebKit/WebKit@b9bad31 Fixed: 1523168 Change-Id: Ib9d0a63befbb930b9595bcc89fb5955050c97b2f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5260750 Commit-Queue: Joey Arhar <jarharchromium.org> Reviewed-by: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1257674} -- wpt-commits: 3c00d743109ae3d06e874e56dd9287f3ded06f44 wpt-pr: 44370 UltraBlame original commit: 05debd390111652dd5aedc146e636bfe8f059607
1 parent e587fe4 commit 005a921

File tree

1 file changed

+266
-0
lines changed

1 file changed

+266
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
<
2+
!
3+
DOCTYPE
4+
html
5+
>
6+
<
7+
link
8+
rel
9+
=
10+
author
11+
href
12+
=
13+
"
14+
mailto
15+
:
16+
jarhar
17+
chromium
18+
.
19+
org
20+
"
21+
>
22+
<
23+
link
24+
rel
25+
=
26+
help
27+
href
28+
=
29+
"
30+
https
31+
:
32+
/
33+
/
34+
bugs
35+
.
36+
chromium
37+
.
38+
org
39+
/
40+
p
41+
/
42+
chromium
43+
/
44+
issues
45+
/
46+
detail
47+
?
48+
id
49+
=
50+
1523168
51+
"
52+
>
53+
<
54+
script
55+
src
56+
=
57+
"
58+
/
59+
resources
60+
/
61+
testharness
62+
.
63+
js
64+
"
65+
>
66+
<
67+
/
68+
script
69+
>
70+
<
71+
script
72+
src
73+
=
74+
"
75+
/
76+
resources
77+
/
78+
testharnessreport
79+
.
80+
js
81+
"
82+
>
83+
<
84+
/
85+
script
86+
>
87+
<
88+
script
89+
src
90+
=
91+
"
92+
/
93+
resources
94+
/
95+
testdriver
96+
.
97+
js
98+
"
99+
>
100+
<
101+
/
102+
script
103+
>
104+
<
105+
script
106+
src
107+
=
108+
"
109+
/
110+
resources
111+
/
112+
testdriver
113+
-
114+
vendor
115+
.
116+
js
117+
"
118+
>
119+
<
120+
/
121+
script
122+
>
123+
<
124+
button
125+
popovertarget
126+
=
127+
mypopover
128+
>
129+
<
130+
label
131+
>
132+
label
133+
<
134+
/
135+
label
136+
>
137+
<
138+
/
139+
button
140+
>
141+
<
142+
div
143+
id
144+
=
145+
mypopover
146+
popover
147+
=
148+
auto
149+
>
150+
popover
151+
<
152+
/
153+
div
154+
>
155+
<
156+
script
157+
>
158+
promise_test
159+
(
160+
async
161+
(
162+
)
163+
=
164+
>
165+
{
166+
const
167+
label
168+
=
169+
document
170+
.
171+
querySelector
172+
(
173+
'
174+
label
175+
'
176+
)
177+
;
178+
assert_false
179+
(
180+
mypopover
181+
.
182+
matches
183+
(
184+
'
185+
:
186+
popover
187+
-
188+
open
189+
'
190+
)
191+
'
192+
Popover
193+
should
194+
be
195+
closed
196+
at
197+
the
198+
start
199+
of
200+
the
201+
test
202+
.
203+
'
204+
)
205+
;
206+
await
207+
test_driver
208+
.
209+
click
210+
(
211+
label
212+
)
213+
;
214+
assert_true
215+
(
216+
mypopover
217+
.
218+
matches
219+
(
220+
'
221+
:
222+
popover
223+
-
224+
open
225+
'
226+
)
227+
'
228+
The
229+
popover
230+
should
231+
be
232+
opened
233+
by
234+
clicking
235+
on
236+
the
237+
label
238+
.
239+
'
240+
)
241+
;
242+
}
243+
'
244+
Buttons
245+
with
246+
popovertarget
247+
should
248+
invoke
249+
targets
250+
even
251+
if
252+
there
253+
is
254+
a
255+
label
256+
in
257+
the
258+
button
259+
.
260+
'
261+
)
262+
;
263+
<
264+
/
265+
script
266+
>

0 commit comments

Comments
 (0)