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.
git-svn-id: svn://10.0.0.236/trunk@138129 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include "nsFrame.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsUnitConversion.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
@@ -81,7 +81,7 @@ NS_IMETHODIMP
|
||||
nsMathMLmsqrtFrame::Init(nsIPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIStyleContext* aContext,
|
||||
nsStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow)
|
||||
{
|
||||
nsresult rv = nsMathMLContainerFrame::Init(aPresContext, aContent, aParent,
|
||||
@@ -297,36 +297,25 @@ nsMathMLmsqrtFrame::Reflow(nsIPresContext* aPresContext,
|
||||
|
||||
// ----------------------
|
||||
// the Style System will use these to pass the proper style context to our MathMLChar
|
||||
NS_IMETHODIMP
|
||||
nsMathMLmsqrtFrame::GetAdditionalStyleContext(PRInt32 aIndex,
|
||||
nsIStyleContext** aStyleContext) const
|
||||
nsStyleContext*
|
||||
nsMathMLmsqrtFrame::GetAdditionalStyleContext(PRInt32 aIndex) const
|
||||
{
|
||||
NS_PRECONDITION(aStyleContext, "null OUT ptr");
|
||||
if (aIndex < 0) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
*aStyleContext = nsnull;
|
||||
switch (aIndex) {
|
||||
case NS_SQR_CHAR_STYLE_CONTEXT_INDEX:
|
||||
mSqrChar.GetStyleContext(aStyleContext);
|
||||
return mSqrChar.GetStyleContext();
|
||||
break;
|
||||
default:
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
return nsnull;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsMathMLmsqrtFrame::SetAdditionalStyleContext(PRInt32 aIndex,
|
||||
nsIStyleContext* aStyleContext)
|
||||
nsStyleContext* aStyleContext)
|
||||
{
|
||||
if (aIndex < 0) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
switch (aIndex) {
|
||||
case NS_SQR_CHAR_STYLE_CONTEXT_INDEX:
|
||||
mSqrChar.SetStyleContext(aStyleContext);
|
||||
break;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user