|Summary:||Implement more of Mozilla Selection API|
|Product:||WebKit||Reporter:||Alexey Proskuryakov <ap>|
|Component:||HTML Editing||Assignee:||Alexey Proskuryakov <ap>|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.4|
Description Alexey Proskuryakov 2007-11-09 07:55:40 PST
Looks like there is still not much in common between WebKit and Firefox Selection objects. Patch for more Firefox methods forthcoming.
Comment 1 Alexey Proskuryakov 2007-11-09 08:07:29 PST
Created attachment 17156 [details] proposed patch What is the conceptual difference between DOMSelection, Selection and SelectionController? Looks like we may have too many of those.
Comment 2 Darin Adler 2007-11-09 08:32:13 PST
(In reply to comment #1) > What is the conceptual difference between DOMSelection, Selection and > SelectionController? Looks like we may have too many of those. DOMSelection is the DOM's "selection object" API. It has the same relationship to SelectionController that DOMWindow has to Frame. Right now there's a problem in that we were "grooming" SelectionController to be this DOM object. So it has many functions that should simply be moved into DOMSelection. I think it's worthwhile to break out the DOM API just as we break out many aspects of the Frame object. Selection vs. SelectionController is another story. Selection is supposed to be an object that represents "a selection"; not necessarily what is selected right at this moment in a frame. A sort of "super-DOMRange". SelectionController, on the other hand, is "the selection management for a particular frame". However, there is some ancient code that uses SelectionController in the way we intend to use Selection, making a copy of it and modifying it. That should go away.
Comment 3 Darin Adler 2007-11-10 12:17:41 PST
Comment on attachment 17156 [details] proposed patch r=me But this is following the wrong pattern: We want to move the DOM operations into DOMSelection and not add them all to SelectionController unless they are somehow more generally useful.
Comment 4 Alexey Proskuryakov 2007-11-10 12:33:07 PST
Committed revision 27666.