mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 422678. Table rows whose style-height doesn't fit in the available height (but whose cells do) should be marked incomplete during reflow. r=bernd,sr=dbaron
This commit is contained in:
parent
5c164edc01
commit
7c840869f1
59
layout/reftests/bugs/231823-1-ref.html
Normal file
59
layout/reftests/bugs/231823-1-ref.html
Normal file
@ -0,0 +1,59 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-print">
|
||||
<body>
|
||||
<div style="height:1087px;">
|
||||
<div>Location: </div>
|
||||
|
||||
<p>
|
||||
We are located at 333 West San Carlos Street, Suite 1650, San Jose.
|
||||
Our building has a parking garage, and we will validate your parking.
|
||||
After you park, as you are walking out of the parking garage, you will
|
||||
see a bank of elevators. These elevators only go up and down in the
|
||||
garage – they don’t connect to the office building. You
|
||||
should walk past those elevators, walk out of the garage, walk across a
|
||||
courtyard, and into the doors for the main building. There is another
|
||||
bank of elevators in that building. Take these elevators to the 16th
|
||||
Floor.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From Highway 280 heading northbound to San Jose: Take the Guadalupe
|
||||
Parkway exit, also called Highway 87. This exit splits into a
|
||||
northbound and a southbound direction. Take the northbound direction.
|
||||
Once on the Guadalupe Parkway take the first exit, which is the Santa
|
||||
Clara Street exit. Bear right on Santa Clara Street as you come off
|
||||
that exit. The first light you come to is Almaden Blvd. Turn right on
|
||||
Almaden. Go down 3 lights to West San Carlos Street. Turn right on
|
||||
West San Carlos. The next light you come to is a small street called
|
||||
Woz Way. Turn right on Woz. The parking garage for our building is on
|
||||
your right. Turn right into the garage. Then follow the directions
|
||||
above from the garage to our office.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From Highway 101 heading southbound to San Jose: Take the Guadalupe
|
||||
Parkway exit, also called Highway 87. Stay on the Guadalupe as it
|
||||
turns into a surface street and you cross over Hedding and Coleman.
|
||||
Once it turns into an expressway again, the second exit is the Park
|
||||
Avenue exit. Take this exit. Turn left on Park Avenue. After you
|
||||
turn left you will come under the freeway and immediately come to a
|
||||
traffic light at a small street called Woz Way. Turn right on Woz
|
||||
Way. The parking garage for our building is on your left. Turn left
|
||||
into the garage. Then follow the directions above from the garage to
|
||||
our office.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From Highway 101 heading northbound to San Jose: Turn on to Highway
|
||||
280 headed north. Then follow directions above for Highway 280 heading
|
||||
northbound to San Jose.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From Highway 880: Take Highway 880 to Highway 280 South, and then
|
||||
follow directions above from Highway 280 heading southbound to San
|
||||
Jose.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
66
layout/reftests/bugs/231823-1.html
Normal file
66
layout/reftests/bugs/231823-1.html
Normal file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-print">
|
||||
<body>
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td rowspan="2" valign="top">
|
||||
<div>Location: </div>
|
||||
|
||||
<p>
|
||||
We are located at 333 West San Carlos Street, Suite 1650, San Jose.
|
||||
Our building has a parking garage, and we will validate your parking.
|
||||
After you park, as you are walking out of the parking garage, you will
|
||||
see a bank of elevators. These elevators only go up and down in the
|
||||
garage – they don’t connect to the office building. You
|
||||
should walk past those elevators, walk out of the garage, walk across a
|
||||
courtyard, and into the doors for the main building. There is another
|
||||
bank of elevators in that building. Take these elevators to the 16th
|
||||
Floor.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From Highway 280 heading northbound to San Jose: Take the Guadalupe
|
||||
Parkway exit, also called Highway 87. This exit splits into a
|
||||
northbound and a southbound direction. Take the northbound direction.
|
||||
Once on the Guadalupe Parkway take the first exit, which is the Santa
|
||||
Clara Street exit. Bear right on Santa Clara Street as you come off
|
||||
that exit. The first light you come to is Almaden Blvd. Turn right on
|
||||
Almaden. Go down 3 lights to West San Carlos Street. Turn right on
|
||||
West San Carlos. The next light you come to is a small street called
|
||||
Woz Way. Turn right on Woz. The parking garage for our building is on
|
||||
your right. Turn right into the garage. Then follow the directions
|
||||
above from the garage to our office.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From Highway 101 heading southbound to San Jose: Take the Guadalupe
|
||||
Parkway exit, also called Highway 87. Stay on the Guadalupe as it
|
||||
turns into a surface street and you cross over Hedding and Coleman.
|
||||
Once it turns into an expressway again, the second exit is the Park
|
||||
Avenue exit. Take this exit. Turn left on Park Avenue. After you
|
||||
turn left you will come under the freeway and immediately come to a
|
||||
traffic light at a small street called Woz Way. Turn right on Woz
|
||||
Way. The parking garage for our building is on your left. Turn left
|
||||
into the garage. Then follow the directions above from the garage to
|
||||
our office.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From Highway 101 heading northbound to San Jose: Turn on to Highway
|
||||
280 headed north. Then follow directions above for Highway 280 heading
|
||||
northbound to San Jose.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
From Highway 880: Take Highway 880 to Highway 280 South, and then
|
||||
follow directions above from Highway 280 heading southbound to San
|
||||
Jose.
|
||||
</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr height="1087">
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
20
layout/reftests/bugs/422249-1-ref.html
Normal file
20
layout/reftests/bugs/422249-1-ref.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-print">
|
||||
<head><style>
|
||||
.tall {
|
||||
border: 1px solid black;
|
||||
line-height: 20px;
|
||||
}
|
||||
</style></head>
|
||||
<body style="margin:0">
|
||||
<table class="tall" cellspacing="0" cellpadding="0"><td valign="top">
|
||||
<div style="height:2000px;">
|
||||
a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i
|
||||
<br>j<br>k<br>l<br>m<br>n<br>o<br>p<br>q<br>r<br>s<br>t<br>u<br>v<br>w<br>x
|
||||
<br>y<br>z<br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i<br>j<br>k<br>l
|
||||
<br>m<br>n<br>o<br>p<br>q<br>r<br>s<br>t<br>u<br>v<br>w<br>x<br>y<br>z
|
||||
<br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i<br>j<br>k<br>l<br>m<br>n</td>
|
||||
</div>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
18
layout/reftests/bugs/422249-1.html
Normal file
18
layout/reftests/bugs/422249-1.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-print">
|
||||
<head><style>
|
||||
.tall {
|
||||
border: 1px solid black;
|
||||
height: 2002px;
|
||||
line-height: 20px;
|
||||
}
|
||||
</style></head>
|
||||
<body style="margin:0">
|
||||
<table class="tall" cellspacing="0" cellpadding="0"><td valign="top">a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i
|
||||
<br>j<br>k<br>l<br>m<br>n<br>o<br>p<br>q<br>r<br>s<br>t<br>u<br>v<br>w<br>x
|
||||
<br>y<br>z<br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i<br>j<br>k<br>l
|
||||
<br>m<br>n<br>o<br>p<br>q<br>r<br>s<br>t<br>u<br>v<br>w<br>x<br>y<br>z
|
||||
<br>a<br>b<br>c<br>d<br>e<br>f<br>g<br>h<br>i<br>j<br>k<br>l<br>m<br>n</td>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
12
layout/reftests/bugs/422678-1-ref.html
Normal file
12
layout/reftests/bugs/422678-1-ref.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-print">
|
||||
<body>
|
||||
<table border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="background:yellow;"><div style="height:800px;">Hello</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
12
layout/reftests/bugs/422678-1.html
Normal file
12
layout/reftests/bugs/422678-1.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-print">
|
||||
<body>
|
||||
<table border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="background:yellow; height:800px;" valign="top">Hello</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -126,6 +126,7 @@ fails == 25888-3r.html 25888-3r-ref.html # bug 25888
|
||||
== 214077-1a.html 214077-1-ref.html
|
||||
== 214077-1b.html 214077-1-ref.html
|
||||
== 218473-1.html 218473-1-ref.html
|
||||
== 231823-1.html 231823-1-ref.html
|
||||
== 234686-1.html 234686-ref.html
|
||||
== 234686-2.html 234686-ref.html
|
||||
== 234686-3.html 234686-ref.html
|
||||
@ -775,7 +776,9 @@ fails == 413027-3.html 413027-3-ref.html
|
||||
== 421419-1.html 421419-1-ref.html
|
||||
== 421885-1.xml 421885-1-ref.xml
|
||||
== 421955-1.html 421955-1-ref.html
|
||||
== 422249-1.html 422249-1-ref.html
|
||||
== 422394-1.html 422394-1-ref.html
|
||||
== 422678-1.html 422678-1-ref.html
|
||||
== 423130-1.html 423130-1-ref.html
|
||||
== 423385-1.html 423385-1-ref.html
|
||||
== 423599-1.html 423599-1-ref.html
|
||||
|
@ -911,7 +911,19 @@ NS_METHOD nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
// 0 dimensioned cells need to be treated specially in Standard/NavQuirks mode
|
||||
// see testcase "emptyCells.html"
|
||||
SetContentEmpty(0 == kidSize.height);
|
||||
nsIFrame* prevInFlow = GetPrevInFlow();
|
||||
PRBool isEmpty;
|
||||
if (prevInFlow) {
|
||||
isEmpty = static_cast<nsTableCellFrame*>(prevInFlow)->GetContentEmpty();
|
||||
} else {
|
||||
// XXX this is a bad way to check for empty content. There are various
|
||||
// ways the cell could have content but the kid could end up with zero
|
||||
// height. See
|
||||
// http://www.w3.org/TR/CSS21/tables.html#empty-cells
|
||||
// and bug 76331.
|
||||
isEmpty = kidSize.height == 0;
|
||||
}
|
||||
SetContentEmpty(isEmpty);
|
||||
|
||||
// Place the child
|
||||
FinishReflowChild(firstKid, aPresContext, &kidReflowState, kidSize,
|
||||
|
@ -798,7 +798,8 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
PRInt32 prevColIndex = firstPrevColIndex;
|
||||
nscoord x = 0; // running total of children x offset
|
||||
|
||||
nscoord paginatedHeight = 0;
|
||||
// This computes the max of all cell heights
|
||||
nscoord cellMaxHeight = 0;
|
||||
|
||||
// Reflow each of our existing cell frames
|
||||
for (nsIFrame* kidFrame = iter.First(); kidFrame; kidFrame = iter.Next()) {
|
||||
@ -946,10 +947,10 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
UpdateHeight(desiredSize.height, ascent, descent, &aTableFrame, cellFrame);
|
||||
}
|
||||
else {
|
||||
paginatedHeight = PR_MAX(paginatedHeight, desiredSize.height);
|
||||
cellMaxHeight = PR_MAX(cellMaxHeight, desiredSize.height);
|
||||
PRInt32 rowSpan = aTableFrame.GetEffectiveRowSpan((nsTableCellFrame&)*kidFrame);
|
||||
if (1 == rowSpan) {
|
||||
SetContentHeight(paginatedHeight);
|
||||
SetContentHeight(cellMaxHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1010,12 +1011,14 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
else { // constrained height, paginated
|
||||
aDesiredSize.height = paginatedHeight;
|
||||
if (aDesiredSize.height <= aReflowState.availableHeight) {
|
||||
nscoord height = CalcHeightFromUnpaginatedHeight(aPresContext, *this);
|
||||
aDesiredSize.height = PR_MAX(aDesiredSize.height, height);
|
||||
aDesiredSize.height = PR_MIN(aDesiredSize.height, aReflowState.availableHeight);
|
||||
// Compute the height we should have from style (subtracting the
|
||||
// height from our prev-in-flows from the style height)
|
||||
nscoord styleHeight = CalcHeightFromUnpaginatedHeight(aPresContext, *this);
|
||||
if (styleHeight > aReflowState.availableHeight) {
|
||||
styleHeight = aReflowState.availableHeight;
|
||||
NS_FRAME_SET_INCOMPLETE(aStatus);
|
||||
}
|
||||
aDesiredSize.height = PR_MAX(cellMaxHeight, styleHeight);
|
||||
}
|
||||
nsRect rowRect(0, 0, aDesiredSize.width, aDesiredSize.height);
|
||||
aDesiredSize.mOverflowArea.UnionRect(aDesiredSize.mOverflowArea, rowRect);
|
||||
|
Loading…
Reference in New Issue
Block a user