Don't call CalculateContentBottom inside PR_MAX(), which evaluates its arguments twice. (Bug 511482) r=dbaron a1.9.0.15=dveditz
git-svn-id: svn://10.0.0.236/trunk@258320 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c690eb5bca
commit
34c9000324
@ -2423,11 +2423,11 @@ CalculateBlockContentBottom(nsBlockFrame* aFrame)
|
|||||||
if (line->IsBlock()) {
|
if (line->IsBlock()) {
|
||||||
nsIFrame* child = line->mFirstChild;
|
nsIFrame* child = line->mFirstChild;
|
||||||
nscoord offset = child->GetRect().y - child->GetRelativeOffset().y;
|
nscoord offset = child->GetRect().y - child->GetRelativeOffset().y;
|
||||||
contentBottom = PR_MAX(contentBottom,
|
contentBottom = NS_MAX(contentBottom,
|
||||||
nsLayoutUtils::CalculateContentBottom(child) + offset);
|
nsLayoutUtils::CalculateContentBottom(child) + offset);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
contentBottom = PR_MAX(contentBottom, line->mBounds.YMost());
|
contentBottom = NS_MAX(contentBottom, line->mBounds.YMost());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return contentBottom;
|
return contentBottom;
|
||||||
@ -2446,7 +2446,7 @@ nsLayoutUtils::CalculateContentBottom(nsIFrame* aFrame)
|
|||||||
PRIntn nextListID = 0;
|
PRIntn nextListID = 0;
|
||||||
do {
|
do {
|
||||||
if (childList == nsnull && blockFrame) {
|
if (childList == nsnull && blockFrame) {
|
||||||
contentBottom = PR_MAX(contentBottom, CalculateBlockContentBottom(blockFrame));
|
contentBottom = NS_MAX(contentBottom, CalculateBlockContentBottom(blockFrame));
|
||||||
}
|
}
|
||||||
else if (childList != nsGkAtoms::overflowList &&
|
else if (childList != nsGkAtoms::overflowList &&
|
||||||
childList != nsGkAtoms::excessOverflowContainersList &&
|
childList != nsGkAtoms::excessOverflowContainersList &&
|
||||||
@ -2456,7 +2456,7 @@ nsLayoutUtils::CalculateContentBottom(nsIFrame* aFrame)
|
|||||||
child; child = child->GetNextSibling())
|
child; child = child->GetNextSibling())
|
||||||
{
|
{
|
||||||
nscoord offset = child->GetRect().y - child->GetRelativeOffset().y;
|
nscoord offset = child->GetRect().y - child->GetRelativeOffset().y;
|
||||||
contentBottom = PR_MAX(contentBottom,
|
contentBottom = NS_MAX(contentBottom,
|
||||||
CalculateContentBottom(child) + offset);
|
CalculateContentBottom(child) + offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
42
mozilla/layout/generic/crashtests/511482.html
Normal file
42
mozilla/layout/generic/crashtests/511482.html
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<div style="border: 5px solid blue;">
|
||||||
|
<div style="-moz-column-width: 530px;height:300px; border: 5px solid red;">
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
<div style="width:128px; height:128px;border: 5px solid green" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -147,3 +147,4 @@ load 445288.html
|
|||||||
load 472776-1.html
|
load 472776-1.html
|
||||||
load 472950-1.html
|
load 472950-1.html
|
||||||
load 477928.html
|
load 477928.html
|
||||||
|
load 511482.html
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user