4.1.1
- FIX: Improve performance of tag name matching, which runs for every element and selector.
- FIX: Fix
nthselectors taking polynomial time when nested inside theof Sof othernthselectors, such
as:nth-last-child(n of :nth-last-child(n of li)), as each level of nesting multiplied the work by the number
of siblings.nthselectors inside:has()with a subsequent-sibling combinator, such as
:has(~ :nth-child(n of li)), were also quadratic. Each sibling is now evaluated against annthselector at most
once per parent. - FIX: A
rangeinput's value is clamped to its minimum and maximum, 0 and 100 by default, so it now matches
:out-of-rangeonly when its maximum is less than its minimum, and:in-rangeotherwise, including withoutmin
ormax. Arangeinput that is disabled,readonlyor in adatalistmatches neither. - FIX:
:in-rangeand:out-of-rangeno longer match an input of any type that is disabled,readonlyor in a
datalist, as it is barred from constraint validation. - FIX:
:in-rangeand:out-of-rangetreat adate,month,weekordatetime-localvalue after
275760-09-13T00:00:00Z as invalid, as browsers do. - FIX:
:placeholder-shownsanitizes an input's value before checking it, as browsers do, so it matches when the
value is only line breaks, only whitespace forurlandemail, or, fornumber, not a valid floating-point
number or one that overflows a double, such as1e9999. - FIX: Fix
:placeholder-showntaking time quadratic in the depth of the document, as it got the text of every
element before checking that it is atextarea.