зеркало из https://github.com/mozilla/pjs.git
CSS 2.1 compliance empty-cells does not apply in border-collapsed tables, initial patch by William Wedin, bug 392047, r/sr=roc
This commit is contained in:
Родитель
6022bfe136
Коммит
95b2e8f5bd
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<head><title>bug 392047</title>
|
||||
<style>
|
||||
table {empty-cells:show;
|
||||
background-color:red;
|
||||
padding:0;
|
||||
border-spacing:0}
|
||||
td {background-color:green;
|
||||
padding:0;
|
||||
color:green}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table>
|
||||
<tr><td></td><td>X</td></tr>
|
||||
<tr><td>X</td><td></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<head><title>bug 392047</title>
|
||||
<style>
|
||||
table {empty-cells:hide;
|
||||
background-color:red;
|
||||
padding:0;
|
||||
border-spacing:0;
|
||||
border-collapse:collapse;}
|
||||
td {background-color:green;
|
||||
padding:0;
|
||||
color:green}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table>
|
||||
<tr><td></td><td>X</td></tr>
|
||||
<tr><td>X</td><td></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -607,6 +607,7 @@ skip-if(MOZ_WIDGET_TOOLKIT!="windows") == 391045.html 391045-ref.html # windows-
|
|||
== 391909-1.html 391909-1-ref.html
|
||||
== 391979.html 391979-ref.html
|
||||
== 391994-1.html 391994-1-ref.html
|
||||
== 392047.html 392047-ref.html
|
||||
== 392435-1.html 392435-1-ref.html
|
||||
== 393330-1.html 393330-1-ref.html
|
||||
== 393490-1.html 393490-1-ref.html
|
||||
|
|
|
@ -355,9 +355,6 @@ nsTableCellFrame::PaintCellBackground(nsIRenderingContext& aRenderingContext,
|
|||
{
|
||||
if (!GetStyleVisibility()->IsVisible())
|
||||
return;
|
||||
if (GetContentEmpty() &&
|
||||
NS_STYLE_TABLE_EMPTY_CELLS_HIDE == GetStyleTableBorder()->mEmptyCells)
|
||||
return;
|
||||
|
||||
PaintBackground(aRenderingContext, aDirtyRect, aPt);
|
||||
}
|
||||
|
@ -413,13 +410,15 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
return NS_OK;
|
||||
|
||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsTableCellFrame");
|
||||
|
||||
PRInt32 emptyCellStyle = GetContentEmpty() ? GetStyleTableBorder()->mEmptyCells
|
||||
: NS_STYLE_TABLE_EMPTY_CELLS_SHOW;
|
||||
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
|
||||
|
||||
PRInt32 emptyCellStyle = GetContentEmpty() && !tableFrame->IsBorderCollapse() ?
|
||||
GetStyleTableBorder()->mEmptyCells
|
||||
: NS_STYLE_TABLE_EMPTY_CELLS_SHOW;
|
||||
// take account of 'empty-cells'
|
||||
if (GetStyleVisibility()->IsVisible() &&
|
||||
(NS_STYLE_TABLE_EMPTY_CELLS_HIDE != emptyCellStyle)) {
|
||||
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
|
||||
|
||||
|
||||
PRBool isRoot = aBuilder->IsAtRootOfPseudoStackingContext();
|
||||
if (!isRoot) {
|
||||
|
|
|
@ -608,7 +608,7 @@ TableBackgroundPainter::PaintCell(nsTableCellFrame* aCell,
|
|||
cellTableStyle = aCell->GetStyleTableBorder();
|
||||
if (!(NS_STYLE_TABLE_EMPTY_CELLS_SHOW == cellTableStyle->mEmptyCells ||
|
||||
NS_STYLE_TABLE_EMPTY_CELLS_SHOW_BACKGROUND == cellTableStyle->mEmptyCells)
|
||||
&& aCell->GetContentEmpty()) {
|
||||
&& aCell->GetContentEmpty() && !mIsBorderCollapse) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче