Repository navigation
Commit f78ac28
committed
Various spec fixes
- `:read-write` (and `:read-only`) now ignore `contenteditable` on
non-HTML elements, such as an SVG `foreignObject`, as the attribute
only applies to HTML elements. Such elements inherit the state of
their parent.
- `:checked` now only matches the last radio button with a `checked`
attribute in a radio button group, as in a browser, where a group is
the radio buttons with the same `name` and form, including the
`form` attribute. `:default` still matches all of them, and the
contents of a `template` are unaffected as they are not connected.
- `:dir()` and `:defined` no longer affect the rest of the selector
list they are in. Previously, a selector list that used either of
them could not have its combinators cross an `iframe`, ignored the
specified namespaces, and matched nothing in XML, not even the parts
that didn't use them. They still do not match in XML, but
`:not(:dir(ltr))` and `:not(:defined)` now do.
- `:default` and `:indeterminate` now honor the `form` attribute,
which can associate a submit button or radio button with a form it
is not in, or leave it without a form. It is ignored in a
`template`, as in the HTML
specification. Submit buttons outside of a form can now be its
default button.
- `:default`, `:checked`, and `:indeterminate` now handle a form
inside a form like a browser. In HTML, a browser ignores the nested
form and takes its end tag for that of the parent, which matters for
parsers that keep the nested form, such as `html.parser`. In XHTML
and in a `template`, nested forms are real forms.
- `:checked` now matches the `option` that a browser would select.
Without `multiple`, that is only the last `option` with a `selected`
attribute in a `select`, and if there are none and the `select`
shows a single option, the first `option` that is not disabled.
`:default` still only considers the `selected` attribute.
- `:read-write` (and `:read-only`) no longer let the contents of an
`iframe` inherit `contenteditable` from outside of the `iframe`, as
they are in another document.1 parent d305d43 commit f78ac28
20 files changed
Lines changed: 1684 additions & 151 deletions
File tree
- docs/src
- dictionary
- markdown
- about
- selectors
- soupsieve
- tests
- test_extra
- test_level3
- test_level4
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
25 | 45 | | |
26 | 46 | | |
27 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
94 | 104 | | |
95 | 105 | | |
96 | 106 | | |
| |||
256 | 266 | | |
257 | 267 | | |
258 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
259 | 273 | | |
260 | 274 | | |
261 | 275 | | |
| |||
530 | 544 | | |
531 | 545 | | |
532 | 546 | | |
533 | | - | |
534 | | - | |
| 547 | + | |
| 548 | + | |
535 | 549 | | |
536 | 550 | | |
537 | 551 | | |
| |||
1271 | 1285 | | |
1272 | 1286 | | |
1273 | 1287 | | |
1274 | | - | |
| 1288 | + | |
| 1289 | + | |
1275 | 1290 | | |
1276 | 1291 | | |
1277 | 1292 | | |
| |||
1457 | 1472 | | |
1458 | 1473 | | |
1459 | 1474 | | |
| 1475 | + | |
| 1476 | + | |
1460 | 1477 | | |
1461 | 1478 | | |
1462 | 1479 | | |
| |||
1497 | 1514 | | |
1498 | 1515 | | |
1499 | 1516 | | |
1500 | | - | |
| 1517 | + | |
| 1518 | + | |
1501 | 1519 | | |
1502 | 1520 | | |
1503 | 1521 | | |
| |||
0 commit comments