From 0fbd4d199e2244e0746c627fe629e732ab66a820 Mon Sep 17 00:00:00 2001
From: "mats.palmgren%bredband.net"
Date: Sat, 1 Dec 2007 10:47:59 +0000
Subject: [PATCH] Propagate |aRemoveOnlyFluidContinuations| when removing
continuations in other blocks. b=405178 r+sr=roc a=mtschrep
git-svn-id: svn://10.0.0.236/trunk@240218 18797224-902f-48f8-a5cc-f745e15eee43
---
mozilla/layout/generic/nsBlockFrame.cpp | 15 ++++--
mozilla/layout/generic/test/Makefile.in | 1 +
.../layout/generic/test/test_bug405178.html | 51 +++++++++++++++++++
3 files changed, 62 insertions(+), 5 deletions(-)
create mode 100644 mozilla/layout/generic/test/test_bug405178.html
diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp
index 9540452e2cf..21b0c9f12e6 100644
--- a/mozilla/layout/generic/nsBlockFrame.cpp
+++ b/mozilla/layout/generic/nsBlockFrame.cpp
@@ -5229,7 +5229,8 @@ nsBlockInFlowLineIterator::Prev()
}
}
-static nsresult RemoveBlockChild(nsIFrame* aFrame, PRBool aDestroyFrames)
+static nsresult RemoveBlockChild(nsIFrame* aFrame, PRBool aDestroyFrames,
+ PRBool aRemoveOnlyFluidContinuations)
{
if (!aFrame)
return NS_OK;
@@ -5238,7 +5239,8 @@ static nsresult RemoveBlockChild(nsIFrame* aFrame, PRBool aDestroyFrames)
NS_ASSERTION(nextBlock->GetType() == nsGkAtoms::blockFrame ||
nextBlock->GetType() == nsGkAtoms::areaFrame,
"Our child's continuation's parent is not a block?");
- return nextBlock->DoRemoveFrame(aFrame, aDestroyFrames);
+ return nextBlock->DoRemoveFrame(aFrame, aDestroyFrames,
+ aRemoveOnlyFluidContinuations);
}
// This function removes aDeletedFrame and all its continuations. It
@@ -5295,7 +5297,8 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame, PRBool aDestroyFrames,
} else {
aDeletedFrame->SetNextSibling(nsnull);
}
- return RemoveBlockChild(nif, aDestroyFrames);
+ return RemoveBlockChild(nif, aDestroyFrames,
+ aRemoveOnlyFluidContinuations);
}
}
@@ -5455,7 +5458,8 @@ found_frame:;
// Continuations for placeholder frames don't always appear in
// consecutive lines. So for placeholders, just continue the slow easy way.
if (isPlaceholder) {
- return RemoveBlockChild(deletedNextContinuation, aDestroyFrames);
+ return RemoveBlockChild(deletedNextContinuation, aDestroyFrames,
+ aRemoveOnlyFluidContinuations);
}
// See if we should keep looking in the current flow's line list.
@@ -5504,7 +5508,8 @@ found_frame:;
#endif
// Advance to next flow block if the frame has more continuations
- return RemoveBlockChild(aDeletedFrame, aDestroyFrames);
+ return RemoveBlockChild(aDeletedFrame, aDestroyFrames,
+ aRemoveOnlyFluidContinuations);
}
nsresult
diff --git a/mozilla/layout/generic/test/Makefile.in b/mozilla/layout/generic/test/Makefile.in
index 07ab962a890..e5a0b6d02be 100644
--- a/mozilla/layout/generic/test/Makefile.in
+++ b/mozilla/layout/generic/test/Makefile.in
@@ -57,6 +57,7 @@ _TEST_FILES = test_bug288789.html \
test_bug394173.html \
test_bug394239.html \
test_bug402380.html \
+ test_bug405178.html \
test_character_movement.html \
test_word_movement.html \
$(NULL)
diff --git a/mozilla/layout/generic/test/test_bug405178.html b/mozilla/layout/generic/test/test_bug405178.html
new file mode 100644
index 00000000000..2d0485c9d23
--- /dev/null
+++ b/mozilla/layout/generic/test/test_bug405178.html
@@ -0,0 +1,51 @@
+
+
+
+
+ Test for Bug 405178
+
+
+
+
+
+Mozilla Bug 405178
+孑ۍ
+
+
+
+
+
+
+
+
+