mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibWeb: Properly serialize position/edge style values
This commit is contained in:
parent
583ca6af89
commit
84150f972f
Notes:
github-actions[bot]
2024-12-13 11:36:34 +00:00
Author: https://github.com/Gingeh
Commit: 84150f972f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2651
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/awesomekling
21 changed files with 461 additions and 288 deletions
25
Tests/LibWeb/Text/input/position-serialization.html
Normal file
25
Tests/LibWeb/Text/input/position-serialization.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="include.js"></script>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test(() => {
|
||||
const values = [
|
||||
"center",
|
||||
"left bottom",
|
||||
"center top",
|
||||
"center top 20%",
|
||||
"left 10px top 20%",
|
||||
"10px top",
|
||||
"right 10px bottom 20%",
|
||||
"center, left bottom",
|
||||
"left 10px bottom 20%, right 10px top 20%"
|
||||
];
|
||||
|
||||
const target = document.getElementById('target');
|
||||
for (const value of values) {
|
||||
target.style.setProperty("background-position", value);
|
||||
println("inline: " + target.style.getPropertyValue("background-position"));
|
||||
println("computed: " + getComputedStyle(target).getPropertyValue("background-position"));
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue