mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibWeb: Serialize grid-area
as auto
if all sub-properties are auto
This commit is contained in:
parent
57d0c563e0
commit
c029a9c98c
Notes:
github-actions[bot]
2025-03-20 17:00:47 +00:00
Author: https://github.com/tcl3
Commit: c029a9c98c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4004
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 14 additions and 12 deletions
|
@ -293,6 +293,8 @@ String ShorthandStyleValue::to_string(SerializationMode mode) const
|
||||||
builder.appendff(" / {}", row_end.grid_track_placement().to_string());
|
builder.appendff(" / {}", row_end.grid_track_placement().to_string());
|
||||||
if (!column_end.grid_track_placement().is_auto())
|
if (!column_end.grid_track_placement().is_auto())
|
||||||
builder.appendff(" / {}", column_end.grid_track_placement().to_string());
|
builder.appendff(" / {}", column_end.grid_track_placement().to_string());
|
||||||
|
if (builder.is_empty())
|
||||||
|
return "auto"_string;
|
||||||
return MUST(builder.to_string());
|
return MUST(builder.to_string());
|
||||||
}
|
}
|
||||||
// FIXME: Serialize Grid differently once we support it better!
|
// FIXME: Serialize Grid differently once we support it better!
|
||||||
|
|
|
@ -366,8 +366,8 @@ All supported properties and their default values exposed from CSSStylePropertie
|
||||||
'font-width': 'normal'
|
'font-width': 'normal'
|
||||||
'gap': 'normal'
|
'gap': 'normal'
|
||||||
'grid': ''
|
'grid': ''
|
||||||
'gridArea': ''
|
'gridArea': 'auto'
|
||||||
'grid-area': ''
|
'grid-area': 'auto'
|
||||||
'gridAutoColumns': 'auto'
|
'gridAutoColumns': 'auto'
|
||||||
'grid-auto-columns': 'auto'
|
'grid-auto-columns': 'auto'
|
||||||
'gridAutoFlow': 'row'
|
'gridAutoFlow': 'row'
|
||||||
|
|
|
@ -2,9 +2,9 @@ Harness status: OK
|
||||||
|
|
||||||
Found 30 tests
|
Found 30 tests
|
||||||
|
|
||||||
13 Pass
|
14 Pass
|
||||||
17 Fail
|
16 Fail
|
||||||
Fail Property grid-area value 'auto / auto / auto / auto'
|
Pass Property grid-area value 'auto / auto / auto / auto'
|
||||||
Pass Property grid-row value 'auto / auto'
|
Pass Property grid-row value 'auto / auto'
|
||||||
Pass Property grid-column-end value 'auto'
|
Pass Property grid-column-end value 'auto'
|
||||||
Fail Property grid-row value '-zπ'
|
Fail Property grid-row value '-zπ'
|
||||||
|
|
|
@ -2,13 +2,13 @@ Harness status: OK
|
||||||
|
|
||||||
Found 57 tests
|
Found 57 tests
|
||||||
|
|
||||||
19 Pass
|
24 Pass
|
||||||
38 Fail
|
33 Fail
|
||||||
Fail e.style['grid-area'] = "auto" should set the property value
|
Pass e.style['grid-area'] = "auto" should set the property value
|
||||||
Fail e.style['grid-area'] = "auto / auto" should set the property value
|
Pass e.style['grid-area'] = "auto / auto" should set the property value
|
||||||
Fail e.style['grid-area'] = "auto / auto / auto" should set the property value
|
Pass e.style['grid-area'] = "auto / auto / auto" should set the property value
|
||||||
Fail e.style['grid-area'] = "auto / auto / auto / auto" should set the property value
|
Pass e.style['grid-area'] = "auto / auto / auto / auto" should set the property value
|
||||||
Fail e.style['grid-area'] = "AuTo" should set the property value
|
Pass e.style['grid-area'] = "AuTo" should set the property value
|
||||||
Pass e.style['grid-row'] = "auto" should set the property value
|
Pass e.style['grid-row'] = "auto" should set the property value
|
||||||
Pass e.style['grid-row'] = "auto/auto" should set the property value
|
Pass e.style['grid-row'] = "auto/auto" should set the property value
|
||||||
Pass e.style['grid-column-end'] = "AuTo" should set the property value
|
Pass e.style['grid-column-end'] = "AuTo" should set the property value
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue