Bug 1219537 - Simplify a couple of PresContext() gets on nsIFrame/nsStyleContext. r=dholbert

This commit is contained in:
Cameron McCormack 2015-10-29 17:06:31 +11:00
parent 8db9db00d2
commit 422987e613
2 changed files with 2 additions and 4 deletions

View File

@ -430,7 +430,7 @@ public:
NS_DECL_QUERYFRAME_TARGET(nsIFrame)
nsPresContext* PresContext() const {
return StyleContext()->RuleNode()->PresContext();
return StyleContext()->PresContext();
}
/**

View File

@ -46,9 +46,7 @@ nsNativeTheme::GetPresShell(nsIFrame* aFrame)
if (!aFrame)
return nullptr;
// this is a workaround for the egcs 1.1.2 not inlining
// aFrame->PresContext(), which causes an undefined symbol
nsPresContext *context = aFrame->StyleContext()->RuleNode()->PresContext();
nsPresContext* context = aFrame->PresContext();
return context ? context->GetPresShell() : nullptr;
}