Commit 45870afc authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez Committed by Pier Angelo Vendrame
Browse files

Bug 2025968 - Don't allow fragmenting a MiddleCroppingBlockFrame. r=layout-reviewers,dshin

This requires multicol and XUL (see prefs). But anyways easy to fix.

Differential Revision: https://phabricator.services.mozilla.com/D289644
parent 4cc48629
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -164,6 +164,8 @@ void MiddleCroppingBlockFrame::Reflow(nsPresContext* aPresContext,
    AddStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
    LinesBegin()->MarkDirty();
    nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowInput, aStatus);
    // We can't be fragmented.
    aStatus.Reset();
    if (cropped) {
      break;
    }
@@ -176,7 +178,6 @@ void MiddleCroppingBlockFrame::Reflow(nsPresContext* aPresContext,
      // The value overflows - crop it and reflow again (once).
      if (CropTextToWidth(*aReflowInput.mRenderingContext, sizeToFit, value)) {
        nsBlockFrame::DidReflow(aPresContext, &aReflowInput);
        aStatus.Reset();
        MarkSubtreeDirty();
        AddStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
        // FIXME(emilio): Why do we need to clear cached intrinsics, if they are