зеркало из https://github.com/mozilla/pjs.git
Check each next-in-flow if it's an overflow container. b=564968 r=fantasai
This commit is contained in:
Родитель
c443b6c9ae
Коммит
a64539e276
|
@ -0,0 +1,30 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<style>
|
||||
.container {
|
||||
height: 1em;
|
||||
}
|
||||
.overflow {
|
||||
height: 8em;
|
||||
}
|
||||
body {
|
||||
font-family: monospace;
|
||||
height: 8em;
|
||||
line-height: 1em;
|
||||
-moz-column-count: 2;
|
||||
-moz-column-gap: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function boom()
|
||||
{
|
||||
document.documentElement.offsetHeight;
|
||||
document.getElementById('x').style.display = 'none';
|
||||
document.documentElement.offsetHeight;
|
||||
document.getElementById('y').style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body style="width: 17ch;" onload="boom();"><div id="x" class="container"></div>This paragraph must be in the first column.<div class="container" id="y"><div class="overflow"></div></div></body>
|
||||
</html>
|
|
@ -305,3 +305,4 @@ load 541714-2.html
|
|||
load 547338.xul
|
||||
load 551635-1.html
|
||||
load 564368-1.xhtml
|
||||
load 564968.xhtml
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* Robert O'Callahan <roc+moz@cs.cmu.edu>
|
||||
* L. David Baron <dbaron@dbaron.org>
|
||||
* IBM Corporation
|
||||
* Mats Palmgren <mats.palmgren@bredband.net>
|
||||
* Mats Palmgren <matspal@gmail.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
|
@ -5172,13 +5172,6 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame, PRUint32 aFlags)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// If next-in-flow is an overflow container, must remove it first
|
||||
nsIFrame* next = aDeletedFrame->GetNextInFlow();
|
||||
if (next && next->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) {
|
||||
static_cast<nsContainerFrame*>(next->GetParent())
|
||||
->DeleteNextInFlowChild(next->PresContext(), next, PR_FALSE);
|
||||
}
|
||||
|
||||
nsIPresShell* presShell = presContext->PresShell();
|
||||
|
||||
// Find the line that contains deletedFrame
|
||||
|
@ -5274,9 +5267,18 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame, PRUint32 aFlags)
|
|||
printf("DoRemoveFrame: %s line=%p frame=",
|
||||
searchingOverflowList?"overflow":"normal", line.get());
|
||||
nsFrame::ListTag(stdout, aDeletedFrame);
|
||||
printf(" prevSibling=%p deletedNextContinuation=%p\n", prevSibling, deletedNextContinuation);
|
||||
printf(" prevSibling=%p deletedNextContinuation=%p\n",
|
||||
aDeletedFrame->GetPrevSibling(), deletedNextContinuation);
|
||||
#endif
|
||||
|
||||
// If next-in-flow is an overflow container, must remove it first.
|
||||
if (deletedNextContinuation &&
|
||||
deletedNextContinuation->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) {
|
||||
static_cast<nsContainerFrame*>(deletedNextContinuation->GetParent())
|
||||
->DeleteNextInFlowChild(presContext, deletedNextContinuation, PR_FALSE);
|
||||
deletedNextContinuation = nsnull;
|
||||
}
|
||||
|
||||
aDeletedFrame->Destroy();
|
||||
aDeletedFrame = deletedNextContinuation;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче