Closed Bug 1533968 Opened 1 year ago Closed 1 year ago

Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Should not be called for display item types that are not able to have animations on the compositor), at src/obj-firefox/dist/include/mozilla/LayerAnimationInfo.h:51

Categories

(Core :: DOM: Animation, defect, P3)

defect

Tracking

()

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

People

(Reporter: tsmith, Assigned: boris)

References

(Blocks 2 open bugs)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase.html

Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Should not be called for display item types that are not able to have animations on the compositor), at src/obj-firefox/dist/include/mozilla/LayerAnimationInfo.h:51

#0 mozilla::LayerAnimationInfo::GetCSSPropertiesFor(DisplayItemType) src/obj-firefox/dist/include/mozilla/LayerAnimationInfo.h:48:9
#1 mozilla::EffectCompositor::ClearIsRunningOnCompositor(nsIFrame const*, DisplayItemType) src/dom/animation/EffectCompositor.cpp:508:7
#2 AddAnimationsForDisplayItem(nsIFrame*, nsDisplayListBuilder*, nsDisplayItem*, DisplayItemType, Send, mozilla::layers::LayersBackend, mozilla::layers::AnimationInfo&) src/layout/painting/nsDisplayList.cpp:756:3
#3 nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(mozilla::layers::Layer*, nsDisplayListBuilder*, nsDisplayItem*, nsIFrame*, DisplayItemType) src/layout/painting/nsDisplayList.cpp:898:3
#4 nsDisplayBackgroundColor::BuildLayer(nsDisplayListBuilder*, mozilla::layers::LayerManager*, mozilla::ContainerLayerParameters const&) src/layout/painting/nsDisplayList.cpp:4626:3
#5 mozilla::ContainerState::ProcessDisplayItems(nsDisplayList*) src/layout/painting/FrameLayerBuilder.cpp:4837:38
#6 mozilla::FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder*, mozilla::layers::LayerManager*, nsIFrame*, nsDisplayItem*, nsDisplayList*, mozilla::ContainerLayerParameters const&, mozilla::gfx::Matrix4x4Typed<mozilla::gfx::UnknownUnits, mozilla::gfx::UnknownUnits> const*, unsigned int) src/layout/painting/FrameLayerBuilder.cpp:6313:9
#7 nsDisplayList::BuildLayers(nsDisplayListBuilder*, mozilla::layers::LayerManager*, unsigned int, bool) src/layout/painting/nsDisplayList.cpp:2549:28
#8 nsDisplayList::PaintRoot(nsDisplayListBuilder*, gfxContext*, unsigned int) src/layout/painting/nsDisplayList.cpp:2769:9
#9 nsLayoutUtils::PaintFrame(gfxContext*, nsIFrame*, nsRegion const&, unsigned int, nsDisplayListBuilderMode, nsLayoutUtils::PaintFrameFlags) src/layout/base/nsLayoutUtils.cpp:3872:12
#10 mozilla::PresShell::Paint(nsView*, nsRegion const&, unsigned int) src/layout/base/PresShell.cpp:6055:5
#11 nsViewManager::ProcessPendingUpdatesPaint(nsIWidget*) src/view/nsViewManager.cpp:461:19
#12 nsViewManager::ProcessPendingUpdatesForView(nsView*, bool) src/view/nsViewManager.cpp:396:33
#13 nsViewManager::ProcessPendingUpdates() src/view/nsViewManager.cpp:1022:5
#14 nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:2031:11
#15 mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) src/layout/base/nsRefreshDriver.cpp:319:7
#16 mozilla::RefreshDriverTimer::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:336:5
#17 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:697:16
#18 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::VsyncEvent const&) src/layout/base/nsRefreshDriver.cpp:592:9
#19 mozilla::layout::VsyncChild::RecvNotify(mozilla::VsyncEvent const&) src/layout/ipc/VsyncChild.cpp:65:16
#20 mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) src/obj-firefox/ipc/ipdl/PVsyncChild.cpp:168:54
#21 mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) src/obj-firefox/ipc/ipdl/PBackgroundChild.cpp:2828:28
#22 mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) src/ipc/glue/MessageChannel.cpp:2151:21
#23 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) src/ipc/glue/MessageChannel.cpp:2078:9
#24 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) src/ipc/glue/MessageChannel.cpp:1937:3
#25 mozilla::ipc::MessageChannel::MessageTask::Run() src/ipc/glue/MessageChannel.cpp:1968:13
#26 nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1179:14
#27 NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:482:10
#28 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:88:21
#29 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:315:10
#30 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:290:3
#31 nsBaseAppShell::Run() src/widget/nsBaseAppShell.cpp:137:27
#32 XRE_RunAppShell() src/toolkit/xre/nsEmbedFunctions.cpp:911:20
#33 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:238:9
#34 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:315:10
#35 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:290:3
#36 XRE_InitChildProcess(int, char**, XREChildData const*) src/toolkit/xre/nsEmbedFunctions.cpp:749:34
#37 content_process_main(mozilla::Bootstrap*, int, char**) src/browser/app/../../ipc/contentproc/plugin-container.cpp:49:28
#38 main src/browser/app/nsBrowserApp.cpp:265:18
Flags: in-testsuite?
Priority: -- → P3

Just looking at the stack here, I'm pretty sure what happens is that in nsDisplayBackgroundColor::BuildLayer we have:

  nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(
      layer, aBuilder, this, mFrame, GetType());

Where GetType() will return either TYPE_BACKGROUND_COLOR or TYPE_TABLE_BACKGROUND_COLOR.

In the test case, we are animating a table cell so I'm guess we hit the latter case.

When we get to LayerAnimationInfo::GetCSSPropertiesFor we have:

    switch (aDisplayItemType) {
      case DisplayItemType::TYPE_BACKGROUND_COLOR:
        return backgroundColorProperties;
      case DisplayItemType::TYPE_OPACITY:
        return opacityProperties;
      case DisplayItemType::TYPE_TRANSFORM:
        return transformProperties;
      default:
        MOZ_ASSERT_UNREACHABLE(
            "Should not be called for display item types "
            "that are not able to have animations on the "
            "compositor");
        return empty;
    }

I guess we should handle TYPE_TABLE_BACKGROUND_COLOR here.

nsDisplayTableBackgroundColor inherits from nsDisplayBackgroundColor, so
we should also handle its display item type properly when adding
transitions/animations to the compositor.

Duplicate of this bug: 1538752
Assignee: nobody → boris.chiou
Attachment #9053447 - Attachment description: Bug 1533968 - Return correct property set for TYPE_TABLE_BACKRGOUND_COLOR. → Bug 1533968 - Don't add animations to layer for TYPE_TABLE_BACKRGOUND_COLOR.
Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6f0b0ab56a47
Don't add animations to layer for TYPE_TABLE_BACKRGOUND_COLOR. r=hiro
Status: NEW → RESOLVED
Closed: 1 year 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.