Bug 1281102 - Don't create table continuations unless we're paginating, and don't do grid fragmentation with unconstrained available bsize. r=dholbert

This commit is contained in:
Mats Palmgren 2016-08-23 23:34:35 +02:00
Родитель 78bb875898
Коммит fa15154ace
2 изменённых файлов: 13 добавлений и 7 удалений

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

@ -4565,18 +4565,21 @@ Maybe<nsGridContainerFrame::Fragmentainer>
nsGridContainerFrame::GetNearestFragmentainer(const GridReflowInput& aState) const
{
Maybe<nsGridContainerFrame::Fragmentainer> data;
WritingMode wm = aState.mWM;
const ReflowInput* gridRI = aState.mReflowInput;
const ReflowInput* cbRS = gridRI->mCBReflowInput;
for ( ; cbRS; cbRS = cbRS->mCBReflowInput) {
nsIScrollableFrame* sf = do_QueryFrame(cbRS->mFrame);
if (gridRI->AvailableBSize() == NS_UNCONSTRAINEDSIZE) {
return data;
}
WritingMode wm = aState.mWM;
const ReflowInput* cbRI = gridRI->mCBReflowInput;
for ( ; cbRI; cbRI = cbRI->mCBReflowInput) {
nsIScrollableFrame* sf = do_QueryFrame(cbRI->mFrame);
if (sf) {
break;
}
if (wm.IsOrthogonalTo(cbRS->GetWritingMode())) {
if (wm.IsOrthogonalTo(cbRI->GetWritingMode())) {
break;
}
nsIAtom* frameType = cbRS->mFrame->GetType();
nsIAtom* frameType = cbRI->mFrame->GetType();
if ((frameType == nsGkAtoms::canvasFrame &&
PresContext()->IsPaginated()) ||
frameType == nsGkAtoms::columnSetFrame) {

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

@ -3222,8 +3222,11 @@ nsTableFrame::ReflowChildren(TableReflowInput& aReflowInput,
// Remember where we just were in case we end up pushing children
prevKidFrame = kidFrame;
MOZ_ASSERT(!NS_FRAME_IS_NOT_COMPLETE(aStatus) || isPaginated,
"Table contents should only fragment in paginated contexts");
// Special handling for incomplete children
if (NS_FRAME_IS_NOT_COMPLETE(aStatus)) {
if (isPaginated && NS_FRAME_IS_NOT_COMPLETE(aStatus)) {
nsIFrame* kidNextInFlow = kidFrame->GetNextInFlow();
if (!kidNextInFlow) {
// The child doesn't have a next-in-flow so create a continuing