Commit 1c9711b
committed
[popover] Don't throw when popover/dialog is in requested state
https://bugs.webkit.org/show_bug.cgi?id=255879
Reviewed by Tim Nguyen.
Implement the spec changes from:
whatwg/html#9142
The dialog related changes are tested by dialog-no-throw-requested-state.html.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-no-throw-requested-state-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-no-throw-requested-state.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-attribute-basic.html:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-move-documents.html:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/resources/popover-utils.js:
(async sendTab):
(async sendEscape):
(async sendEnter):
(assertPopoverVisibility):
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss-expected.txt:
* Source/WebCore/html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::show):
(WebCore::HTMLDialogElement::showModal):
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::checkPopoverValidity):
(WebCore::HTMLElement::showPopover):
(WebCore::HTMLElement::hidePopoverInternal):
Canonical link: https://commits.webkit.org/263957@main1 parent e911b9b commit 1c9711b
9 files changed
Lines changed: 83 additions & 36 deletions
File tree
- LayoutTests
- imported/w3c/web-platform-tests/html/semantics
- interactive-elements/the-dialog-element
- popovers
- resources
- platform/ios/imported/w3c/web-platform-tests/html/semantics/popovers
- Source/WebCore/html
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 30 | + | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
| |||
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
130 | | - | |
131 | 129 | | |
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
135 | | - | |
| 133 | + | |
136 | 134 | | |
137 | 135 | | |
138 | | - | |
| 136 | + | |
139 | 137 | | |
140 | 138 | | |
141 | 139 | | |
| |||
151 | 149 | | |
152 | 150 | | |
153 | 151 | | |
154 | | - | |
| 152 | + | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
158 | | - | |
159 | 156 | | |
160 | 157 | | |
161 | 158 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | | - | |
76 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
1242 | | - | |
| 1242 | + | |
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1247 | 1250 | | |
1248 | 1251 | | |
1249 | 1252 | | |
1250 | 1253 | | |
1251 | 1254 | | |
1252 | 1255 | | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
| |||
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
1264 | | - | |
| 1264 | + | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
| |||
1375 | 1375 | | |
1376 | 1376 | | |
1377 | 1377 | | |
1378 | | - | |
| 1378 | + | |
| 1379 | + | |
1379 | 1380 | | |
| 1381 | + | |
| 1382 | + | |
1380 | 1383 | | |
1381 | 1384 | | |
1382 | 1385 | | |
| |||
1386 | 1389 | | |
1387 | 1390 | | |
1388 | 1391 | | |
1389 | | - | |
| 1392 | + | |
| 1393 | + | |
1390 | 1394 | | |
| 1395 | + | |
| 1396 | + | |
1391 | 1397 | | |
1392 | 1398 | | |
1393 | 1399 | | |
| |||
1399 | 1405 | | |
1400 | 1406 | | |
1401 | 1407 | | |
1402 | | - | |
| 1408 | + | |
| 1409 | + | |
1403 | 1410 | | |
| 1411 | + | |
| 1412 | + | |
1404 | 1413 | | |
1405 | 1414 | | |
1406 | 1415 | | |
| |||
1425 | 1434 | | |
1426 | 1435 | | |
1427 | 1436 | | |
1428 | | - | |
| 1437 | + | |
| 1438 | + | |
1429 | 1439 | | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
1430 | 1443 | | |
1431 | 1444 | | |
1432 | 1445 | | |
1433 | 1446 | | |
1434 | 1447 | | |
1435 | 1448 | | |
1436 | | - | |
| 1449 | + | |
| 1450 | + | |
1437 | 1451 | | |
| 1452 | + | |
| 1453 | + | |
1438 | 1454 | | |
1439 | 1455 | | |
1440 | 1456 | | |
1441 | 1457 | | |
1442 | 1458 | | |
1443 | 1459 | | |
1444 | 1460 | | |
1445 | | - | |
| 1461 | + | |
| 1462 | + | |
1446 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
1447 | 1466 | | |
1448 | 1467 | | |
1449 | 1468 | | |
| |||
0 commit comments