diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-highlight-api/painting/resources | |
parent | Initial commit. (diff) | |
download | firefox-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-highlight-api/painting/resources')
2 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-highlight-api/painting/resources/iframe-code.html b/testing/web-platform/tests/css/css-highlight-api/painting/resources/iframe-code.html new file mode 100644 index 0000000000..a4a1829be2 --- /dev/null +++ b/testing/web-platform/tests/css/css-highlight-api/painting/resources/iframe-code.html @@ -0,0 +1,13 @@ +<style> + ::highlight(foo) { + color: blue; + background-color: cyan; + } +</style> +<span id='span-iframe'>abc</span> +<script> + let r = new Range(); + r.setStart(document.querySelector('#span-iframe'), 0); + r.setEnd(document.querySelector('#span-iframe'), 1); + CSS.highlights.set('foo', new Highlight(r)); +</script>
\ No newline at end of file diff --git a/testing/web-platform/tests/css/css-highlight-api/painting/resources/run-after-layout-and-paint.js b/testing/web-platform/tests/css/css-highlight-api/painting/resources/run-after-layout-and-paint.js new file mode 100644 index 0000000000..75d3e279a4 --- /dev/null +++ b/testing/web-platform/tests/css/css-highlight-api/painting/resources/run-after-layout-and-paint.js @@ -0,0 +1,11 @@ +// This is inspired in runAfterLayoutAndPaint() from +// third_party/blink/web_tests/resources/run-after-layout-and-paint.js. +function runAfterLayoutAndPaint(callback) { + // See http://crrev.com/c/1395193/10/third_party/blink/web_tests/http/tests/resources/run-after-layout-and-paint.js + // for more discussions. + requestAnimationFrame(function() { + requestAnimationFrame(function() { + callback(); + }); + }); +}
\ No newline at end of file |