mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibWeb: Set correct longhands if grid-area
subproperties are omitted
This commit is contained in:
parent
c029a9c98c
commit
2672fe99b7
Notes:
github-actions[bot]
2025-03-20 17:00:40 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/2672fe99b77 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4004 Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 6 additions and 6 deletions
|
@ -4176,14 +4176,14 @@ RefPtr<CSSStyleValue> Parser::parse_grid_area_shorthand_value(TokenStream<Compon
|
|||
if (row_end_style_value)
|
||||
row_end = row_end_style_value.release_nonnull()->as_grid_track_placement().grid_track_placement();
|
||||
else
|
||||
row_end = column_start;
|
||||
row_end = row_start;
|
||||
|
||||
// When grid-column-end is omitted, if grid-column-start is a <custom-ident>, grid-column-end is set to
|
||||
// that <custom-ident>; otherwise, it is set to auto.
|
||||
if (column_end_style_value)
|
||||
column_end = column_end_style_value.release_nonnull()->as_grid_track_placement().grid_track_placement();
|
||||
else
|
||||
column_end = row_end;
|
||||
column_end = column_start;
|
||||
|
||||
transaction.commit();
|
||||
return ShorthandStyleValue::create(PropertyID::GridArea,
|
||||
|
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
|||
|
||||
Found 53 tests
|
||||
|
||||
44 Pass
|
||||
9 Fail
|
||||
46 Pass
|
||||
7 Fail
|
||||
Pass e.style['grid-area'] = "auto" should set grid-column-end
|
||||
Pass e.style['grid-area'] = "auto" should set grid-column-start
|
||||
Pass e.style['grid-area'] = "auto" should set grid-row-end
|
||||
|
@ -16,10 +16,10 @@ Pass e.style['grid-area'] = "--a" should set grid-row-start
|
|||
Pass e.style['grid-area'] = "--a" should not set unrelated longhands
|
||||
Pass e.style['grid-area'] = "a / b" should set grid-column-end
|
||||
Pass e.style['grid-area'] = "a / b" should set grid-column-start
|
||||
Fail e.style['grid-area'] = "a / b" should set grid-row-end
|
||||
Pass e.style['grid-area'] = "a / b" should set grid-row-end
|
||||
Pass e.style['grid-area'] = "a / b" should set grid-row-start
|
||||
Pass e.style['grid-area'] = "a / b" should not set unrelated longhands
|
||||
Fail e.style['grid-area'] = "a / b / c" should set grid-column-end
|
||||
Pass e.style['grid-area'] = "a / b / c" should set grid-column-end
|
||||
Pass e.style['grid-area'] = "a / b / c" should set grid-column-start
|
||||
Pass e.style['grid-area'] = "a / b / c" should set grid-row-end
|
||||
Pass e.style['grid-area'] = "a / b / c" should set grid-row-start
|
||||
|
|
Loading…
Add table
Reference in a new issue