- From: Dominic Farolino <notifications@github.com>
- Date: Wed, 12 Mar 2025 19:50:28 -0700
- To: w3c/selection-api <selection-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/selection-api/pull/345/review/2680332396@github.com>
@domfarolino commented on this pull request. > @@ -546,24 +566,18 @@ <h2> <var>newFocus</var> be the <a>boundary point</a> (<var>node</var>, <var>offset</var>). </li> - <li>Let <var>newRange</var> be a new <a>range</a>. - </li> - <li>If <var>node</var>'s [=tree/root=] is not the same as the - [=this=]'s <a>range</a>'s [=tree/root=], [=Range/set the start=] - <var>newRange</var>'s [=range/start=] and [=range/end=] to - <var>newFocus</var>. + <li>If <var>node</var>'s [=tree/root=] is not the same as + [=this=]'s <a>range</a>'s [=tree/root=], <a>reset the range</a> with + <var>newFocus</var> and <var>newFocus</var>. </li> <li>Otherwise, if <var>oldAnchor</var> is [=boundary point/before=] I don't think we need to go that far. I think we just need an algorithm that gives us the two shadow hosts in each's shadow-including ancestor chain that share the same root. Then we can finally compare those two with the DOM "before" and "after" concepts. So basically grab each endpoint's full shadow-including ancestor chain, and find the lowest node or shadow host in each's chain that share a common root, I think? Those hosts will be children of that root, and can be compared via DOM algorithms. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/selection-api/pull/345#discussion_r1992593245 You are receiving this because you are subscribed to this thread. Message ID: <w3c/selection-api/pull/345/review/2680332396@github.com>
Received on Thursday, 13 March 2025 02:50:32 UTC