Closed Bug 1878846 Opened 1 year ago Closed 1 year ago

[css-grid] Baseline aligned items should join the correct sharing group according to writing mode

Categories

(Core :: Layout: Grid, defect, P2)

defect

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: tlouw, Assigned: tlouw)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

https://drafts.csswg.org/css-align-3/#baseline-terms

The baseline alignment preferences of two boxes in a baseline-sharing group are compatible if they have:
- the same block flow direction and same baseline alignment preference
- opposite block flow direction and opposite baseline alignment preference

This avoids using raw integer values which might cause bugs.
Also removed a clang-format: off block for better formatting.

https://drafts.csswg.org/css-align-3/#baseline-terms
The baseline sharing group is not equal to the baseline specified for
the item. It has to be calculated separately. The baseline sharing
group determines on which side of the block the item is aligned, but the
specified baseline is still used to determine the baseline of the item.

Depends on D200767

Attachment #9378467 - Attachment description: WIP: Bug 1878846 - Change grid items to use PerLogicalAxis types. r=#layout → Bug 1878846 - Change grid items to use PerLogicalAxis types. r=#layout
Attachment #9378468 - Attachment description: WIP: Bug 1878846 - Take writing mode into account when calculating baseline sharing group. r=#layout → Bug 1878846 - Take writing mode into account when calculating baseline sharing group. r=#layout
Pushed by tlouw@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cab51450b6bd Change grid items to use PerLogicalAxis types. r=TYLin

Backed out for causing build bustages in nsIFrame.h

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/layout/generic/nsIFrame.h(4522,15): error: inline function 'nsIFrame::IsMasonry' is not defined [-Werror,-Wundefined-inline]
Flags: needinfo?(tlouw)

False positive warning reported by clangd for a removed header file. Fixed and relanded.

Flags: needinfo?(tlouw)
Pushed by tlouw@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7829576fd77e Change grid items to use PerLogicalAxis types. r=TYLin
Pushed by tlouw@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b6eb0c382d2f Take writing mode into account when calculating baseline sharing group. r=layout-reviewers,dholbert,emilio

Backed out for causing wr failures on masonry-grid-item-content-baseline-001.html.

Flags: needinfo?(tlouw)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch

Fixed backed out patch. Re-landing.

Flags: needinfo?(tlouw)
Pushed by tlouw@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c59a7f7b8852 Take writing mode into account when calculating baseline sharing group. r=layout-reviewers,dholbert,emilio

Backed out for causing Wr failures on align-items-baseline-row-vert.html

Backout link

Push with failures

Failure log

Flags: needinfo?(tlouw)
Pushed by tlouw@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ef94bf18338f Take writing mode into account when calculating baseline sharing group. r=layout-reviewers,dholbert,emilio
Flags: needinfo?(tlouw)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: