Re: [blink-dev] Re: Intent to Prototype: document.caretPositionFromPoint API

2024-01-24 Thread 'Siye Liu' via blink-dev
Thank you all for the feedback. I am going to open a ticket to discuss the expected behavior in shadow DOM and report the status back. Thanks, Siye On Tuesday, January 23, 2024 at 1:45:44 PM UTC-8 dba...@chromium.org wrote: > For what it's worth, some of the historical context around the 2009

Re: [blink-dev] Re: Intent to Prototype: document.caretPositionFromPoint API

2024-01-23 Thread David Baron
For what it's worth, some of the historical context around the 2009 changes is in WebApps TPAC 2009 minutes and Anne's folllowup email to www-style . -David On Tue, Jan

Re: [blink-dev] Re: Intent to Prototype: document.caretPositionFromPoint API

2024-01-23 Thread 'Dan Clark' via blink-dev
For the shadow DOM scenario, have we started the spec conversation about what behavior we want to end up at? I find the Gecko behavior a bit suspicious since it's piercing into potentially-closed shadow trees without having a prior reference to them. Maybe caretPositionFromPoint should not

Re: [blink-dev] Re: Intent to Prototype: document.caretPositionFromPoint API

2024-01-18 Thread Daniel Bratell
Sounds like something that should be reflected in the specs. Again, not directly related to this Intent, but maybe something that should happen in parallel. /Daniel On 2024-01-17 23:38, 'Siye Liu' via blink-dev wrote: Blink has similar concept called "affinity" when placing caret at wrapped

Re: [blink-dev] Re: Intent to Prototype: document.caretPositionFromPoint API

2024-01-17 Thread 'Siye Liu' via blink-dev
Blink has similar concept called "affinity" when placing caret at wrapped line. definition: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/visible_position.h;l=39-54 Thanks, Siye On Wednesday, January 17, 2024 at 6:35:14 AM UTC-8 Daniel

Re: [blink-dev] Re: Intent to Prototype: document.caretPositionFromPoint API

2024-01-17 Thread Daniel Bratell
This is not directly related to this one function but more to the whole API. I quickly skimmed the spec and I could not find out how it handles line breaks which make caret positions ambigious? When you press the END key at one line, and the HOME key at the following line your caret DOM

[blink-dev] Re: Intent to Prototype: document.caretPositionFromPoint API

2024-01-16 Thread 'Siye Liu' via blink-dev
Hi Brian, To answer your question, 1. This prototype only covers the main dom scenario (https://crbug.com/388976). Shadow dom scenario is tracked in https://crbug.com/1514810. 2. The prototype should have similar behavior as caretRangeFromPoint's implementation in Blink (when the point is over

[blink-dev] Re: Intent to Prototype: document.caretPositionFromPoint API

2024-01-12 Thread Brian Birtles
Hi, Will this also cover the behavioral differences between caretPositionFromPoint as implemented in Gecko and caretRangeFromPoint as implemented in Blink such as: 1. caretPositionFromPoint in Gecko digs into shadow DOM elements whereas caretRangeFromPoint in Blink does not. 2. When the point