Bug 1719541 - Directly assign RefPtrs in nsCSSPageFrameCosntructor.cpp r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D119324
This commit is contained in:
@@ -1901,8 +1901,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
|
||||
const bool isMathMLContent = content->IsMathMLElement();
|
||||
|
||||
// create the pseudo SC for the table wrapper as a child of the inner SC
|
||||
RefPtr<ComputedStyle> outerComputedStyle;
|
||||
outerComputedStyle =
|
||||
RefPtr<ComputedStyle> outerComputedStyle =
|
||||
mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::tableWrapper, computedStyle);
|
||||
|
||||
@@ -2102,9 +2101,9 @@ nsIFrame* nsCSSFrameConstructor::ConstructTableCell(
|
||||
newFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
|
||||
|
||||
// Resolve pseudo style and initialize the body cell frame
|
||||
RefPtr<ComputedStyle> innerPseudoStyle;
|
||||
innerPseudoStyle = mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::cellContent, computedStyle);
|
||||
RefPtr<ComputedStyle> innerPseudoStyle =
|
||||
mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::cellContent, computedStyle);
|
||||
|
||||
// Create a block frame that will format the cell's content
|
||||
bool isBlock;
|
||||
@@ -2778,9 +2777,9 @@ nsContainerFrame* nsCSSFrameConstructor::ConstructPageFrame(
|
||||
// of the pages easier and faster.
|
||||
pageFrame->Init(nullptr, aParentFrame, aPrevPageFrame);
|
||||
|
||||
RefPtr<ComputedStyle> pageContentPseudoStyle;
|
||||
pageContentPseudoStyle = styleSet->ResolveNonInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::pageContent);
|
||||
RefPtr<ComputedStyle> pageContentPseudoStyle =
|
||||
styleSet->ResolveNonInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::pageContent);
|
||||
|
||||
nsContainerFrame* pageContentFrame =
|
||||
NS_NewPageContentFrame(aPresShell, pageContentPseudoStyle);
|
||||
@@ -2803,9 +2802,9 @@ nsContainerFrame* nsCSSFrameConstructor::ConstructPageFrame(
|
||||
pageContentFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
|
||||
pageContentFrame->MarkAsAbsoluteContainingBlock();
|
||||
|
||||
RefPtr<ComputedStyle> canvasPseudoStyle;
|
||||
canvasPseudoStyle = styleSet->ResolveInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::canvas, pageContentPseudoStyle);
|
||||
RefPtr<ComputedStyle> canvasPseudoStyle =
|
||||
styleSet->ResolveInheritingAnonymousBoxStyle(PseudoStyleType::canvas,
|
||||
pageContentPseudoStyle);
|
||||
|
||||
aCanvasFrame = NS_NewCanvasFrame(aPresShell, canvasPseudoStyle);
|
||||
|
||||
@@ -2894,9 +2893,9 @@ nsIFrame* nsCSSFrameConstructor::ConstructSelectFrame(
|
||||
aState.AddChild(comboboxFrame, aFrameList, content, aParentFrame);
|
||||
|
||||
// Resolve pseudo element style for the dropdown list
|
||||
RefPtr<ComputedStyle> listStyle;
|
||||
listStyle = mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::dropDownList, computedStyle);
|
||||
RefPtr<ComputedStyle> listStyle =
|
||||
mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::dropDownList, computedStyle);
|
||||
|
||||
// Create a listbox
|
||||
nsListControlFrame* listFrame =
|
||||
@@ -3049,8 +3048,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructFieldSetFrame(
|
||||
fieldsetFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
|
||||
|
||||
// Resolve style and initialize the frame
|
||||
RefPtr<ComputedStyle> fieldsetContentStyle;
|
||||
fieldsetContentStyle =
|
||||
RefPtr<ComputedStyle> fieldsetContentStyle =
|
||||
mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::fieldsetContent, computedStyle);
|
||||
|
||||
@@ -4659,8 +4657,7 @@ void nsCSSFrameConstructor::FlushAccumulatedBlock(
|
||||
ComputedStyle* parentContext =
|
||||
nsIFrame::CorrectStyleParentFrame(aParentFrame, anonPseudo)->Style();
|
||||
ServoStyleSet* styleSet = mPresShell->StyleSet();
|
||||
RefPtr<ComputedStyle> blockContext;
|
||||
blockContext =
|
||||
RefPtr<ComputedStyle> blockContext =
|
||||
styleSet->ResolveInheritingAnonymousBoxStyle(anonPseudo, parentContext);
|
||||
|
||||
// then, create a block frame that will wrap the child frames. Make it a
|
||||
@@ -4776,9 +4773,9 @@ nsContainerFrame* nsCSSFrameConstructor::ConstructFrameWithAnonymousChild(
|
||||
newFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
|
||||
|
||||
// Create the pseudo SC for the anonymous wrapper child as a child of the SC:
|
||||
RefPtr<ComputedStyle> scForAnon;
|
||||
scForAnon = mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(
|
||||
aInnerPseudo, computedStyle);
|
||||
RefPtr<ComputedStyle> scForAnon =
|
||||
mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(aInnerPseudo,
|
||||
computedStyle);
|
||||
|
||||
// Create the anonymous inner wrapper frame
|
||||
nsContainerFrame* innerFrame = aInnerConstructor(mPresShell, scForAnon);
|
||||
|
||||
Reference in New Issue
Block a user