Bug 1345362 part 4. Rename ResolveAnonymousBoxStyle to ResolveInheritingAnonymousBoxStyle. r=heycam

MozReview-Commit-ID: GVA1fTh0RDv

--HG--
extra : rebase_source : 4333baf6764f346d68836e387fa002705684bfdd
This commit is contained in:
Boris Zbarsky 2017-03-08 23:50:28 -05:00
Родитель b537f110e2
Коммит 964a12c306
13 изменённых файлов: 101 добавлений и 81 удалений

Просмотреть файл

@ -2524,8 +2524,8 @@ ElementRestyler::RestyleSelf(nsIFrame* aSelf,
rshint);
}
} else if (pseudoType == CSSPseudoElementType::InheritingAnonBox) {
newContext = styleSet->ResolveAnonymousBoxStyle(pseudoTag,
parentContext);
newContext = styleSet->ResolveInheritingAnonymousBoxStyle(pseudoTag,
parentContext);
}
else {
if (pseudoTag) {
@ -2873,8 +2873,8 @@ ElementRestyler::RestyleSelf(nsIFrame* aSelf,
nsRestyleHint(0));
}
} else if (extraPseudoType == CSSPseudoElementType::InheritingAnonBox) {
newExtraContext = styleSet->ResolveAnonymousBoxStyle(extraPseudoTag,
newContext);
newExtraContext = styleSet->
ResolveInheritingAnonymousBoxStyle(extraPseudoTag, newContext);
} else {
// Don't expect XUL tree stuff here, since it needs a comparator and
// all.

Просмотреть файл

@ -2080,7 +2080,8 @@ nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
// create the pseudo SC for the table wrapper as a child of the inner SC
RefPtr<nsStyleContext> outerStyleContext;
outerStyleContext = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableWrapper, styleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::tableWrapper,
styleContext);
// Create the table wrapper frame which holds the caption and inner table frame
nsContainerFrame* newFrame;
@ -2300,7 +2301,8 @@ nsCSSFrameConstructor::ConstructTableCell(nsFrameConstructorState& aState,
// Resolve pseudo style and initialize the body cell frame
RefPtr<nsStyleContext> innerPseudoStyle;
innerPseudoStyle = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::cellContent, styleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::cellContent,
styleContext);
// Create a block frame that will format the cell's content
bool isBlock;
@ -2406,7 +2408,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
// @see nsStyleContext::ApplyStyleFixups
{
RefPtr<nsStyleContext> sc = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::viewport, nullptr);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::viewport, nullptr);
GetRootFrame()->SetStyleContextWithoutNotification(sc);
}
@ -2716,7 +2718,8 @@ nsCSSFrameConstructor::ConstructRootFrame()
// --------- BUILD VIEWPORT -----------
RefPtr<nsStyleContext> viewportPseudoStyle =
styleSet->ResolveAnonymousBoxStyle(nsCSSAnonBoxes::viewport, nullptr);
styleSet->ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::viewport,
nullptr);
ViewportFrame* viewportFrame =
NS_NewViewportFrame(mPresShell, viewportPseudoStyle);
@ -2880,8 +2883,9 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
StyleSetHandle styleSet = mPresShell->StyleSet();
// If paginated, make sure we don't put scrollbars in
if (!isScrollable) {
rootPseudoStyle = styleSet->ResolveAnonymousBoxStyle(rootPseudo,
viewportPseudoStyle);
rootPseudoStyle =
styleSet->ResolveInheritingAnonymousBoxStyle(rootPseudo,
viewportPseudoStyle);
} else {
if (rootPseudo == nsCSSAnonBoxes::canvas) {
rootPseudo = nsCSSAnonBoxes::scrolledCanvas;
@ -2898,8 +2902,9 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
// resolve a context for the scrollframe
RefPtr<nsStyleContext> styleContext;
styleContext = styleSet->ResolveAnonymousBoxStyle(nsCSSAnonBoxes::viewportScroll,
viewportPseudoStyle);
styleContext =
styleSet->ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::viewportScroll,
viewportPseudoStyle);
// Note that the viewport scrollframe is always built with
// overflow:auto style. This forces the scroll frame to create
@ -2980,8 +2985,9 @@ nsCSSFrameConstructor::ConstructPageFrame(nsIPresShell* aPresShell,
StyleSetHandle styleSet = aPresShell->StyleSet();
RefPtr<nsStyleContext> pagePseudoStyle;
pagePseudoStyle = styleSet->ResolveAnonymousBoxStyle(nsCSSAnonBoxes::page,
parentStyleContext);
pagePseudoStyle =
styleSet->ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::page,
parentStyleContext);
nsContainerFrame* pageFrame = NS_NewPageFrame(aPresShell, pagePseudoStyle);
@ -2991,8 +2997,8 @@ nsCSSFrameConstructor::ConstructPageFrame(nsIPresShell* aPresShell,
RefPtr<nsStyleContext> pageContentPseudoStyle;
pageContentPseudoStyle =
styleSet->ResolveAnonymousBoxStyle(nsCSSAnonBoxes::pageContent,
pagePseudoStyle);
styleSet->ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::pageContent,
pagePseudoStyle);
nsContainerFrame* pageContentFrame =
NS_NewPageContentFrame(aPresShell, pageContentPseudoStyle);
@ -3011,8 +3017,9 @@ nsCSSFrameConstructor::ConstructPageFrame(nsIPresShell* aPresShell,
pageContentFrame->MarkAsAbsoluteContainingBlock();
RefPtr<nsStyleContext> canvasPseudoStyle;
canvasPseudoStyle = styleSet->ResolveAnonymousBoxStyle(nsCSSAnonBoxes::canvas,
pageContentPseudoStyle);
canvasPseudoStyle =
styleSet->ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::canvas,
pageContentPseudoStyle);
aCanvasFrame = NS_NewCanvasFrame(aPresShell, canvasPseudoStyle);
@ -3111,7 +3118,8 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsFrameConstructorState& aState,
// Resolve pseudo element style for the dropdown list
RefPtr<nsStyleContext> listStyle;
listStyle = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::dropDownList, styleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::dropDownList,
styleContext);
// Create a listbox
nsContainerFrame* listFrame = NS_NewListControlFrame(mPresShell, listStyle);
@ -3274,7 +3282,8 @@ nsCSSFrameConstructor::ConstructFieldSetFrame(nsFrameConstructorState& aState,
// Resolve style and initialize the frame
RefPtr<nsStyleContext> fieldsetContentStyle;
fieldsetContentStyle = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::fieldsetContent, styleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::fieldsetContent,
styleContext);
const nsStyleDisplay* fieldsetContentDisplay = fieldsetContentStyle->StyleDisplay();
bool isScrollable = fieldsetContentDisplay->IsScrollableOverflow();
@ -3318,8 +3327,9 @@ nsCSSFrameConstructor::ConstructFieldSetFrame(nsFrameConstructorState& aState,
columnSetFrame =
NS_NewColumnSetFrame(mPresShell, fieldsetContentStyle, nsFrameState(0));
InitAndRestoreFrame(aState, content, parent, columnSetFrame);
innerSC = mPresShell->StyleSet()->ResolveAnonymousBoxStyle(
nsCSSAnonBoxes::columnContent, fieldsetContentStyle);
innerSC = mPresShell->StyleSet()->
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::columnContent,
fieldsetContentStyle);
if (absPosContainer) {
absPosContainer = columnSetFrame;
}
@ -3933,9 +3943,9 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
nsIFrame* maybeAbsoluteContainingBlock = newFrame;
nsIFrame* possiblyLeafFrame = newFrame;
if (bits & FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS) {
RefPtr<nsStyleContext> outerSC =
mPresShell->StyleSet()->ResolveAnonymousBoxStyle(*data->mAnonBoxPseudo,
styleContext);
RefPtr<nsStyleContext> outerSC = mPresShell->StyleSet()->
ResolveInheritingAnonymousBoxStyle(*data->mAnonBoxPseudo,
styleContext);
#ifdef DEBUG
nsContainerFrame* containerFrame = do_QueryFrame(newFrame);
MOZ_ASSERT(containerFrame);
@ -3966,8 +3976,9 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
columnSetFrame =
NS_NewColumnSetFrame(mPresShell, outerSC, nsFrameState(0));
InitAndRestoreFrame(aState, content, container, columnSetFrame);
innerSC = mPresShell->StyleSet()->ResolveAnonymousBoxStyle(
nsCSSAnonBoxes::columnContent, outerSC);
innerSC = mPresShell->StyleSet()->
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::columnContent,
outerSC);
}
innerFrame = NS_NewBlockFormattingContext(mPresShell, innerSC);
if (columnSetFrame) {
@ -4591,7 +4602,7 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsFrameConstructorState& aState,
// we used the style that was passed in. So resolve another one.
StyleSetHandle styleSet = mPresShell->StyleSet();
RefPtr<nsStyleContext> scrolledChildStyle =
styleSet->ResolveAnonymousBoxStyle(aScrolledPseudo, contentStyle);
styleSet->ResolveInheritingAnonymousBoxStyle(aScrolledPseudo, contentStyle);
if (gfxScrollFrame) {
gfxScrollFrame->SetInitialChildList(kPrincipalList, anonymousItems);
@ -5122,8 +5133,7 @@ nsCSSFrameConstructor::FlushAccumulatedBlock(nsFrameConstructorState& aState,
StyleSetHandle styleSet = mPresShell->StyleSet();
RefPtr<nsStyleContext> blockContext;
blockContext = styleSet->
ResolveAnonymousBoxStyle(anonPseudo, parentContext);
ResolveInheritingAnonymousBoxStyle(anonPseudo, parentContext);
// then, create a block frame that will wrap the child frames. Make it a
// MathML frame so that Get(Absolute/Float)ContainingBlockFor know that this
@ -5247,7 +5257,7 @@ nsCSSFrameConstructor::ConstructFrameWithAnonymousChild(
// Create the pseudo SC for the anonymous wrapper child as a child of the SC:
RefPtr<nsStyleContext> scForAnon;
scForAnon = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(aInnerPseudo, styleContext);
ResolveInheritingAnonymousBoxStyle(aInnerPseudo, styleContext);
// Create the anonymous inner wrapper frame
nsContainerFrame* innerFrame = aInnerConstructor(mPresShell, scForAnon);
@ -5580,8 +5590,8 @@ nsCSSFrameConstructor::AddPageBreakItem(nsIContent* aContent,
// for user-modify.)
RefPtr<nsStyleContext> pseudoStyle =
mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::pageBreak,
aMainStyleContext->GetParent());
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::pageBreak,
aMainStyleContext->GetParent());
MOZ_ASSERT(pseudoStyle->StyleDisplay()->mDisplay == StyleDisplay::Block,
"Unexpected display");
@ -10082,7 +10092,8 @@ nsCSSFrameConstructor::CreateNeededAnonFlexOrGridItems(
nsStyleContext* parentStyle = aParentFrame->StyleContext();
nsIContent* parentContent = aParentFrame->GetContent();
already_AddRefed<nsStyleContext> wrapperStyle =
mPresShell->StyleSet()->ResolveAnonymousBoxStyle(pseudoType, parentStyle);
mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(pseudoType,
parentStyle);
static const FrameConstructionData sBlockFormattingContextFCData =
FCDATA_DECL(FCDATA_SKIP_FRAMESET | FCDATA_USE_CHILD_ITEMS,
@ -10584,7 +10595,8 @@ nsCSSFrameConstructor::WrapItemsInPseudoParent(nsIContent* aParentContent,
}
already_AddRefed<nsStyleContext> wrapperStyle =
mPresShell->StyleSet()->ResolveAnonymousBoxStyle(pseudoType, aParentStyle);
mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(pseudoType,
aParentStyle);
FrameConstructionItem* newItem =
new FrameConstructionItem(&pseudoData.mFCData,
// Use the content of our parent frame
@ -10653,8 +10665,8 @@ void nsCSSFrameConstructor::CreateNeededPseudoSiblings(
const PseudoParentData& pseudoData =
sPseudoParentData[eTypeRubyBaseContainer];
already_AddRefed<nsStyleContext> pseudoStyle = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(*pseudoData.mPseudoType,
aParentFrame->StyleContext());
ResolveInheritingAnonymousBoxStyle(*pseudoData.mPseudoType,
aParentFrame->StyleContext());
FrameConstructionItem* newItem =
new FrameConstructionItem(&pseudoData.mFCData,
// Use the content of the parent frame
@ -11103,8 +11115,8 @@ nsCSSFrameConstructor::ProcessChildren(nsFrameConstructorState& aState,
}
RefPtr<nsStyleContext> blockSC = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::mozXULAnonymousBlock,
frameStyleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::mozXULAnonymousBlock,
frameStyleContext);
nsBlockFrame* blockFrame = NS_NewBlockFrame(mPresShell, blockSC);
// We might, in theory, want to set NS_BLOCK_FLOAT_MGR and
// NS_BLOCK_MARGIN_ROOT, but I think it's a bad idea given that
@ -12033,7 +12045,8 @@ nsCSSFrameConstructor::ConstructBlock(nsFrameConstructorState& aState,
InitAndRestoreFrame(aState, aContent, aParentFrame, columnSetFrame);
blockStyle = mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::columnContent, aStyleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::columnContent,
aStyleContext);
parent = columnSetFrame;
*aNewFrame = columnSetFrame;
if (aPositionedFrameForAbsPosContainer == blockFrame) {
@ -12222,12 +12235,11 @@ nsCSSFrameConstructor::CreateIBSiblings(nsFrameConstructorState& aState,
// When such an inline box is affected by relative positioning, any
// resulting translation also affects the block-level box contained
// in the inline box.
RefPtr<nsStyleContext> blockSC =
mPresShell->StyleSet()->
ResolveAnonymousBoxStyle(aIsPositioned ?
nsCSSAnonBoxes::mozAnonymousPositionedBlock :
nsCSSAnonBoxes::mozAnonymousBlock,
styleContext);
RefPtr<nsStyleContext> blockSC = mPresShell->StyleSet()->
ResolveInheritingAnonymousBoxStyle(aIsPositioned ?
nsCSSAnonBoxes::mozAnonymousPositionedBlock :
nsCSSAnonBoxes::mozAnonymousBlock,
styleContext);
nsContainerFrame* lastNewInline =
static_cast<nsContainerFrame*>(aInitialInline->FirstContinuation());

Просмотреть файл

@ -1359,9 +1359,9 @@ nsComboboxControlFrame::CreateFrameForDisplayNode()
// create the style contexts for the anonymous block frame and text frame
RefPtr<nsStyleContext> styleContext;
styleContext = styleSet->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::mozDisplayComboboxControlFrame,
mStyleContext,
nsStyleSet::eSkipParentDisplayBasedStyleFixup);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::mozDisplayComboboxControlFrame,
mStyleContext,
nsStyleSet::eSkipParentDisplayBasedStyleFixup);
RefPtr<nsStyleContext> textStyleContext;
textStyleContext =

Просмотреть файл

@ -10077,7 +10077,7 @@ nsFrame::UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame,
// Anon boxes inherit from their parent; that's us.
RefPtr<nsStyleContext> newContext =
aStyleSet.ResolveAnonymousBoxStyle(pseudo, StyleContext());
aStyleSet.ResolveInheritingAnonymousBoxStyle(pseudo, StyleContext());
// Figure out whether we have an actual change. It's important that we do
// this, for several reasons:

Просмотреть файл

@ -335,7 +335,8 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
for (int blankX = mChildCount; blankX < numCells; blankX++) {
RefPtr<nsStyleContext> pseudoStyleContext;
pseudoStyleContext = shell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::framesetBlank, mStyleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::framesetBlank,
mStyleContext);
// XXX the blank frame is using the content of its parent - at some point it
// should just have null content, if we support that
@ -911,8 +912,8 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
RefPtr<nsStyleContext> pseudoStyleContext;
pseudoStyleContext = styleSet->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::horizontalFramesetBorder,
mStyleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::horizontalFramesetBorder,
mStyleContext);
borderFrame = new (shell) nsHTMLFramesetBorderFrame(pseudoStyleContext,
borderWidth,
@ -941,8 +942,8 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
RefPtr<nsStyleContext> pseudoStyleContext;
pseudoStyleContext = styleSet->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::verticalFramesetBorder,
mStyleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::verticalFramesetBorder,
mStyleContext);
borderFrame = new (shell) nsHTMLFramesetBorderFrame(pseudoStyleContext,
borderWidth,

Просмотреть файл

@ -1057,7 +1057,7 @@ nsInlineFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet,
// The anonymous block's style inherits from ours, and we already have our new
// style context.
RefPtr<nsStyleContext> newContext =
aStyleSet.ResolveAnonymousBoxStyle(pseudo, StyleContext());
aStyleSet.ResolveInheritingAnonymousBoxStyle(pseudo, StyleContext());
// We're guaranteed that newContext only differs from the old style context on
// the block in things they might inherit from us. And changehint processing
@ -1115,7 +1115,8 @@ nsFirstLineFrame::Init(nsIContent* aContent,
// of the parent frame.
nsStyleContext* parentContext = aParent->StyleContext();
RefPtr<nsStyleContext> newSC = PresContext()->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::mozLineFrame, parentContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::mozLineFrame,
parentContext);
SetStyleContext(newSC);
} else {
MOZ_ASSERT(FirstInFlow() != aPrevInFlow);

Просмотреть файл

@ -344,9 +344,9 @@ ServoStyleSet::ResolveTransientStyle(Element* aElement, CSSPseudoElementType aTy
// aFlags is an nsStyleSet flags bitfield
already_AddRefed<nsStyleContext>
ServoStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags)
ServoStyleSet::ResolveInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags)
{
MOZ_ASSERT(nsCSSAnonBoxes::IsAnonBox(aPseudoTag) &&
!nsCSSAnonBoxes::IsNonInheritingAnonBox(aPseudoTag));
@ -386,7 +386,7 @@ ServoStyleSet::ResolveNonInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag)
MOZ_ASSERT(aPseudoTag != nsCSSAnonBoxes::pageContent,
"If nsCSSAnonBoxes::pageContent ends up non-inheriting, check "
"whether we need to do anything to move the "
"@page handling from ResolveAnonymousBoxStyle to "
"@page handling from ResolveInheritingAnonymousBoxStyle to "
"ResolveNonInheritingAnonymousBoxStyle");
nsCSSAnonBoxes::NonInheriting type =

Просмотреть файл

@ -142,8 +142,9 @@ public:
// inherits style from the given aParentContext. aFlags is an nsStyleSet
// flags bitfield.
already_AddRefed<nsStyleContext>
ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext,
uint32_t aFlags = 0);
ResolveInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags = 0);
// Get a style context for an anonymous box that does not inherit style from
// anything. aPseudoTag is the pseudo-tag to use and must be non-null. It

Просмотреть файл

@ -135,8 +135,9 @@ public:
nsStyleContext* aParentContext,
dom::Element* aPseudoElement);
inline already_AddRefed<nsStyleContext>
ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext,
uint32_t aFlags = 0);
ResolveInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags = 0);
inline already_AddRefed<nsStyleContext>
ResolveNonInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag);
inline nsresult AppendStyleSheet(SheetType aType, StyleSheet* aSheet);

