summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-048.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-048.html
parentInitial commit. (diff)
downloadfirefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz
firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-048.html')
-rw-r--r--testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-048.html84
1 files changed, 84 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-048.html b/testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-048.html
new file mode 100644
index 0000000000..04f842281d
--- /dev/null
+++ b/testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-048.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+
+ <meta charset="UTF-8">
+
+ <title>CSS Writing Modes Test: 'writing-mode: horizontal-tb' set to &lt;body&gt; element propagates to viewport</title>
+
+ <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
+ <link rel="help" href="https://www.w3.org/TR/css-writing-modes-4/#principal-flow" title="8. The Principal Writing Mode">
+ <!--
+ Issue 3066: [css-writing-modes] Does vertical writing mode of an HTML body
+ element cause an orthogonal flow?
+ https://github.com/w3c/csswg-drafts/issues/3066
+ -->
+ <link rel="match" href="wm-propagation-body-033-ref.html">
+
+ <meta name="assert" content="This test checks that when the root element has a &lt;body&gt; child element, then the principal writing mode is instead taken from the values of writing-mode and direction on the first such child element instead of taken from the root element. Also, a small script in this test verifies that the computed value of 'writing-mode' of the root element itself is not affected by such propagation.">
+
+ <!--
+ Tests 032 to 035: html's writing-mode is not specified
+
+ Tests 036 to 039: html's writing-mode is specified as horizontal-tb
+
+ Tests 040 to 043: html's writing-mode is specified as vertical-rl
+
+ Tests 044 to 047: html's writing-mode is specified as vertical-lr
+
+ Tests 048 to 051: html's writing-mode is specified as sideways-rl
+
+ Tests 052 to 055: html's writing-mode is specified as sideways-lr
+ -->
+
+ <style>
+ html
+ {
+ writing-mode: sideways-rl;
+ }
+
+ body
+ {
+ writing-mode: horizontal-tb;
+ }
+
+ img#orange-square
+ {
+ height: 100px;
+ padding-right: 1em;
+ vertical-align: top;
+ width: 100px;
+ }
+
+ h1#second-test-condition
+ {
+ background-color: red;
+ color: yellow;
+ }
+ </style>
+
+ <script>
+ function verifyComputedValueDocRoot()
+ {
+ if(getComputedStyle(document.documentElement)["writing-mode"] == "sideways-rl")
+ {
+ document.getElementById("second-test-condition").style.display = "none";
+ };
+
+ /*
+ If the computed value of 'writing-mode' of the root element
+ itself is not affected by such propagation, then the big FAIL
+ word will not be displayed.
+ */
+ }
+ </script>
+
+ <body onload="verifyComputedValueDocRoot();">
+
+ <div><img id="orange-square" src="support/swatch-orange.png" alt="Image download support must be enabled"><img src="support/wm-propagation-body-003-exp-res.png" width="340" height="37" alt="Image download support must be enabled"></div>
+
+ <!--
+ The image says:
+ Test passes if there is an orange square
+ in the <strong>upper-left corner</strong> of the page.
+ -->
+
+ <h1 id="second-test-condition">FAIL</h1>