mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Tests for recalculating ordinals after list manipulation
FIXME: Rendering modifications to a list is sometimes not pixel-perfect vs. reference (likely a bug). After this is fixed, screenshot tests from this commit will likely fail + can be moved to ref tests.
This commit is contained in:
parent
20546725be
commit
51b4b4a270
Notes:
github-actions[bot]
2025-06-16 11:46:13 +00:00
Author: https://github.com/manuel-za
Commit: 51b4b4a270
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4442
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/InvalidUsernameException
Reviewed-by: https://github.com/R-Goc
Reviewed-by: https://github.com/skyz1 ✅
45 changed files with 1068 additions and 0 deletions
39
Tests/LibWeb/Ref/input/ol-render-node-insert-first.html
Normal file
39
Tests/LibWeb/Ref/input/ol-render-node-insert-first.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<link rel="match" href="../expected/ol-render-node-insert-first-ref.html" />
|
||||
</head>
|
||||
<html class="reftest-wait">
|
||||
<body>
|
||||
<ol id="ol1">
|
||||
<li id="two1">Two</li>
|
||||
<li>Three</li>
|
||||
</ol>
|
||||
<ol reversed id="ol2">
|
||||
<li id="two2">Two</li>
|
||||
<li>One</li>
|
||||
</ol>
|
||||
<script>
|
||||
// Two nested requestAnimationFrame() calls to force code execution _after_ initial paint
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
const ol1 = document.getElementById("ol1");
|
||||
const two1 = document.getElementById("two1");
|
||||
|
||||
const ol2 = document.getElementById("ol2");
|
||||
const two = document.getElementById("two2");
|
||||
|
||||
const one = document.createElement("li");
|
||||
one.innerHTML = "One";
|
||||
|
||||
const three = document.createElement("li");
|
||||
three.innerHTML = "Three";
|
||||
|
||||
ol1.insertBefore( one, two1 );
|
||||
ol2.insertBefore( three, two2 );
|
||||
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue