Bug 1489295 Part 4 - Remove InitAndWrapInColumnSetFrameIfNeeded(). r=dbaron

The last consumer of the method is removed in Part 3.

Depends on D24396

Differential Revision: https://phabricator.services.mozilla.com/D24470

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2019-03-22 02:47:32 +00:00
Родитель 11a3e0712a
Коммит 5bef4c66dd
2 изменённых файлов: 0 добавлений и 44 удалений

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

@ -10498,34 +10498,6 @@ void nsCSSFrameConstructor::RecoverLetterFrames(nsContainerFrame* aBlockFrame) {
//----------------------------------------------------------------------
nsContainerFrame* nsCSSFrameConstructor::InitAndWrapInColumnSetFrameIfNeeded(
nsFrameConstructorState& aState, nsIContent* aContent,
nsContainerFrame* aParentFrame, nsContainerFrame* aBlockFrame,
ComputedStyle* aComputedStyle) {
MOZ_ASSERT((aBlockFrame->IsBlockFrame() || aBlockFrame->IsDetailsFrame()),
"aBlockFrame should either be a block frame or a details frame.");
if (!aComputedStyle->StyleColumn()->IsColumnContainerStyle()) {
aBlockFrame->SetComputedStyleWithoutNotification(aComputedStyle);
InitAndRestoreFrame(aState, aContent, aParentFrame, aBlockFrame);
return aBlockFrame;
}
// Wrap the block frame in a ColumnSetFrame.
nsContainerFrame* columnSetFrame = NS_NewColumnSetFrame(
mPresShell, aComputedStyle, nsFrameState(NS_FRAME_OWNS_ANON_BOXES));
InitAndRestoreFrame(aState, aContent, aParentFrame, columnSetFrame);
SetInitialSingleChild(columnSetFrame, aBlockFrame);
RefPtr<ComputedStyle> anonBlockStyle =
mPresShell->StyleSet()->ResolveInheritingAnonymousBoxStyle(
PseudoStyleType::columnContent, aComputedStyle);
aBlockFrame->SetComputedStyleWithoutNotification(anonBlockStyle);
InitAndRestoreFrame(aState, aContent, columnSetFrame, aBlockFrame);
return columnSetFrame;
}
void nsCSSFrameConstructor::ConstructBlock(
nsFrameConstructorState& aState, nsIContent* aContent,
nsContainerFrame* aParentFrame, nsContainerFrame* aContentParentFrame,

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

@ -1775,22 +1775,6 @@ class nsCSSFrameConstructor final : public nsFrameManager {
bool* aHaveFirstLetterStyle,
bool* aHaveFirstLineStyle);
// Initialize aBlockFrame, and wrap it in a ColumnSetFrame if needed.
//
// If a ColumnSetFrame needs to be created, then this function will create
// one, and set aBlockFrame as its child (with an updated "columnContent"
// ComputedStyle() pointer), and initialize both frames. Otherwise, it
// initializes aBlockFrame.
//
// @return the new ColumnSetFrame if needed; otherwise aBlockFrame.
//
// FIXME (Bug 1489295): Callers using this function to create multi-column
// hierarchy should be revised to support column-span.
nsContainerFrame* InitAndWrapInColumnSetFrameIfNeeded(
nsFrameConstructorState& aState, nsIContent* aContent,
nsContainerFrame* aParentFrame, nsContainerFrame* aBlockFrame,
ComputedStyle* aComputedStyle);
// |aContentParentFrame| should be null if it's really the same as
// |aParentFrame|.
// @param aFrameItems where we want to put the block in case it's in-flow.