Closed Bug 1995348 Opened 1 year ago Closed 2 months ago

Implement parsing for masonry using new keywords `display:grid-lanes` / `inline-grid-lanes`

Categories

(Core :: Layout: Grid, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: dholbert, Assigned: tlouw)

References

(Blocks 6 open bugs)

Details

Attachments

(2 external files)

Spinning this off from bug 1991204 to implement masonry as a display value.

The actual value is TBD - it's currently display:something in the spec :) -- but the existing WPTs use[1] display:masonry and display:inline-masonry, so we should use that (behind a pref, because that's not what will actually ship) to enable the appropriate behavior for those tests.

[1] see e.g. here: https://searchfox.org/firefox-main/source/testing/web-platform/tests/css/css-grid/masonry/tentative/alignment/masonry-align-content-001.html#23
and here: https://searchfox.org/firefox-main/source/testing/web-platform/tests/css/css-grid/masonry/tentative/baseline/masonry-grid-item-content-baseline-001.html#20

(In reply to Daniel Holbert [:dholbert] from comment #0)

the existing WPTs use[1] display:masonry and display:inline-masonry, so we should use that (behind a pref, because that's not what will actually ship) to enable the appropriate behavior for those tests.

(As noted in the spec "issue 2" box (https://drafts.csswg.org/css-grid-3/#issue-1224e16e ), the discussion about the actual final display value is happening in https://github.com/w3c/csswg-drafts/issues/12022 . But that'll just be a trivial switcheroo once that's settled.)

For other masonry related properties, I saw in the css-grid-3's recent changes section https://drafts.csswg.org/css-grid-3/#recent-changes

Introduced item-flow and the item-* longhands, replacing masonry-flow and related properties. (Issue 11480)

So it appears that the parsing tests for masonry-flow, etc in https://wpt.fyi/results/css/css-masonry/tentative/parsing?label=master&label=experimental&aligned&q=masonry are out-of-date.

RESOLVED: masonry switch will be display: grid-lanes

https://github.com/w3c/csswg-drafts/issues/12022#issuecomment-3525043825

Summary: Implement parsing for masonry using placeholder `display:masonry` / `inline-masonry` → Implement parsing for masonry using placeholder `display:grid-lanes` / `inline-grid-lanes`

Use the "display: grid-lanes" value to conform to current usage in web
platform tests.

See: https://drafts.csswg.org/css-grid-3/#masonry-model

Assignee: nobody → tlouw
Status: NEW → ASSIGNED
Attachment #9528760 - Attachment description: Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=#layout → WIP: Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=#layout
Attachment #9528760 - Attachment description: WIP: Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=#layout → Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=#layout
Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/74e86f72e209 https://hg.mozilla.org/integration/autoland/rev/ce817bfc7b96 Implement the "grid-lanes" value for the "display" property r=layout-reviewers,dholbert
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d839523e0358 https://hg.mozilla.org/integration/autoland/rev/6fb14d9268d3 Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,dholbert" for causing assertion failures @ nsCSSFrameConstructor.cpp

Hit assert due to missing switch for ::GridLanes in frame constructor. Fixing.

Flags: needinfo?(tlouw)

Heads up, the inline-grid-lanes keyword is currently still under debate. In https://github.com/w3c/csswg-drafts/issues/10961#issuecomment-3829784658 I posted a formal objection against the resolution to add it. Also see the following comments. This doesn't have influence on the two-keywords value inline grid-lanes, though.

Sebastian

Attachment #9528760 - Attachment description: Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=#layout → WIP: Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=#layout
Attachment #9528760 - Attachment description: WIP: Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=#layout → Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=#layout
Summary: Implement parsing for masonry using placeholder `display:grid-lanes` / `inline-grid-lanes` → Implement parsing for masonry using new keywords `display:grid-lanes` / `inline-grid-lanes`
Blocks: 2068781
Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/80681147a04f https://hg.mozilla.org/integration/autoland/rev/f211b642f916 Implement the "grid-lanes" value for the "display" property r=layout-reviewers,dholbert
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6cba464774b1 https://hg.mozilla.org/integration/autoland/rev/14001f32a9eb Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,dholbert" for causing wr and wpt tests failures at grid-lanes

Backed out for causing wr and wpt tests failures at grid-lanes
Backout Link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-PASS | /css/css-grid/grid-lanes/alignment/column-justify-items-end-justify-self-start-001.html | Testing http://web-platform.test:8000/css/css-grid/grid-lanes/alignment/column-justify-items-end-justify-self-start-001.html == http://web-platform.test:8000/css/css-grid/grid-lanes/alignment/column-justify-items-end-justify-self-start-001-ref.html
wpt

Flags: needinfo?(tlouw)

Issue is an intermittent failure, added the expectation.

Flags: needinfo?(tlouw)
Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/58dc1aa78388 https://hg.mozilla.org/integration/autoland/rev/5730010ae5c2 Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bbc2bc5fb903 https://hg.mozilla.org/integration/autoland/rev/1b3cc64d718a Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" for causing WR failures @ /css/css-anchor-position/grid-lanes-position-area-basic.html

That one look like a (perhaps Android-only) off-by-1px issue -- the pink Anchored div is 1px further down in the testcase as compared to the reference case.

For that one, we probably want to restore the .ini file and change its expectation to

expected:
      if os == "android": FAIL
Blocks: 2069059
Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/67545d82b217 https://hg.mozilla.org/integration/autoland/rev/2a83e02a4e6e Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e3ad624d0b94 https://hg.mozilla.org/integration/autoland/rev/a5fd1083b2e0 Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" for causing failures at grid-lanes-item-placement-002.html.
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0d04e60d213a https://hg.mozilla.org/integration/autoland/rev/7dcbb9a29e5d Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" for causing failures at row-flex-track-intrinsic-sizes.html.
Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b950c0cea5ca https://hg.mozilla.org/integration/autoland/rev/64d41e8853e8 Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/18875dc40511 https://hg.mozilla.org/integration/autoland/rev/ace31ebf37b5 Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" for causing wpt failures.

Reverted this because it was causing wpt failures.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: PROCESS-CRASH | 71242aff-cceb-00a2-e10f-b14c7fef7f30 | MOZ_RELEASE_ASSERT(item->mFrame == oof) [@ nsGridContainerFrame::MasonryLayout] | /css/css-break/grid/grid-lanes/column-grid-lanes-oof-fragmentation-005.html

Please also check this wpt failure.

Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/057d1e9e61b6 https://hg.mozilla.org/integration/autoland/rev/845a1b8a6550 Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/62825 for changes under testing/web-platform/tests

Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ab5b898e126f https://hg.mozilla.org/integration/autoland/rev/6426534c69dd Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" for causing wr test failures

Backed out for causing wr and wpt test failures
Backout Link
Push with failures wr
wpt
Failure Log
Failure Log

Upstream PR was closed without merging

Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6654b23b3026 https://hg.mozilla.org/integration/autoland/rev/1a79dc2e0624 Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/49ae0e590a02 https://hg.mozilla.org/integration/autoland/rev/2e8c0bd6f4d1 Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" for causing multiple wpt/wr failures
Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3b87acb3429a https://hg.mozilla.org/integration/autoland/rev/47ac13122026 Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f5e317930189 https://hg.mozilla.org/integration/autoland/rev/289ffa4de2f1 Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" for causing failures at column-gap-decorations-inset-overlap-negative.html.
Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5086038b098d https://hg.mozilla.org/integration/autoland/rev/7069e0f754af Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio
Pushed by pstanciu@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5cbb21bce7d3 https://hg.mozilla.org/integration/autoland/rev/202bbb09c1ec Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" for causing wr failures @ column-negative-margin-003.html
Pushed by tlouw@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0cee93c68c01 https://hg.mozilla.org/integration/autoland/rev/ce8aea5846c2 Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4d27cc793aa9 https://hg.mozilla.org/integration/autoland/rev/a0e0962524bb Revert "Bug 1995348 - Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio" WR failures

(In reply to Sandor Molnar[:smolnar] from comment #43)

Failure log

This^ failure is bug 2054343, unrelated to this bug (and Boris is working on it).

Failure log #2

This^ one is indeed part of this bug (failure in grid-lanes/row-single-lane-fragmentation-002.html). That test seems to pass in current mozilla-central per wpt.fyi, likely by accident (because we use a block container instead of a grid-lanes container, and the layout with a block container happens to produce the rendering that the test expects). So we need to add an annotation for that one, to mark it as expected-fail.

Upstream PR was closed without merging

Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5a991196e742 https://hg.mozilla.org/integration/autoland/rev/1333eacacf6c Implement the "grid-lanes" value for the "display" property r=layout-reviewers,firefox-style-system-reviewers,dholbert,emilio
Attachment #9648540 - Attachment description: WIP: Bug 1995348 - remove some annotations for expected crashes and increase maximum allowed assertion count → Bug 1995348 - remove some annotations for expected crashes and increase maximum allowed assertion count
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/af1f1dad9765 https://hg.mozilla.org/integration/autoland/rev/23c57e1ef31f remove some annotations for expected crashes and increase maximum allowed assertion count
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch

Upstream PR merged by moz-wptsync-bot

Regressions: 2075829
Flags: needinfo?(tlouw)

Did you want to nominate this for a Nightly relnote? If so, set the relnote-firefox flag to "?"
https://wiki.mozilla.org/Release_Management/Release_Notes_Nomination

Possible wording:

Starting with Firefox 159, Firefox Nightly supports the grid-lanes and inline-grid-lanes values of the CSS display property for masonry-style layouts.

Flags: needinfo?(tlouw)

At this time, I don't think a relnote is needed. This was mostly done for investigation and assessment.

Flags: needinfo?(tlouw)
Blocks: 2076619
Blocks: 2077170
QA Whiteboard: [qa-triage-done-c160/b159]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: