Remove nsIStyleContext (bug 114713), r/sr=dbaron. Changed lots of methods to use nsStyleContext* or already_AddRefed<nsStyleContext> as return values, depending on whether a reference is returned. Turn on nsRefPtr (bug 104346), and change nsDerivedSafe to not declare AddRef and Release explicitly virtual, r=jag, sr=dbaron.

This commit is contained in:
bryner@netscape.com
2003-02-22 00:32:13 +00:00
parent fc5bde705c
commit ba58162e96
311 changed files with 3728 additions and 4482 deletions

View File

@@ -50,6 +50,7 @@
#include "nsIDOMNode.h"
#include "nsLayoutAtoms.h"
#include "nsReflowPath.h"
#include "nsAutoPtr.h"
// MouseEvent suppression in PP
#include "nsGUIEvent.h"
@@ -253,17 +254,13 @@ nsGfxButtonControlFrame::CreateFrameFor(nsIPresContext* aPresContext,
aPresContext->GetShell(getter_AddRefs(shell));
nsIFrame * parentFrame = mFrames.FirstChild();
nsCOMPtr<nsIStyleContext> styleContext;
parentFrame->GetStyleContext(getter_AddRefs(styleContext));
nsStyleContext* styleContext = parentFrame->GetStyleContext();
rv = NS_NewTextFrame(shell, &newFrame);
if (NS_FAILED(rv)) { return rv; }
if (!newFrame) { return NS_ERROR_NULL_POINTER; }
nsCOMPtr<nsIStyleContext> textStyleContext;
rv = aPresContext->ResolveStyleContextForNonElement(
styleContext,
getter_AddRefs(textStyleContext));
if (NS_FAILED(rv)) { return rv; }
nsRefPtr<nsStyleContext> textStyleContext;
textStyleContext = aPresContext->ResolveStyleContextForNonElement(styleContext);
if (!textStyleContext) { return NS_ERROR_NULL_POINTER; }
if (styleContext) {