зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1388626. Restyle ::-moz-xul-anonymous-block as needed with stylo. r=heycam
MozReview-Commit-ID: KZ0s1x60VBx --HG-- extra : rebase_source : d7103464e7563ae7105417f254609cb22481e0e3
This commit is contained in:
Родитель
d2109610fb
Коммит
60cd46bdce
|
@ -11385,6 +11385,9 @@ nsCSSFrameConstructor::ProcessChildren(nsFrameConstructorState& aState,
|
|||
aFrameItems.AddChild(blockFrame);
|
||||
|
||||
aFrame->AddStateBits(NS_STATE_BOX_WRAPS_KIDS_IN_BLOCK);
|
||||
MOZ_ASSERT(!aFrame->IsLeaf(),
|
||||
"Why do we have an nsLeafBoxFrame here?");
|
||||
aFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1908,6 +1908,14 @@ nsBoxFrame::SupportsOrdinalsInChildren()
|
|||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
nsBoxFrame::AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult)
|
||||
{
|
||||
if (GetStateBits() & NS_STATE_BOX_WRAPS_KIDS_IN_BLOCK) {
|
||||
aResult.AppendElement(OwnedAnonBox(PrincipalChildList().FirstChild()));
|
||||
}
|
||||
}
|
||||
|
||||
// Helper less-than-or-equal function, used in CheckBoxOrder() as a
|
||||
// template-parameter for the sorting functions.
|
||||
bool
|
||||
|
|
|
@ -171,6 +171,11 @@ public:
|
|||
*/
|
||||
virtual bool SupportsOrdinalsInChildren();
|
||||
|
||||
/**
|
||||
* Return our wrapper block, if any.
|
||||
*/
|
||||
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
|
||||
|
||||
private:
|
||||
explicit nsBoxFrame(nsStyleContext* aContext)
|
||||
: nsBoxFrame(aContext, kClassID, false, nullptr) {}
|
||||
|
|
Загрузка…
Ссылка в новой задаче