From 77b07ceb5e943dc7cd7a47fa155808d547cb97c5 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 9 Mar 2026 11:30:38 +0100 Subject: [PATCH] No issue - Fix some fatal printing assertions. - Turn a fatal assert into a warning if we can't guarantee a drawTarget. This should not be fatal since the DrawTarget is checked later. - Remove a fatal assertion if a display table background is cross-document since non-display iframes may cause this situation without it being an error. --- gfx/thebes/PrintTarget.cpp | 2 +- layout/tables/nsTableFrame.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/gfx/thebes/PrintTarget.cpp b/gfx/thebes/PrintTarget.cpp index a077513003..900cbd81a0 100644 --- a/gfx/thebes/PrintTarget.cpp +++ b/gfx/thebes/PrintTarget.cpp @@ -58,7 +58,7 @@ PrintTarget::MakeDrawTarget(const IntSize& aSize, // This should not be called outside of BeginPage()/EndPage() calls since // some backends can only provide a valid DrawTarget at that time. - MOZ_ASSERT(mHasActivePage, "We can't guarantee a valid DrawTarget"); + NS_WARNING_ASSERTION(mHasActivePage, "We can't guarantee a valid DrawTarget without an active page. Content may be missing."); if (cairo_surface_status(mCairoSurface)) { return nullptr; diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index 7fcdcb9d87..f843ae9a8b 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -81,9 +81,6 @@ class nsDisplayTableBackgroundSet { nsDisplayTableBackgroundSet(nsDisplayListBuilder* aBuilder, nsIFrame* aTable) : mBuilder(aBuilder) { mPrevTableBackgroundSet = mBuilder->SetTableBackgroundSet(this); - mozilla::DebugOnly reference = - mBuilder->FindReferenceFrameFor(aTable, &mToReferenceFrame); - MOZ_ASSERT(nsLayoutUtils::IsAncestorFrameCrossDoc(reference, aTable)); mDirtyRect = mBuilder->GetDirtyRect(); }