Bug 1324524 - Make sure we use nsDisplayTableCellbackground for tables with border-collapse. r=tnikkel
This commit is contained in:
18
layout/reftests/table-bordercollapse/1324524-ref.html
Normal file
18
layout/reftests/table-bordercollapse/1324524-ref.html
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
background-color: rgba(0, 255, 0, 0.5);
|
||||||
|
margin-bottom: 10px;
|
||||||
|
height: 100px;
|
||||||
|
width:100px;
|
||||||
|
border-radius: 50px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
19
layout/reftests/table-bordercollapse/1324524.html
Normal file
19
layout/reftests/table-bordercollapse/1324524.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
background-color: rgb(0, 255, 0);
|
||||||
|
margin-bottom: 10px;
|
||||||
|
height: 100px;
|
||||||
|
width:100px;
|
||||||
|
border-radius: 50px;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
@@ -104,3 +104,4 @@ fuzzy(255,40) == border-style-outset-becomes-groove.html border-style-outset-bec
|
|||||||
# So get 40 pixels of fuzz, 20 at each beveled corner (because the border width
|
# So get 40 pixels of fuzz, 20 at each beveled corner (because the border width
|
||||||
# is 20px).
|
# is 20px).
|
||||||
fuzzy(255,40) == border-style-inset-becomes-ridge.html border-style-inset-becomes-ridge-ref.html
|
fuzzy(255,40) == border-style-inset-becomes-ridge.html border-style-inset-becomes-ridge-ref.html
|
||||||
|
fuzzy(2,8301) == 1324524.html 1324524-ref.html
|
||||||
|
|||||||
@@ -502,16 +502,20 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
if (aBuilder->IsForEventDelivery() ||
|
if (aBuilder->IsForEventDelivery() ||
|
||||||
!StyleBackground()->IsTransparent(this) ||
|
!StyleBackground()->IsTransparent(this) ||
|
||||||
StyleDisplay()->mAppearance) {
|
StyleDisplay()->mAppearance) {
|
||||||
if (!tableFrame->IsBorderCollapse() ||
|
if (!tableFrame->IsBorderCollapse()) {
|
||||||
aBuilder->IsAtRootOfPseudoStackingContext() ||
|
|
||||||
aBuilder->IsForEventDelivery()) {
|
|
||||||
// The cell background was not painted by the nsTablePainter,
|
|
||||||
// so we need to do it. We have special background processing here
|
|
||||||
// so we need to duplicate some code from nsFrame::DisplayBorderBackgroundOutline
|
|
||||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder,
|
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(aBuilder,
|
||||||
this,
|
this,
|
||||||
GetRectRelativeToSelf(),
|
GetRectRelativeToSelf(),
|
||||||
aLists.BorderBackground());
|
aLists.BorderBackground());
|
||||||
|
} else if (aBuilder->IsAtRootOfPseudoStackingContext() ||
|
||||||
|
aBuilder->IsForEventDelivery()) {
|
||||||
|
// The cell background was not painted by the nsTablePainter,
|
||||||
|
// so we need to do it. We have special background processing here
|
||||||
|
// so we need to duplicate some code from nsFrame::DisplayBorderBackgroundOutline
|
||||||
|
nsDisplayTableItem* item =
|
||||||
|
new (aBuilder) nsDisplayTableCellBackground(aBuilder, this);
|
||||||
|
aLists.BorderBackground()->AppendNewToTop(item);
|
||||||
|
item->UpdateForFrameBackground(this);
|
||||||
} else {
|
} else {
|
||||||
// The nsTablePainter will paint our background. Make sure it
|
// The nsTablePainter will paint our background. Make sure it
|
||||||
// knows if we're background-attachment:fixed.
|
// knows if we're background-attachment:fixed.
|
||||||
|
|||||||
Reference in New Issue
Block a user