From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../web-platform/tests/css/css-logical/META.yml | 3 + .../tests/css/css-logical/animation-001.html | 335 +++++++++++++++++++++ .../tests/css/css-logical/animation-002.html | 226 ++++++++++++++ .../css/css-logical/animation-003.tentative.html | 37 +++ .../tests/css/css-logical/animation-004.html | 284 +++++++++++++++++ .../animations/caption-side-no-interpolation.html | 15 + .../animations/float-interpolation.html | 24 ++ .../tests/css/css-logical/cascading-001-ref.html | 39 +++ .../tests/css/css-logical/cascading-001.html | 57 ++++ .../css/css-logical/getComputedStyle-listing.html | 106 +++++++ .../tests/css/css-logical/inheritance.html | 95 ++++++ .../css/css-logical/logical-box-border-color.html | 15 + .../css/css-logical/logical-box-border-radius.html | 18 ++ .../css-logical/logical-box-border-shorthands.html | 15 + .../css/css-logical/logical-box-border-style.html | 15 + .../css/css-logical/logical-box-border-width.html | 18 ++ .../tests/css/css-logical/logical-box-inset.html | 18 ++ .../tests/css/css-logical/logical-box-margin.html | 15 + .../tests/css/css-logical/logical-box-padding.html | 15 + .../tests/css/css-logical/logical-box-size.html | 17 ++ .../css-logical/logical-values-float-clear-1.html | 39 +++ .../css-logical/logical-values-float-clear-2.html | 40 +++ .../css-logical/logical-values-float-clear-3.html | 39 +++ .../css-logical/logical-values-float-clear-4.html | 40 +++ .../logical-values-float-clear-reftest.html | 68 +++++ .../css-logical/logical-values-float-clear.html | 17 ++ .../css/css-logical/logical-values-resize.html | 15 + .../css-logical/logicalprops-block-size-vlr.html | 122 ++++++++ .../css/css-logical/logicalprops-block-size.html | 123 ++++++++ .../css-logical/logicalprops-inline-size-vlr.html | 122 ++++++++ .../css/css-logical/logicalprops-inline-size.html | 119 ++++++++ .../css/css-logical/logicalprops-quirklength.html | 36 +++ .../logicalprops-with-deferred-writing-mode.html | 175 +++++++++++ .../css-logical/logicalprops-with-variables.html | 69 +++++ .../css-logical/parsing/block-size-computed.html | 44 +++ .../css-logical/parsing/block-size-invalid.html | 29 ++ .../css/css-logical/parsing/block-size-valid.html | 28 ++ .../parsing/border-block-color-computed.html | 31 ++ .../parsing/border-block-color-invalid.html | 31 ++ .../parsing/border-block-color-valid.html | 23 ++ .../parsing/border-block-style-computed.html | 30 ++ .../parsing/border-block-style-invalid.html | 22 ++ .../parsing/border-block-style-valid.html | 30 ++ .../css-logical/parsing/border-block-valid.html | 25 ++ .../parsing/border-block-width-computed.html | 76 +++++ .../parsing/border-block-width-invalid.html | 25 ++ .../parsing/border-block-width-valid.html | 27 ++ .../parsing/border-inline-color-computed.html | 31 ++ .../parsing/border-inline-color-invalid.html | 31 ++ .../parsing/border-inline-color-valid.html | 23 ++ .../parsing/border-inline-style-computed.html | 30 ++ .../parsing/border-inline-style-invalid.html | 22 ++ .../parsing/border-inline-style-valid.html | 30 ++ .../css-logical/parsing/border-inline-valid.html | 25 ++ .../parsing/border-inline-width-computed.html | 76 +++++ .../parsing/border-inline-width-invalid.html | 25 ++ .../parsing/border-inline-width-valid.html | 27 ++ .../css-logical/parsing/inline-size-computed.html | 44 +++ .../css-logical/parsing/inline-size-invalid.html | 29 ++ .../css/css-logical/parsing/inline-size-valid.html | 28 ++ .../parsing/inset-block-inline-computed.html | 35 +++ .../parsing/inset-block-inline-invalid.html | 25 ++ .../parsing/inset-block-inline-shorthand.html | 35 +++ .../parsing/inset-block-inline-valid.html | 30 ++ .../css/css-logical/parsing/inset-computed.html | 33 ++ .../css/css-logical/parsing/inset-invalid.html | 19 ++ .../css/css-logical/parsing/inset-shorthand.html | 43 +++ .../tests/css/css-logical/parsing/inset-valid.html | 27 ++ .../parsing/margin-block-inline-computed.html | 49 +++ .../parsing/margin-block-inline-invalid.html | 25 ++ .../parsing/margin-block-inline-shorthand.html | 35 +++ .../parsing/margin-block-inline-valid.html | 32 ++ .../parsing/max-block-size-computed.html | 32 ++ .../parsing/max-block-size-invalid.html | 29 ++ .../css-logical/parsing/max-block-size-valid.html | 28 ++ .../parsing/max-inline-size-computed.html | 32 ++ .../parsing/max-inline-size-invalid.html | 29 ++ .../css-logical/parsing/max-inline-size-valid.html | 28 ++ .../parsing/min-block-size-computed.html | 47 +++ .../parsing/min-block-size-invalid.html | 29 ++ .../css-logical/parsing/min-block-size-valid.html | 28 ++ .../parsing/min-inline-size-computed.html | 47 +++ .../parsing/min-inline-size-invalid.html | 29 ++ .../css-logical/parsing/min-inline-size-valid.html | 28 ++ .../parsing/padding-block-inline-computed.html | 54 ++++ .../parsing/padding-block-inline-invalid.html | 35 +++ .../parsing/padding-block-inline-shorthand.html | 35 +++ .../parsing/padding-block-inline-valid.html | 27 ++ .../logical-values-float-clear-1-ref.html | 36 +++ .../logical-values-float-clear-2-ref.html | 37 +++ .../logical-values-float-clear-3-ref.html | 38 +++ .../logical-values-float-clear-4-ref.html | 39 +++ .../logical-values-float-clear-reftest-ref.html | 68 +++++ .../css-logical/resources/test-box-properties.js | 297 ++++++++++++++++++ .../css-logical/resources/test-logical-values.js | 27 ++ .../tests/css/css-logical/resources/test-shared.js | 112 +++++++ 96 files changed, 4812 insertions(+) create mode 100644 testing/web-platform/tests/css/css-logical/META.yml create mode 100644 testing/web-platform/tests/css/css-logical/animation-001.html create mode 100644 testing/web-platform/tests/css/css-logical/animation-002.html create mode 100644 testing/web-platform/tests/css/css-logical/animation-003.tentative.html create mode 100644 testing/web-platform/tests/css/css-logical/animation-004.html create mode 100644 testing/web-platform/tests/css/css-logical/animations/caption-side-no-interpolation.html create mode 100644 testing/web-platform/tests/css/css-logical/animations/float-interpolation.html create mode 100644 testing/web-platform/tests/css/css-logical/cascading-001-ref.html create mode 100644 testing/web-platform/tests/css/css-logical/cascading-001.html create mode 100644 testing/web-platform/tests/css/css-logical/getComputedStyle-listing.html create mode 100644 testing/web-platform/tests/css/css-logical/inheritance.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-border-color.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-border-radius.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-border-shorthands.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-border-style.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-border-width.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-inset.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-margin.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-padding.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-box-size.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-values-float-clear-1.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-values-float-clear-2.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-values-float-clear-3.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-values-float-clear-4.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-values-float-clear-reftest.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-values-float-clear.html create mode 100644 testing/web-platform/tests/css/css-logical/logical-values-resize.html create mode 100644 testing/web-platform/tests/css/css-logical/logicalprops-block-size-vlr.html create mode 100644 testing/web-platform/tests/css/css-logical/logicalprops-block-size.html create mode 100644 testing/web-platform/tests/css/css-logical/logicalprops-inline-size-vlr.html create mode 100644 testing/web-platform/tests/css/css-logical/logicalprops-inline-size.html create mode 100644 testing/web-platform/tests/css/css-logical/logicalprops-quirklength.html create mode 100644 testing/web-platform/tests/css/css-logical/logicalprops-with-deferred-writing-mode.html create mode 100644 testing/web-platform/tests/css/css-logical/logicalprops-with-variables.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/block-size-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/block-size-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/block-size-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-color-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-color-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-color-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-style-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-style-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-style-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-width-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-width-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-block-width-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-color-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-color-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-color-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-style-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-style-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-style-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-width-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-width-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/border-inline-width-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inline-size-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inline-size-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inline-size-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-shorthand.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inset-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inset-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inset-shorthand.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/inset-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-shorthand.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/max-block-size-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/max-block-size-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/max-block-size-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/max-inline-size-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/max-inline-size-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/max-inline-size-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/min-block-size-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/min-block-size-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/min-block-size-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/min-inline-size-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/min-inline-size-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/min-inline-size-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-computed.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-invalid.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-shorthand.html create mode 100644 testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-valid.html create mode 100644 testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-1-ref.html create mode 100644 testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-2-ref.html create mode 100644 testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-3-ref.html create mode 100644 testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-4-ref.html create mode 100644 testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-reftest-ref.html create mode 100644 testing/web-platform/tests/css/css-logical/resources/test-box-properties.js create mode 100644 testing/web-platform/tests/css/css-logical/resources/test-logical-values.js create mode 100644 testing/web-platform/tests/css/css-logical/resources/test-shared.js (limited to 'testing/web-platform/tests/css/css-logical') diff --git a/testing/web-platform/tests/css/css-logical/META.yml b/testing/web-platform/tests/css/css-logical/META.yml new file mode 100644 index 0000000000..cf789d631b --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/META.yml @@ -0,0 +1,3 @@ +spec: https://drafts.csswg.org/css-logical/ +suggested_reviewers: + - fantasai diff --git a/testing/web-platform/tests/css/css-logical/animation-001.html b/testing/web-platform/tests/css/css-logical/animation-001.html new file mode 100644 index 0000000000..71542022c9 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/animation-001.html @@ -0,0 +1,335 @@ + + +Animating CSS logical properties using Web Animations + + + + + + + +
+ diff --git a/testing/web-platform/tests/css/css-logical/animation-002.html b/testing/web-platform/tests/css/css-logical/animation-002.html new file mode 100644 index 0000000000..9213a05d83 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/animation-002.html @@ -0,0 +1,226 @@ + + +Animating CSS logical properties using CSS Animations + + + + + + +
+ diff --git a/testing/web-platform/tests/css/css-logical/animation-003.tentative.html b/testing/web-platform/tests/css/css-logical/animation-003.tentative.html new file mode 100644 index 0000000000..bcb4e15d80 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/animation-003.tentative.html @@ -0,0 +1,37 @@ + + +Animating CSS logical properties using CSS Animations - Web Animations reflection + + + + + + +
+ diff --git a/testing/web-platform/tests/css/css-logical/animation-004.html b/testing/web-platform/tests/css/css-logical/animation-004.html new file mode 100644 index 0000000000..c1bed63872 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/animation-004.html @@ -0,0 +1,284 @@ + + +Animating CSS logical properties using CSS Transitions + + + + + + +
+
+ diff --git a/testing/web-platform/tests/css/css-logical/animations/caption-side-no-interpolation.html b/testing/web-platform/tests/css/css-logical/animations/caption-side-no-interpolation.html new file mode 100644 index 0000000000..2eef093e46 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/animations/caption-side-no-interpolation.html @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/animations/float-interpolation.html b/testing/web-platform/tests/css/css-logical/animations/float-interpolation.html new file mode 100644 index 0000000000..c067f2f03c --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/animations/float-interpolation.html @@ -0,0 +1,24 @@ + + +float interpolation + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/cascading-001-ref.html b/testing/web-platform/tests/css/css-logical/cascading-001-ref.html new file mode 100644 index 0000000000..79a432c455 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/cascading-001-ref.html @@ -0,0 +1,39 @@ + + + + + CSS Logical Properties Cascading Reference + + + + +

Test passes if there are two vertical blue boxes followed by two horizontal blue boxes.

+ +

+

+

+

+ + diff --git a/testing/web-platform/tests/css/css-logical/cascading-001.html b/testing/web-platform/tests/css/css-logical/cascading-001.html new file mode 100644 index 0000000000..61399a8330 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/cascading-001.html @@ -0,0 +1,57 @@ + + + + + CSS Logical Properties: "A computed value that has logical and physical properties is determined by applying the CSS cascade to declarations of both." + + + + + + + +

Test passes if there are two vertical blue boxes followed by two horizontal blue boxes.

+

+

+

+

+ + diff --git a/testing/web-platform/tests/css/css-logical/getComputedStyle-listing.html b/testing/web-platform/tests/css/css-logical/getComputedStyle-listing.html new file mode 100644 index 0000000000..5970bcea63 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/getComputedStyle-listing.html @@ -0,0 +1,106 @@ + + +CSS Logical Properties: computed style listing + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/inheritance.html b/testing/web-platform/tests/css/css-logical/inheritance.html new file mode 100644 index 0000000000..5546a20d6c --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/inheritance.html @@ -0,0 +1,95 @@ + + + + +Inheritance of CSS Logical Properties and Values properties + + + + + + + + +
+
+
+
+
+
+ + + + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-border-color.html b/testing/web-platform/tests/css/css-logical/logical-box-border-color.html new file mode 100644 index 0000000000..b33528d9cd --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-border-color.html @@ -0,0 +1,15 @@ + + +CSS Logical Properties: Flow-Relative Border Colors + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-border-radius.html b/testing/web-platform/tests/css/css-logical/logical-box-border-radius.html new file mode 100644 index 0000000000..81b8fa0fec --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-border-radius.html @@ -0,0 +1,18 @@ + + +CSS Logical Properties: flow-relative border-radius + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-border-shorthands.html b/testing/web-platform/tests/css/css-logical/logical-box-border-shorthands.html new file mode 100644 index 0000000000..d05d864f59 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-border-shorthands.html @@ -0,0 +1,15 @@ + + +CSS Logical Properties: Flow-Relative Border Shorthands + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-border-style.html b/testing/web-platform/tests/css/css-logical/logical-box-border-style.html new file mode 100644 index 0000000000..448499ddaa --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-border-style.html @@ -0,0 +1,15 @@ + + +CSS Logical Properties: Flow-Relative Border Styles + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-border-width.html b/testing/web-platform/tests/css/css-logical/logical-box-border-width.html new file mode 100644 index 0000000000..d7cac485b5 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-border-width.html @@ -0,0 +1,18 @@ + + +CSS Logical Properties: Flow-Relative Border Widths + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-inset.html b/testing/web-platform/tests/css/css-logical/logical-box-inset.html new file mode 100644 index 0000000000..8587d79ed9 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-inset.html @@ -0,0 +1,18 @@ + + +CSS Logical Properties: Flow-Relative Offsets + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-margin.html b/testing/web-platform/tests/css/css-logical/logical-box-margin.html new file mode 100644 index 0000000000..86240f96a6 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-margin.html @@ -0,0 +1,15 @@ + + +CSS Logical Properties: Flow-Relative Margins + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-padding.html b/testing/web-platform/tests/css/css-logical/logical-box-padding.html new file mode 100644 index 0000000000..f96f02757c --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-padding.html @@ -0,0 +1,15 @@ + + +CSS Logical Properties: Flow-Relative Padding + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-box-size.html b/testing/web-platform/tests/css/css-logical/logical-box-size.html new file mode 100644 index 0000000000..f90346b839 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-box-size.html @@ -0,0 +1,17 @@ + + +CSS Logical Properties: Flow-Relative Sizing + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-values-float-clear-1.html b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-1.html new file mode 100644 index 0000000000..d7f37fffdd --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-1.html @@ -0,0 +1,39 @@ + + + + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. +
Inline-start
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. +
Inline-end
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +
+ +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. +
Inline-start
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. +
Inline-end
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +
diff --git a/testing/web-platform/tests/css/css-logical/logical-values-float-clear-2.html b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-2.html new file mode 100644 index 0000000000..f5af837595 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-2.html @@ -0,0 +1,40 @@ + + + + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. +
Inline-start
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. +
Inline-end
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +
+ +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. +
Inline-start
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. +
Inline-end
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +
diff --git a/testing/web-platform/tests/css/css-logical/logical-values-float-clear-3.html b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-3.html new file mode 100644 index 0000000000..b49711b7b2 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-3.html @@ -0,0 +1,39 @@ + + + + + + + +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start

+
+ +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end

+
+ +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start

+
+ +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end

+
diff --git a/testing/web-platform/tests/css/css-logical/logical-values-float-clear-4.html b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-4.html new file mode 100644 index 0000000000..d585d38bf3 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-4.html @@ -0,0 +1,40 @@ + + + + + + + +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start

+
+ +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end

+
+ +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start

+
+ +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end

+
diff --git a/testing/web-platform/tests/css/css-logical/logical-values-float-clear-reftest.html b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-reftest.html new file mode 100644 index 0000000000..c0fe9a52bc --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-values-float-clear-reftest.html @@ -0,0 +1,68 @@ + + +CSS Logical Values: Flow-Relative Values for the 'float' property + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/logical-values-float-clear.html b/testing/web-platform/tests/css/css-logical/logical-values-float-clear.html new file mode 100644 index 0000000000..e82765809f --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-values-float-clear.html @@ -0,0 +1,17 @@ + + +CSS Logical Values: Flow-Relative Values for the 'float' and 'clear' Properties + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logical-values-resize.html b/testing/web-platform/tests/css/css-logical/logical-values-resize.html new file mode 100644 index 0000000000..3be65dacf9 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logical-values-resize.html @@ -0,0 +1,15 @@ + + +CSS Logical Values: Flow-Relative Values for the 'resize' Property + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-logical/logicalprops-block-size-vlr.html b/testing/web-platform/tests/css/css-logical/logicalprops-block-size-vlr.html new file mode 100644 index 0000000000..da02e759d8 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logicalprops-block-size-vlr.html @@ -0,0 +1,122 @@ + + +CSS Logical Properties: {max-,min-}block-size vertical-lr + + + + + + + + + +
+ +

Maximum and minimim block sizes in blocks with vertical-lr

+
+

block-size < min-block-size

+
+ +

min-block-size < block-sizemax-block-size

+
+ +

block-size > max-block-size

+
+
+ +

Overridance of width and block-size in vertical-lr

+
+

Check that width overrides block-size

+
+ +

Check that block-size overrides width

+
+
+ +

Maximum and minimim block sizes in table cells with vertical-lr

+
+

block-size < min-block-size

+
+
+
+ +

min-block-size < block-sizemax-block-size

+
+
+
+ +

block-size > max-block-size

+
+
+
+
+ + diff --git a/testing/web-platform/tests/css/css-logical/logicalprops-block-size.html b/testing/web-platform/tests/css/css-logical/logicalprops-block-size.html new file mode 100644 index 0000000000..8d90c07a98 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logicalprops-block-size.html @@ -0,0 +1,123 @@ + + +CSS Logical Properties: {max-,min-}block-size + + + + + + + + + +
+ +

Maximum and minimim block sizes in blocks

+
+

block-size < min-block-size

+
+ +

min-block-size < block-sizemax-block-size

+
+ +

block-size > max-block-size

+
+
+ +

Overridance of height and block-size

+
+

Check that height overrides block-size

+
+ +

Check that block-size overrides height

+
+
+ +

Maximum and minimim block sizes in table cells

+
+

block-size < min-block-size

+
+
+
+ +

min-block-size < block-sizemax-block-size

+
+
+
+ +

block-size > max-block-size

+
+
+
+
+ + diff --git a/testing/web-platform/tests/css/css-logical/logicalprops-inline-size-vlr.html b/testing/web-platform/tests/css/css-logical/logicalprops-inline-size-vlr.html new file mode 100644 index 0000000000..0a53dbbc5c --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logicalprops-inline-size-vlr.html @@ -0,0 +1,122 @@ + + +CSS Logical Properties: {max-,min-}inline-size vertical-lr + + + + + + + + + +
+ +

Maximum and minimim inline sizes in blocks with vertical-lr

+
+

inline-size < min-inline-size

+
+ +

min-inline-size < inline-sizemax-inline-size

+
+ +

inline-size > max-inline-size

+
+
+ +

Overridance of height and inline-size in vertical-lr

+
+

Check that height overrides inline-size

+
+ +

Check that inline-size overrides height

+
+
+ +

Maximum and minimim inline sizes in table cells with vertical-lr

+
+

inline-size < min-inline-size

+
+
+
+ +

min-inline-size < inline-sizemax-inline-size

+
+
+
+ +

inline-size > max-inline-size

+
+
+
+
+ + diff --git a/testing/web-platform/tests/css/css-logical/logicalprops-inline-size.html b/testing/web-platform/tests/css/css-logical/logicalprops-inline-size.html new file mode 100644 index 0000000000..3ec169924a --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logicalprops-inline-size.html @@ -0,0 +1,119 @@ + + +CSS Logical Properties: {max-,min-}inline-size + + + + + + + + + +
+ +

Maximum and minimim inline sizes in blocks

+
+

inline-size < min-inline-size

+
+ +

min-inline-size < inline-sizemax-inline-size

+
+ +

inline-size > max-inline-size

+
+
+ +

Overridance of width and inline-size

+
+

Check that width overrides inline-size

+
+ +

Check that inline-size overrides width

+
+
+ +

Maximum and minimim inline sizes in table cells

+
+

inline-size < min-inline-size

+
+
+
+ +

min-inline-size < inline-sizemax-inline-size

+
+
+
+ +

inline-size > max-inline-size

+
+
+
+
+ + diff --git a/testing/web-platform/tests/css/css-logical/logicalprops-quirklength.html b/testing/web-platform/tests/css/css-logical/logicalprops-quirklength.html new file mode 100644 index 0000000000..3e133db880 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logicalprops-quirklength.html @@ -0,0 +1,36 @@ + +CSS Logical Properties + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/logicalprops-with-deferred-writing-mode.html b/testing/web-platform/tests/css/css-logical/logicalprops-with-deferred-writing-mode.html new file mode 100644 index 0000000000..a213d375bd --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logicalprops-with-deferred-writing-mode.html @@ -0,0 +1,175 @@ + + +Logical properties with deferred <code>writing-mode</code> + + + + + + +
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-logical/logicalprops-with-variables.html b/testing/web-platform/tests/css/css-logical/logicalprops-with-variables.html new file mode 100644 index 0000000000..fc52495bc0 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/logicalprops-with-variables.html @@ -0,0 +1,69 @@ + + +Logical properties with <code>var()</code> + + + + +
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/block-size-computed.html b/testing/web-platform/tests/css/css-logical/parsing/block-size-computed.html new file mode 100644 index 0000000000..de3a3c2a0c --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/block-size-computed.html @@ -0,0 +1,44 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().blockSize + + + + + + + + +
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/block-size-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/block-size-invalid.html new file mode 100644 index 0000000000..37d8890773 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/block-size-invalid.html @@ -0,0 +1,29 @@ + + + + +CSS Logical Properties and Values: parsing block-size with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/block-size-valid.html b/testing/web-platform/tests/css/css-logical/parsing/block-size-valid.html new file mode 100644 index 0000000000..47170e48f1 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/block-size-valid.html @@ -0,0 +1,28 @@ + + + + +CSS Logical Properties and Values: parsing block-size with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-color-computed.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-color-computed.html new file mode 100644 index 0000000000..24a745f5fe --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-color-computed.html @@ -0,0 +1,31 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderBlockColor + + + + + + + +
+
+ + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-color-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-color-invalid.html new file mode 100644 index 0000000000..1c25f125fe --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-color-invalid.html @@ -0,0 +1,31 @@ + + + + +CSS Logical Properties and Values: parsing border-block-color with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-color-valid.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-color-valid.html new file mode 100644 index 0000000000..aefe0f268b --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-color-valid.html @@ -0,0 +1,23 @@ + + + + +CSS Logical Properties and Values: parsing border-block-color with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-style-computed.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-style-computed.html new file mode 100644 index 0000000000..9cd8a252b2 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-style-computed.html @@ -0,0 +1,30 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderBlockStyle + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-style-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-style-invalid.html new file mode 100644 index 0000000000..680e510aae --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-style-invalid.html @@ -0,0 +1,22 @@ + + + + +CSS Logical Properties and Values: parsing border-block-style with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-style-valid.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-style-valid.html new file mode 100644 index 0000000000..860a1052b8 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-style-valid.html @@ -0,0 +1,30 @@ + + + + +CSS Logical Properties and Values: parsing border-block-style with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-valid.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-valid.html new file mode 100644 index 0000000000..68c9797c0f --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-valid.html @@ -0,0 +1,25 @@ + + + + +CSS Logical Properties and Values: parsing border-block with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-width-computed.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-width-computed.html new file mode 100644 index 0000000000..66b0cb7c60 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-width-computed.html @@ -0,0 +1,76 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderBlockWidth + + + + + + + +
+
+ + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-width-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-width-invalid.html new file mode 100644 index 0000000000..65990fe930 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-width-invalid.html @@ -0,0 +1,25 @@ + + + + +CSS Logical Properties and Values: parsing border-block-width with invalid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-block-width-valid.html b/testing/web-platform/tests/css/css-logical/parsing/border-block-width-valid.html new file mode 100644 index 0000000000..03b02a2566 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-block-width-valid.html @@ -0,0 +1,27 @@ + + + + +CSS Logical Properties and Values: parsing border-block-width with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-computed.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-computed.html new file mode 100644 index 0000000000..106a4f48e4 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-computed.html @@ -0,0 +1,31 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderInlineColor + + + + + + + +
+
+ + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-invalid.html new file mode 100644 index 0000000000..f0070c787b --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-invalid.html @@ -0,0 +1,31 @@ + + + + +CSS Logical Properties and Values: parsing border-inline-color with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-valid.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-valid.html new file mode 100644 index 0000000000..6bf240006e --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-color-valid.html @@ -0,0 +1,23 @@ + + + + +CSS Logical Properties and Values: parsing border-inline-color with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-computed.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-computed.html new file mode 100644 index 0000000000..0ba858a685 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-computed.html @@ -0,0 +1,30 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderInlineStyle + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-invalid.html new file mode 100644 index 0000000000..6684dc19ec --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-invalid.html @@ -0,0 +1,22 @@ + + + + +CSS Logical Properties and Values: parsing border-inline-style with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-valid.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-valid.html new file mode 100644 index 0000000000..4fd0cbbb09 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-style-valid.html @@ -0,0 +1,30 @@ + + + + +CSS Logical Properties and Values: parsing border-inline-style with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-valid.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-valid.html new file mode 100644 index 0000000000..be29783acf --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-valid.html @@ -0,0 +1,25 @@ + + + + +CSS Logical Properties and Values: parsing border-inline with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-computed.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-computed.html new file mode 100644 index 0000000000..03b71f0386 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-computed.html @@ -0,0 +1,76 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderInlineWidth + + + + + + + +
+
+ + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-invalid.html new file mode 100644 index 0000000000..8624fcf0fe --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-invalid.html @@ -0,0 +1,25 @@ + + + + +CSS Logical Properties and Values: parsing border-inline-width with invalid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-valid.html b/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-valid.html new file mode 100644 index 0000000000..81c7049c5e --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/border-inline-width-valid.html @@ -0,0 +1,27 @@ + + + + +CSS Logical Properties and Values: parsing border-inline-width with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inline-size-computed.html b/testing/web-platform/tests/css/css-logical/parsing/inline-size-computed.html new file mode 100644 index 0000000000..0f60165a34 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inline-size-computed.html @@ -0,0 +1,44 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().inlineSize + + + + + + + + +
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inline-size-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/inline-size-invalid.html new file mode 100644 index 0000000000..d3d5d3f84d --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inline-size-invalid.html @@ -0,0 +1,29 @@ + + + + +CSS Logical Properties and Values: parsing inline-size with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inline-size-valid.html b/testing/web-platform/tests/css/css-logical/parsing/inline-size-valid.html new file mode 100644 index 0000000000..e785b468cd --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inline-size-valid.html @@ -0,0 +1,28 @@ + + + + +CSS Logical Properties and Values: parsing inline-size with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-computed.html b/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-computed.html new file mode 100644 index 0000000000..d18e97dfc3 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-computed.html @@ -0,0 +1,35 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().insetBlock / insetInline + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-invalid.html new file mode 100644 index 0000000000..fe073f852e --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-invalid.html @@ -0,0 +1,25 @@ + + + + +CSS Logical Properties and Values: parsing inset-block and inset-inline with invalid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-shorthand.html b/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-shorthand.html new file mode 100644 index 0000000000..c089c2a0d8 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-shorthand.html @@ -0,0 +1,35 @@ + + + + +CSS Logical Properties and Values: inset-block and inset-inline set longhands + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-valid.html b/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-valid.html new file mode 100644 index 0000000000..b08975251d --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inset-block-inline-valid.html @@ -0,0 +1,30 @@ + + + + +CSS Logical Properties and Values: parsing inset-block and inset-inline with valid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inset-computed.html b/testing/web-platform/tests/css/css-logical/parsing/inset-computed.html new file mode 100644 index 0000000000..8a08830bd4 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inset-computed.html @@ -0,0 +1,33 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().inset + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inset-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/inset-invalid.html new file mode 100644 index 0000000000..604b801c76 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inset-invalid.html @@ -0,0 +1,19 @@ + + + + +CSS Logical Properties and Values: parsing inset with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inset-shorthand.html b/testing/web-platform/tests/css/css-logical/parsing/inset-shorthand.html new file mode 100644 index 0000000000..4557879129 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inset-shorthand.html @@ -0,0 +1,43 @@ + + + + +CSS Logical Properties and Values: inset sets longhands + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/inset-valid.html b/testing/web-platform/tests/css/css-logical/parsing/inset-valid.html new file mode 100644 index 0000000000..2d8f937f07 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/inset-valid.html @@ -0,0 +1,27 @@ + + + + +CSS Logical Properties and Values: parsing inset with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-computed.html b/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-computed.html new file mode 100644 index 0000000000..6ef52bda3b --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-computed.html @@ -0,0 +1,49 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().marginBlockStart etc. + + + + + + + + + +
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-invalid.html new file mode 100644 index 0000000000..a1e0cbf388 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-invalid.html @@ -0,0 +1,25 @@ + + + + +CSS Logical Properties and Values: parsing margin-block and margin-inline with invalid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-shorthand.html b/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-shorthand.html new file mode 100644 index 0000000000..9cdae57402 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-shorthand.html @@ -0,0 +1,35 @@ + + + + +CSS Logical Properties and Values: margin-block and margin-inline sets longhands + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-valid.html b/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-valid.html new file mode 100644 index 0000000000..4a278f9034 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/margin-block-inline-valid.html @@ -0,0 +1,32 @@ + + + + +CSS Logical Properties and Values: parsing margin-block and margin-inline with valid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/max-block-size-computed.html b/testing/web-platform/tests/css/css-logical/parsing/max-block-size-computed.html new file mode 100644 index 0000000000..12764d3ea6 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/max-block-size-computed.html @@ -0,0 +1,32 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().maxBlockSize + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/max-block-size-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/max-block-size-invalid.html new file mode 100644 index 0000000000..adcf6e497e --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/max-block-size-invalid.html @@ -0,0 +1,29 @@ + + + + +CSS Logical Properties and Values: parsing max-block-size with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/max-block-size-valid.html b/testing/web-platform/tests/css/css-logical/parsing/max-block-size-valid.html new file mode 100644 index 0000000000..75b5c6f549 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/max-block-size-valid.html @@ -0,0 +1,28 @@ + + + + +CSS Logical Properties and Values: parsing max-block-size with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-computed.html b/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-computed.html new file mode 100644 index 0000000000..693262f250 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-computed.html @@ -0,0 +1,32 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().maxInlineSize + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-invalid.html new file mode 100644 index 0000000000..fa695551b2 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-invalid.html @@ -0,0 +1,29 @@ + + + + +CSS Logical Properties and Values: parsing max-inline-size with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-valid.html b/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-valid.html new file mode 100644 index 0000000000..19d582962d --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/max-inline-size-valid.html @@ -0,0 +1,28 @@ + + + + +CSS Logical Properties and Values: parsing max-inline-size with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/min-block-size-computed.html b/testing/web-platform/tests/css/css-logical/parsing/min-block-size-computed.html new file mode 100644 index 0000000000..7c59eb5a49 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/min-block-size-computed.html @@ -0,0 +1,47 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().minBlockSize + + + + + + + + + +
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/min-block-size-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/min-block-size-invalid.html new file mode 100644 index 0000000000..325dc2e0ae --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/min-block-size-invalid.html @@ -0,0 +1,29 @@ + + + + +CSS Logical Properties and Values: parsing min-block-size with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/min-block-size-valid.html b/testing/web-platform/tests/css/css-logical/parsing/min-block-size-valid.html new file mode 100644 index 0000000000..5a5d4a4385 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/min-block-size-valid.html @@ -0,0 +1,28 @@ + + + + +CSS Logical Properties and Values: parsing min-block-size with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-computed.html b/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-computed.html new file mode 100644 index 0000000000..730ad4e474 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-computed.html @@ -0,0 +1,47 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().minInlineSize + + + + + + + + + +
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-invalid.html new file mode 100644 index 0000000000..eb2cc8bb10 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-invalid.html @@ -0,0 +1,29 @@ + + + + +CSS Logical Properties and Values: parsing min-inline-size with invalid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-valid.html b/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-valid.html new file mode 100644 index 0000000000..fa4ba0d1bb --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/min-inline-size-valid.html @@ -0,0 +1,28 @@ + + + + +CSS Logical Properties and Values: parsing min-inline-size with valid values + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-computed.html b/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-computed.html new file mode 100644 index 0000000000..230f18525a --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-computed.html @@ -0,0 +1,54 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().paddingBlockStart etc. + + + + + + + + + +
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-invalid.html b/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-invalid.html new file mode 100644 index 0000000000..56c2adb078 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-invalid.html @@ -0,0 +1,35 @@ + + + + +CSS Logical Properties and Values: parsing padding-block and padding-inline with invalid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-shorthand.html b/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-shorthand.html new file mode 100644 index 0000000000..d0811c27dc --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-shorthand.html @@ -0,0 +1,35 @@ + + + + +CSS Logical Properties and Values: padding-block and padding-inline set longhands + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-valid.html b/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-valid.html new file mode 100644 index 0000000000..1f3be17784 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/parsing/padding-block-inline-valid.html @@ -0,0 +1,27 @@ + + + + +CSS Logical Properties and Values: parsing padding-block and padding-inline with valid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-1-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-1-ref.html new file mode 100644 index 0000000000..0dac4c29b1 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-1-ref.html @@ -0,0 +1,36 @@ + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. +
Inline-start
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. +
Inline-end
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +
+ +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. +
Inline-start
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. +
Inline-end
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +
diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-2-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-2-ref.html new file mode 100644 index 0000000000..82bfcd2d36 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-2-ref.html @@ -0,0 +1,37 @@ + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. +
Inline-start
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. +
Inline-end
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +
+ +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Phasellus efficitur nisi at sollicitudin eleifend. +
Inline-start
+ Vestibulum ac condimentum diam. Vivamus viverra iaculis mollis. + Nam bibendum, dolor id porttitor egestas, metus sem pretium eros, + ut mollis mauris ligula eu risus. Aenean eget vestibulum nunc. +
Inline-end
+ Nam vitae eleifend tellus. Vestibulum ut accumsan lacus. + Vivamus vitae eros hendrerit, tincidunt augue non, laoreet justo. + Aliquam erat volutpat. +
diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-3-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-3-ref.html new file mode 100644 index 0000000000..654afd856f --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-3-ref.html @@ -0,0 +1,38 @@ + + + + +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start

