[csswg-drafts] Pull Request: [css-highlight-api-1] Don't paint highlights that cross contain boundaries

frivoal has just labeled a pull request from dandclark for https://github.com/w3c/csswg-drafts as "Closed Rejected as Wontfix by CSSWG Resolution":

== [css-highlight-api-1] Don't paint highlights that cross contain boundaries ==
If a StaticRange crosses a `contain` boundary and the boundary point inside the contained element is removed, UAs would have to stop painting the full extent of the range. This would violate the `contain` invariant, since a change inside the element with `contain` would have affected the appearance of content outside of that element.

To eliminate this problem, never paint ranges that cross `contain` boundaries.

A slightly more scoped solution would be to apply this limitation only for highlights specified with `StaticRange`, but since there doesn't seem to be any use case for applying highlights across `contain` boundaries, the limitation is applied to live `Range`s as well for consistency's sake.

This PR changes the range-painting criteria into an algorithm, since precisely expressing the concept of "crossing a contain boundary" is clumsy in prose.

Resolves #4598.

See https://github.com/w3c/csswg-drafts/pull/6734


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 4 February 2022 02:45:26 UTC