Gecko:Obsolete API: Difference between revisions

m
Links; Updates
No edit summary
m (Links; Updates)
 
(6 intermediate revisions by 5 users not shown)
Line 3: Line 3:
If at all possible, please provide a) a suggested alternate class or function that provides similar functionality; and b) a link to a bug for removing the obsolete API from the codebase.  The bug should contain rationale for obsoleting that API.  To propose an API for obsolescence, please file a bug and add it to the proposed obsolete API section.
If at all possible, please provide a) a suggested alternate class or function that provides similar functionality; and b) a link to a bug for removing the obsolete API from the codebase.  The bug should contain rationale for obsoleting that API.  To propose an API for obsolescence, please file a bug and add it to the proposed obsolete API section.


= Obsolete API =
== Obsolete API ==
* nsIFileSpec, nsFileSpec
* nsIFileSpec, nsFileSpec
** FileSpec has various issues, including being limited to the system character set for filenames. <!-- more? -->
** FileSpec has various issues, including being limited to the system character set for filenames. <!-- more? -->
** Use nsIFile/nsILocalFile/nsILocalFile{In,Out}putStream
** Use nsIFile/nsILocalFile/nsILocalFile{In,Out}putStream
** https://bugzilla.mozilla.org/show_bug.cgi?id=38122
** {{Bug|38122}}
* nsIPref
* nsIPref ('''GONE''')
** Use nsIPrefService/nsIPrefBranch/nsIPrefBranch2
** Use nsIPrefService/nsIPrefBranch/nsIPrefBranch2
** https://bugzilla.mozilla.org/show_bug.cgi?id=175193
** {{Bug|175193}}
* ns(I)SupportsArray, nsIEnumerator
* ns(I)SupportsArray, nsIEnumerator
** nsSupportsArray is very inefficient and has a bad API
** nsSupportsArray is very inefficient and has a bad API
** Use any of the arrays in [[mdc:XPCOM_array_guide|The Mozilla Array Guide]].
** Use any of the arrays in [[mdc:XPCOM_array_guide|The Mozilla Array Guide]].
** Mailnews Removal covered by {{bug|394167}}
* nsVoidArray
* nsVoidArray
** Doesn't provide typesafety
** Doesn't provide typesafety
Line 29: Line 30:
* nsIBox
* nsIBox
** This is now just a typedef for nsIFrame.
** This is now just a typedef for nsIFrame.
* nsIDOMEventReceiver, and all specialized DOM event listener interfaces (better to use nsIDOMEventListener), e.g:
* nsIDOMEventReceiver ({{Bug|363089}}, and all specialized DOM event listener interfaces (better to use nsIDOMEventListener), e.g:
** nsIDOMCompositionListener
** nsIDOMCompositionListener
** nsIDOMContextMenuListener
** nsIDOMContextMenuListener
Line 39: Line 40:
** nsIDOMMouseListener
** nsIDOMMouseListener
** nsIDOMMouseMotionListener
** nsIDOMMouseMotionListener
** nsIDOMMutationListener (unused, remove in 1.9?)
** nsIDOMMutationListener (unused, remove in 1.9?, {{Bug|360847}})
** nsIDOMPageTransitionListener (unused, remove in 1.9?)
** nsIDOMPageTransitionListener (unused, remove in 1.9?, {{Bug|360847}})
** nsIDOMPaintListener (unused, remove in 1.9?)
** nsIDOMPaintListener (unused, remove in 1.9?, {{Bug|360847}})
** nsIDOMScrollListener (unused, remove in 1.9?)
** nsIDOMScrollListener (unused, remove in 1.9?, {{Bug|360847}})
** nsIDOMTextListener
** nsIDOMTextListener
** nsIDOMUIListener
** nsIDOMUIListener
** nsIDOMXULListener
** nsIDOMXULListener


= Proposed Obsolete API =
== Proposed Obsolete API ==


* NS_GET_IID, NS_DEFINE_IID, and T::GetIID, except when NS_GET_IID is used on a template parameter.
* NS_GET_IID, NS_DEFINE_IID, and T::GetIID, except when NS_GET_IID is used on a template parameter.
Line 55: Line 56:
* NS_NewAtom, NS_NewPermanentAtom
* NS_NewAtom, NS_NewPermanentAtom
** use do_GetAtom, do_GetPermanentAtom instead
** use do_GetAtom, do_GetPermanentAtom instead
* nsIRenderingContext, nsIDrawingSurface, nsIFontMetrics, nsTransform2D, nsFont, etc
* nsIRenderingContext, nsIDrawingSurface, nsIFontMetrics, nsTransform2D, nsFont, etc. (see [[Gfx glue layer removal]].)
** any substantial new rendering code should be written to Thebes directly; that is, gfxContext, gfx*Surface, gfxPlatform, gfxFontGroup, gfxTextRun.
** any substantial new rendering code should be written to Thebes directly; that is, gfxContext, gfx*Surface, gfxPlatform, gfxFontGroup, gfxTextRun.
Confirmed users
97

edits