Bug 1888702 Part 2 - Remove PrependPageBreakItem() and simplify AppendPageBreakItem(). r=layout-reviewers,emilio
The last caller of PrependPageBreakItem() is removed in https://hg.mozilla.org/mozilla-central/rev/97613a0619b2 Since we only need to append page break items, we don't need InsertPageBreakItem() and InsertPageBreakLocation enum. We can just implement AppendPageBreakItem directly. Differential Revision: https://phabricator.services.mozilla.com/D206150
This commit is contained in:
@@ -4985,9 +4985,8 @@ nsCSSFrameConstructor::FindSVGData(const Element& aElement,
|
||||
return data;
|
||||
}
|
||||
|
||||
void nsCSSFrameConstructor::InsertPageBreakItem(
|
||||
nsIContent* aContent, FrameConstructionItemList& aItems,
|
||||
InsertPageBreakLocation location) {
|
||||
void nsCSSFrameConstructor::AppendPageBreakItem(
|
||||
nsIContent* aContent, FrameConstructionItemList& aItems) {
|
||||
RefPtr<ComputedStyle> pseudoStyle =
|
||||
mPresShell->StyleSet()->ResolveNonInheritingAnonymousBoxStyle(
|
||||
PseudoStyleType::pageBreak);
|
||||
@@ -4997,13 +4996,8 @@ void nsCSSFrameConstructor::InsertPageBreakItem(
|
||||
|
||||
static constexpr FrameConstructionData sPageBreakData(NS_NewPageBreakFrame,
|
||||
FCDATA_SKIP_FRAMESET);
|
||||
if (location == InsertPageBreakLocation::eBefore) {
|
||||
aItems.PrependItem(this, &sPageBreakData, aContent, pseudoStyle.forget(),
|
||||
true);
|
||||
} else {
|
||||
aItems.AppendItem(this, &sPageBreakData, aContent, pseudoStyle.forget(),
|
||||
true);
|
||||
}
|
||||
aItems.AppendItem(this, &sPageBreakData, aContent, pseudoStyle.forget(),
|
||||
true);
|
||||
}
|
||||
|
||||
bool nsCSSFrameConstructor::ShouldCreateItemsForChild(
|
||||
|
||||
Reference in New Issue
Block a user