summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-computed-direction-001.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-computed-direction-001.html
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-computed-direction-001.html')
-rw-r--r--testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-computed-direction-001.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-computed-direction-001.html b/testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-computed-direction-001.html
new file mode 100644
index 0000000000..035f608165
--- /dev/null
+++ b/testing/web-platform/tests/css/css-writing-modes/wm-propagation-body-computed-direction-001.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+
+ <meta charset="UTF-8">
+
+ <title>CSS Writing Modes Test: computed 'direction' of root element when 'writing-mode' for &lt;body&gt; 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-3/#principal-flow">
+ <!--
+ 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
+ -->
+
+ <meta name="assert" content="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 such first child element instead of taken from the root element. In this test, a small script verifies that the computed value of 'direction' of the root element itself is not affected by such propagation.">
+
+ <!--
+ This test *only* verifies the computed value of 'direction' of the
+ root element.
+
+ This test does *not* verify if the 'writing-mode' value of
+ the body element propagates to the root element.
+ -->
+
+ <script src="/resources/testharness.js"></script>
+
+ <script src="/resources/testharnessreport.js"></script>
+
+ <style>
+ html
+ {
+ direction: rtl;
+ writing-mode: vertical-lr;
+ }
+
+ body
+ {
+ direction: ltr;
+ writing-mode: vertical-rl;
+ }
+ </style>
+
+ <script>
+ function startTesting()
+ {
+
+ test(function()
+ {
+
+ assert_equals(getComputedStyle(document.documentElement).direction, "rtl" );
+
+ }, "First test on computed value of 'direction' of root element.");
+
+ }
+
+ startTesting();
+
+ </script>