[webkit-dev] DOMRange and khtml::Selection direction

Duncan Wilcox duncan at mclink.it
Fri Aug 12 00:38:06 PDT 2005

> We will need to do something like this to solve the problem. A  
> completely separate method would be inconvenient. I think I'd  
> prefer a new class that includes both a range and a selection  
> direction, or something along those lines.

Would it be possible to extend DOMRange with selection direction?

> You don't mention how the selection direction would be passed to  
> the delegate method, but I assume you'd suggest n additional  
> parameter.

I had thought that perhaps selection direction is not needed very  
often, and that the delegate might expressely call [WebView  
selectionDirection] to get it, but on second thought it creates  
trouble with the mouse selection, so I guess the correct way is  
either an additional parameter in the  
  delegate method and in [WebView setSelectedDOMRange:affinity:], or  
an extension to DOMRange so that the parameter is implicitly carried  


More information about the webkit-dev mailing list