Closed Bug 1541679 Opened 6 years ago Closed 5 years ago

Assertion failure: containingBlock == ibContainingBlock || nsLayoutUtils::IsProperAncestorFrame(containingBlock, ibContainingBlock) (Multi-column containing block should be equal to or be the ancestor of the IB containing block!),

Categories

(Core :: Layout: Columns, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox-esr60 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: tsmith, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, regression, testcase)

Attachments

(2 files, 2 obsolete files)

Attached file testcase.html

Reduced with m-c:
BuildID=20190403204605
SourceStamp=74be8815ccfce81f1ca6568f8cfebfc847a83ba2

Assertion failure: containingBlock == ibContainingBlock || nsLayoutUtils::IsProperAncestorFrame(containingBlock, ibContainingBlock) (Multi-column containing block should be equal to or be the ancestor of the IB containing block!), at src/layout/base/nsCSSFrameConstructor.cpp:8386

#0 nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame*) src/layout/base/nsCSSFrameConstructor.cpp:8382:9
#1 nsCSSFrameConstructor::RecreateFramesForContent(nsIContent*, nsCSSFrameConstructor::InsertionKind) src/layout/base/nsCSSFrameConstructor.cpp:8676:16
#2 nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState&, nsIFrame*, nsIFrame*, nsCSSFrameConstructor::FrameConstructionItemList&, bool, nsIFrame*) src/layout/base/nsCSSFrameConstructor.cpp
#3 nsCSSFrameConstructor::ContentAppended(nsIContent*, nsCSSFrameConstructor::InsertionKind) src/layout/base/nsCSSFrameConstructor.cpp:6805:7
#4 mozilla::RestyleManager::ProcessRestyledFrames(nsStyleChangeList&) src/layout/base/RestyleManager.cpp:1447:27
#5 mozilla::RestyleManager::DoProcessPendingRestyles(mozilla::ServoTraversalFlags) src/layout/base/RestyleManager.cpp:3109:9
#6 mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) src/layout/base/PresShell.cpp:4123:39
#7 nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:1892:18
#8 mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) src/layout/base/nsRefreshDriver.cpp:319:7
#9 mozilla::RefreshDriverTimer::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:336:5
#10 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:702:16
#11 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::VsyncEvent const&) src/layout/base/nsRefreshDriver.cpp:597:9
#12 mozilla::layout::VsyncChild::RecvNotify(mozilla::VsyncEvent const&) src/layout/ipc/VsyncChild.cpp:65:16
#13 mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) src/obj-firefox/ipc/ipdl/PVsyncChild.cpp:168:54
#14 mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) src/obj-firefox/ipc/ipdl/PBackgroundChild.cpp:3941:28
#15 mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) src/ipc/glue/MessageChannel.cpp:2151:21
#16 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) src/ipc/glue/MessageChannel.cpp:2078:9
#17 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) src/ipc/glue/MessageChannel.cpp:1937:3
#18 mozilla::ipc::MessageChannel::MessageTask::Run() src/ipc/glue/MessageChannel.cpp:1968:13
#19 nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1180:14
#20 NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:482:10
#21 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:88:21
#22 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:315:10
#23 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:290:3
#24 nsBaseAppShell::Run() src/widget/nsBaseAppShell.cpp:137:27
#25 XRE_RunAppShell() src/toolkit/xre/nsEmbedFunctions.cpp:919:20
#26 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:238:9
#27 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:315:10
#28 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:290:3
#29 XRE_InitChildProcess(int, char**, XREChildData const*) src/toolkit/xre/nsEmbedFunctions.cpp:757:34
#30 content_process_main(mozilla::Bootstrap*, int, char**) src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28
#31 main src/browser/app/nsBrowserApp.cpp:263:18
Flags: in-testsuite?

This is a debug assertion checking multicol containing block is equal to or is an ancestor of {ib} containing block.

When climbing the parent chain, GetIBContainingBlockFor() skips any frames with pseudo or anon style in https://searchfox.org/mozilla-central/rev/9ee63566281365f26e7a4b06c9d4e2219e64c3e8/layout/base/nsCSSFrameConstructor.cpp#558

In this test case, the multicol containing block is a ColumnSetWrapper(body) with -moz-scrolled-content style. Therefore GetIBContainingBlockFor() just skips it and reach the HTMLScroll(body) above the multicol containing block.

The logic to skipping pseudo or anon frames was added in Bug 322678. We need to figure out whether it's still needed, or we should adjust the assertion.

Priority: -- → P5
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

Apart from the debug assertion in
MaybeRecreateContainerForFrameRemoval(), GetIBContainingBlockFor() is
used for finding the IB containing block's content for reframing.

Skipping frames with pseudo could return an ancestor of the real IB
containing block, which might not be necessary nowadays.

For two reasons:

  1. We do asynchronously reframe now, so we don't remove frames
    synchronously during reflow. No need to test against IsReflowLocked().

  2. GetIBContainingBlock() never return nullptr after Part 1, no need to
    reframe root element as a fallback.

Depends on D26628

Attachment #9056745 - Attachment is obsolete: true

This patch does something similar to GetIBContainingBlockFor() because
pseudo frames are not good reframe target.

Attachment #9056744 - Attachment is obsolete: true
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/fe4a28a68cfc Skip pseudo frames when finding multicol containing block for reframing. r=bzbarsky
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: