Closed Bug 1676565 Opened 2 years ago Closed 2 years ago

Add flex item fragmentation reftests for vertical writing-mode

Categories

(Core :: Layout: Flexbox, task)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(4 files)

We have flex item fragmentation reftests in
https://searchfox.org/mozilla-central/rev/02cb78667e87ccc42fea5edc6f3f2dd2edd6ecd5/layout/reftests/flexbox/pagination/reftest.list#43-96

We should add the same set of reftests but in writing-mode: vertical-lr and writing-mode: vertical-rl.

This reftest is not in reftest.list nor does it have a reference file.
Let's remove it.

Part 3 is going to duplicate all the fragmentation reftests, and add
"writing-mode: vertical-lr" to them. If any of the physical property is
missed the conversion, we'll know when running the them.

This patch is generated by running the following script under
layout/reftests/flexbox/pagination.

#!/usr/bin/env bash

function rename() {
    rg -l "$1" flexbox-single-* flexbox-multi* | xargs sed -i "s/$1/$2/g"
}

rename "margin-top" "margin-block-start"
rename "margin-bottom" "margin-block-end"
rename "border-width: 10px 0" "border-block-width: 10px"
rename "border: solid white" "border: 0 solid white"
rename "border-width: 15px 0" "border-block-width: 15px"
rename "padding: 5px 0" "padding-block: 5px"
rename "padding: 15px 0" "padding-block: 15px"
rename "top:" "inset-block-start:"
rename "left:" "inset-inline-start:"

# Rename properties containing 'width' or 'Height' to something else temporarily.
rename "border-width" "border-XXX"
rename "border-block-width" "border-block-XXX"
rename "column-width" "column-XXX"
rename "offsetHeight" "offsetYYY"

rename "width" "inline-size"
rename "height" "block-size"
rename "Height" "Block-size"

# Switch them back.
rename "XXX" "width"
rename "YYY" "Height"

Depends on D96739

First, copy the original reftests, then running the following command to
add writing-mode: vertical-lr to all the reftests.

rg -l "<style>" flexbox-*vertical-lr*  | xargs sed -i "s/<style>/<style>\n  html \{\n    writing-mode: vertical-lr;\n  \}/g"

reftest.list are modified manually.

Depends on D96740

First, copy the "vertical-lr" reftests added in Part 3, then running the
following command to convert to writing-mode: vertical-rl for all the
reftests.

rg -l "vertical-lr" flexbox-*vertical-rl*  | xargs sed -i "s/vertical-lr/vertical-rl/g"

reftest.list are modified manually.

Depends on D96741

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9ab0b2a43963
Part 1 - Remove flexbox-multicol-vert-empty-2.html. r=emilio
https://hg.mozilla.org/integration/autoland/rev/f2c568389a40
Part 2 - Convert flex item fragmentation reftests to use logical properties. r=emilio
https://hg.mozilla.org/integration/autoland/rev/8843edd4832b
Part 3 - Add flex item fragmentation reftests for "writing-mode: vertical-lr". r=emilio
https://hg.mozilla.org/integration/autoland/rev/cfcf871c7731
Part 4 - Add flex item fragmentation reftests for "writing-mode: vertical-rl". r=emilio
You need to log in before you can comment on or make changes to this bug.