mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Parse and propagate white-space-trim CSS property
This commit is contained in:
parent
50bdd2cb85
commit
9480b1fc5c
Notes:
github-actions[bot]
2025-05-29 10:06:01 +00:00
Author: https://github.com/Calme1709
Commit: 9480b1fc5c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4832
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
14 changed files with 151 additions and 7 deletions
|
|
@ -233,10 +233,11 @@ All properties associated with getComputedStyle(document.body):
|
|||
"230": "user-select",
|
||||
"231": "vertical-align",
|
||||
"232": "view-transition-name",
|
||||
"233": "width",
|
||||
"234": "x",
|
||||
"235": "y",
|
||||
"236": "z-index"
|
||||
"233": "white-space-trim",
|
||||
"234": "width",
|
||||
"235": "x",
|
||||
"236": "y",
|
||||
"237": "z-index"
|
||||
}
|
||||
All properties associated with document.body.style by default:
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -650,6 +650,8 @@ All supported properties and their default values exposed from CSSStylePropertie
|
|||
'white-space': 'normal'
|
||||
'whiteSpaceCollapse': 'collapse'
|
||||
'white-space-collapse': 'collapse'
|
||||
'whiteSpaceTrim': 'none'
|
||||
'white-space-trim': 'none'
|
||||
'width': '284px'
|
||||
'wordBreak': 'normal'
|
||||
'word-break': 'normal'
|
||||
|
|
|
|||
|
|
@ -231,6 +231,7 @@ unicode-bidi: normal
|
|||
user-select: auto
|
||||
vertical-align: baseline
|
||||
view-transition-name: none
|
||||
white-space-trim: none
|
||||
width: 784px
|
||||
x: 0px
|
||||
y: 0px
|
||||
|
|
|
|||
3
Tests/LibWeb/Text/expected/css/white-space-trim.txt
Normal file
3
Tests/LibWeb/Text/expected/css/white-space-trim.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
none
|
||||
discard-inner
|
||||
discard-after discard-inner
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
Harness status: OK
|
||||
|
||||
Found 199 tests
|
||||
Found 200 tests
|
||||
|
||||
189 Pass
|
||||
190 Pass
|
||||
10 Fail
|
||||
Pass accent-color
|
||||
Pass border-collapse
|
||||
|
|
@ -199,6 +199,7 @@ Pass unicode-bidi
|
|||
Pass user-select
|
||||
Pass vertical-align
|
||||
Pass view-transition-name
|
||||
Pass white-space-trim
|
||||
Fail width
|
||||
Pass x
|
||||
Pass y
|
||||
|
|
|
|||
21
Tests/LibWeb/Text/input/css/white-space-trim.html
Normal file
21
Tests/LibWeb/Text/input/css/white-space-trim.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
#single-value {
|
||||
white-space-trim: discard-inner;
|
||||
}
|
||||
|
||||
#multiple-values {
|
||||
white-space-trim: discard-inner discard-after;
|
||||
}
|
||||
</style>
|
||||
<div id="default"></div>
|
||||
<div id="single-value"></div>
|
||||
<div id="multiple-values"></div>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
println(getComputedStyle(document.getElementById("default")).whiteSpaceTrim);
|
||||
println(getComputedStyle(document.getElementById("single-value")).whiteSpaceTrim);
|
||||
println(getComputedStyle(document.getElementById("multiple-values")).whiteSpaceTrim);
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue