summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-ruby/rt-display-blockified.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-ruby/rt-display-blockified.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-ruby/rt-display-blockified.html')
-rw-r--r--testing/web-platform/tests/css/css-ruby/rt-display-blockified.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-ruby/rt-display-blockified.html b/testing/web-platform/tests/css/css-ruby/rt-display-blockified.html
new file mode 100644
index 0000000000..b2b7989fdd
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ruby/rt-display-blockified.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>Blockifying 'display: ruby-text' loses ruby-text functionality</title>
+<link rel="help" href="https://drafts.csswg.org/css-ruby-1/#block-ruby">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<style>
+ruby {
+ font-size: 60px;
+ line-height: 1;
+}
+
+rt.abspos {
+ position: absolute;
+ font-size: inherit;
+ line-height: 1;
+}
+
+rt.float {
+ float: left;
+ font-size: inherit;
+ line-height: 1;
+}
+</style>
+
+<p><ruby><span id="base">base1</span> <rt class="abspos">abspos</rt>base2 <rt class="float">float</rt></ruby></p>
+
+<script>
+test(() => {
+ const base = document.querySelector('#base').getBoundingClientRect();
+ const rt = document.querySelector('.abspos').getBoundingClientRect();
+ assert_greater_than_equal(rt.y, base.y);
+}, 'position:absolute should not work as ruby-text');
+
+test(() => {
+ const base = document.querySelector('#base').getBoundingClientRect();
+ const rt = document.querySelector('.float').getBoundingClientRect();
+ assert_greater_than_equal(rt.y, base.y);
+}, 'float:left should not work as ruby-text');
+</script>