From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../tentative/rowspan-height-redistribution.html | 503 +++++++++++++++++++++ 1 file changed, 503 insertions(+) create mode 100644 testing/web-platform/tests/css/css-tables/tentative/rowspan-height-redistribution.html (limited to 'testing/web-platform/tests/css/css-tables/tentative/rowspan-height-redistribution.html') diff --git a/testing/web-platform/tests/css/css-tables/tentative/rowspan-height-redistribution.html b/testing/web-platform/tests/css/css-tables/tentative/rowspan-height-redistribution.html new file mode 100644 index 0000000000..364ae321c9 --- /dev/null +++ b/testing/web-platform/tests/css/css-tables/tentative/rowspan-height-redistribution.html @@ -0,0 +1,503 @@ + +ROWSPAN redistribution + + + + + + + + +
+

ROWSPAN > 1 to row distribution

+

The algorithm has not been standardized. This is my understanding of how it works.

+
    +
  1. rowspan>1 TDs are sorted:
  2. +
      +
    1. If TD span the same rows, taller TD is distributed first.
    2. +
    3. If one TD is fully enclosed by another, inner TD is distributed first.
    4. +
    5. Otherwise, higher TD is distributed first.
    6. +
    +
  3. Each rowspan>1 TD's height is distributed as following
  4. +
      +
    1. rowspan > 1 TDs have height TDh, span N rows. N rows have total height of Rh. TDh - Rh height, Dh, must be distributed as follows.
    2. +
    3. If percentage resolution size is available (this happens when redistributiong table/section height), percentage rows grow to their percentage size, proportional to (percentage size - current size). Dh shrinks by distributed height. Justification: explicit percentage rows should grow to their percentage.
    4. +
    5. Rows that originate rowspan>1 cells get all the Dh height, distributed evenly. Justification: rowspan>1 rows are likely to need to grow later. If there are multiple rowspan>1 cells, there can be multiple originating rows.
    6. +
    7. Unconstrained non-empty rows grow, proportional to their existing height.
    8. +
    9. If all rows are empty, last row gets all the height. Justification: ???
    10. +
    11. Contstrained rows grow in proportion to current height.
    12. +
    +
+

It is unclear what the existing ChromeLegacy/FF algorithms do for distribution over rowspan>1 and empty cells. FF special cases "there is no cell originating in the row with owspan=1 and there are at least 2 cells spanning the row. Chrome Legacy also tries to do something similar, but they disagree on what. TablesNG will try to ship without special cases.

+

Safari fails most of these tests

+

Color scheme

+ + + + + + + + + + + + + + + + + + + + + + + +
odd rows are yellow
even rows are orange
inner divs have a green gradient
+
row
row
row
row
+

Unconstrained rows

+

Rows whose height is not fixed or percent are unconstrained.

+

Unconstrained rows +Unconstrained rows are redistributed proportionally. Rows are constrained if their height is fixed, or percent.

+ + + + + + + + + +
0,0
0,1
+ +

Unconstrained rows with zero height do not grow.

+ + + + + + + + + + + +
0,0
0,2
+ +

rowspan>1 is zero height, spanned rows have height.

+ + + + + + + + + + + + + + + +
1,0
2,0
+ +

Unconstrained rows are redistributed proportionally to heights

+ + + + + + + + + +
0,0
0,1
+ +

Fixed rows

+ +

Constrained fixed rows +do not grow if there are unconstrained ones

+

Edge grows constrained rows too

+ + + + + + + + + +
0,0 30px
0,1
+ +

Constrained fixed rows +grow proportionally to their size if there are no unconstrained rows

+ + + + + + + + + + + + +
20
20
40
+ +

Percent rows

+ +

Constrained percent rows +grow like unconstrained ones when percent resolution size is undefined.

+

FF always treats percent rows as constrained. Chrome legacy does resolve percentage against final height of the table. I do not think that can work. Edge follows NG.

+ + + + + + + + + + +
0,0 30%
0,1
100px
+ + +

Percent rows with zero height +do not grow.

+

Legacy Chrome has a strange gap between rows

+ + + + + + + + + + + +
0,0
2,0
+ +

Order of rowspan distribution

+ + +

If cells span the same rows, bigger cell is distributed first +Not sure how to test this, I think it is just an optimization, there is no observable effect. +

FF and Legacy Chrome unexpectedly distribute height evenly between rows in the first test case. Edge and TablesNG do not.

+ + + + + + + + + + + + + +
bottombottom
+ + + + + + + + + + + + + + + + +
bottombottom
+ + + + + + + + + + +
bottombottom
+ + +

If one cell is fully enclosed by another, inner cell wins. +

Not in Edge

+ + + + + + + + + + + +
+ +

First row wins. +rowspan-4 distributes 50 to last empty row, row3. rowspan-3 distributes 100px to only nonempty row, row3. +

Edge disagrees here.

+ + + + + + + + + + + + + +
+ +

Rowspan distribution over empty rows.

+ +

Rowspans that span non-existent rows +Span is truncated so only existing rows are spanned.

+ + + + + + + + + + + + + + + + +
0,0
rowspan 5
1,0
body 2
+ +

Rowspan spans only empty rows +Last spanned row gets all the height. +

Edge distributes height to all empty rows, not just last.

+ + + + + + + + + + + + + + + +
first row
last row
+ +

TD is not considered empty if it has padding, but no content + + + + + + + + + + + + + +
first row
last row
+ +

row with an empty tall cell is not considered empty. +

+ + + + + + + + + + + + + + +
rowspan
+ +

Empty rows with border-spacing big enough for rowspan cell +rows are 0 height, cell spans the entire table. + + + + + + + +
+ +

row with a non-empty rowspan>0 cell is empty. +Distributes to all rows except start row? +

+ + + + + + + + + + + + + +
rowspan
rowspan
+ + + + + + + + + + + +
rowspan
yo
+ + +

Distribution over rowspan > 1 rows +Distribution over rowspan > 1 rows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

Distribution of table height over rowspan > 1 rows +If there are any unconstrained non-empty rows, they get it. +When all rows are empty, last row takes it

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

Distribution of rowspan over percentage rows +Percentage rows are considered empty if they cannot resolve

+ + + + + + + + + + + + + +
+ +
+ -- cgit v1.2.3