summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-fonts/first-available-font-006.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-fonts/first-available-font-006.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-fonts/first-available-font-006.html')
-rw-r--r--testing/web-platform/tests/css/css-fonts/first-available-font-006.html65
1 files changed, 65 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-fonts/first-available-font-006.html b/testing/web-platform/tests/css/css-fonts/first-available-font-006.html
new file mode 100644
index 0000000000..3766fd1bfa
--- /dev/null
+++ b/testing/web-platform/tests/css/css-fonts/first-available-font-006.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS fonts test: baseline position with explicit sizing, no space in first font</title>
+<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
+<link rel="help" href="https://drafts.csswg.org/css-fonts-3/#first-available-font">
+<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#first-available-font">
+<link rel="match" href="first-available-font-005-ref.html">
+<meta name="assert" content="The position of the baseline in an inline-level box whose height is determined by a non-normal value of line-height
+ does depend on the primary font, which is the first that contains U+0020.">
+<style>
+@font-face {
+ font-family: 'A-no-space';
+ font-style: normal;
+ font-weight: 400;
+ src: url(/fonts/Revalia.woff) format('woff');
+ unicode-range: U+0061;
+}
+@font-face {
+ font-family: 'B-no-space';
+ font-style: normal;
+ font-weight: 400;
+ src: url(/fonts/AD.woff) format('woff');
+ unicode-range: U+0061;
+}
+@font-face {
+ font-family: 'B';
+ font-style: normal;
+ font-weight: 400;
+ src: url(/fonts/AD.woff) format('woff');
+}
+
+div {
+ position: absolute;
+ line-height: 100px;
+ font-size: 100px;
+ width: 300px; /* plenty of room for the (invisible) text */
+ text-align: right;
+ color: transparent;
+ outline: solid;
+}
+span { /* visible thing aligned to the baseline, and small enough to not influence its position */
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+}
+
+/* white #a is on top of red #b,
+ The first font in their respective lists do no contain U+0020,
+ and therfore the first available font should be the next one, which is the same.
+ Since the baseline should be based on the primary font,
+ their baselines should line up and red #b should be invisible.
+ The fact that that font is used should make no difference.
+ */
+#a { font-family: A-no-space, B; }
+#a span { background: red; }
+
+#b { font-family: B-no-space, B; }
+#b span { background: white; }
+
+</style>
+
+<p>Test passes if there is <strong>no red</strong> below.
+
+<div id=a>aa<span></span></div>
+<div id=b>aa<span></span></div>