- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 02 Dec 2021 00:17:57 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `statis ranges and highlights`. <details><summary>The full IRC log of that discussion</summary> <TabAtkins> Topic: statis ranges and highlights<br> <TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/4598<br> <TabAtkins> sanketj: there was discussion in a previous meeting to just add a paint step taht ignores static ranges that cross a containment boundary<br> <TabAtkins> sanketj: it didn't seem like it was something unique to the highlight api<br> <TabAtkins> sanketj: selection also adds ranges, and they're allowed to cross containment boundaries<br> <TabAtkins> sanketj: so if this should be disallowed for highlights, it should be done at a more general level<br> <TabAtkins> sanketj: so Dan's proposal is that we shouldn't need to handle this case in the Highlight API specifically<br> <Rossen_> q<br> <TabAtkins> sanketj: but there's also a question of what forum this q should be taken up in<br> <florian> q+<br> <TabAtkins> dandclark: even for live ranges today, if i'm using a live rang eto paint a selection, i can use the range API to make it encompass a paint-contained element and cause paint changes inside that contained element<br> <TabAtkins> dandclark: so we already don't really pay attention to paint contain, and that makes sense - they're not really bound to the tree hiearchy<br> <TabAtkins> dandclark: before we were looking at this the wrong way - if i have a range across a paint boundary, and i remove the element that one end is on, we ahve to invalidate it and that requires more invalidation than seemed reasonable<br> <dandclark> Proposed resolution: Allow static-range-backed custom highlights to be painted across paint-contain boundaries. Changes in static range validity can invalidate an intersected element with paint-contain. This is OK, and we will document this interaction in the highlight spec.<br> <TabAtkins> dandclark: But really this sort of invalidation is akin to live range invalidation<br> <TabAtkins> dandclark: So proposed resolution [above]<br> <Rossen_> ack florian<br> <TabAtkins> florian: I think i disagree<br> <TabAtkins> florian: Problem is not whether something crosses a paint boundary. Crossing is fine<br> <TabAtkins> florian: The initial problem with static range is that if it starts outside the paint contain and goes inside, and the dom changes within the paint-contain area, and the paint-contain area is offscreen, then in that case there is part of the range inside and outside<br> <TabAtkins> florian: the part that is outside isn't changing, it still goes up to the edge, but the part inside does change, becuas eyou changed the DOM. But that breaks an invariant of paint containment, that you don't need to worrya bout the painting of a contained element that's offscreen<br> <TabAtkins> florian: I think that's different from your examples<br> <TabAtkins> florian: If you ahve a live range that you change, so the part that's outside shoudl be different, well you changed it, of course you have to repaint<br> <TabAtkins> florian: with selection it's the same - if you change the selection, surely you ahve to repaint it<br> <TabAtkins> florian: also, paint containment allows browsers to skip painting, and paint-based invalidation. it doesn't allow browser to skip dom updates.<br> <TabAtkins> florian: So if dom updates you do still have to handle that<br> <Rossen_> q?<br> <TabAtkins> florian: So that's why the live vs static range is important<br> <BoCupp> q+ to say in Florian's example state of the range is changed, and if a range intersects a contained element and its state changes its allowed to invalidate its painting<br> <TabAtkins> florian: live ranges are effectively part of the dom, so modifying the dom modifies the live range<br> <TabAtkins> florian: but the point of the static range is that it doesn't get updated; the author is meant to take care of that<br> <TabAtkins> florian: and it might get inconsistent where the entire thing shouldn't be painted<br> <TabAtkins> florian: So statics can give us an inconsistent state that live ranges can't<br> <TabAtkins> florian: Just not painting ranges that cross paint boundaries might not be right, we can explore this sapce more<br> <TabAtkins> BoCupp: In both cases, it's the state of the range that's changing. The range that's intersecting an element with paint containment needs to be able to invalidate inside that boundary<br> <TabAtkins> BoCupp: Misleading us is that we're using nodes that are inside or outside the containment, to trigger changes in the range.<br> <TabAtkins> BoCupp: I don't think it matters that the state is computed for static ranges so you can tell they're valid or invalid, or you change the start node so it moves from inside to outside the containment<br> <TabAtkins> BoCupp: so we don't think there's a new case here. we might need to dig more into what florian is bringing up<br> <TabAtkins> BoCupp: ultimately this is about optimizations browser can pursue, and rather than put in complicated rules, put the onus on browsers to pay attention to ranges that might intersect containments<br> <TabAtkins> florian: That invalidates the point of contain, tho. Point is that it removes several things that it no longer needs to pay attention to.<br> <TabAtkins> BoCupp: It only requires them to pay attention to this one thing, ranges.<br> <TabAtkins> Rossen_: Sounds like this discussion should continue on GH, there's more detail to be ironed out before we're ready for resolution.<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4598#issuecomment-984175946 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 2 December 2021 00:17:59 UTC