Confirmed users
97
edits
(→Obsolete API: change guide links to point directly to MDC) |
m (Links; Updates) |
||
(10 intermediate revisions by 8 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 | ||
** | ** {{Bug|38122}} | ||
* nsIPref | * nsIPref ('''GONE''') | ||
** Use nsIPrefService/nsIPrefBranch/nsIPrefBranch2 | ** Use nsIPrefService/nsIPrefBranch/nsIPrefBranch2 | ||
** | ** {{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 | ||
** Prefer to use nsTArray or nsCOMArray. | ** Prefer to use nsTArray or nsCOMArray. | ||
* nsAutoVoidArray | |||
** Use nsAutoTArray | |||
* nsAutoBuffer | |||
** Use nsAutoTArray | |||
* nsStringArray, nsCStringArray | * nsStringArray, nsCStringArray | ||
** Malloc-happy | ** Malloc-happy | ||
Line 25: | Line 30: | ||
* nsIBox | * nsIBox | ||
** This is now just a typedef for nsIFrame. | ** This is now just a typedef for nsIFrame. | ||
* nsIDOMEventReceiver ({{Bug|363089}}, and all specialized DOM event listener interfaces (better to use nsIDOMEventListener), e.g: | |||
** nsIDOMCompositionListener | |||
** nsIDOMContextMenuListener | |||
** nsIDOMDragListener | |||
** nsIDOMFocusListener | |||
** nsIDOMFormListener | |||
** nsIDOMKeyListener | |||
** nsIDOMLoadListener | |||
** nsIDOMMouseListener | |||
** nsIDOMMouseMotionListener | |||
** nsIDOMMutationListener (unused, remove in 1.9?, {{Bug|360847}}) | |||
** nsIDOMPageTransitionListener (unused, remove in 1.9?, {{Bug|360847}}) | |||
** nsIDOMPaintListener (unused, remove in 1.9?, {{Bug|360847}}) | |||
** nsIDOMScrollListener (unused, remove in 1.9?, {{Bug|360847}}) | |||
** nsIDOMTextListener | |||
** nsIDOMUIListener | |||
** 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 34: | 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. (see [[Gfx glue layer removal]].) | |||
** any substantial new rendering code should be written to Thebes directly; that is, gfxContext, gfx*Surface, gfxPlatform, gfxFontGroup, gfxTextRun. |