Fix parent style context warnings by being consistent about parent contexts.
Bug 380116, r+sr=dbaron
This commit is contained in:
@@ -138,14 +138,13 @@ nsGfxButtonControlFrame::CreateFrameFor(nsIContent* aContent)
|
||||
|
||||
if (aContent == mTextContent) {
|
||||
nsIFrame * parentFrame = mFrames.FirstChild();
|
||||
nsStyleContext* styleContext = parentFrame->GetStyleContext();
|
||||
|
||||
nsPresContext* presContext = PresContext();
|
||||
nsRefPtr<nsStyleContext> textStyleContext;
|
||||
textStyleContext = presContext->StyleSet()->
|
||||
ResolveStyleForNonElement(styleContext);
|
||||
ResolveStyleForNonElement(mStyleContext);
|
||||
|
||||
if (textStyleContext && styleContext) {
|
||||
if (textStyleContext) {
|
||||
newFrame = NS_NewTextFrame(presContext->PresShell(), textStyleContext);
|
||||
if (newFrame) {
|
||||
// initialize the text frame
|
||||
|
||||
Reference in New Issue
Block a user