mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Don't call CalculateContentBottom inside PR_MAX(), which evaluates its arguments twice. (Bug 511482) r=dbaron
This commit is contained in:
parent
fe67eb2e36
commit
96372404b6
@ -2650,11 +2650,11 @@ CalculateBlockContentBottom(nsBlockFrame* aFrame)
|
||||
if (line->IsBlock()) {
|
||||
nsIFrame* child = line->mFirstChild;
|
||||
nscoord offset = child->GetRect().y - child->GetRelativeOffset().y;
|
||||
contentBottom = PR_MAX(contentBottom,
|
||||
contentBottom = NS_MAX(contentBottom,
|
||||
nsLayoutUtils::CalculateContentBottom(child) + offset);
|
||||
}
|
||||
else {
|
||||
contentBottom = PR_MAX(contentBottom, line->mBounds.YMost());
|
||||
contentBottom = NS_MAX(contentBottom, line->mBounds.YMost());
|
||||
}
|
||||
}
|
||||
return contentBottom;
|
||||
@ -2673,7 +2673,7 @@ nsLayoutUtils::CalculateContentBottom(nsIFrame* aFrame)
|
||||
PRIntn nextListID = 0;
|
||||
do {
|
||||
if (childList == nsnull && blockFrame) {
|
||||
contentBottom = PR_MAX(contentBottom, CalculateBlockContentBottom(blockFrame));
|
||||
contentBottom = NS_MAX(contentBottom, CalculateBlockContentBottom(blockFrame));
|
||||
}
|
||||
else if (childList != nsGkAtoms::overflowList &&
|
||||
childList != nsGkAtoms::excessOverflowContainersList &&
|
||||
@ -2683,7 +2683,7 @@ nsLayoutUtils::CalculateContentBottom(nsIFrame* aFrame)
|
||||
child; child = child->GetNextSibling())
|
||||
{
|
||||
nscoord offset = child->GetRect().y - child->GetRelativeOffset().y;
|
||||
contentBottom = PR_MAX(contentBottom,
|
||||
contentBottom = NS_MAX(contentBottom,
|
||||
CalculateContentBottom(child) + offset);
|
||||
}
|
||||
}
|
||||
|
42
layout/generic/crashtests/511482.html
Normal file
42
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>
|
@ -244,3 +244,4 @@ load 494332-1.html
|
||||
load 501535-1.html
|
||||
load 505912-1.html
|
||||
# load 508115-1.html
|
||||
load 511482.html
|
||||
|
Loading…
Reference in New Issue
Block a user