Bug 1517069 - Make GetMultiColumnContainingBlockFor() return nsContainerFrame*. r=dholbert

GetParent() already returns nsContainerFrame*, and it's easier to use
with API like FinishBuildingColumns() demanding a nsContainerFrame*.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2019-01-02 22:27:43 +00:00
Родитель e9d6362cbf
Коммит 70b1934e2e
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -564,11 +564,11 @@ static nsIFrame* GetIBContainingBlockFor(nsIFrame* aFrame) {
return parentFrame; return parentFrame;
} }
static nsIFrame* GetMultiColumnContainingBlockFor(nsIFrame* aFrame) { static nsContainerFrame* GetMultiColumnContainingBlockFor(nsIFrame* aFrame) {
MOZ_ASSERT(aFrame->HasAnyStateBits(NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR), MOZ_ASSERT(aFrame->HasAnyStateBits(NS_FRAME_HAS_MULTI_COLUMN_ANCESTOR),
"Should only be called if the frame has a multi-column ancestor!"); "Should only be called if the frame has a multi-column ancestor!");
nsIFrame* current = aFrame->GetParent(); nsContainerFrame* current = aFrame->GetParent();
while (current && !current->IsColumnSetWrapperFrame()) { while (current && !current->IsColumnSetWrapperFrame()) {
current = current->GetParent(); current = current->GetParent();
} }
@ -8316,7 +8316,8 @@ bool nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(
grandparent->GetPrevSibling()); grandparent->GetPrevSibling());
if (needsReframe) { if (needsReframe) {
nsIFrame* containingBlock = GetMultiColumnContainingBlockFor(inFlowFrame); nsContainerFrame* containingBlock =
GetMultiColumnContainingBlockFor(inFlowFrame);
#ifdef DEBUG #ifdef DEBUG
if (IsFramePartOfIBSplit(inFlowFrame)) { if (IsFramePartOfIBSplit(inFlowFrame)) {