mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-18 02:13:08 +09:00
Bug 1334247 - Remove nsIAnonymousContentCreator::CreateFrameFor
Tag #1375
This commit is contained in:
parent
02ff2ef376
commit
499252b89f
6 changed files with 19 additions and 60 deletions
|
|
@ -77,30 +77,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue