diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 2fd667506c2d..7db54fdd0356 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -5757,6 +5757,8 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState (aFlags & ITEM_ALLOW_PAGE_BREAK) && aState.mPresContext->IsPaginated() && !display->IsAbsolutelyPositionedStyle() && + !(aParentFrame && + aParentFrame->GetType() == nsGkAtoms::gridContainerFrame) && !(bits & FCDATA_IS_TABLE_PART) && !(bits & FCDATA_IS_SVG_TEXT);