diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/web-platform/tests/css/css-highlight-api/painting | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-highlight-api/painting')
2 files changed, 55 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001-ref.html b/testing/web-platform/tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001-ref.html new file mode 100644 index 0000000000..aa76cf08b4 --- /dev/null +++ b/testing/web-platform/tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Highlight API Test: ::highlight text-decoration paints over higher priority when not clashing</title> + <style> + #yellow-highlight { + background-color: yellow; + text-decoration: underline; + text-decoration-color: red; + } + </style> +</head> +<body> + <span id="yellow-highlight">Yellow</span> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001.html b/testing/web-platform/tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001.html new file mode 100644 index 0000000000..7ab318b5a1 --- /dev/null +++ b/testing/web-platform/tests/css/css-highlight-api/painting/custom-highlight-painting-priority-text-decoration-001.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html> +<head> + <title>CSS Highlight API Test: ::highlight text-decoration paints over higher priority when not clashing</title> + <link rel="help" href="https://www.w3.org/TR/css-highlight-api-1/#priorities"> + <link rel="match" href="custom-highlight-painting-priority-text-decoration-001-ref.html"> + <style> + ::highlight(yellow-highlight) { + background-color: yellow; + } + ::highlight(underline-highlight) { + text-decoration: underline; + text-decoration-color: red; + } + </style> +</head> +<body> + <span id="yellow-highlight">Yellow</span> + + <script> + let yellow = document.getElementById("yellow-highlight"); + let highlightYellow = new Highlight(new StaticRange({ + startContainer: yellow.childNodes[0], + startOffset: 0, + endContainer: yellow.childNodes[0], + endOffset: 6 + })); + let highlightUnderline = new Highlight(new StaticRange({ + startContainer: yellow.childNodes[0], + startOffset: 0, + endContainer: yellow.childNodes[0], + endOffset: 6 + })); + CSS.highlights.set("yellow-highlight", highlightYellow); + CSS.highlights.set("underline-highlight", highlightUnderline); + highlightYellow.priority = 10; + </script> +</body> +</html>
\ No newline at end of file |