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 webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting: delegate method and in [WebView setSelectedDOMRange:affinity:], or an extension to DOMRange so that the parameter is implicitly carried along.

Duncan

_______________________________________________
webkit-dev mailing list
[email protected]
http://www.opendarwin.org/mailman/listinfo/webkit-dev

Reply via email to