backing out fix for bug 412679 because it regressed a reftest

This commit is contained in:
myk@mozilla.org 2008-01-25 15:02:23 -08:00
Родитель 9617a96824
Коммит 2175972d57
8 изменённых файлов: 14 добавлений и 238 удалений

Просмотреть файл

@ -304,7 +304,7 @@ public:
* override ComputeSize to enforce their width/height invariants.
*
* Implementations may optimize by returning a garbage width if
* GetStylePosition()->mWidth.GetUnit() != eStyleUnit_Auto, and
* GetStylePosition()->mWidth.GetUnit() == eStyleUnit_Auto, and
* likewise for height, since in such cases the result is guaranteed
* to be unused.
*/

Просмотреть файл

@ -67,15 +67,6 @@ nsLeafFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext)
return result;
}
/* virtual */ nsSize
nsLeafFrame::ComputeAutoSize(nsIRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder,
nsSize aPadding, PRBool aShrinkWrap)
{
return nsSize(GetIntrinsicWidth(), GetIntrinsicHeight());
}
NS_IMETHODIMP
nsLeafFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aMetrics,
@ -89,12 +80,11 @@ nsLeafFrame::Reflow(nsPresContext* aPresContext,
NS_PRECONDITION(mState & NS_FRAME_IN_REFLOW, "frame is not in reflow");
// XXX add in code to check for width/height being set via css
// and if set use them instead of calling GetDesiredSize.
NS_ASSERTION(aReflowState.ComputedWidth() != NS_UNCONSTRAINEDSIZE,
"Shouldn't have unconstrained stuff here "
"Thanks to the rules of reflow");
NS_ASSERTION(NS_INTRINSICSIZE != aReflowState.ComputedHeight(),
"Shouldn't have unconstrained stuff here "
"thanks to ComputeAutoSize");
"Shouldn't have unconstrained stuff here");
DoReflow(aPresContext, aMetrics, aReflowState, aStatus);
@ -109,7 +99,15 @@ nsLeafFrame::DoReflow(nsPresContext* aPresContext,
nsReflowStatus& aStatus)
{
aMetrics.width = aReflowState.ComputedWidth();
aMetrics.height = aReflowState.ComputedHeight();
if (NS_INTRINSICSIZE != aReflowState.ComputedHeight()) {
aMetrics.height = aReflowState.ComputedHeight();
} else {
aMetrics.height = GetIntrinsicHeight();
// XXXbz using NS_CSS_MINMAX like this presupposes content-box sizing.
aMetrics.height = NS_CSS_MINMAX(aMetrics.height,
aReflowState.mComputedMinHeight,
aReflowState.mComputedMaxHeight);
}
AddBordersAndPadding(aReflowState, aMetrics);
aStatus = NS_FRAME_COMPLETE;

Просмотреть файл

@ -67,14 +67,6 @@ public:
virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext);
virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext);
/**
* Our auto size is just intrinsic width and intrinsic height.
*/
virtual nsSize ComputeAutoSize(nsIRenderingContext *aRenderingContext,
nsSize aCBSize, nscoord aAvailableWidth,
nsSize aMargin, nsSize aBorder,
nsSize aPadding, PRBool aShrinkWrap);
/**
* Reflow our frame. This will use the computed width plus borderpadding for
* the desired width, and use the return value of GetIntrinsicHeight plus

Просмотреть файл

@ -1,51 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#red {
position: fixed;
background-color: blue;
top: 10px;
left: 10px;
}
#green {
position: fixed;
background-color: blue;
top: 10px;
width: 80px;
right: 10px;
}
#blue {
position: fixed;
background-color: blue;
left: 10px;
height: 80px;
bottom: 10px;
}
#yellow {
position: fixed;
background-color: blue;
right: 10px;
width: 80px;
height: 80px;
bottom: 10px;
}
</style>
<script>
</script>
</head>
<body>
<iframe id=red></iframe>
<iframe id=green></iframe>
<iframe id=blue></iframe>
<iframe id=yellow></iframe>
</body>
</html>

Просмотреть файл

@ -1,55 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#red {
position: fixed;
background-color: blue;
top: 10px;
left: 10px;
right: 100px;
bottom: 100px;
}
#green {
position: fixed;
background-color: blue;
top: 10px;
width: 80px;
right: 10px;
bottom: 100px;
}
#blue {
position: fixed;
background-color: blue;
left: 10px;
height: 80px;
right: 100px;
bottom: 10px;
}
#yellow {
position: fixed;
background-color: blue;
right: 10px;
width: 80px;
height: 80px;
bottom: 10px;
}
</style>
<script>
</script>
</head>
<body>
<iframe id=red></iframe>
<iframe id=green></iframe>
<iframe id=blue></iframe>
<iframe id=yellow></iframe>
</body>
</html>

Просмотреть файл

@ -1,51 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#red {
position: absolute;
background-color: blue;
top: 10px;
left: 10px;
}
#green {
position: absolute;
background-color: blue;
top: 10px;
width: 80px;
right: 10px;
}
#blue {
position: absolute;
background-color: blue;
left: 10px;
height: 80px;
bottom: 10px;
}
#yellow {
position: absolute;
background-color: blue;
right: 10px;
width: 80px;
height: 80px;
bottom: 10px;
}
</style>
<script>
</script>
</head>
<body>
<iframe id=red></iframe>
<iframe id=green></iframe>
<iframe id=blue></iframe>
<iframe id=yellow></iframe>
</body>
</html>

Просмотреть файл

@ -1,55 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#red {
position: absolute;
background-color: blue;
top: 10px;
left: 10px;
right: 100px;
bottom: 100px;
}
#green {
position: absolute;
background-color: blue;
top: 10px;
width: 80px;
right: 10px;
bottom: 100px;
}
#blue {
position: absolute;
background-color: blue;
left: 10px;
height: 80px;
right: 100px;
bottom: 10px;
}
#yellow {
position: absolute;
background-color: blue;
right: 10px;
width: 80px;
height: 80px;
bottom: 10px;
}
</style>
<script>
</script>
</head>
<body>
<iframe id=red></iframe>
<iframe id=green></iframe>
<iframe id=blue></iframe>
<iframe id=yellow></iframe>
</body>
</html>

Просмотреть файл

@ -662,7 +662,5 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
!= 409659-1b.html 409659-1-ref.html
!= 409659-1c.html 409659-1-ref.html
== 409659-1d.html 409659-1-ref.html
== 412679-1.html 412679-1-ref.html
== 412679-2.html 412679-2-ref.html
== 411334-1.xml 411334-1-ref.xml
== 413361-1.html 413361-1-ref.html