diff --git a/layout/reftests/bugs/444928-3-ref.html b/layout/reftests/bugs/444928-3-notref.html similarity index 100% rename from layout/reftests/bugs/444928-3-ref.html rename to layout/reftests/bugs/444928-3-notref.html diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 9ef76219ddea..4f79f78199dc 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1138,7 +1138,7 @@ fuzzy-if(skiaContent,0-1,0-3) == 442542-1.html 442542-1-ref.html == 444375-1.html 444375-1-ref.html == 444928-1.html 444928-1-ref.html == 444928-2.html 444928-2-ref.html -== 444928-3.html 444928-3-ref.html +!= 444928-3.html 444928-3-notref.html random == 445004-1.html 445004-1-ref.html # bug 472268 == 445142-1a.html 445142-1-ref.html == 445142-1b.html 445142-1-ref.html diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 7168721558ec..36a1ef5583af 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -3871,38 +3871,14 @@ void nsTableFrame::Dump(bool aDumpRows, bool aDumpCols, bool aDumpCellMap) { #endif bool nsTableFrame::ColumnHasCellSpacingBefore(int32_t aColIndex) const { - if (aColIndex == 0) { - return true; - } // Since fixed-layout tables should not have their column sizes change // as they load, we assume that all columns are significant. - auto* fif = static_cast(FirstInFlow()); - if (fif->LayoutStrategy()->GetType() == nsITableLayoutStrategy::Fixed) { - return true; - } - nsTableCellMap* cellMap = fif->GetCellMap(); - if (!cellMap) { - return false; - } - if (cellMap->GetNumCellsOriginatingInCol(aColIndex) > 0) { - return true; - } - // Check if we have a element with a non-zero definite inline size. - // Note: percentages and calc(%) are intentionally not considered. - if (const auto* col = fif->GetColFrame(aColIndex)) { - const auto& iSize = col->StylePosition()->ISize(GetWritingMode()); - if (iSize.ConvertsToLength() && iSize.ToLength() > 0) { - const auto& maxISize = col->StylePosition()->MaxISize(GetWritingMode()); - if (!maxISize.ConvertsToLength() || maxISize.ToLength() > 0) { - return true; - } - } - const auto& minISize = col->StylePosition()->MinISize(GetWritingMode()); - if (minISize.ConvertsToLength() && minISize.ToLength() > 0) { - return true; - } - } - return false; + if (LayoutStrategy()->GetType() == nsITableLayoutStrategy::Fixed) return true; + // the first column is always significant + if (aColIndex == 0) return true; + nsTableCellMap* cellMap = GetCellMap(); + if (!cellMap) return false; + return cellMap->GetNumCellsOriginatingInCol(aColIndex) > 0; } /******************************************************************************** diff --git a/testing/web-platform/meta/css/css-tables/html5-table-formatting-2.html.ini b/testing/web-platform/meta/css/css-tables/html5-table-formatting-2.html.ini new file mode 100644 index 000000000000..8113f79bccac --- /dev/null +++ b/testing/web-platform/meta/css/css-tables/html5-table-formatting-2.html.ini @@ -0,0 +1,7 @@ +[html5-table-formatting-2.html] + [Border-spacing is added between any two unmerged columns (1)] + expected: FAIL + + [Border-spacing is added between any two unmerged columns (5)] + expected: FAIL + diff --git a/testing/web-platform/tests/css/css-tables/col-definite-max-size-001-ref.html b/testing/web-platform/tests/css/css-tables/col-definite-max-size-001-ref.html deleted file mode 100644 index 835113b2e61d..000000000000 --- a/testing/web-platform/tests/css/css-tables/col-definite-max-size-001-ref.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - -
12
- - - - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - - - -
12
- - - - - - - - -
12
- - - - - - - - -
12
- - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - -
12
- - - - - - - - -
12
- - - - - - - - -
12
diff --git a/testing/web-platform/tests/css/css-tables/col-definite-max-size-001.html b/testing/web-platform/tests/css/css-tables/col-definite-max-size-001.html deleted file mode 100644 index bcd7ca2fd89c..000000000000 --- a/testing/web-platform/tests/css/css-tables/col-definite-max-size-001.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
diff --git a/testing/web-platform/tests/css/css-tables/col-definite-min-size-001.html b/testing/web-platform/tests/css/css-tables/col-definite-min-size-001.html deleted file mode 100644 index 7fb6632eec48..000000000000 --- a/testing/web-platform/tests/css/css-tables/col-definite-min-size-001.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
diff --git a/testing/web-platform/tests/css/css-tables/col-definite-size-001-ref.html b/testing/web-platform/tests/css/css-tables/col-definite-size-001-ref.html deleted file mode 100644 index 7f666ef0a397..000000000000 --- a/testing/web-platform/tests/css/css-tables/col-definite-size-001-ref.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - -
12
- - - - - - - - -
12
- - - - - - - - -
12
- - - - - - - - -
12
diff --git a/testing/web-platform/tests/css/css-tables/col-definite-size-001.html b/testing/web-platform/tests/css/css-tables/col-definite-size-001.html deleted file mode 100644 index 7f30417557fb..000000000000 --- a/testing/web-platform/tests/css/css-tables/col-definite-size-001.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12
- - - - - - - - - - - - - - -
12