W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2021

Re: [csswg-drafts] [css-highlight-api] Specifying behavior for Highlights involving multiple documents (#6417)

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Wed, 04 Aug 2021 23:26:40 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-893041246-1628119598-sysbot+gh@w3.org>
The CSS Working Group just discussed `[css-highlight-api] Specifying behavior for Highlights involving multiple documents`, and agreed to the following:

* `RESOLVED: revert previous resolution and allow any ranges to be added to a registry. At paint time we only use ranges that are with the originating document`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: [css-highlight-api] Specifying behavior for Highlights involving multiple documents<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/6417#issuecomment-884332586<br>
&lt;dael> astearns: dandclark can you lead?<br>
&lt;dael> dandclark: This is a rerun of an issue I raised a couple weeks ago. Reached resolution but thought of an issue<br>
&lt;dael> dandclark: Summary is that if we have a couple of same domain iframes have a couple of registries and can add range from wrong window. Resolved to make impossible by throwing when you attempt to add highlight registry from another window<br>
&lt;dael> dandclark: This is trying to establish invarient where they only have ranges from same window. Issue might be is if I add range from same window and I moved to another window I have violated the invarient and it's not clear what to do<br>
&lt;dael> dandclark: No straightfoward way to block unless we check when we move<br>
&lt;TabAtkins> q+<br>
&lt;florian> q?<br>
&lt;dael> dandclark: like to revisit if throwing is right. If we can't maintain this invarient re-open allowing and during painting step they're skipped.<br>
&lt;astearns> ack TabAtkins<br>
&lt;dael> TabAtkins: If we can check what window they're from at painting time I'm not sure why it's problematic to check upon assignemnt to registry<br>
&lt;dael> dandclark: We can, but if at time assigned to registry it's correct but then I can take and position in a different window and it's too late to stop<br>
&lt;florian> q+<br>
&lt;dael> TabAtkins: Oh, didn't realize range could move like that<br>
&lt;dael> dandclark: Codesnip in the issue<br>
&lt;dandclark> https://github.com/w3c/csswg-drafts/issues/6417#issuecomment-884332586<br>
&lt;iank_> ranges are amazing like that.<br>
&lt;dael> florian: I haven't followed this closely, but it reminds me of interaction between ranges and css contain where range had one end outside and one within and the possibility that changing violates containment<br>
&lt;dael> florian: Had considered having in dictionary and ignoring it. I don't think we resolved there and it's still open<br>
&lt;astearns> ack florian<br>
&lt;smfr> q+<br>
&lt;florian> q-<br>
&lt;sanketj> q+<br>
&lt;astearns> ack smfr<br>
&lt;dael> smfr: Do we need to invent a new kind of range that's live but contained in a single document? Cannot move between docs?<br>
&lt;dael> TabAtkins: And restrict to only accept that type?<br>
&lt;dael> smfr: Range would associate to that document and throw if you call with a node from different doc?<br>
&lt;dael> TabAtkins: But we only allow that new type of range with this API?<br>
&lt;dael> smfr: Possibly<br>
&lt;dael> TabAtkins: If we didn't restrict not sure what we gain with the new range type<br>
&lt;dael> smfr: Yeah, only get benefits if you enforce using the new kind of range<br>
&lt;astearns> ack sanketj<br>
&lt;florian> the css-contain issue is : https://github.com/w3c/csswg-drafts/issues/4598<br>
&lt;dael> sanketj: I wanted to echo what florian was saying. Similarities with the contain boundary case where it doesn't make sesne for range boundry to check and it's allowed at paint and we decide then to allow<br>
&lt;dandclark> +1 to what sanketj said :)<br>
&lt;dael> sanketj: This should work same where we allow authors to place ranges where they want but when we paint we only paint those on same originating doc as the highlight registry. That's my preferred solution here<br>
&lt;Rossen_> q?<br>
&lt;GameMaker> +1 for sanketj/florian's solution as well<br>
&lt;Rossen_> q+<br>
&lt;dael> astearns: I think I prefer that solution as well. I can imagine this being whack a mole where we restrict things being added and someone comes up with a method of getting a range into a registry we hadn't thought of<br>
&lt;heycam> q+<br>
&lt;dael> astearns: Seems like it's fitting the problem better<br>
&lt;astearns> ack Rossen_<br>
&lt;dael> Rossen_: I agree with the path forward.<br>
&lt;dael> Rossen_: Before we resolve, sanketj or florian can you remind us what the OM or a11y model behind the ranges? How would they be exposed to assistive tech. xpose collection, only active, etc.?<br>
&lt;dael> florian: I think unresolved in spec. Maybe sanketj knows what was explored impl-wise<br>
&lt;dael> sanketj: I don't think we've reached exploring how to expose. OM-wise the highlight, range objects are OM types we're working with<br>
&lt;dael> Rossen_: I think it would be unfortunate if we reach too far into impl without considering those scenarios. I would suggest to start thinking through these<br>
&lt;dael> florian: You're right. It's been known for a while but it's about time we look into it<br>
&lt;astearns> ack heycam<br>
&lt;dael> heycam: Just realized I thinkw e have another instance of this which is selection object from getSelection. I don't remember what happens but maybe we can see what that does and perhaps do the same<br>
&lt;dael> astearns: Anyone know what happens for selection?<br>
&lt;dael> sanketj: I don't know how selection values update, but nothing blocks from being selected in another document. I'm not sure what happens when it does, though. Nothing stops it from being placed in arbitrary locations<br>
&lt;dael> astearns: previous resolution was throw on mismatches<br>
&lt;dael> astearns: I'm hearing prop is revert previous and allow any ranges to be added to a registry. At paint time we only use ranges that are with the originating document<br>
&lt;dlibby> q+<br>
&lt;dael> astearns: Any discussion on that prop resolution?<br>
&lt;astearns> ack dlibby<br>
&lt;dael> dlibby: We kept mentioning paint time. Is it more about how properties cascade? Or is it really checking when you paint?<br>
&lt;dael> TabAtkins: I suspect it will be some ranges are valid when in right document and painting will only paint valid ranges. And that would let you hook to a11y tools where they only get valid ranges<br>
&lt;dael> florian: And the cascade is for set of ranges for whole highlight so some invalid range doesn't change cascade<br>
&lt;dael> dlibby: that's right, thanks<br>
&lt;dael> astearns: Any more commets?<br>
&lt;dael> astearns: Obj?<br>
&lt;dael> RESOLVED: revert previous resolution and allow any ranges to be added to a registry. At paint time we only use ranges that are with the originating document<br>
&lt;dael> astearns: Thanks for bringing this up again dandclark<br>

GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6417#issuecomment-893041246 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 4 August 2021 23:26:42 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:42 UTC