mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Temporarily forget the line container while calculating widths for next-in-flow children. b=477928 r+sr=roc
This commit is contained in:
parent
ba3d343cb3
commit
f1bdfe1672
18
layout/generic/crashtests/477928.html
Normal file
18
layout/generic/crashtests/477928.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function boom()
|
||||||
|
{
|
||||||
|
document.getElementById("a").appendChild(document.createTextNode("\n"));
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="boom();">
|
||||||
|
<div id="a" style="max-width: -moz-max-content; -moz-column-count: 2;"><span style="white-space: pre-line;"><span>
|
||||||
|
</span>
|
||||||
|
</span></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -193,3 +193,4 @@ load 465651-1.html
|
|||||||
load 467487-1.html
|
load 467487-1.html
|
||||||
load 468207-1.html
|
load 468207-1.html
|
||||||
load 472950-1.html
|
load 472950-1.html
|
||||||
|
load 477928.html
|
||||||
|
@ -717,10 +717,11 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsIRenderingContext *aRenderingContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const nsLineList_iterator* savedLine = aData->line;
|
const nsLineList_iterator* savedLine = aData->line;
|
||||||
|
nsIFrame* const savedLineContainer = aData->lineContainer;
|
||||||
|
|
||||||
nsContainerFrame *lastInFlow;
|
nsContainerFrame *lastInFlow;
|
||||||
for (nsContainerFrame *nif = this; nif;
|
for (nsContainerFrame *nif = this; nif;
|
||||||
nif = (nsContainerFrame*) nif->GetNextInFlow()) {
|
nif = static_cast<nsContainerFrame*>(nif->GetNextInFlow())) {
|
||||||
for (nsIFrame *kid = nif->mFrames.FirstChild(); kid;
|
for (nsIFrame *kid = nif->mFrames.FirstChild(); kid;
|
||||||
kid = kid->GetNextSibling()) {
|
kid = kid->GetNextSibling()) {
|
||||||
if (aType == nsLayoutUtils::MIN_WIDTH)
|
if (aType == nsLayoutUtils::MIN_WIDTH)
|
||||||
@ -731,13 +732,16 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsIRenderingContext *aRenderingContext,
|
|||||||
static_cast<InlinePrefWidthData*>(aData));
|
static_cast<InlinePrefWidthData*>(aData));
|
||||||
}
|
}
|
||||||
|
|
||||||
// After we advance to our next-in-flow, the stored line may not
|
// After we advance to our next-in-flow, the stored line and line container
|
||||||
// longer be the correct line. Just forget it.
|
// may no longer be correct. Just forget them.
|
||||||
aData->line = nsnull;
|
aData->line = nsnull;
|
||||||
|
aData->lineContainer = nsnull;
|
||||||
|
|
||||||
lastInFlow = nif;
|
lastInFlow = nif;
|
||||||
}
|
}
|
||||||
|
|
||||||
aData->line = savedLine;
|
aData->line = savedLine;
|
||||||
|
aData->lineContainer = savedLineContainer;
|
||||||
|
|
||||||
// This goes at the end no matter how things are broken and how
|
// This goes at the end no matter how things are broken and how
|
||||||
// messy the bidi situations are, since per CSS2.1 section 8.6
|
// messy the bidi situations are, since per CSS2.1 section 8.6
|
||||||
|
Loading…
Reference in New Issue
Block a user