Open Bug 298715 Opened 19 years ago Updated 2 years ago

clean up selection code

Categories

(Core :: DOM: Selection, defect)

defect

Tracking

()

mozilla1.9alpha1

People

(Reporter: dbaron, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [patch])

Attachments

(2 files)

I'm going to attach a patch that does a bit of cleanup in the selection code. 
In particular:
 * clean up nsISelectionListener.idl , and remove a constant that represents "no
bits set in bitfield" (which is confusing because the constant looks just like
the bit constants)
 * Remove some unneeded mType and Get/SetType methods which are used only for an
nsTypedSelection to call its mFrameSelection to call back to itself.


Later I might also want to rename some classes -- I think the current class
names are extremely confusing.  I've been thinking of:

  nsISelectionController -> nsISelectionContainer

  nsSelection -> nsSelectionManager  (or nsSelectionList or Set?)
  NS_NewSelection -> NS_NewSelectionManager
  nsIFrameSelection -> nsISelectionManager

  nsTypedSelection -> nsSelection or nsDOMSelection
Whiteboard: [patch]
Target Milestone: --- → mozilla1.9alpha
Also, I should fix up some of the file locations after the layout file
reorganization:

content/base/public/nsISelection.idl
content/base/public/nsISelectionController.idl
content/base/public/nsISelectionDisplay.idl
content/base/public/nsISelectionListener.idl
content/base/public/nsISelectionPrivate.idl
layout/base/nsIFrameSelection.h
layout/base/nsISelectionImageService.h
layout/generic/nsSelection.cpp


(And also fix nsStyleConsts.h while I'm doing this.)
FYI, there is also bug 165870.
Attached patch updated patch #1Splinter Review
This is an updated version of the patch. I'm not exactly sure what should be done with it.

If anyone wants me to do any of the renaming in comment 0 or any new kind of renaming scheme I can do that...
QA Contact: selection
Assignee: dbaron → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: