mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-27 04:31:16 +00:00
import from UXP: Bug 1334247 - Remove nsIAnonymousContentCreator::CreateFrameFor (499252b8)
This commit is contained in:
@@ -78,30 +78,6 @@ nsGfxButtonControlFrame::AppendAnonymousContentTo(nsTArray<nsIContent*>& aElemen
|
||||
}
|
||||
}
|
||||
|
||||
// Create the text content used as label for the button.
|
||||
// The frame will be generated by the frame constructor.
|
||||
nsIFrame*
|
||||
nsGfxButtonControlFrame::CreateFrameFor(nsIContent* aContent)
|
||||
{
|
||||
nsIFrame * newFrame = nullptr;
|
||||
|
||||
if (aContent == mTextContent) {
|
||||
nsContainerFrame* parentFrame = do_QueryFrame(mFrames.FirstChild());
|
||||
|
||||
nsPresContext* presContext = PresContext();
|
||||
RefPtr<nsStyleContext> textStyleContext;
|
||||
textStyleContext = presContext->StyleSet()->
|
||||
ResolveStyleForText(mTextContent, mStyleContext);
|
||||
|
||||
newFrame = NS_NewTextFrame(presContext->PresShell(), textStyleContext);
|
||||
// initialize the text frame
|
||||
newFrame->Init(mTextContent, parentFrame, nullptr);
|
||||
mTextContent->SetPrimaryFrame(newFrame);
|
||||
}
|
||||
|
||||
return newFrame;
|
||||
}
|
||||
|
||||
NS_QUERYFRAME_HEAD(nsGfxButtonControlFrame)
|
||||
NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLButtonControlFrame)
|
||||
|
||||
Reference in New Issue
Block a user