diff --git a/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp b/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp index 7b49c242df8..8ac62d36d42 100644 --- a/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp +++ b/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp @@ -4176,14 +4176,14 @@ RefPtr Parser::parse_grid_area_shorthand_value(TokenStreamas_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 , grid-column-end is set to // that ; 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, diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-grid/parsing/grid-area-shorthand.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-grid/parsing/grid-area-shorthand.txt index e956d974aed..9c9f57fccdb 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-grid/parsing/grid-area-shorthand.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-grid/parsing/grid-area-shorthand.txt @@ -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