Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario, the last baseline of a scroll container is always the margin-end. In other (e.g. flex, grid) scenarios, it's the border-box clamped offset to the last line in the container. This enables the required 3 different behaviours for `inline-block` scroll containers for 3 different `baseline-source` values: - `auto`: Last baseline, margin-end - `first`: Border-box clamped offset to the first line - `last`: Border-box clamped offset to the last line Differential Revision: https://phabricator.services.mozilla.com/D173886
This commit is contained in:
@@ -1298,10 +1298,12 @@ void nsColumnSetFrame::AppendDirectlyOwnedAnonBoxes(
|
||||
}
|
||||
|
||||
Maybe<nscoord> nsColumnSetFrame::GetNaturalBaselineBOffset(
|
||||
WritingMode aWM, BaselineSharingGroup aBaselineGroup) const {
|
||||
WritingMode aWM, BaselineSharingGroup aBaselineGroup,
|
||||
BaselineExportContext aExportContext) const {
|
||||
Maybe<nscoord> result;
|
||||
for (const auto* kid : mFrames) {
|
||||
auto kidBaseline = kid->GetNaturalBaselineBOffset(aWM, aBaselineGroup);
|
||||
auto kidBaseline =
|
||||
kid->GetNaturalBaselineBOffset(aWM, aBaselineGroup, aExportContext);
|
||||
if (!kidBaseline) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user