Looks like there is still not much in common between WebKit and Firefox Selection objects.
Patch for more Firefox methods forthcoming.
Created attachment 17156 [details]
What is the conceptual difference between DOMSelection, Selection and SelectionController? Looks like we may have too many of those.
(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 on attachment 17156 [details]
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.
Committed revision 27666.