+
+ +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end

+
+ +
+
End
+
Start
+

a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start

+
+ +
+
End
+
Start
+

a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end

+
diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-4-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-4-ref.html new file mode 100644 index 0000000000..0c2065b3e9 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-4-ref.html @@ -0,0 +1,39 @@ + + + + +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-start

+
+ +
+
Start
+
End
+

a b c d e f g h i j k l m n o p q r s t u v w x y z LTR clear:inline-end

+
+ +
+
End
+
Start
+

a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-start

+
+ +
+
End
+
Start
+

a b c d e f g h i j k l m n o p q r s t u v w x y z RTL clear:inline-end

+
diff --git a/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-reftest-ref.html b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-reftest-ref.html new file mode 100644 index 0000000000..28c275ebb3 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/reference/logical-values-float-clear-reftest-ref.html @@ -0,0 +1,68 @@ + + +CSS Reftest Reference + + + + + diff --git a/testing/web-platform/tests/css/css-logical/resources/test-box-properties.js b/testing/web-platform/tests/css/css-logical/resources/test-box-properties.js new file mode 100644 index 0000000000..ef1854f97d --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/resources/test-box-properties.js @@ -0,0 +1,297 @@ +import { + testElement, + writingModes, + testCSSValues, + testComputedValues, + makeDeclaration +} from "./test-shared.js"; + +// Values to use while testing +const testValues = { + "length": ["1px", "2px", "3px", "4px", "5px"], + "color": ["rgb(1, 1, 1)", "rgb(2, 2, 2)", "rgb(3, 3, 3)", "rgb(4, 4, 4)", "rgb(5, 5, 5)"], + "border-style": ["solid", "dashed", "dotted", "double", "groove"], +}; + +/** + * Creates a group of physical and logical box properties, such as + * + * { physical: { + * left: "margin-left", right: "margin-right", + * top: "margin-top", bottom: "margin-bottom", + * }, logical: { + * inlineStart: "margin-inline-start", inlineEnd: "margin-inline-end", + * blockStart: "margin-block-start", blockEnd: "margin-block-end", + * }, shorthands: { + * "margin": ["margin-top", "margin-right", "margin-bottom", "margin-left"], + * "margin-inline": ["margin-inline-start", "margin-inline-end"], + * "margin-block": ["margin-block-start", "margin-block-end"], + * }, type: ["length"], prerequisites: "...", property: "margin-*" } + * + * @param {string} property + * A string representing the property names, like "margin-*". + * @param {Object} descriptor + * @param {string|string[]} descriptor.type + * Describes the kind of values accepted by the property, like "length". + * Must be a key or a collection of keys from the `testValues` object. + * @param {Object={}} descriptor.prerequisites + * Represents property declarations that are needed by `property` to work. + * For example, border-width properties require a border style. + */ +export function createBoxPropertyGroup(property, descriptor) { + const logical = {}; + const physical = {}; + const shorthands = {}; + for (const axis of ["inline", "block"]) { + const shorthand = property.replace("*", axis); + const longhands = []; + shorthands[shorthand] = longhands; + for (const side of ["start", "end"]) { + const logicalSide = axis + "-" + side; + const camelCase = logicalSide.replace(/-(.)/g, (match, $1) => $1.toUpperCase()); + const longhand = property.replace("*", logicalSide); + logical[camelCase] = longhand; + longhands.push(longhand); + } + } + const isInset = property === "inset-*"; + let prerequisites = ""; + for (const physicalSide of ["left", "right", "top", "bottom"]) { + physical[physicalSide] = isInset ? physicalSide : property.replace("*", physicalSide); + prerequisites += makeDeclaration(descriptor.prerequisites, physicalSide); + } + shorthands[property.replace("-*", "")] = + ["top", "right", "bottom", "left"].map(physicalSide => physical[physicalSide]); + const type = [].concat(descriptor.type); + return {logical, physical, shorthands, type, prerequisites, property}; +} + +/** + * Creates a group physical and logical box-corner properties. + * + * @param {string} property + * A string representing the property names, like "border-*-radius". + * @param {Object} descriptor + * @param {string|string[]} descriptor.type + * Describes the kind of values accepted by the property, like "length". + * Must be a key or a collection of keys from the `testValues` object. + * @param {Object={}} descriptor.prerequisites + * Represents property declarations that are needed by `property` to work. + * For example, border-width properties require a border style. + */ +export function createCornerPropertyGroup(property, descriptor) { + const logical = {}; + const physical = {}; + const shorthands = {}; + for (const logicalCorner of ["start-start", "start-end", "end-start", "end-end"]) { + const prop = property.replace("*", logicalCorner); + const [block_side, inline_side] = logicalCorner.split("-"); + const b = "block" + block_side.charAt(0).toUpperCase() + block_side.slice(1); + const i = "inline" + inline_side.charAt(0).toUpperCase() + inline_side.slice(1); + const index = b + "-" + i; // e.g. "blockStart-inlineEnd" + logical[index] = prop; + } + let prerequisites = ""; + for (const physicalCorner of ["top-left", "top-right", "bottom-left", "bottom-right"]) { + const prop = property.replace("*", physicalCorner); + physical[physicalCorner] = prop; + prerequisites += makeDeclaration(descriptor.prerequisites, physicalCorner); + } + const type = [].concat(descriptor.type); + return {logical, physical, shorthands, type, prerequisites, property}; +} + +/** + * Creates a group of physical and logical sizing properties. + * + * @param {string} prefix + * One of "", "max-" or "min-". + */ +export function createSizingPropertyGroup(prefix) { + return { + logical: { + inline: `${prefix}inline-size`, + block: `${prefix}block-size`, + }, + physical: { + horizontal: `${prefix}width`, + vertical: `${prefix}height`, + }, + type: ["length"], + prerequisites: makeDeclaration({display: "block"}), + property: (prefix ? prefix.slice(0, -1) + " " : "") + "sizing", + }; +} + +/** + * Tests a grup of logical and physical properties in different writing modes. + * + * @param {Object} group + * An object returned by createBoxPropertyGroup or createSizingPropertyGroup. + */ +export function runTests(group) { + const values = testValues[group.type[0]].map(function(_, i) { + return group.type.map(type => testValues[type][i]).join(" "); + }); + const logicals = Object.values(group.logical); + const physicals = Object.values(group.physical); + const shorthands = group.shorthands ? Object.entries(group.shorthands) : null; + const is_corner = group.property == "border-*-radius"; + + test(function() { + const expected = []; + for (const [i, logicalProp] of logicals.entries()) { + testElement.style.setProperty(logicalProp, values[i]); + expected.push([logicalProp, values[i]]); + } + testCSSValues("logical properties in inline style", testElement.style, expected); + }, `Test that logical ${group.property} properties are supported.`); + testElement.style.cssText = ""; + + const shorthandValues = {}; + for (const [shorthand, longhands] of shorthands || []) { + let valueArray; + if (group.type.length > 1) { + valueArray = [values[0]]; + } else { + valueArray = testValues[group.type].slice(0, longhands.length); + } + shorthandValues[shorthand] = valueArray; + const value = valueArray.join(" "); + const expected = [[shorthand, value]]; + for (let [i, longhand] of longhands.entries()) { + expected.push([longhand, valueArray[group.type.length > 1 ? 0 : i]]); + } + test(function() { + testElement.style.setProperty(shorthand, value); + testCSSValues("shorthand in inline style", testElement.style, expected); + const stylesheet = `.test { ${group.prerequisites} }`; + testComputedValues("shorthand in computed style", stylesheet, expected); + }, `Test that ${shorthand} shorthand sets longhands and serializes correctly.`); + testElement.style.cssText = ""; + } + + for (const writingMode of writingModes) { + for (const style of writingMode.styles) { + const writingModeDecl = makeDeclaration(style); + + const associated = {}; + for (const [logicalSide, logicalProp] of Object.entries(group.logical)) { + let physicalProp; + if (is_corner) { + const [ block_side, inline_side] = logicalSide.split("-"); + const physicalSide1 = writingMode[block_side]; + const physicalSide2 = writingMode[inline_side]; + let physicalCorner; + // mirror "left-top" to "top-left" etc + if (["top", "bottom"].includes(physicalSide1)) { + physicalCorner = physicalSide1 + "-" + physicalSide2; + } else { + physicalCorner = physicalSide2 + "-" + physicalSide1; + } + physicalProp = group.physical[physicalCorner]; + } else { + physicalProp = group.physical[writingMode[logicalSide]]; + } + associated[logicalProp] = physicalProp; + associated[physicalProp] = logicalProp; + } + + // Test that logical properties are converted to their physical + // equivalent correctly when all in the group are present on a single + // declaration, with no overwriting of previous properties and + // no physical properties present. We put the writing mode properties + // on a separate declaration to test that the computed values of these + // properties are used, rather than those on the same declaration. + test(function() { + let decl = group.prerequisites; + const expected = []; + for (const [i, logicalProp] of logicals.entries()) { + decl += `${logicalProp}: ${values[i]}; `; + expected.push([logicalProp, values[i]]); + expected.push([associated[logicalProp], values[i]]); + } + testComputedValues("logical properties on one declaration, writing " + + `mode properties on another, '${writingModeDecl}'`, + `.test { ${writingModeDecl} } .test { ${decl} }`, + expected); + }, `Test that logical ${group.property} properties share computed values ` + + `with their physical associates, with '${writingModeDecl}'.`); + + // Test logical shorthand properties. + if (shorthands) { + test(function() { + for (const [shorthand, longhands] of shorthands) { + let valueArray = shorthandValues[shorthand]; + const decl = group.prerequisites + `${shorthand}: ${valueArray.join(" ")}; `; + const expected = []; + for (let [i, longhand] of longhands.entries()) { + const longhandValue = valueArray[group.type.length > 1 ? 0 : i]; + expected.push([longhand, longhandValue]); + expected.push([associated[longhand], longhandValue]); + } + testComputedValues("shorthand properties on one declaration, writing " + + `mode properties on another, '${writingModeDecl}'`, + `.test { ${writingModeDecl} } .test { ${decl} }`, + expected); + } + }, `Test that ${group.property} shorthands set the computed value of both ` + + `logical and physical longhands, with '${writingModeDecl}'.`); + } + + // Test that logical and physical properties are cascaded together, + // honoring their relative order on a single declaration + // (a) with a single logical property after the physical ones + // (b) with a single physical property after the logical ones + test(function() { + for (const lastIsLogical of [true, false]) { + const lasts = lastIsLogical ? logicals : physicals; + const others = lastIsLogical ? physicals : logicals; + for (const lastProp of lasts) { + let decl = writingModeDecl + group.prerequisites; + const expected = []; + for (const [i, prop] of others.entries()) { + decl += `${prop}: ${values[i]}; `; + const valueIdx = associated[prop] === lastProp ? others.length : i; + expected.push([prop, values[valueIdx]]); + expected.push([associated[prop], values[valueIdx]]); + } + decl += `${lastProp}: ${values[others.length]}; `; + testComputedValues(`'${lastProp}' last on single declaration, '${writingModeDecl}'`, + `.test { ${decl} }`, + expected); + } + } + }, `Test that ${group.property} properties honor order of appearance when both ` + + `logical and physical associates are declared, with '${writingModeDecl}'.`); + + // Test that logical and physical properties are cascaded properly when + // on different declarations + // (a) with a logical property in the high specificity rule + // (b) with a physical property in the high specificity rule + test(function() { + for (const highIsLogical of [true, false]) { + let lowDecl = writingModeDecl + group.prerequisites; + const high = highIsLogical ? logicals : physicals; + const others = highIsLogical ? physicals : logicals; + for (const [i, prop] of others.entries()) { + lowDecl += `${prop}: ${values[i]}; `; + } + for (const highProp of high) { + const highDecl = `${highProp}: ${values[others.length]}; `; + const expected = []; + for (const [i, prop] of others.entries()) { + const valueIdx = associated[prop] === highProp ? others.length : i; + expected.push([prop, values[valueIdx]]); + expected.push([associated[prop], values[valueIdx]]); + } + testComputedValues(`'${highProp}', two declarations, '${writingModeDecl}'`, + `#test { ${highDecl} } .test { ${lowDecl} }`, + expected); + } + } + }, `Test that ${group.property} properties honor selector specificty when both ` + + `logical and physical associates are declared, with '${writingModeDecl}'.`); + } + } +} diff --git a/testing/web-platform/tests/css/css-logical/resources/test-logical-values.js b/testing/web-platform/tests/css/css-logical/resources/test-logical-values.js new file mode 100644 index 0000000000..7a039379cb --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/resources/test-logical-values.js @@ -0,0 +1,27 @@ +import { + testElement, + writingModes, + testCSSValues, + testComputedValues, + makeDeclaration +} from "./test-shared.js"; + +/** + * Tests flow-relative values for a CSS property in different writing modes. + * + * @param {string} property + * The CSS property to be tested. + * @param {string[]} values + * An array with the flow-relative values to be tested. + */ +export function runTests(property, values) { + for (const value of values) { + test(function() { + const {style} = testElement; + style.cssText = ""; + style.setProperty(property, value); + testCSSValues("logical values in inline style", style, [[property, value]]); + testComputedValues("logical values in computed style", style, [[property, value]]); + }, `Test that '${property}: ${value}' is supported.`); + } +} diff --git a/testing/web-platform/tests/css/css-logical/resources/test-shared.js b/testing/web-platform/tests/css/css-logical/resources/test-shared.js new file mode 100644 index 0000000000..7a1da2e649 --- /dev/null +++ b/testing/web-platform/tests/css/css-logical/resources/test-shared.js @@ -0,0 +1,112 @@ +const sheet = document.head.appendChild(document.createElement("style")); + +// Specify size for outer
to avoid unconstrained-size warnings +// when writing-mode of the inner test
is vertical-* +const wrapper = document.body.appendChild(document.createElement("div")); +wrapper.style.cssText = "width:100px; height: 100px;"; +export const testElement = wrapper.appendChild(document.createElement("div")); +testElement.id = testElement.className = "test"; + +// Six unique overall writing modes for property-mapping purposes. +export const writingModes = [ + { + styles: [ + {"writing-mode": "horizontal-tb", "direction": "ltr"}, + ], + blockStart: "top", blockEnd: "bottom", inlineStart: "left", inlineEnd: "right", + over: "top", under: "bottom", lineLeft: "left", lineRight: "right", + block: "vertical", inline: "horizontal" }, + { + styles: [ + {"writing-mode": "horizontal-tb", "direction": "rtl"}, + ], + blockStart: "top", blockEnd: "bottom", inlineStart: "right", inlineEnd: "left", + over: "top", under: "bottom", lineLeft: "left", lineRight: "right", + block: "vertical", inline: "horizontal" }, + { + styles: [ + {"writing-mode": "vertical-rl", "direction": "rtl"}, + {"writing-mode": "sideways-rl", "direction": "rtl"}, + ], + blockStart: "right", blockEnd: "left", inlineStart: "bottom", inlineEnd: "top", + over: "right", under: "left", lineLeft: "top", lineRight: "bottom", + block: "horizontal", inline: "vertical" }, + { + styles: [ + {"writing-mode": "vertical-rl", "direction": "ltr"}, + {"writing-mode": "sideways-rl", "direction": "ltr"}, + ], + blockStart: "right", blockEnd: "left", inlineStart: "top", inlineEnd: "bottom", + over: "right", under: "left", lineLeft: "top", lineRight: "bottom", + block: "horizontal", inline: "vertical" }, + { + styles: [ + {"writing-mode": "vertical-lr", "direction": "rtl"}, + ], + blockStart: "left", blockEnd: "right", inlineStart: "bottom", inlineEnd: "top", + over: "right", under: "left", lineLeft: "top", lineRight: "bottom", + block: "horizontal", inline: "vertical" }, + { + styles: [ + {"writing-mode": "sideways-lr", "direction": "ltr"}, + ], + blockStart: "left", blockEnd: "right", inlineStart: "bottom", inlineEnd: "top", + over: "left", under: "right", lineLeft: "bottom", lineRight: "top", + block: "horizontal", inline: "vertical" }, + { + styles: [ + {"writing-mode": "vertical-lr", "direction": "ltr"}, + ], + blockStart: "left", blockEnd: "right", inlineStart: "top", inlineEnd: "bottom", + over: "right", under: "left", lineLeft: "top", lineRight: "bottom", + block: "horizontal", inline: "vertical" }, + { + styles: [ + {"writing-mode": "sideways-lr", "direction": "rtl"}, + ], + blockStart: "left", blockEnd: "right", inlineStart: "top", inlineEnd: "bottom", + over: "left", under: "right", lineLeft: "bottom", lineRight: "top", + block: "horizontal", inline: "vertical" }, +]; + +// Check if logical properties work well in WebKit non-standard +// '-webkit-writing-mode: horizontal-bt' mode +if (CSS.supports("-webkit-writing-mode", "horizontal-bt")) { + writingModes.push ( + { + styles: [ + {"-webkit-writing-mode": "horizontal-bt", "direction": "ltr"}, + ], + blockStart: "bottom", blockEnd: "top", inlineStart: "left", inlineEnd: "right", + over: "top", under: "bottom", lineLeft: "left", lineRight: "right", + block: "vertical", inline: "horizontal" }, + { + styles: [ + {"-webkit-writing-mode": "horizontal-bt", "direction": "rtl"}, + ], + blockStart: "bottom", blockEnd: "top", inlineStart: "right", inlineEnd: "left", + over: "top", under: "bottom", lineLeft: "left", lineRight: "right", + block: "vertical", inline: "horizontal" }, + ) +} + +export function testCSSValues(testName, style, expectedValues) { + for (const [property, value] of expectedValues) { + assert_equals(style.getPropertyValue(property), value, `${testName}, ${property}`); + } +} + +export function testComputedValues(testName, rules, expectedValues) { + sheet.textContent = rules; + const cs = getComputedStyle(testElement); + testCSSValues(testName, cs, expectedValues); + sheet.textContent = ""; +} + +export function makeDeclaration(object = {}, replacement = "*") { + let decl = ""; + for (const [property, value] of Object.entries(object)) { + decl += `${property.replace("*", replacement)}: ${value}; `; + } + return decl; +} -- cgit v1.2.3