Просмотреть файл

@ -125,11 +125,12 @@ StyleSetHandle::Ptr::ResolvePseudoElementStyle(dom::Element* aParentElement,
// aFlags is an nsStyleSet flags bitfield
already_AddRefed<nsStyleContext>
StyleSetHandle::Ptr::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags)
StyleSetHandle::Ptr::ResolveInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags)
{
FORWARD(ResolveAnonymousBoxStyle, (aPseudoTag, aParentContext, aFlags));
FORWARD(ResolveInheritingAnonymousBoxStyle, (aPseudoTag, aParentContext,
aFlags));
}
already_AddRefed<nsStyleContext>

Просмотреть файл

@ -2056,9 +2056,9 @@ nsStyleSet::ProbePseudoElementStyle(Element* aParentElement,
}
already_AddRefed<nsStyleContext>
nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags)
nsStyleSet::ResolveInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags)
{
NS_ENSURE_FALSE(mInShutdown, nullptr);
@ -2132,7 +2132,7 @@ nsStyleSet::ResolveNonInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag)
MOZ_ASSERT(aPseudoTag != nsCSSAnonBoxes::pageContent,
"If nsCSSAnonBoxes::pageContent ends up non-inheriting, move the "
"@page handling from ResolveAnonymousBoxStyle to "
"@page handling from ResolveInheritingAnonymousBoxStyle to "
"ResolveNonInheritingAnonymousBoxStyle");
RefPtr<nsStyleContext> retval =

