Backed out 2 changesets (bug 1680406, bug 1663222) for causing mochitest failures. CLOSED TREE
Backed out changeset 6de49379342e (bug 1663222)
Backed out changeset 0ad0d59dbeec (bug 1680406)
This commit is contained in:
@@ -5167,22 +5167,25 @@ bool nsBlockFrame::DrainOverflowLines() {
|
||||
// Make all the frames on the overflow line list mine.
|
||||
ReparentFrames(overflowLines->mFrames, prevBlock, this);
|
||||
|
||||
// Collect overflow containers from our OverflowContainers list that are
|
||||
// continuations from the frames we picked up from our prev-in-flow, then
|
||||
// prepend those to ExcessOverflowContainers to ensure the continuations
|
||||
// Collect overflow containers from our [Excess]OverflowContainers lists
|
||||
// that are continuations from the frames we picked up from our
|
||||
// prev-in-flow. We'll append these to mFrames to ensure the continuations
|
||||
// are ordered.
|
||||
if (GetOverflowContainers()) {
|
||||
nsFrameList ocContinuations;
|
||||
auto HasOverflowContainers = [this]() -> bool {
|
||||
return GetOverflowContainers() || GetExcessOverflowContainers();
|
||||
};
|
||||
nsFrameList ocContinuations;
|
||||
if (HasOverflowContainers()) {
|
||||
for (auto* f : overflowLines->mFrames) {
|
||||
auto* cont = f;
|
||||
bool done = false;
|
||||
while (!done && (cont = cont->GetNextContinuation()) &&
|
||||
cont->GetParent() == this) {
|
||||
bool onlyChild = !cont->GetPrevSibling() && !cont->GetNextSibling();
|
||||
if (cont->HasAnyStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER) &&
|
||||
TryRemoveFrame(OverflowContainersProperty(), cont)) {
|
||||
if (MaybeStealOverflowContainerFrame(cont)) {
|
||||
cont->RemoveStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER);
|
||||
ocContinuations.AppendFrame(nullptr, cont);
|
||||
done = onlyChild;
|
||||
done = onlyChild && !HasOverflowContainers();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -5191,13 +5194,6 @@ bool nsBlockFrame::DrainOverflowLines() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!ocContinuations.IsEmpty()) {
|
||||
if (nsFrameList* eoc = GetExcessOverflowContainers()) {
|
||||
eoc->InsertFrames(nullptr, nullptr, ocContinuations);
|
||||
} else {
|
||||
SetExcessOverflowContainers(std::move(ocContinuations));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make the overflow out-of-flow frames mine too.
|
||||
@@ -5235,6 +5231,7 @@ bool nsBlockFrame::DrainOverflowLines() {
|
||||
mLines.splice(mLines.begin(), overflowLines->mLines);
|
||||
NS_ASSERTION(overflowLines->mLines.empty(), "splice should empty list");
|
||||
delete overflowLines;
|
||||
AddFrames(ocContinuations, mFrames.LastChild(), nullptr);
|
||||
didFindOverflow = true;
|
||||
}
|
||||
}
|
||||
@@ -6224,8 +6221,8 @@ void nsBlockFrame::DoRemoveFrameInternal(nsIFrame* aDeletedFrame,
|
||||
}
|
||||
|
||||
while (line != line_end && aDeletedFrame) {
|
||||
MOZ_ASSERT(this == aDeletedFrame->GetParent(), "messed up delete code");
|
||||
MOZ_ASSERT(line->Contains(aDeletedFrame), "frame not in line");
|
||||
NS_ASSERTION(this == aDeletedFrame->GetParent(), "messed up delete code");
|
||||
NS_ASSERTION(line->Contains(aDeletedFrame), "frame not in line");
|
||||
|
||||
if (!(aFlags & FRAMES_ARE_EMPTY)) {
|
||||
line->MarkDirty();
|
||||
|
||||
Reference in New Issue
Block a user