From 3ad7017163720386c8dbd39fc32e3c40dfc605ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 9 Jan 2023 18:02:23 +0000 Subject: [PATCH] Bug 1807963 - Remove non-standard values of caption-side for good. r=TYLin,layout-reviewers They have been disabled since bug 1688695. There's a variety of table-caption bugs that would be easier to fix if we didn't have to account for side-captions. Differential Revision: https://phabricator.services.mozilla.com/D165690 --- .../shared/css/generated/properties-db.js | 4 - dom/base/test/test_bug414190.html | 31 +- dom/html/HTMLTableCaptionElement.cpp | 2 - layout/generic/ReflowInput.cpp | 14 - layout/generic/nsContainerFrame.cpp | 51 +- .../bugs/1062963-floatmanager-reflow-ref.html | 55 - .../bugs/1062963-floatmanager-reflow.html | 83 -- layout/reftests/bugs/134706-6b.html | 64 - layout/reftests/bugs/134706-6c.html | 64 - .../bugs/427129-table-caption-ref.html | 715 ++--------- .../reftests/bugs/427129-table-caption.html | 1120 +++-------------- layout/reftests/bugs/478614-6-ref.html | 16 - layout/reftests/bugs/478614-6.html | 16 - layout/reftests/bugs/478614-7-ref.html | 18 - layout/reftests/bugs/478614-7.html | 17 - layout/reftests/bugs/reftest.list | 11 +- .../grid-item-table-stretch-003-ref.html | 191 --- .../css-grid/grid-item-table-stretch-003.html | 180 --- layout/reftests/css-grid/reftest.list | 1 - .../reftests/margin-collapsing/reftest.list | 13 - .../table-caption-bottom-outside-1-dyn.html | 48 - .../table-caption-bottom-outside-1.html | 41 - .../table-caption-bottom-outside-2-dyn.html | 43 - .../table-caption-bottom-outside-2.html | 36 - .../table-caption-top-outside-1-dyn.html | 48 - .../table-caption-top-outside-1.html | 41 - .../table-caption-top-outside-2-dyn.html | 43 - .../table-caption-top-outside-2.html | 36 - layout/reftests/pagination/reftest.list | 4 - .../table-caption-splitaftercaption-10.html | 23 - .../table-caption-splitaftercaption-11.html | 23 - ...table-caption-splitaftercaption-6-ref.html | 28 - .../table-caption-splitaftercaption-6.html | 22 - ...table-caption-splitaftercaption-7-ref.html | 28 - .../table-caption-splitaftercaption-7.html | 22 - .../reftests/writing-mode/tables/reftest.list | 4 +- .../tables/table-caption-left-1-ref.html | 65 - .../tables/table-caption-left-1.html | 71 -- .../tables/table-caption-right-1-ref.html | 65 - .../tables/table-caption-right-1.html | 71 -- layout/style/test/property_database.js | 18 +- layout/tables/nsTableWrapperFrame.cpp | 325 +---- layout/tables/nsTableWrapperFrame.h | 29 +- modules/libpref/init/StaticPrefList.yaml | 7 - .../style/values/specified/table.rs | 20 +- .../floats/floats-wrap-bfc-006b.xht.ini | 2 - .../floats/floats-wrap-bfc-006c.xht.ini | 2 - .../floats/floats-wrap-bfc-006b.xht | 63 - .../floats/floats-wrap-bfc-006c.xht | 63 - 49 files changed, 345 insertions(+), 3612 deletions(-) delete mode 100644 layout/reftests/bugs/1062963-floatmanager-reflow-ref.html delete mode 100644 layout/reftests/bugs/1062963-floatmanager-reflow.html delete mode 100644 layout/reftests/bugs/134706-6b.html delete mode 100644 layout/reftests/bugs/134706-6c.html delete mode 100644 layout/reftests/bugs/478614-6-ref.html delete mode 100644 layout/reftests/bugs/478614-6.html delete mode 100644 layout/reftests/bugs/478614-7-ref.html delete mode 100644 layout/reftests/bugs/478614-7.html delete mode 100644 layout/reftests/css-grid/grid-item-table-stretch-003-ref.html delete mode 100644 layout/reftests/css-grid/grid-item-table-stretch-003.html delete mode 100644 layout/reftests/margin-collapsing/table-caption-bottom-outside-1-dyn.html delete mode 100644 layout/reftests/margin-collapsing/table-caption-bottom-outside-1.html delete mode 100644 layout/reftests/margin-collapsing/table-caption-bottom-outside-2-dyn.html delete mode 100644 layout/reftests/margin-collapsing/table-caption-bottom-outside-2.html delete mode 100644 layout/reftests/margin-collapsing/table-caption-top-outside-1-dyn.html delete mode 100644 layout/reftests/margin-collapsing/table-caption-top-outside-1.html delete mode 100644 layout/reftests/margin-collapsing/table-caption-top-outside-2-dyn.html delete mode 100644 layout/reftests/margin-collapsing/table-caption-top-outside-2.html delete mode 100644 layout/reftests/pagination/table-caption-splitaftercaption-10.html delete mode 100644 layout/reftests/pagination/table-caption-splitaftercaption-11.html delete mode 100644 layout/reftests/pagination/table-caption-splitaftercaption-6-ref.html delete mode 100644 layout/reftests/pagination/table-caption-splitaftercaption-6.html delete mode 100644 layout/reftests/pagination/table-caption-splitaftercaption-7-ref.html delete mode 100644 layout/reftests/pagination/table-caption-splitaftercaption-7.html delete mode 100644 layout/reftests/writing-mode/tables/table-caption-left-1-ref.html delete mode 100644 layout/reftests/writing-mode/tables/table-caption-left-1.html delete mode 100644 layout/reftests/writing-mode/tables/table-caption-right-1-ref.html delete mode 100644 layout/reftests/writing-mode/tables/table-caption-right-1.html delete mode 100644 testing/web-platform/meta/css/css-tables/floats/floats-wrap-bfc-006b.xht.ini delete mode 100644 testing/web-platform/meta/css/css-tables/floats/floats-wrap-bfc-006c.xht.ini delete mode 100644 testing/web-platform/tests/css/css-tables/floats/floats-wrap-bfc-006b.xht delete mode 100644 testing/web-platform/tests/css/css-tables/floats/floats-wrap-bfc-006c.xht diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js index 42af6a75fede..a4a322577742 100644 --- a/devtools/shared/css/generated/properties-db.js +++ b/devtools/shared/css/generated/properties-db.js @@ -5621,15 +5621,11 @@ exports.CSS_PROPERTIES = { "supports": [], "values": [ "bottom", - "bottom-outside", "inherit", "initial", - "left", "revert", "revert-layer", - "right", "top", - "top-outside", "unset" ] }, diff --git a/dom/base/test/test_bug414190.html b/dom/base/test/test_bug414190.html index a8a6f7f81838..813d35ae7d4d 100644 --- a/dom/base/test/test_bug414190.html +++ b/dom/base/test/test_bug414190.html @@ -40,7 +40,7 @@ function runTest() { var tableBoundingRect = table.getBoundingClientRect(); var cellBoundingRect = cell.getBoundingClientRect(); var captionBoundingRect = caption.getBoundingClientRect(); - + is(tableRects.length, 2, "Table should have rects for body and caption"); isEqualRect(tableRects[0], cellBoundingRect, 10, "Table first rect should be cell rect"); @@ -51,41 +51,18 @@ function runTest() { is(captionBoundingRect.right - captionBoundingRect.left, 50, "Caption incorrect width"); is(captionBoundingRect.bottom - captionBoundingRect.top, 70, "Caption incorrect height"); is(captionBoundingRect.top, cellBoundingRect.bottom + 10, "Discontiguous vertical geometry"); - + is(tableBoundingRect.top, cellBoundingRect.top - 10, "Table top error"); is(tableBoundingRect.left, cellBoundingRect.left - 10, "Table left error"); is(tableBoundingRect.bottom, captionBoundingRect.bottom, "Table bottom error"); is(tableBoundingRect.right, cellBoundingRect.right + 10, "Table right error"); - - caption.style.captionSide = "left"; - - tableRects = table.getClientRects(); - tableBoundingRect = table.getBoundingClientRect(); - cellBoundingRect = cell.getBoundingClientRect(); - captionBoundingRect = caption.getBoundingClientRect(); - - is(tableRects.length, 2, "Table should have rects for body and caption"); - isEqualRect(tableRects[0], cellBoundingRect, 10, - "Table first rect should be cell rect plus border"); - isEqualRect(tableRects[1], captionBoundingRect, 0, - "Table second rect should be caption rect"); - is(cellBoundingRect.right - cellBoundingRect.left, 80, "Cell incorrect width"); - is(cellBoundingRect.bottom - cellBoundingRect.top, 100, "Cell incorrect height"); - is(captionBoundingRect.right - captionBoundingRect.left, 50, "Caption incorrect width"); - is(captionBoundingRect.bottom - captionBoundingRect.top, 70, "Caption incorrect height"); - is(captionBoundingRect.right + 10, cellBoundingRect.left, "Discontiguous horizontal geometry"); - is(tableBoundingRect.top, cellBoundingRect.top - 10, "Table top error"); - is(tableBoundingRect.left, captionBoundingRect.left, "Table left error"); - is(tableBoundingRect.bottom, cellBoundingRect.bottom + 10, "Table bottom error"); - is(tableBoundingRect.right, cellBoundingRect.right + 10, "Table right error"); + SimpleTest.finish(); } SimpleTest.waitForExplicitFinish(); -addLoadEvent(function() { - SpecialPowers.pushPrefEnv({"set": [["layout.css.caption-side-non-standard.enabled", true]]}, runTest); -}); +addLoadEvent(runTest); diff --git a/dom/html/HTMLTableCaptionElement.cpp b/dom/html/HTMLTableCaptionElement.cpp index f3b384b843bb..01b1f3e7c782 100644 --- a/dom/html/HTMLTableCaptionElement.cpp +++ b/dom/html/HTMLTableCaptionElement.cpp @@ -26,8 +26,6 @@ JSObject* HTMLTableCaptionElement::WrapNode(JSContext* aCx, NS_IMPL_ELEMENT_CLONE(HTMLTableCaptionElement) static const nsAttrValue::EnumTable kCaptionAlignTable[] = { - {"left", StyleCaptionSide::Left}, - {"right", StyleCaptionSide::Right}, {"top", StyleCaptionSide::Top}, {"bottom", StyleCaptionSide::Bottom}, {nullptr, 0}}; diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp index 1fd53a654484..d5e6b17d4ace 100644 --- a/layout/generic/ReflowInput.cpp +++ b/layout/generic/ReflowInput.cpp @@ -2127,17 +2127,6 @@ static eNormalLineHeightControl GetNormalLineHeightCalcControl(void) { return sNormalLineHeightControl; } -static inline bool IsSideCaption(nsIFrame* aFrame, - const nsStyleDisplay* aStyleDisplay, - WritingMode aWM) { - if (aStyleDisplay->mDisplay != StyleDisplay::TableCaption) { - return false; - } - auto captionSide = aFrame->StyleTableBorder()->mCaptionSide; - return captionSide == StyleCaptionSide::Left || - captionSide == StyleCaptionSide::Right; -} - // XXX refactor this code to have methods for each set of properties // we are computing: width,height,line-height; margin; offsets @@ -2425,9 +2414,6 @@ void ReflowInput::InitConstraints( if (!isBlockLevel) { return false; } - if (IsSideCaption(mFrame, mStyleDisplay, cbwm)) { - return false; - } if (mStyleDisplay->mDisplay == StyleDisplay::InlineTable) { return false; } diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 09a3704f311f..e76355d02cfd 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -954,45 +954,22 @@ LogicalSize nsContainerFrame::ComputeAutoSize( AutoMaybeDisableFontInflation an(this); WritingMode tableWM = GetParent()->GetWritingMode(); - StyleCaptionSide captionSide = StyleTableBorder()->mCaptionSide; - if (aWM.IsOrthogonalTo(tableWM)) { - if (captionSide == StyleCaptionSide::Top || - captionSide == StyleCaptionSide::TopOutside || - captionSide == StyleCaptionSide::Bottom || - captionSide == StyleCaptionSide::BottomOutside) { - // For an orthogonal caption on a block-dir side of the table, - // shrink-wrap to min-isize. - result.ISize(aWM) = GetMinISize(aRenderingContext); - } else { - // An orthogonal caption on an inline-dir side of the table - // is constrained to the containing block. - nscoord pref = GetPrefISize(aRenderingContext); - if (pref > aCBSize.ISize(aWM)) { - pref = aCBSize.ISize(aWM); - } - if (pref < result.ISize(aWM)) { - result.ISize(aWM) = pref; - } - } + // For an orthogonal caption on a block-dir side of the table, shrink-wrap + // to min-isize. + result.ISize(aWM) = GetMinISize(aRenderingContext); } else { - if (captionSide == StyleCaptionSide::Left || - captionSide == StyleCaptionSide::Right) { - result.ISize(aWM) = GetMinISize(aRenderingContext); - } else if (captionSide == StyleCaptionSide::Top || - captionSide == StyleCaptionSide::Bottom) { - // The outer frame constrains our available isize to the isize of - // the table. Grow if our min-isize is bigger than that, but not - // larger than the containing block isize. (It would really be nice - // to transmit that information another way, so we could grow up to - // the table's available isize, but that's harder.) - nscoord min = GetMinISize(aRenderingContext); - if (min > aCBSize.ISize(aWM)) { - min = aCBSize.ISize(aWM); - } - if (min > result.ISize(aWM)) { - result.ISize(aWM) = min; - } + // The outer frame constrains our available isize to the isize of + // the table. Grow if our min-isize is bigger than that, but not + // larger than the containing block isize. (It would really be nice + // to transmit that information another way, so we could grow up to + // the table's available isize, but that's harder.) + nscoord min = GetMinISize(aRenderingContext); + if (min > aCBSize.ISize(aWM)) { + min = aCBSize.ISize(aWM); + } + if (min > result.ISize(aWM)) { + result.ISize(aWM) = min; } } } diff --git a/layout/reftests/bugs/1062963-floatmanager-reflow-ref.html b/layout/reftests/bugs/1062963-floatmanager-reflow-ref.html deleted file mode 100644 index adde9d36313c..000000000000 --- a/layout/reftests/bugs/1062963-floatmanager-reflow-ref.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - Reftest, bug 1062963 - - - - - - -
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
- -
- - - diff --git a/layout/reftests/bugs/1062963-floatmanager-reflow.html b/layout/reftests/bugs/1062963-floatmanager-reflow.html deleted file mode 100644 index 1f7bcff88a46..000000000000 --- a/layout/reftests/bugs/1062963-floatmanager-reflow.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - Reftest, bug 1062963 - - - - - - - - - - - -
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
- - - diff --git a/layout/reftests/bugs/134706-6b.html b/layout/reftests/bugs/134706-6b.html deleted file mode 100644 index 89cb22bb53f4..000000000000 --- a/layout/reftests/bugs/134706-6b.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - CSS 2.1 Test Suite: Test for flow around floats - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
Caption
Cell
-
- - - diff --git a/layout/reftests/bugs/134706-6c.html b/layout/reftests/bugs/134706-6c.html deleted file mode 100644 index 53ad2035c67a..000000000000 --- a/layout/reftests/bugs/134706-6c.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - CSS 2.1 Test Suite: Test for flow around floats - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
Caption
Cell
-
- - - diff --git a/layout/reftests/bugs/427129-table-caption-ref.html b/layout/reftests/bugs/427129-table-caption-ref.html index 26cb22d3e160..4cecb194cb68 100644 --- a/layout/reftests/bugs/427129-table-caption-ref.html +++ b/layout/reftests/bugs/427129-table-caption-ref.html @@ -1,31 +1,31 @@ + "http://www.w3.org/TR/html4/strict.dtd"> - Reftest, bug 427129 - - - +
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
+
+
+
+
+
diff --git a/layout/reftests/bugs/427129-table-caption.html b/layout/reftests/bugs/427129-table-caption.html index fe48408fb3f9..f310ca0dda06 100644 --- a/layout/reftests/bugs/427129-table-caption.html +++ b/layout/reftests/bugs/427129-table-caption.html @@ -1,36 +1,36 @@ + "http://www.w3.org/TR/html4/strict.dtd"> - Reftest, bug 427129 - - - +
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
+
+
+
+ + + +
+
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
-
- -
-
-
-
- - - -
-
+
+
+
+ + + +
+
diff --git a/layout/reftests/bugs/478614-6-ref.html b/layout/reftests/bugs/478614-6-ref.html deleted file mode 100644 index f5934c6603bd..000000000000 --- a/layout/reftests/bugs/478614-6-ref.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Testcase for table + caption vertical margins (bug 478614) - - - - - -
caption
td
- - diff --git a/layout/reftests/bugs/478614-6.html b/layout/reftests/bugs/478614-6.html deleted file mode 100644 index 210e9938d582..000000000000 --- a/layout/reftests/bugs/478614-6.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Testcase for table + caption vertical margins (bug 478614) - - - - - -
caption
td
- - diff --git a/layout/reftests/bugs/478614-7-ref.html b/layout/reftests/bugs/478614-7-ref.html deleted file mode 100644 index 908ac8b55d6a..000000000000 --- a/layout/reftests/bugs/478614-7-ref.html +++ /dev/null @@ -1,18 +0,0 @@ - - - -Testcase for table + caption vertical margins (bug 478614) - - - - - -
caption
td
-
block
- - diff --git a/layout/reftests/bugs/478614-7.html b/layout/reftests/bugs/478614-7.html deleted file mode 100644 index 625f0054d6b9..000000000000 --- a/layout/reftests/bugs/478614-7.html +++ /dev/null @@ -1,17 +0,0 @@ - - - -Testcase for table + caption vertical margins (bug 478614) - - - - - -
caption
td
-
block
- - diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index a9b152535d5a..6a1b0a38d900 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -143,8 +143,6 @@ random == 99850-1b.html 99850-1-ref.html # bug 471629 == 134706-4.html 134706-4-ref.html == 134706-5.html 134706-5-ref.html == 134706-6.html 134706-6-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == 134706-6b.html 134706-6b-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == 134706-6c.html 134706-6c-ref.html == 134706-7.html 134706-7-ref.html == 139550-1a.html 139550-1-ref.html == 139550-1b.html 139550-1-ref.html @@ -1029,7 +1027,7 @@ asserts(3) != 427017-1.xhtml about:blank # crash test (needs reftest-paged). exi == 427129-scrollframe.html 427129-ref.html == 427129-table.html 427129-ref.html == 427129-image.html 427129-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == 427129-table-caption.html 427129-table-caption-ref.html +== 427129-table-caption.html 427129-table-caption-ref.html fuzzy(0-1,0-60) == 427370-1.html 427370-1-ref.html == 427730-1.html 427730-1-ref.html == 428278.html 428278-ref.html @@ -1144,8 +1142,8 @@ random == 445004-1.html 445004-1-ref.html # bug 472268 == 445142-2b.html 445142-2-ref.html skip-if(winWidget&&isCoverageBuild) fails-if(usesRepeatResampling) fails-if(!useDrawSnapshot&&!winWidget) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),86-87,73-73) == 446100-1a.html about:blank fuzzy-if(winWidget&&isCoverageBuild,178-178,127-127) fails-if(Android) fails-if(usesRepeatResampling) fails-if(!useDrawSnapshot&&!winWidget) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),177-178,127-127) == 446100-1b.html about:blank -skip-if(winWidget&&isCoverageBuild) fuzzy(171-172,192-192) fails-if(!winWidget) fails-if(useDrawSnapshot) == 446100-1c.html about:blank -skip-if(winWidget&&isCoverageBuild) fails-if(usesRepeatResampling) fails-if(!winWidget) fails-if(useDrawSnapshot) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),111-112,212-212) == 446100-1d.html about:blank +skip-if(winWidget&&isCoverageBuild) fuzzy(171-172,192-192) fails-if(!useDrawSnapshot&&!winWidget) == 446100-1c.html about:blank +skip-if(winWidget&&isCoverageBuild) fails-if(usesRepeatResampling) fails-if(!useDrawSnapshot&&!winWidget) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),111-112,212-212) == 446100-1d.html about:blank skip-if(winWidget&&isCoverageBuild) fails-if(usesRepeatResampling) fails-if(!useDrawSnapshot&&!winWidget) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),31-32,35-35) == 446100-1e.html about:blank fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),0-141,0-19) == 446100-1f.html about:blank fails-if(winWidget&&isCoverageBuild) fails-if(usesRepeatResampling) fails-if(Android) fails-if(!useDrawSnapshot&&!winWidget) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu),141-142,19-19) == 446100-1g.html about:blank @@ -1261,8 +1259,6 @@ skip-if(Android) random-if(d2d) == chrome://reftest/content/bugs/478377-1.xhtml == 478614-3.html 478614-3-ref.html == 478614-4.html 478614-4-ref.html == 478614-5.html 478614-5-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == 478614-6.html 478614-6-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == 478614-7.html 478614-7-ref.html == 478811-1.html 478811-1-ref.html == 478811-2.html 478811-2-ref.html == 478811-3.html 478811-3-ref.html @@ -1814,7 +1810,6 @@ fails-if(!useDrawSnapshot) == 1059498-2.html 1059498-1-ref.html # WebRender: see fails-if(!useDrawSnapshot) == 1059498-3.html 1059498-1-ref.html # WebRender: see bug 1499113 == 1062108-1.html 1062108-1-ref.html == 1062792-1.html 1062792-1-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == 1062963-floatmanager-reflow.html 1062963-floatmanager-reflow-ref.html == 1066554-1.html 1066554-1-ref.html == 1069716-1.html 1069716-1-ref.html == 1078262-1.html about:blank # bug 1656792 diff --git a/layout/reftests/css-grid/grid-item-table-stretch-003-ref.html b/layout/reftests/css-grid/grid-item-table-stretch-003-ref.html deleted file mode 100644 index 7ce9eb7d113a..000000000000 --- a/layout/reftests/css-grid/grid-item-table-stretch-003-ref.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Reference: stretching table items that has a side-caption with 'normal' and/or 'stretch' and min/max-size, with Automatic Minimum Size clamping - - - - - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
-
- - - diff --git a/layout/reftests/css-grid/grid-item-table-stretch-003.html b/layout/reftests/css-grid/grid-item-table-stretch-003.html deleted file mode 100644 index 601f026d5658..000000000000 --- a/layout/reftests/css-grid/grid-item-table-stretch-003.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - CSS Grid Test: stretching table items that has a side-caption with 'normal' and/or 'stretch' and min/max-size, with Automatic Minimum Size clamping - - - - - - - -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
-
- - - diff --git a/layout/reftests/css-grid/reftest.list b/layout/reftests/css-grid/reftest.list index 0ea9526355d7..2f90bfd33563 100644 --- a/layout/reftests/css-grid/reftest.list +++ b/layout/reftests/css-grid/reftest.list @@ -125,7 +125,6 @@ fuzzy-if(winWidget,0-1,0-10) == grid-max-sizing-flex-003.html grid-max-sizing-fl == grid-item-button-001.html grid-item-button-001-ref.html == grid-item-table-stretch-001.html grid-item-table-stretch-001-ref.html == grid-item-table-stretch-002.html grid-item-table-stretch-002-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == grid-item-table-stretch-003.html grid-item-table-stretch-003-ref.html == grid-item-table-stretch-004.html grid-item-table-stretch-004-ref.html == grid-item-fieldset-stretch-001.html grid-item-fieldset-stretch-001-ref.html skip-if(Android) == grid-item-video-stretch-001.html grid-item-video-stretch-001-ref.html # Huh, Android doesn't have webm support? diff --git a/layout/reftests/margin-collapsing/reftest.list b/layout/reftests/margin-collapsing/reftest.list index 7a9a69f867d9..29ad50f67abf 100644 --- a/layout/reftests/margin-collapsing/reftest.list +++ b/layout/reftests/margin-collapsing/reftest.list @@ -662,27 +662,14 @@ fuzzy-if(winWidget&&!nativeThemePref,0-4,0-36) == block-overflow-5c-dyn.html blo == table-caption-2a-dyn.html table-caption-2-ref.html == table-caption-2b-dyn.html table-caption-2-ref.html == table-caption-2c-dyn.html table-caption-2-ref.html -# Note: CSS 2.1 suggests that the 'caption-side' values 'top-outside' and -# 'bottom-outside' will be used in a future CSS Module to restore the -# CSS 2 definition of 'top' and 'bottom' (which is different from CSS 2.1's). -# Since Bug #659828 was fixed, 'top-outside' and 'bottom-outside' act as an -# alias for the CSS 2.1 values 'top' and 'bottom' respectively. == table-caption-top-1.html table-caption-top-1-ref.html == table-caption-top-2.html table-caption-top-2-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-top-outside-1.html table-caption-top-1-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-top-outside-2.html table-caption-top-1-ref.html == table-caption-bottom-1.html table-caption-bottom-1-ref.html == table-caption-bottom-2.html table-caption-bottom-2-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-bottom-outside-1.html table-caption-bottom-1-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-bottom-outside-2.html table-caption-bottom-1-ref.html == table-caption-top-1-dyn.html table-caption-top-1-ref.html == table-caption-top-2-dyn.html table-caption-top-1-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-top-outside-1-dyn.html table-caption-top-1-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-top-outside-2-dyn.html table-caption-top-2-ref.html == table-caption-bottom-1-dyn.html table-caption-bottom-1-ref.html == table-caption-bottom-2-dyn.html table-caption-bottom-1-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-bottom-outside-1-dyn.html table-caption-bottom-1-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-bottom-outside-2-dyn.html table-caption-bottom-1-ref.html fails == caption-sibling-1a.html caption-sibling-1-ref.html # Bug 144517 != caption-sibling-1a.html caption-sibling-1-noref.html fails == caption-sibling-1b.html caption-sibling-1-ref.html # Bug 144517 diff --git a/layout/reftests/margin-collapsing/table-caption-bottom-outside-1-dyn.html b/layout/reftests/margin-collapsing/table-caption-bottom-outside-1-dyn.html deleted file mode 100644 index a719d82dae68..000000000000 --- a/layout/reftests/margin-collapsing/table-caption-bottom-outside-1-dyn.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - -
-
-
-
-
-
- - diff --git a/layout/reftests/margin-collapsing/table-caption-bottom-outside-1.html b/layout/reftests/margin-collapsing/table-caption-bottom-outside-1.html deleted file mode 100644 index 5a4c9c7c827e..000000000000 --- a/layout/reftests/margin-collapsing/table-caption-bottom-outside-1.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -
-
-
-
-
-
- - diff --git a/layout/reftests/margin-collapsing/table-caption-bottom-outside-2-dyn.html b/layout/reftests/margin-collapsing/table-caption-bottom-outside-2-dyn.html deleted file mode 100644 index 7ff0b78ee471..000000000000 --- a/layout/reftests/margin-collapsing/table-caption-bottom-outside-2-dyn.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -
-
-
-
-
-
- - diff --git a/layout/reftests/margin-collapsing/table-caption-bottom-outside-2.html b/layout/reftests/margin-collapsing/table-caption-bottom-outside-2.html deleted file mode 100644 index c730424e77b5..000000000000 --- a/layout/reftests/margin-collapsing/table-caption-bottom-outside-2.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - -
-
-
-
-
-
- - diff --git a/layout/reftests/margin-collapsing/table-caption-top-outside-1-dyn.html b/layout/reftests/margin-collapsing/table-caption-top-outside-1-dyn.html deleted file mode 100644 index e386f1949bcb..000000000000 --- a/layout/reftests/margin-collapsing/table-caption-top-outside-1-dyn.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - -
-
-
-
-
-
- - diff --git a/layout/reftests/margin-collapsing/table-caption-top-outside-1.html b/layout/reftests/margin-collapsing/table-caption-top-outside-1.html deleted file mode 100644 index f159d4297248..000000000000 --- a/layout/reftests/margin-collapsing/table-caption-top-outside-1.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -
-
-
-
-
-
- - diff --git a/layout/reftests/margin-collapsing/table-caption-top-outside-2-dyn.html b/layout/reftests/margin-collapsing/table-caption-top-outside-2-dyn.html deleted file mode 100644 index 4a213e776083..000000000000 --- a/layout/reftests/margin-collapsing/table-caption-top-outside-2-dyn.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -
-
-
-
-
-
- - diff --git a/layout/reftests/margin-collapsing/table-caption-top-outside-2.html b/layout/reftests/margin-collapsing/table-caption-top-outside-2.html deleted file mode 100644 index d5516f8c7e1c..000000000000 --- a/layout/reftests/margin-collapsing/table-caption-top-outside-2.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - -
-
-
-
-
-
- - diff --git a/layout/reftests/pagination/reftest.list b/layout/reftests/pagination/reftest.list index 1cb2f3177ed9..34c71335cfc0 100644 --- a/layout/reftests/pagination/reftest.list +++ b/layout/reftests/pagination/reftest.list @@ -63,12 +63,8 @@ fuzzy(0-1,0-23) == resize-reflow-001.html resize-reflow-001.ref.html == table-caption-splitaftercaption-3.html table-caption-splitaftercaption-3-ref.html == table-caption-splitaftercaption-4.html table-caption-splitaftercaption-4-ref.html == table-caption-splitaftercaption-5.html table-caption-splitaftercaption-5-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-splitaftercaption-6.html table-caption-splitaftercaption-6-ref.html -pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-splitaftercaption-7.html table-caption-splitaftercaption-7-ref.html # == table-caption-splitaftercaption-8.html blank.html # bug 672654 # == table-caption-splitaftercaption-9.html blank.html # bug 672654 -# pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-splitaftercaption-10.html blank.html # bug 672654 -# pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-splitaftercaption-11.html blank.html # bug 672654 == table-cell-breaking-1a.html table-cell-breaking-1-ref.html == table-cell-breaking-1b.html table-cell-breaking-1-ref.html == table-cell-breaking-2a.html table-cell-breaking-2-ref.html diff --git a/layout/reftests/pagination/table-caption-splitaftercaption-10.html b/layout/reftests/pagination/table-caption-splitaftercaption-10.html deleted file mode 100644 index 421051bdca9c..000000000000 --- a/layout/reftests/pagination/table-caption-splitaftercaption-10.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - -
- - diff --git a/layout/reftests/pagination/table-caption-splitaftercaption-11.html b/layout/reftests/pagination/table-caption-splitaftercaption-11.html deleted file mode 100644 index f9975aaf6c77..000000000000 --- a/layout/reftests/pagination/table-caption-splitaftercaption-11.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - -
- - diff --git a/layout/reftests/pagination/table-caption-splitaftercaption-6-ref.html b/layout/reftests/pagination/table-caption-splitaftercaption-6-ref.html deleted file mode 100644 index 7f6511fa6bb4..000000000000 --- a/layout/reftests/pagination/table-caption-splitaftercaption-6-ref.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - -
- - - - - - -
- - diff --git a/layout/reftests/pagination/table-caption-splitaftercaption-6.html b/layout/reftests/pagination/table-caption-splitaftercaption-6.html deleted file mode 100644 index 9d83c0b6bb76..000000000000 --- a/layout/reftests/pagination/table-caption-splitaftercaption-6.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - -
- - diff --git a/layout/reftests/pagination/table-caption-splitaftercaption-7-ref.html b/layout/reftests/pagination/table-caption-splitaftercaption-7-ref.html deleted file mode 100644 index b688732995dd..000000000000 --- a/layout/reftests/pagination/table-caption-splitaftercaption-7-ref.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - -
- - - - - - -
- - diff --git a/layout/reftests/pagination/table-caption-splitaftercaption-7.html b/layout/reftests/pagination/table-caption-splitaftercaption-7.html deleted file mode 100644 index d2945969c758..000000000000 --- a/layout/reftests/pagination/table-caption-splitaftercaption-7.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - -
- - diff --git a/layout/reftests/writing-mode/tables/reftest.list b/layout/reftests/writing-mode/tables/reftest.list index df6a7610a7ee..5ba2bf9c0e4d 100644 --- a/layout/reftests/writing-mode/tables/reftest.list +++ b/layout/reftests/writing-mode/tables/reftest.list @@ -75,9 +75,7 @@ fuzzy-if(winWidget,0-48,0-600) fuzzy-if(cocoaWidget,0-19,0-97) == wm-row-progres fuzzy-if(winWidget,0-48,0-600) fuzzy-if(cocoaWidget,0-19,0-97) == wm-row-progression-007.xht multicol-count-002-ref.xht fuzzy-if(Android,0-255,0-38) == table-caption-top-1.html table-caption-top-1-ref.html -fuzzy-if(Android,0-255,0-38) pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-bottom-1.html table-caption-bottom-1-ref.html -fuzzy-if(Android,0-244,0-27) pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-left-1.html table-caption-left-1-ref.html -fuzzy-if(Android,0-244,0-27) pref(layout.css.caption-side-non-standard.enabled,true) == table-caption-right-1.html table-caption-right-1-ref.html +fuzzy-if(Android,0-255,0-38) == table-caption-bottom-1.html table-caption-bottom-1-ref.html == border-collapse-bevels-1a.html border-collapse-bevels-1-ref.html fuzzy-if(cocoaWidget,0-23,0-162) == border-collapse-bevels-1b.html border-collapse-bevels-1-ref.html diff --git a/layout/reftests/writing-mode/tables/table-caption-left-1-ref.html b/layout/reftests/writing-mode/tables/table-caption-left-1-ref.html deleted file mode 100644 index 4e4f38a7248d..000000000000 --- a/layout/reftests/writing-mode/tables/table-caption-left-1-ref.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - -
-
table caption
-
-
- -
-
table caption
-
-
- -
-
table caption
-
-
- -
-
table caption
-
-
- -
-
table caption
-
-
- -
-
table caption
-
-
diff --git a/layout/reftests/writing-mode/tables/table-caption-left-1.html b/layout/reftests/writing-mode/tables/table-caption-left-1.html deleted file mode 100644 index 1096bcaeb3d2..000000000000 --- a/layout/reftests/writing-mode/tables/table-caption-left-1.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - -
table caption
- - - - -
table caption
- - - - -
table caption
- - - - -
table caption
- - - - -
table caption
- - - - -
table caption
diff --git a/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html b/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html deleted file mode 100644 index 7bbe52488635..000000000000 --- a/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - -
-
-
table caption
-
- -
-
-
table caption
-
- -
-
-
table caption
-
- -
-
-
table caption
-
- -
-
-
table caption
-
- -
-
-
table caption
-
diff --git a/layout/reftests/writing-mode/tables/table-caption-right-1.html b/layout/reftests/writing-mode/tables/table-caption-right-1.html deleted file mode 100644 index e6a4cd7347ba..000000000000 --- a/layout/reftests/writing-mode/tables/table-caption-right-1.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - -
table caption
- - - - -
table caption
- - - - -
table caption
- - - - -
table caption
- - - - -
table caption
- - - - -
table caption
diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 90d2c5709ab3..a14931ca651e 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -5080,7 +5080,7 @@ var gCSSProperties = { type: CSS_TYPE_LONGHAND, initial_values: ["top"], other_values: ["bottom"], - invalid_values: [], + invalid_values: ["right", "left", "top-outside", "bottom-outside"], }, "caret-color": { domProp: "caretColor", @@ -11631,22 +11631,6 @@ function get_computed_value(cs, property) { return cs.getPropertyValue(property); } -const kNonStandardCaptionSideValues = [ - "right", - "left", - "top-outside", - "bottom-outside", -]; -if (IsCSSPropertyPrefEnabled("layout.css.caption-side-non-standard.enabled")) { - gCSSProperties["caption-side"].other_values.push( - ...kNonStandardCaptionSideValues - ); -} else { - gCSSProperties["caption-side"].invalid_values.push( - ...kNonStandardCaptionSideValues - ); -} - { const mozHiddenUnscrollableEnabled = IsCSSPropertyPrefEnabled( "layout.css.overflow-moz-hidden-unscrollable.enabled" diff --git a/layout/tables/nsTableWrapperFrame.cpp b/layout/tables/nsTableWrapperFrame.cpp index ff7ef03cc0b4..9f1aab02a8a2 100644 --- a/layout/tables/nsTableWrapperFrame.cpp +++ b/layout/tables/nsTableWrapperFrame.cpp @@ -5,6 +5,7 @@ #include "nsTableWrapperFrame.h" +#include "LayoutConstants.h" #include "mozilla/ComputedStyle.h" #include "mozilla/PresShell.h" #include "nsFrameManager.h" @@ -159,12 +160,6 @@ void nsTableWrapperFrame::RemoveFrame(ChildListID aListID, // The inner frame can't be removed so this should be the caption MOZ_ASSERT(FrameChildListID::Caption == aListID, "can't remove inner frame"); - if (HasSideCaption()) { - // The old caption isize had an effect on the inner table isize, so - // we're going to need to reflow it. Mark it dirty - InnerTableFrame()->MarkSubtreeDirty(); - } - // Remove the frame and destroy it mCaptionFrames.DestroyFrame(aOldFrame); @@ -260,12 +255,8 @@ nscoord nsTableWrapperFrame::GetMinISize(gfxContext* aRenderingContext) { nscoord capISize = nsLayoutUtils::IntrinsicForContainer( aRenderingContext, mCaptionFrames.FirstChild(), IntrinsicISizeType::MinISize); - if (HasSideCaption()) { - iSize += capISize; - } else { - if (capISize > iSize) { - iSize = capISize; - } + if (capISize > iSize) { + iSize = capISize; } } return iSize; @@ -278,33 +269,12 @@ nscoord nsTableWrapperFrame::GetPrefISize(gfxContext* aRenderingContext) { maxISize = nsLayoutUtils::IntrinsicForContainer( aRenderingContext, InnerTableFrame(), IntrinsicISizeType::PrefISize); - if (Maybe captionSide = GetCaptionSide()) { - switch (*captionSide) { - case StyleCaptionSide::Left: - case StyleCaptionSide::Right: { - nscoord capMin = nsLayoutUtils::IntrinsicForContainer( - aRenderingContext, mCaptionFrames.FirstChild(), - IntrinsicISizeType::MinISize); - maxISize += capMin; - } break; - default: { - IntrinsicISizeType iwt; - if (*captionSide == StyleCaptionSide::Top || - *captionSide == StyleCaptionSide::Bottom) { - // Don't let the caption's pref isize expand the table's pref - // isize. - iwt = IntrinsicISizeType::MinISize; - } else { - MOZ_ASSERT(*captionSide == StyleCaptionSide::TopOutside || - *captionSide == StyleCaptionSide::BottomOutside, - "unexpected caption side"); - iwt = IntrinsicISizeType::PrefISize; - } - nscoord capPref = nsLayoutUtils::IntrinsicForContainer( - aRenderingContext, mCaptionFrames.FirstChild(), iwt); - maxISize = std::max(maxISize, capPref); - } break; - } + if (mCaptionFrames.NotEmpty()) { + // Don't let the caption's pref isize expand the table's pref isize. + const nscoord capMinISize = nsLayoutUtils::IntrinsicForContainer( + aRenderingContext, mCaptionFrames.FirstChild(), + IntrinsicISizeType::MinISize); + maxISize = std::max(maxISize, capMinISize); } return maxISize; } @@ -340,9 +310,8 @@ LogicalSize nsTableWrapperFrame::InnerTableShrinkWrapSize( // be applied to the inner table directly, so we don't need to subtract // caption-area when preparing innerOverrides for // nsTableFrame::ComputeSize(). - const LogicalSize areaOccupiedByCaption(aWM); StyleSizeOverrides innerOverrides = ComputeSizeOverridesForInnerTable( - aTableFrame, aSizeOverrides, bpSize, areaOccupiedByCaption); + aTableFrame, aSizeOverrides, bpSize, /* aBSizeOccupiedByCaption = */ 0); auto size = aTableFrame ->ComputeSize(aRenderingContext, aWM, aCBSize, aAvailableISize, @@ -389,8 +358,7 @@ StyleSize nsTableWrapperFrame::ReduceStyleSizeBy( StyleSizeOverrides nsTableWrapperFrame::ComputeSizeOverridesForInnerTable( const nsTableFrame* aTableFrame, const StyleSizeOverrides& aWrapperSizeOverrides, - const LogicalSize& aBorderPadding, - const LogicalSize& aAreaOccupiedByCaption) const { + const LogicalSize& aBorderPadding, nscoord aBSizeOccupiedByCaption) const { if (aWrapperSizeOverrides.mApplyOverridesVerbatim || !aWrapperSizeOverrides.HasAnyLengthOverrides()) { // We are asked to apply the size overrides directly to the inner table, or @@ -399,7 +367,7 @@ StyleSizeOverrides nsTableWrapperFrame::ComputeSizeOverridesForInnerTable( } const auto wm = aTableFrame->GetWritingMode(); - LogicalSize areaOccupied = aAreaOccupiedByCaption; + LogicalSize areaOccupied(wm, 0, aBSizeOccupiedByCaption); if (aTableFrame->StylePosition()->mBoxSizing == StyleBoxSizing::Content) { // If the inner table frame has 'box-sizing: content', enlarge the occupied // area by adding border & padding because they should also be subtracted @@ -486,65 +454,26 @@ LogicalSize nsTableWrapperFrame::ComputeAutoSize( } } - // Match the availableISize logic in Reflow. + // Match the logic in Reflow() that sets aside space for the caption. Maybe captionSide = GetCaptionSide(); - // The result.ISize() is unconditionally set to a meaningful value in the - // logic that follows, but the unconstrained BSize() value might be used for - // cases where either BSize is indeed unconstrained). - LogicalSize result(aWM, 0, NS_UNCONSTRAINEDSIZE); + const LogicalSize innerTableSize = InnerTableShrinkWrapSize( + aRenderingContext, InnerTableFrame(), aWM, aCBSize, kidAvailableISize, + aSizeOverrides, flags); if (!captionSide) { - result = InnerTableShrinkWrapSize(aRenderingContext, InnerTableFrame(), aWM, - aCBSize, kidAvailableISize, - aSizeOverrides, flags); - } else if (*captionSide == StyleCaptionSide::Left || - *captionSide == StyleCaptionSide::Right) { - const LogicalSize captionSize = - CaptionShrinkWrapSize(aRenderingContext, mCaptionFrames.FirstChild(), - aWM, aCBSize, kidAvailableISize, flags); - const LogicalSize innerTableSize = InnerTableShrinkWrapSize( - aRenderingContext, InnerTableFrame(), aWM, aCBSize, - kidAvailableISize - captionSize.ISize(aWM), aSizeOverrides, flags); - - result.ISize(aWM) = captionSize.ISize(aWM) + innerTableSize.ISize(aWM); - if (captionSize.BSize(aWM) != NS_UNCONSTRAINEDSIZE && - innerTableSize.BSize(aWM) != NS_UNCONSTRAINEDSIZE) { - result.BSize(aWM) = - std::max(captionSize.BSize(aWM), innerTableSize.BSize(aWM)); - } - } else if (*captionSide == StyleCaptionSide::Top || - *captionSide == StyleCaptionSide::Bottom) { - const LogicalSize innerTableSize = InnerTableShrinkWrapSize( - aRenderingContext, InnerTableFrame(), aWM, aCBSize, kidAvailableISize, - aSizeOverrides, flags); - const LogicalSize captionSize = - CaptionShrinkWrapSize(aRenderingContext, mCaptionFrames.FirstChild(), - aWM, aCBSize, innerTableSize.ISize(aWM), flags); - result.ISize(aWM) = - std::max(innerTableSize.ISize(aWM), captionSize.ISize(aWM)); - if (innerTableSize.BSize(aWM) != NS_UNCONSTRAINEDSIZE && - captionSize.BSize(aWM) != NS_UNCONSTRAINEDSIZE) { - result.BSize(aWM) = innerTableSize.BSize(aWM) + captionSize.BSize(aWM); - } - } else { - MOZ_ASSERT(*captionSide == StyleCaptionSide::TopOutside || - *captionSide == StyleCaptionSide::BottomOutside, - "unexpected caption-side"); - const LogicalSize innerTableSize = InnerTableShrinkWrapSize( - aRenderingContext, InnerTableFrame(), aWM, aCBSize, kidAvailableISize, - aSizeOverrides, flags); - const LogicalSize captionSize = - CaptionShrinkWrapSize(aRenderingContext, mCaptionFrames.FirstChild(), - aWM, aCBSize, kidAvailableISize, flags); - result.ISize(aWM) = - std::max(innerTableSize.ISize(aWM), captionSize.ISize(aWM)); - if (innerTableSize.BSize(aWM) != NS_UNCONSTRAINEDSIZE && - captionSize.BSize(aWM) != NS_UNCONSTRAINEDSIZE) { - result.BSize(aWM) = innerTableSize.BSize(aWM) + captionSize.BSize(aWM); - } + return innerTableSize; } - - return result; + const LogicalSize captionSize = + CaptionShrinkWrapSize(aRenderingContext, mCaptionFrames.FirstChild(), aWM, + aCBSize, innerTableSize.ISize(aWM), flags); + const nscoord iSize = + std::max(innerTableSize.ISize(aWM), captionSize.ISize(aWM)); + nscoord bSize = NS_UNCONSTRAINEDSIZE; + if (innerTableSize.BSize(aWM) != NS_UNCONSTRAINEDSIZE && + captionSize.BSize(aWM) != NS_UNCONSTRAINEDSIZE) { + bSize = innerTableSize.BSize(aWM) + captionSize.BSize(aWM); + } + return LogicalSize(aWM, iSize, bSize); } Maybe nsTableWrapperFrame::GetCaptionSide() const { @@ -563,29 +492,10 @@ nscoord nsTableWrapperFrame::ComputeFinalBSize( const MaybeCaptionSide& aCaptionSide, const LogicalSize& aInnerSize, const LogicalSize& aCaptionSize, const LogicalMargin& aCaptionMargin, const WritingMode aWM) const { - nscoord bSize = aInnerSize.BSize(aWM); - - // compute the overall block-size - if (aCaptionSide) { - switch (*aCaptionSide) { - case StyleCaptionSide::Top: - case StyleCaptionSide::TopOutside: - case StyleCaptionSide::Bottom: - case StyleCaptionSide::BottomOutside: - bSize = aInnerSize.BSize(aWM) + - std::max( - 0, aCaptionSize.BSize(aWM) + aCaptionMargin.BStartEnd(aWM)); - break; - case StyleCaptionSide::Left: - case StyleCaptionSide::Right: - bSize = std::max(aInnerSize.BSize(aWM), - aCaptionSize.BSize(aWM) + aCaptionMargin.BEnd(aWM)); - break; - } - } - // negative sizes can upset overflow-area code - return std::max(bSize, 0); + return std::max(0, aInnerSize.BSize(aWM) + + std::max(0, aCaptionSize.BSize(aWM) + + aCaptionMargin.BStartEnd(aWM))); } nsresult nsTableWrapperFrame::GetCaptionOrigin( @@ -608,45 +518,13 @@ nsresult nsTableWrapperFrame::GetCaptionOrigin( NS_AUTOMARGIN != aCaptionMargin.BEnd(aWM), "The computed caption margin is auto?"); - // inline-dir computation - switch (aCaptionSide) { - case StyleCaptionSide::Top: - case StyleCaptionSide::TopOutside: - case StyleCaptionSide::Bottom: - case StyleCaptionSide::BottomOutside: - aOrigin.I(aWM) = aCaptionMargin.IStart(aWM); - break; - case StyleCaptionSide::Left: - case StyleCaptionSide::Right: - aOrigin.I(aWM) = aCaptionMargin.IStart(aWM); - if (aWM.IsBidiLTR() == (aCaptionSide == StyleCaptionSide::Right)) { - aOrigin.I(aWM) += aInnerSize.ISize(aWM); - } - break; - } + aOrigin.I(aWM) = aCaptionMargin.IStart(aWM); + // block-dir computation switch (aCaptionSide) { - case StyleCaptionSide::Right: - case StyleCaptionSide::Left: - aOrigin.B(aWM) = 0; - switch (GetCaptionVerticalAlign()) { - case StyleVerticalAlignKeyword::Middle: - aOrigin.B(aWM) = std::max( - 0, (aInnerSize.BSize(aWM) - aCaptionSize.BSize(aWM)) / 2); - break; - case StyleVerticalAlignKeyword::Bottom: - aOrigin.B(aWM) = - std::max(0, aInnerSize.BSize(aWM) - aCaptionSize.BSize(aWM)); - break; - default: - break; - } - break; - case StyleCaptionSide::BottomOutside: case StyleCaptionSide::Bottom: aOrigin.B(aWM) = aInnerSize.BSize(aWM) + aCaptionMargin.BStart(aWM); break; - case StyleCaptionSide::TopOutside: case StyleCaptionSide::Top: aOrigin.B(aWM) = aCaptionMargin.BStart(aWM); break; @@ -670,40 +548,12 @@ nsresult nsTableWrapperFrame::GetInnerOrigin( return NS_OK; } - nscoord minCapISize = aCaptionSize.ISize(aWM) + aCaptionMargin.IStartEnd(aWM); - - // inline-dir computation - if (aCaptionSide && IsSideCaption(*aCaptionSide)) { - aOrigin.I(aWM) = - (aWM.IsBidiLTR() == (*aCaptionSide == StyleCaptionSide::Left)) - ? minCapISize - : 0; - } - // block-dir computation if (aCaptionSide) { switch (*aCaptionSide) { case StyleCaptionSide::Bottom: - case StyleCaptionSide::BottomOutside: // Leave at zero. break; - case StyleCaptionSide::Left: - case StyleCaptionSide::Right: - switch (GetCaptionVerticalAlign()) { - case StyleVerticalAlignKeyword::Middle: - aOrigin.B(aWM) = std::max( - 0, (aCaptionSize.BSize(aWM) - aInnerSize.BSize(aWM)) / 2); - break; - case StyleVerticalAlignKeyword::Bottom: - aOrigin.B(aWM) = - std::max(0, aCaptionSize.BSize(aWM) - aInnerSize.BSize(aWM)); - break; - default: - // Leave at zero. - break; - } - break; - case StyleCaptionSide::TopOutside: case StyleCaptionSide::Top: aOrigin.B(aWM) = aCaptionSize.BSize(aWM) + aCaptionMargin.BStartEnd(aWM); @@ -713,44 +563,18 @@ nsresult nsTableWrapperFrame::GetInnerOrigin( return NS_OK; } -LogicalSize nsTableWrapperFrame::GetAreaOccupiedByCaption( - StyleCaptionSide aCaptionSide, - const mozilla::LogicalSize& aCaptionMarginBoxSize) const { - const WritingMode wm = GetWritingMode(); - LogicalSize area(wm); - - switch (aCaptionSide) { - case StyleCaptionSide::Top: - case StyleCaptionSide::Bottom: - case StyleCaptionSide::TopOutside: - case StyleCaptionSide::BottomOutside: - area.BSize(wm) = aCaptionMarginBoxSize.BSize(wm); - break; - case StyleCaptionSide::Left: - case StyleCaptionSide::Right: - area.ISize(wm) = aCaptionMarginBoxSize.ISize(wm); - break; - } - - return area; -} - void nsTableWrapperFrame::CreateReflowInputForInnerTable( nsPresContext* aPresContext, nsTableFrame* aTableFrame, const ReflowInput& aOuterRI, Maybe& aChildRI, - const nscoord aAvailISize, - const Maybe& aAreaOccupiedByCaption) const { + const nscoord aAvailISize, nscoord aBSizeOccupiedByCaption) const { MOZ_ASSERT(InnerTableFrame() == aTableFrame); const WritingMode wm = aTableFrame->GetWritingMode(); - const LogicalSize areaOccupiedByCaption = - aAreaOccupiedByCaption ? *aAreaOccupiedByCaption : LogicalSize(wm); - // If we have a caption occupied our content-box area, reduce the available // block-size by the amount. nscoord availBSize = aOuterRI.AvailableBSize(); if (availBSize != NS_UNCONSTRAINEDSIZE) { - availBSize = std::max(0, availBSize - areaOccupiedByCaption.BSize(wm)); + availBSize = std::max(0, availBSize - aBSizeOccupiedByCaption); } const LogicalSize availSize(wm, aAvailISize, availBSize); @@ -765,11 +589,10 @@ void nsTableWrapperFrame::CreateReflowInputForInnerTable( // by the table wrapper, so we need to get our margin from aOuterRI. if (IsGridItem()) { const LogicalMargin margin = aOuterRI.ComputedLogicalMargin(wm); - cbSize->ISize(wm) = std::max(0, cbSize->ISize(wm) - margin.IStartEnd(wm) - - areaOccupiedByCaption.ISize(wm)); + cbSize->ISize(wm) = std::max(0, cbSize->ISize(wm) - margin.IStartEnd(wm)); if (cbSize->BSize(wm) != NS_UNCONSTRAINEDSIZE) { cbSize->BSize(wm) = std::max(0, cbSize->BSize(wm) - margin.BStartEnd(wm) - - areaOccupiedByCaption.BSize(wm)); + aBSizeOccupiedByCaption); } } @@ -800,7 +623,7 @@ void nsTableWrapperFrame::CreateReflowInputForInnerTable( StyleSizeOverrides innerOverrides = ComputeSizeOverridesForInnerTable( aTableFrame, aOuterRI.mStyleSizeOverrides, borderPadding->Size(wm), - areaOccupiedByCaption); + aBSizeOccupiedByCaption); aChildRI.emplace(aPresContext, aOuterRI, aTableFrame, availSize, Nothing(), ReflowInput::InitFlag::CallerWillInit, innerOverrides); @@ -824,8 +647,7 @@ void nsTableWrapperFrame::CreateReflowInputForCaption( // See if we need to reset mIsTopOfPage flag. if (aChildRI->mFlags.mIsTopOfPage) { if (auto captionSide = GetCaptionSide()) { - if (*captionSide == StyleCaptionSide::Bottom || - *captionSide == StyleCaptionSide::BottomOutside) { + if (*captionSide == StyleCaptionSide::Bottom) { aChildRI->mFlags.mIsTopOfPage = false; } } @@ -908,62 +730,32 @@ void nsTableWrapperFrame::Reflow(nsPresContext* aPresContext, MOZ_ASSERT(mCaptionFrames.NotEmpty() == captionSide.isSome()); - if (!captionSide) { - // We don't have a caption. - CreateReflowInputForInnerTable(aPresContext, InnerTableFrame(), aOuterRI, - innerRI, contentBoxISize); - } else if (*captionSide == StyleCaptionSide::Left || - *captionSide == StyleCaptionSide::Right) { - // ComputeAutoSize takes care of making side captions small. Compute - // the caption's size first, and tell the table to fit in what's left. - CreateReflowInputForCaption(aPresContext, mCaptionFrames.FirstChild(), - aOuterRI, captionRI, contentBoxISize); - captionWM = captionRI->GetWritingMode(); - nscoord innerAvailISize = - contentBoxISize - - captionRI->ComputedSizeWithMarginBorderPadding(wm).ISize(wm); - CreateReflowInputForInnerTable(aPresContext, InnerTableFrame(), aOuterRI, - innerRI, innerAvailISize); - } else if (*captionSide == StyleCaptionSide::Top || - *captionSide == StyleCaptionSide::Bottom) { - // Compute the table's size first, and then prevent the caption from - // being larger in the inline dir unless it has to be. - // - // Note that CSS 2.1 (but not 2.0) says: - // The width of the anonymous box is the border-edge width of the - // table box inside it - // We don't actually make our anonymous box that isize (if we did, - // it would break 'auto' margins), but this effectively does that. - CreateReflowInputForInnerTable(aPresContext, InnerTableFrame(), aOuterRI, - innerRI, contentBoxISize); - // It's good that CSS 2.1 says not to include margins, since we - // can't, since they already been converted so they exactly - // fill the available isize (ignoring the margin on one side if - // neither are auto). (We take advantage of that later when we call - // GetCaptionOrigin, though.) + // Compute the table's size first, and then prevent the caption from + // being larger in the inline dir unless it has to be. + // + // Note that CSS 2.1 (but not 2.0) says: + // The width of the anonymous box is the border-edge width of the + // table box inside it + // We don't actually make our anonymous box that isize (if we did, + // it would break 'auto' margins), but this effectively does that. + CreateReflowInputForInnerTable(aPresContext, InnerTableFrame(), aOuterRI, + innerRI, contentBoxISize); + if (captionSide) { + // It's good that CSS 2.1 says not to include margins, since we can't, since + // they already been converted so they exactly fill the available isize + // (ignoring the margin on one side if neither are auto). (We take + // advantage of that later when we call GetCaptionOrigin, though.) nscoord innerBorderISize = innerRI->ComputedSizeWithBorderPadding(wm).ISize(wm); CreateReflowInputForCaption(aPresContext, mCaptionFrames.FirstChild(), aOuterRI, captionRI, innerBorderISize); captionWM = captionRI->GetWritingMode(); - } else { - MOZ_ASSERT(*captionSide == StyleCaptionSide::TopOutside || - *captionSide == StyleCaptionSide::BottomOutside, - "unexpected caption-side"); - // Size the table and the caption independently. - captionWM = mCaptionFrames.FirstChild()->GetWritingMode(); - CreateReflowInputForCaption( - aPresContext, mCaptionFrames.FirstChild(), aOuterRI, captionRI, - aOuterRI.ComputedSize(captionWM).ISize(captionWM)); - CreateReflowInputForInnerTable(aPresContext, InnerTableFrame(), aOuterRI, - innerRI, contentBoxISize); } // First reflow the caption. Maybe captionMet; LogicalSize captionSize(wm); LogicalMargin captionMargin(wm); - Maybe areaOccupiedByCaption; if (captionSide) { captionMet.emplace(wm); // We intentionally don't merge capStatus into aStatus, since we currently @@ -973,16 +765,15 @@ void nsTableWrapperFrame::Reflow(nsPresContext* aPresContext, *captionMet, capStatus); captionSize = captionMet->Size(wm); captionMargin = captionRI->ComputedLogicalMargin(wm); - areaOccupiedByCaption.emplace(GetAreaOccupiedByCaption( - *captionSide, captionSize + captionMargin.Size(wm))); - - if (!areaOccupiedByCaption->IsAllZero()) { + nscoord bSizeOccupiedByCaption = + captionSize.BSize(wm) + captionMargin.BStartEnd(wm); + if (bSizeOccupiedByCaption) { // Reset the inner table's ReflowInput to reduce various sizes because of // the area occupied by caption. innerRI.reset(); CreateReflowInputForInnerTable(aPresContext, InnerTableFrame(), aOuterRI, innerRI, contentBoxISize, - areaOccupiedByCaption); + bSizeOccupiedByCaption); } } diff --git a/layout/tables/nsTableWrapperFrame.h b/layout/tables/nsTableWrapperFrame.h index 8e3f56c3f35e..23899bc240f5 100644 --- a/layout/tables/nsTableWrapperFrame.h +++ b/layout/tables/nsTableWrapperFrame.h @@ -200,16 +200,6 @@ class nsTableWrapperFrame : public nsContainerFrame { // having "physical" names.) MaybeCaptionSide GetCaptionSide() const; - bool HasSideCaption() const { - auto captionSide = GetCaptionSide(); - return captionSide && IsSideCaption(*captionSide); - } - - static bool IsSideCaption(const mozilla::StyleCaptionSide aCaptionSide) { - return aCaptionSide == mozilla::StyleCaptionSide::Left || - aCaptionSide == mozilla::StyleCaptionSide::Right; - } - mozilla::StyleVerticalAlignKeyword GetCaptionVerticalAlign() const; nscoord ComputeFinalBSize(const MaybeCaptionSide&, @@ -234,26 +224,15 @@ class nsTableWrapperFrame : public nsContainerFrame { mozilla::LogicalPoint& aOrigin, mozilla::WritingMode aWM); - // Returns the area occupied by the caption within our content box depending - // on the caption side. - // - // @param aCaptionMarginBoxSize the caption's margin-box size in our - // writing-mode. - mozilla::LogicalSize GetAreaOccupiedByCaption( - mozilla::StyleCaptionSide, - const mozilla::LogicalSize& aCaptionMarginBoxSize) const; - // Create and init the child reflow input, using passed-in aChildRI, so that // caller can use it after we return. // - // @param aAreaOccupiedByCaption the value computed by - // GetAreaOccupiedByCaption() if we have a caption. + // @param aBSizeOccupiedByCaption the block size occupied by the caption + // within our content box. void CreateReflowInputForInnerTable( nsPresContext* aPresContext, nsTableFrame* aTableFrame, const ReflowInput& aOuterRI, Maybe& aChildRI, - const nscoord aAvailISize, - const mozilla::Maybe& aAreaOccupiedByCaption = - mozilla::Nothing()) const; + const nscoord aAvailISize, nscoord aBSizeOccupiedByCaption = 0) const; void CreateReflowInputForCaption(nsPresContext* aPresContext, nsIFrame* aCaptionFrame, const ReflowInput& aOuterRI, @@ -310,7 +289,7 @@ class nsTableWrapperFrame : public nsContainerFrame { const nsTableFrame* aTableFrame, const mozilla::StyleSizeOverrides& aWrapperSizeOverrides, const mozilla::LogicalSize& aBorderPadding, - const mozilla::LogicalSize& aAreaOccupiedByCaption) const; + nscoord aBSizeOccupiedByCaption) const; private: nscoord GetFallbackLogicalBaseline(mozilla::WritingMode aWritingMode) const; diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 06677611064d..d64a0d64b94a 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -8007,13 +8007,6 @@ value: -1 mirror: always -# Whether non-standard caption-side values are enabled -- name: layout.css.caption-side-non-standard.enabled - type: RelaxedAtomicBool - value: false - mirror: always - rust: true - # Whether @layer is enabled - name: layout.css.cascade-layers.enabled type: RelaxedAtomicBool diff --git a/servo/components/style/values/specified/table.rs b/servo/components/style/values/specified/table.rs index 81f3414e8f61..88f917ac78de 100644 --- a/servo/components/style/values/specified/table.rs +++ b/servo/components/style/values/specified/table.rs @@ -8,15 +8,9 @@ /// /// Note that despite having "physical" names, these are actually interpreted /// according to the table's writing-mode: Top and Bottom are treated as -/// block-start and -end respectively, and Left and Right are treated as -/// line-start and -end. +/// block-start and -end respectively. /// /// https://drafts.csswg.org/css-tables/#propdef-caption-side -#[cfg(feature = "gecko")] -fn caption_side_non_standard_enabled(_: &crate::parser::ParserContext) -> bool { - static_prefs::pref!("layout.css.caption-side-non-standard.enabled") -} - #[allow(missing_docs)] #[derive( Clone, @@ -39,16 +33,4 @@ fn caption_side_non_standard_enabled(_: &crate::parser::ParserContext) -> bool { pub enum CaptionSide { Top, Bottom, - #[cfg(feature = "gecko")] - #[parse(condition = "caption_side_non_standard_enabled")] - Right, - #[cfg(feature = "gecko")] - #[parse(condition = "caption_side_non_standard_enabled")] - Left, - #[cfg(feature = "gecko")] - #[parse(condition = "caption_side_non_standard_enabled")] - TopOutside, - #[cfg(feature = "gecko")] - #[parse(condition = "caption_side_non_standard_enabled")] - BottomOutside, } diff --git a/testing/web-platform/meta/css/css-tables/floats/floats-wrap-bfc-006b.xht.ini b/testing/web-platform/meta/css/css-tables/floats/floats-wrap-bfc-006b.xht.ini deleted file mode 100644 index 961a4eff99f3..000000000000 --- a/testing/web-platform/meta/css/css-tables/floats/floats-wrap-bfc-006b.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[floats-wrap-bfc-006b.xht] - prefs: [layout.css.caption-side-non-standard.enabled:true] diff --git a/testing/web-platform/meta/css/css-tables/floats/floats-wrap-bfc-006c.xht.ini b/testing/web-platform/meta/css/css-tables/floats/floats-wrap-bfc-006c.xht.ini deleted file mode 100644 index af1345b96b77..000000000000 --- a/testing/web-platform/meta/css/css-tables/floats/floats-wrap-bfc-006c.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[floats-wrap-bfc-006c.xht] - prefs: [layout.css.caption-side-non-standard.enabled:true] diff --git a/testing/web-platform/tests/css/css-tables/floats/floats-wrap-bfc-006b.xht b/testing/web-platform/tests/css/css-tables/floats/floats-wrap-bfc-006b.xht deleted file mode 100644 index 664edbd129e6..000000000000 --- a/testing/web-platform/tests/css/css-tables/floats/floats-wrap-bfc-006b.xht +++ /dev/null @@ -1,63 +0,0 @@ - - CSS Test: Test for flow around floats - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
Caption
Cell
-
- - - - diff --git a/testing/web-platform/tests/css/css-tables/floats/floats-wrap-bfc-006c.xht b/testing/web-platform/tests/css/css-tables/floats/floats-wrap-bfc-006c.xht deleted file mode 100644 index 88593468f925..000000000000 --- a/testing/web-platform/tests/css/css-tables/floats/floats-wrap-bfc-006c.xht +++ /dev/null @@ -1,63 +0,0 @@ - - CSS Test: Test for flow around floats - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - -
Caption
Cell
-
- - - -