Bug 919729 - Remove unnecessary MOZILLA_INTERNAL_API checks from nsIFrame.h. r=bz

This commit is contained in:
Birunthan Mohanathas 2013-09-25 09:48:20 -04:00
parent d00b39f63d
commit 4198afdd73
2 changed files with 2 additions and 26 deletions

View File

@ -345,7 +345,7 @@ NS_MergeReflowStatusInto(nsReflowStatus* aPrimary, nsReflowStatus aSecondary)
} }
void void
nsWeakFrame::InitInternal(nsIFrame* aFrame) nsWeakFrame::Init(nsIFrame* aFrame)
{ {
Clear(mFrame ? mFrame->PresContext()->GetPresShell() : nullptr); Clear(mFrame ? mFrame->PresContext()->GetPresShell() : nullptr);
mFrame = aFrame; mFrame = aFrame;

View File

@ -806,11 +806,9 @@ public:
#include "nsStyleStructList.h" #include "nsStyleStructList.h"
#undef STYLE_STRUCT #undef STYLE_STRUCT
#ifdef MOZILLA_INTERNAL_API
/** Also forward GetVisitedDependentColor to the style context */ /** Also forward GetVisitedDependentColor to the style context */
nscolor GetVisitedDependentColor(nsCSSProperty aProperty) nscolor GetVisitedDependentColor(nsCSSProperty aProperty)
{ return mStyleContext->GetVisitedDependentColor(aProperty); } { return mStyleContext->GetVisitedDependentColor(aProperty); }
#endif
/** /**
* These methods are to access any additional style contexts that * These methods are to access any additional style contexts that
@ -3249,29 +3247,7 @@ public:
Clear(mFrame ? mFrame->PresContext()->GetPresShell() : nullptr); Clear(mFrame ? mFrame->PresContext()->GetPresShell() : nullptr);
} }
private: private:
void InitInternal(nsIFrame* aFrame); void Init(nsIFrame* aFrame);
void InitExternal(nsIFrame* aFrame) {
Clear(mFrame ? mFrame->PresContext()->GetPresShell() : nullptr);
mFrame = aFrame;
if (mFrame) {
nsIPresShell* shell = mFrame->PresContext()->GetPresShell();
NS_WARN_IF_FALSE(shell, "Null PresShell in nsWeakFrame!");
if (shell) {
shell->AddWeakFrame(this);
} else {
mFrame = nullptr;
}
}
}
void Init(nsIFrame* aFrame) {
#ifdef MOZILLA_INTERNAL_API
InitInternal(aFrame);
#else
InitExternal(aFrame);
#endif
}
nsWeakFrame* mPrev; nsWeakFrame* mPrev;
nsIFrame* mFrame; nsIFrame* mFrame;