Commit 45be3cde authored by Simon Montagu's avatar Simon Montagu
Browse files

Check for orphaned fluid continuations after deleting content. Bug 726460, r=roc

parent bdd00b71
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -793,6 +793,7 @@ nsBidiPresUtils::ResolveParagraph(nsBlockFrame* aBlockFrame,
              RemoveBidiContinuation(aBpd, frame,
                                     frameIndex, newIndex, lineOffset);
              frameIndex = newIndex;
              lastFrame = frame = aBpd->FrameAt(frameIndex);
            }
          } else if (fragmentLength > 0 && runLength > fragmentLength) {
            /*
@@ -1587,6 +1588,16 @@ nsBidiPresUtils::RemoveBidiContinuation(BidiParagraphData *aBpd,
      }
    }
  }

  // Make sure that the last continuation we made fluid does not itself have a
  // fluid continuation (this can happen when re-resolving after dynamic changes
  // to content)
  nsIFrame* lastFrame = aBpd->FrameAt(aLastIndex);
  nsIFrame* next = lastFrame->GetNextInFlow();
  if (next) {
    lastFrame->SetNextContinuation(next);
    next->SetPrevContinuation(lastFrame);
  }
}

nsresult