Просмотреть файл

@ -260,8 +260,8 @@ class nsStyleSet final
mozilla::dom::Element* aPseudoElement = nullptr);
/**
* Bit-flags that can be passed to ResolveAnonymousBoxStyle and GetContext
* in their parameter 'aFlags'.
* Bit-flags that can be passed to ResolveInheritingAnonymousBoxStyle and
* GetContext in their parameter 'aFlags'.
*/
enum {
eNoFlags = 0,
@ -282,8 +282,9 @@ class nsStyleSet final
// inherits style from the given aParentContext. aFlags will be forwarded to
// a GetContext call internally.
already_AddRefed<nsStyleContext>
ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext,
uint32_t aFlags = eNoFlags);
ResolveInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
uint32_t aFlags = eNoFlags);
// Get a style context for an anonymous box that does not inherit style from
// anything. aPseudoTag is the pseudo-tag to use and must be non-null. It

Просмотреть файл

@ -676,7 +676,8 @@ nsTableFrame::CreateAnonymousColGroupFrame(nsTableColGroupType aColGroupType)
RefPtr<nsStyleContext> colGroupStyle;
colGroupStyle = shell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableColGroup, mStyleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::tableColGroup,
mStyleContext);
// Create a col group frame
nsIFrame* newFrame = NS_NewTableColGroupFrame(shell, colGroupStyle);
((nsTableColGroupFrame *)newFrame)->SetColType(aColGroupType);
@ -738,7 +739,8 @@ nsTableFrame::AppendAnonymousColFrames(nsTableColGroupFrame* aColGroupFrame,
iContent = aColGroupFrame->GetContent();
parentStyleContext = aColGroupFrame->StyleContext();
styleContext = shell->StyleSet()->
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableCol, parentStyleContext);
ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::tableCol,
parentStyleContext);
// ASSERTION to check for bug 54454 sneaking back in...
NS_ASSERTION(iContent, "null content in CreateAnonymousColFrames");
@ -7692,8 +7694,8 @@ nsTableFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet,
"What happened to our parent?");
RefPtr<nsStyleContext> newContext =
aStyleSet.ResolveAnonymousBoxStyle(nsCSSAnonBoxes::tableWrapper,
StyleContext());
aStyleSet.ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::tableWrapper,
StyleContext());
// Figure out whether we have an actual change. It's important that we do
// this, even though all the wrapper's changes are due to properties it