Bug 245025 - [css-grid] span i should not serialize to span 1 i
Summary: [css-grid] span i should not serialize to span 1 i
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Woodrow
URL:
Keywords: InRadar
Depends on:
Blocks: 204611
  Show dependency treegraph
 
Reported: 2022-09-10 06:21 PDT by Tim Nguyen (:ntim)
Modified: 2022-09-23 23:32 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Radar WebKit Bug Importer 2022-09-10 06:22:11 PDT
<rdar://problem/99778041>
Comment 2 Matt Woodrow 2022-09-21 19:06:49 PDT
This test is invalid :(

It's checking that `grid-column-start: span 1 i` round-trips exactly, as does `grid-row-start: span i`.

The only way to make both of those tests is to preserve whether the '1' was explicitly passed in, and use that to decide how to serialise the computed value, rather than just using the shortest serialisation principle.

Gecko is passing this because they parse an implicit integer as 0, and omit serializing the integer if it's 0. They then covert 0 to 1 at used value time.

The spec for parsing 'span': If the <integer> is omitted, it defaults to 1. Negative integers or zero are invalid.
Comment 3 Matt Woodrow 2022-09-21 19:23:06 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4587
Comment 4 EWS 2022-09-23 23:32:08 PDT
Committed 254821@main (fc4a525dc150): <https://commits.webkit.org/254821@main>

Reviewed commits have been landed. Closing PR #4587 and removing active labels.