Return already_AddRefed instead of a raw addrefed pointer. Bug 211195, r+sr=bryner

This commit is contained in:
bzbarsky%mit.edu 2003-07-03 20:34:52 +00:00
Родитель 071c724c8f
Коммит 1bdfbda8b2
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -795,7 +795,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
// focused sub-window and sub-element for this top-level
// window.
nsCOMPtr<nsIFocusController> focusController = dont_AddRef(GetFocusControllerForDocument(mDocument));
nsCOMPtr<nsIFocusController> focusController = GetFocusControllerForDocument(mDocument);
if (focusController)
focusController->SetSuppressFocus(PR_TRUE, "Deactivate Suppression");
@ -5482,7 +5482,7 @@ nsEventStateManager::ShiftFocusByDoc(PRBool aForward)
}
// Get the FocusController given an nsIDocument
nsIFocusController*
already_AddRefed<nsIFocusController>
nsEventStateManager::GetFocusControllerForDocument(nsIDocument* aDocument)
{
nsCOMPtr<nsISupports> container;

Просмотреть файл

@ -47,6 +47,7 @@
#include "nsWeakReference.h"
#include "nsHashtable.h"
#include "nsITimer.h"
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsCOMArray.h"
@ -185,7 +186,7 @@ protected:
void EnsureDocument(nsIPresShell* aPresShell);
void EnsureDocument(nsIPresContext* aPresContext);
void FlushPendingEvents(nsIPresContext* aPresContext);
nsIFocusController* GetFocusControllerForDocument(nsIDocument* aDocument);
already_AddRefed<nsIFocusController> GetFocusControllerForDocument(nsIDocument* aDocument);
typedef enum {
eAccessKeyProcessingNormal = 0,