[gap-decorations] Update multicol gap decorations based on new def [chromium/src : main]

0 views
Skip to first unread message

Javier Contreras (Gerrit)

unread,
Sep 22, 2025, 2:30:39 PM (3 days ago) Sep 22
to Alison Maher, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
Attention needed from Alison Maher and Sam Davis Omekara

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Alison Maher
  • Sam Davis Omekara
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
Gerrit-Change-Number: 6972503
Gerrit-PatchSet: 1
Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
Gerrit-Attention: Alison Maher <alm...@microsoft.com>
Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
Gerrit-Comment-Date: Mon, 22 Sep 2025 18:30:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alison Maher (Gerrit)

unread,
Sep 23, 2025, 2:05:15 PM (2 days ago) Sep 23
to Javier Contreras, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
Attention needed from Javier Contreras and Sam Davis Omekara

Alison Maher added 24 comments

Patchset-level comments
File-level comment, Patchset 2:
Alison Maher . resolved

First pass, still need to look at tests

Commit Message
Line 26, Patchset 2:2. Instead of having `CrossGap`s end at only at spanners, we instead simply have
Alison Maher . unresolved

nit: extra "at"

File third_party/blink/renderer/core/layout/column_layout_algorithm.h
Line 275, Patchset 2: GapToRangesMap column_gaps_to_blocked_row_ranges_map_;
Alison Maher . unresolved

This could use a comment

Line 23, Patchset 2:using GapToRangesMap = HashMap<wtf_size_t,
Vector<TrackRange>,
blink::IntWithZeroKeyHashTraits<int>>;
Alison Maher . unresolved

Would it potentially make sense for this to live in GapGeometry instead (if, for example, it becomes useful for some other case in the future)

Or I see later on that it already is. Can we just use that one instead?

File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
Line 480, Patchset 2: std::move(column_gaps_to_blocked_row_ranges_map_));
Alison Maher . unresolved

Similar comment to one I think I made before, but creating a separate data structure rather than adding them directly to the gap geo as we go seems unnecessary. Can we add a TODO to look into cleaning that up for multicol (and other cases)

Line 1475, Patchset 2: (row_gap_size_));
Alison Maher . unresolved

nit: parens no longer needed

Line 1477, Patchset 2: ResetRangeOfCrossGapsBeforeCurrentMainGap();
Alison Maher . unresolved

Will this always be called after CommitRangeOfCrossGapsBeforeCurrentMainGap()? If so, it might make sense to move this into CommitRangeOfCrossGapsBeforeCurrentMainGap() instead

Line 1488, Patchset 2: // version. We add a cross gap for every column in a row, after the
Alison Maher . unresolved

"the start of"

Line 1489, Patchset 2: // first column.
Alison Maher . unresolved

"since there is no gap before the first column"

Line 1618, Patchset 2: /*spanner_main_gap_type=*/SpannerMainGapType::kStart);
Alison Maher . unresolved

nit: since the type and variable name match, it should be ok to remove this comment

Line 1625, Patchset 2: /*spanner_main_gap_type=*/SpannerMainGapType::kEnd);
Alison Maher . unresolved

nit: same comment as above

Line 1628, Patchset 2: // gap before range to be that one of the main gap before this one. This
Alison Maher . unresolved

nit: "one" not needed

Line 1631, Patchset 2: main_gaps_.back().SetRangeOfCrossGapsBefore(
main_gaps_[main_gaps_.size() - 2].RangeOfCrossGapsBefore());
CHECK(main_gaps_.back().RangeOfCrossGapsBefore().IsValid());
Alison Maher . unresolved

If we hit a spanner, could we just check if the last main gap was a spanner, and if so, just update the end offset to the stored spanner main gap, creating one consecutive spanner for groups of spanners?

Line 1639, Patchset 2: // the two main gaps added above)
Alison Maher . unresolved

nit: missing punctuation

File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
Line 370, Patchset 2: wtf_size_t spanner_index = main_gap_running_index_ + 1;
Alison Maher . unresolved

Should we do a CHECK that this is actually an end spanner main gap

and that this index is also less than main_gaps_.size()

Line 368, Patchset 2: // The intersection at an end spanner main gap must still be added to
// the vector, so we can paint behind spanners with `rule-break: none`.
wtf_size_t spanner_index = main_gap_running_index_ + 1;
intersections.push_back(main_gaps_[spanner_index].GetGapOffset());
Alison Maher . unresolved

I think there is still an open question on what happens if a spanner takes up space in more than one row, what happens in that case. Do we paint the gap consecutively through the two rows (even though in general, we see the two rows as having separate decorations)

Line 373, Patchset 2: // In order to support painting behind spanners with `rule-break: none`
// in cases where we have a sequence of spanners back to back, we need
// to add the offsets of any spanners that are adjacent to the current
// spanner. When spanner main gaps have the same `CrossGapBeforeRange`,
// it means they are back to back with no columns in between.
Alison Maher . unresolved

As noted earlier, I wonder if we can store these as one large spanner, such that later, we only have to deal with one conceptual spanner for each group of spanners

Line 417, Patchset 2: // Only for multicol:
Alison Maher . unresolved

nit: this is implied so can be removed

Line 419, Patchset 2: // There are rare edge cases where there are spanners in sequence without
// any columns in between. When this happens, we must make sure we advance
// the `main_gap_running_index_` past this sequence.
if (main_gap_after_consecutive_spanners_index_.has_value()) {
main_gap_running_index_ =
main_gap_after_consecutive_spanners_index_.value();
}

if (main_gap_running_index_ == main_gaps.size()) {
main_gap_running_index_ = kNotFound;
return content_block_end_;
}

CHECK_LE(main_gap_running_index_, main_gaps.size());

if (main_gaps[main_gap_running_index_].IsEndSpannerMainGap()) {
// Main gaps placed at the end of spanners don't have any cross gaps
// associated with them, so we skip them.
++main_gap_running_index_;
if (main_gap_running_index_ == main_gaps.size()) {
main_gap_running_index_ = kNotFound;
return content_block_end_;
}
}
Alison Maher . unresolved

Same comments as earlier, I wonder if we can simplify this if we consider these as one large spanner rather than separate spanners

Line 476, Patchset 2: CrossGap::EdgeIntersectionState cross_gap_edge_state =
GetCrossGaps()[gap_index].GetEdgeIntersectionState();
Alison Maher . unresolved

Can we set this in multicol and just rely on this for both, rather than having separate logic for each layout type?

Line 503, Patchset 2: // TODO(crbug.com/446616449): This might change soon, and if so we will need
// to revisit this.
Alison Maher . unresolved

Same comment as earlier, what if a spanner is large enough to cross into two rows?

Line 551, Patchset 2: // `GenerateCrossIntersectionList`, which is not accounted for when the
// `column_gaps_to_blocked_row_ranges_` is created.
Alison Maher . unresolved

Can you expand on this comment? It makes me wonder if we can just account for this in column_gaps_to_blocked_row_ranges_, but I'm not sure what that would mean/look like.

Line 553, Patchset 2: wtf_size_t multicol_adjustment =
GetContainerType() == ContainerType::kMultiColumn ? 1 : 0;
Alison Maher . unresolved

Since this will always be the same, this could be a static var

File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
Line 186, Patchset 2: // rather than at the middle, so we must adjust
Alison Maher . unresolved

nit: was there meant to be more to this comment?

Open in Gerrit

Related details

Attention is currently required from:
  • Javier Contreras
  • Sam Davis Omekara
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
    Gerrit-Change-Number: 6972503
    Gerrit-PatchSet: 2
    Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
    Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
    Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
    Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
    Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
    Gerrit-Comment-Date: Tue, 23 Sep 2025 18:05:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Javier Contreras (Gerrit)

    unread,
    Sep 24, 2025, 2:21:47 PM (yesterday) Sep 24
    to Alison Maher, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
    Attention needed from Alison Maher and Sam Davis Omekara

    Javier Contreras added 23 comments

    Commit Message
    Line 26, Patchset 2:2. Instead of having `CrossGap`s end at only at spanners, we instead simply have
    Alison Maher . resolved

    nit: extra "at"

    Javier Contreras

    Done

    File third_party/blink/renderer/core/layout/column_layout_algorithm.h
    Line 275, Patchset 2: GapToRangesMap column_gaps_to_blocked_row_ranges_map_;
    Alison Maher . resolved

    This could use a comment

    Javier Contreras

    Done

    Line 23, Patchset 2:using GapToRangesMap = HashMap<wtf_size_t,
    Vector<TrackRange>,
    blink::IntWithZeroKeyHashTraits<int>>;
    Alison Maher . resolved

    Would it potentially make sense for this to live in GapGeometry instead (if, for example, it becomes useful for some other case in the future)

    Or I see later on that it already is. Can we just use that one instead?

    Javier Contreras

    we'd need to include the gap_geometry.h file here, which to me seems like overkill just for an alias.

    File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
    Line 480, Patchset 2: std::move(column_gaps_to_blocked_row_ranges_map_));
    Alison Maher . resolved

    Similar comment to one I think I made before, but creating a separate data structure rather than adding them directly to the gap geo as we go seems unnecessary. Can we add a TODO to look into cleaning that up for multicol (and other cases)

    Javier Contreras

    Done

    Line 1475, Patchset 2: (row_gap_size_));
    Alison Maher . resolved

    nit: parens no longer needed

    Javier Contreras

    Done

    Line 1477, Patchset 2: ResetRangeOfCrossGapsBeforeCurrentMainGap();
    Alison Maher . resolved

    Will this always be called after CommitRangeOfCrossGapsBeforeCurrentMainGap()? If so, it might make sense to move this into CommitRangeOfCrossGapsBeforeCurrentMainGap() instead

    Javier Contreras

    Yes good idea, it wasnt the case before but it is now

    Line 1488, Patchset 2: // version. We add a cross gap for every column in a row, after the
    Alison Maher . resolved

    "the start of"

    Javier Contreras

    Done

    Line 1489, Patchset 2: // first column.
    Alison Maher . resolved

    "since there is no gap before the first column"

    Javier Contreras

    Done

    Line 1618, Patchset 2: /*spanner_main_gap_type=*/SpannerMainGapType::kStart);
    Alison Maher . resolved

    nit: since the type and variable name match, it should be ok to remove this comment

    Javier Contreras

    Done

    Line 1625, Patchset 2: /*spanner_main_gap_type=*/SpannerMainGapType::kEnd);
    Alison Maher . resolved

    nit: same comment as above

    Javier Contreras

    Done

    Line 1628, Patchset 2: // gap before range to be that one of the main gap before this one. This
    Alison Maher . resolved

    nit: "one" not needed

    Javier Contreras

    Done

    Line 1631, Patchset 2: main_gaps_.back().SetRangeOfCrossGapsBefore(
    main_gaps_[main_gaps_.size() - 2].RangeOfCrossGapsBefore());
    CHECK(main_gaps_.back().RangeOfCrossGapsBefore().IsValid());
    Alison Maher . resolved

    If we hit a spanner, could we just check if the last main gap was a spanner, and if so, just update the end offset to the stored spanner main gap, creating one consecutive spanner for groups of spanners?

    Javier Contreras

    Resolved

    Line 1639, Patchset 2: // the two main gaps added above)
    Alison Maher . resolved

    nit: missing punctuation

    Javier Contreras

    Done

    File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
    Line 370, Patchset 2: wtf_size_t spanner_index = main_gap_running_index_ + 1;
    Alison Maher . resolved

    Should we do a CHECK that this is actually an end spanner main gap

    and that this index is also less than main_gaps_.size()

    Javier Contreras

    Done

    Line 368, Patchset 2: // The intersection at an end spanner main gap must still be added to
    // the vector, so we can paint behind spanners with `rule-break: none`.
    wtf_size_t spanner_index = main_gap_running_index_ + 1;
    intersections.push_back(main_gaps_[spanner_index].GetGapOffset());
    Alison Maher . resolved

    I think there is still an open question on what happens if a spanner takes up space in more than one row, what happens in that case. Do we paint the gap consecutively through the two rows (even though in general, we see the two rows as having separate decorations)

    Javier Contreras

    Discussed offline, will file an issue for the case where the spanner pushes content back but we still have a row behind the spanner.

    Line 373, Patchset 2: // In order to support painting behind spanners with `rule-break: none`
    // in cases where we have a sequence of spanners back to back, we need
    // to add the offsets of any spanners that are adjacent to the current
    // spanner. When spanner main gaps have the same `CrossGapBeforeRange`,
    // it means they are back to back with no columns in between.
    Alison Maher . resolved

    As noted earlier, I wonder if we can store these as one large spanner, such that later, we only have to deal with one conceptual spanner for each group of spanners

    Javier Contreras

    Done

    Line 417, Patchset 2: // Only for multicol:
    Alison Maher . resolved

    nit: this is implied so can be removed

    Javier Contreras

    Done

    Line 419, Patchset 2: // There are rare edge cases where there are spanners in sequence without
    // any columns in between. When this happens, we must make sure we advance
    // the `main_gap_running_index_` past this sequence.
    if (main_gap_after_consecutive_spanners_index_.has_value()) {
    main_gap_running_index_ =
    main_gap_after_consecutive_spanners_index_.value();
    }

    if (main_gap_running_index_ == main_gaps.size()) {
    main_gap_running_index_ = kNotFound;
    return content_block_end_;
    }

    CHECK_LE(main_gap_running_index_, main_gaps.size());

    if (main_gaps[main_gap_running_index_].IsEndSpannerMainGap()) {
    // Main gaps placed at the end of spanners don't have any cross gaps
    // associated with them, so we skip them.
    ++main_gap_running_index_;
    if (main_gap_running_index_ == main_gaps.size()) {
    main_gap_running_index_ = kNotFound;
    return content_block_end_;
    }
    }
    Alison Maher . resolved

    Same comments as earlier, I wonder if we can simplify this if we consider these as one large spanner rather than separate spanners

    Javier Contreras

    Done

    Line 476, Patchset 2: CrossGap::EdgeIntersectionState cross_gap_edge_state =
    GetCrossGaps()[gap_index].GetEdgeIntersectionState();
    Alison Maher . resolved

    Can we set this in multicol and just rely on this for both, rather than having separate logic for each layout type?

    Javier Contreras

    I have updated the code to use the edge state. However, we still need special logic for multicolumn because the gaps are not equivalent between flex and mc (for instance flex cross gaps will always only have 2 intersections, multicol's may have 3).

    I updated the unit tests to expect the correct edge state now, but this also uncovered a bug that we were accidentally passing some outset related tests. Now we are failing them (but we have the correct edge state now), but that is ok for now because the outset property will change (with the inset related changes and the fact that the intersections are no longer at the middle of the row gap). I've added these tests as failing until this issue is resolved and in the spec https://github.com/w3c/csswg-drafts/issues/12784, https://github.com/w3c/csswg-drafts/issues/12848

    Line 503, Patchset 2: // TODO(crbug.com/446616449): This might change soon, and if so we will need
    // to revisit this.
    Alison Maher . resolved

    Same comment as earlier, what if a spanner is large enough to cross into two rows?

    Javier Contreras

    See my response to earlier comment for this.

    Line 551, Patchset 2: // `GenerateCrossIntersectionList`, which is not accounted for when the
    // `column_gaps_to_blocked_row_ranges_` is created.
    Alison Maher . unresolved

    Can you expand on this comment? It makes me wonder if we can just account for this in column_gaps_to_blocked_row_ranges_, but I'm not sure what that would mean/look like.

    Javier Contreras

    Still working on fixing this, but the rest is ready to review.

    Line 553, Patchset 2: wtf_size_t multicol_adjustment =
    GetContainerType() == ContainerType::kMultiColumn ? 1 : 0;
    Alison Maher . resolved

    Since this will always be the same, this could be a static var

    Javier Contreras

    Done

    File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
    Line 186, Patchset 2: // rather than at the middle, so we must adjust
    Alison Maher . resolved

    nit: was there meant to be more to this comment?

    Javier Contreras

    No but i've added some to make it clear

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alison Maher
    • Sam Davis Omekara
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
    Gerrit-Change-Number: 6972503
    Gerrit-PatchSet: 5
    Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
    Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
    Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
    Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
    Gerrit-Attention: Alison Maher <alm...@microsoft.com>
    Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 18:21:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alison Maher <alm...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lkaye Handley (Gerrit)

    unread,
    Sep 24, 2025, 3:28:14 PM (yesterday) Sep 24
    to Javier Contreras, Alison Maher, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
    Attention needed from Alison Maher, Javier Contreras and Sam Davis Omekara

    Lkaye Handley added 1 comment

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Lkaye Handley . resolved

    I'm a lot lost

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alison Maher
    • Javier Contreras
    • Sam Davis Omekara
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
    Gerrit-Change-Number: 6972503
    Gerrit-PatchSet: 5
    Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
    Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
    Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
    Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
    Gerrit-CC: Lkaye Handley <handle...@gmail.com>
    Gerrit-Attention: Alison Maher <alm...@microsoft.com>
    Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 19:28:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Javier Contreras (Gerrit)

    unread,
    Sep 24, 2025, 3:54:19 PM (yesterday) Sep 24
    to Lkaye Handley, Alison Maher, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
    Attention needed from Alison Maher and Sam Davis Omekara

    Javier Contreras added 2 comments

    File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
    Line 476, Patchset 2: CrossGap::EdgeIntersectionState cross_gap_edge_state =
    GetCrossGaps()[gap_index].GetEdgeIntersectionState();
    Alison Maher . resolved

    Can we set this in multicol and just rely on this for both, rather than having separate logic for each layout type?

    Javier Contreras

    I have updated the code to use the edge state. However, we still need special logic for multicolumn because the gaps are not equivalent between flex and mc (for instance flex cross gaps will always only have 2 intersections, multicol's may have 3).

    I updated the unit tests to expect the correct edge state now, but this also uncovered a bug that we were accidentally passing some outset related tests. Now we are failing them (but we have the correct edge state now), but that is ok for now because the outset property will change (with the inset related changes and the fact that the intersections are no longer at the middle of the row gap). I've added these tests as failing until this issue is resolved and in the spec https://github.com/w3c/csswg-drafts/issues/12784, https://github.com/w3c/csswg-drafts/issues/12848

    Javier Contreras

    Disregard the previous comment. After some more thinking and discussing with Sam, we should in fact be treating all intersections as `kBoth` (all intersections in multicol should be edges) given where we are placing the intersections now (before row gaps) and given the ongoing discussion in the linked issues above. We can reconsider this later based on what we decide for `inset` etc.

    Line 551, Patchset 2: // `GenerateCrossIntersectionList`, which is not accounted for when the
    // `column_gaps_to_blocked_row_ranges_` is created.
    Alison Maher . resolved

    Can you expand on this comment? It makes me wonder if we can just account for this in column_gaps_to_blocked_row_ranges_, but I'm not sure what that would mean/look like.

    Javier Contreras

    Still working on fixing this, but the rest is ready to review.

    Javier Contreras

    Turns out with the new design of where we place the intersections, we don't need the gap.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alison Maher
    • Sam Davis Omekara
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
    Gerrit-Change-Number: 6972503
    Gerrit-PatchSet: 6
    Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
    Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
    Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
    Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
    Gerrit-CC: Lkaye Handley <handle...@gmail.com>
    Gerrit-Attention: Alison Maher <alm...@microsoft.com>
    Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 19:54:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alison Maher <alm...@microsoft.com>
    Comment-In-Reply-To: Javier Contreras <javi...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alison Maher (Gerrit)

    unread,
    Sep 24, 2025, 7:20:16 PM (yesterday) Sep 24
    to Javier Contreras, Lkaye Handley, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
    Attention needed from Javier Contreras and Sam Davis Omekara

    Alison Maher added 9 comments

    File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
    Line 909, Patchset 8 (Latest): // in between, each spanner accounting for 2 `MainGap`s). In such cases, we
    Alison Maher . unresolved

    Is this still accurate?

    Line 1618, Patchset 8 (Latest): // If we have consecutive spanners with no content in between, we removethe
    Alison Maher . unresolved

    nit: missing space

    Line 1623, Patchset 8 (Latest): }

    if (!spanner_placed_after_spanner_with_no_content_in_between) {
    Alison Maher . unresolved

    This can be simplified to an else

    Line 1639, Patchset 8 (Latest): CHECK_GE(main_gaps_.size(), 2u);
    Alison Maher . unresolved

    Will it always be 2? (if there are rows or other spanners earlier on?)

    Line 1643, Patchset 8 (Latest): // enables us to carry this range forward to any spanner main gaps that are
    // back to back (with no columns in between).
    Alison Maher . unresolved

    Is this still needed, since any back to back spanners are now considered contiguous?

    File third_party/blink/renderer/core/layout/gap/gap_geometry.h
    Line 304, Patchset 8 (Latest): // In multicol, a gap of intersections will be spanner adjacent if and only if
    // there are 3 intersections in the gap, and we are at the middle
    // intersection. This is because all multicol CrossGaps will have only 2
    // intersections, except if they are adjacent to a spanner, in which case they
    // will have 3 intersections: One at the start of the gap, one at the start of
    // the spanner, and one at the end of the spanner. The middle intersection is
    // the one that is spanner adjacent.
    Alison Maher . unresolved

    What if there are two spanners at separate locations, won't there be more than 3?

    File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
    Line 479, Patchset 8 (Latest): if (cross_gap_edge_state == CrossGap::EdgeIntersectionState::kBoth) {
    Alison Maher . unresolved

    If they are all considered both, should this be a CHECK_EQ instead and just always return true?

    Line 528, Patchset 8 (Latest): IsTrackCovered(track_direction, primary_index, secondary_index - 1)) {
    Alison Maher . unresolved

    Why can't we use this same logic for multicol?

    Line 553, Patchset 8 (Latest): return intersections.size() == 3 && intersection_index == 1;
    Alison Maher . unresolved

    As mentioned elsewhere, what happens if there is more than one (non-contiguous) spanner in a row

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Javier Contreras
    • Sam Davis Omekara
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
      Gerrit-Change-Number: 6972503
      Gerrit-PatchSet: 8
      Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
      Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
      Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
      Gerrit-CC: Lkaye Handley <handle...@gmail.com>
      Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
      Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
      Gerrit-Comment-Date: Wed, 24 Sep 2025 23:20:06 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Javier Contreras (Gerrit)

      unread,
      Sep 24, 2025, 7:41:32 PM (yesterday) Sep 24
      to Lkaye Handley, Alison Maher, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
      Attention needed from Alison Maher and Sam Davis Omekara

      Javier Contreras added 9 comments

      File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
      Line 909, Patchset 8: // in between, each spanner accounting for 2 `MainGap`s). In such cases, we
      Alison Maher . resolved

      Is this still accurate?

      Javier Contreras

      It is. We will end up removing one of those main gaps later, but we still need to carry the range forward as we do.

      Line 1618, Patchset 8: // If we have consecutive spanners with no content in between, we removethe
      Alison Maher . resolved

      nit: missing space

      Javier Contreras

      Done

      Line 1623, Patchset 8: }

      if (!spanner_placed_after_spanner_with_no_content_in_between) {
      Alison Maher . resolved

      This can be simplified to an else

      Javier Contreras

      Done

      Line 1639, Patchset 8: CHECK_GE(main_gaps_.size(), 2u);
      Alison Maher . resolved

      Will it always be 2? (if there are rows or other spanners earlier on?)

      Javier Contreras

      There can be more, but its a CHECK_GE so it will be fine.

      Line 1643, Patchset 8: // enables us to carry this range forward to any spanner main gaps that are

      // back to back (with no columns in between).
      Alison Maher . resolved

      Is this still needed, since any back to back spanners are now considered contiguous?

      Javier Contreras

      its still needed to set the range, but i updated the comment

      File third_party/blink/renderer/core/layout/gap/gap_geometry.h
      Line 304, Patchset 8: // In multicol, a gap of intersections will be spanner adjacent if and only if

      // there are 3 intersections in the gap, and we are at the middle
      // intersection. This is because all multicol CrossGaps will have only 2
      // intersections, except if they are adjacent to a spanner, in which case they
      // will have 3 intersections: One at the start of the gap, one at the start of
      // the spanner, and one at the end of the spanner. The middle intersection is
      // the one that is spanner adjacent.
      Alison Maher . resolved

      What if there are two spanners at separate locations, won't there be more than 3?

      Javier Contreras

      Not really. We create a cross gap for each column in each row of columns (refer to picture in resources). The intersections related to each of those cross gaps (C1...) can have at most 3 intersections (if the cross gap has a spanner after it), or two (if it doesn't have a spanner after it).

      I expanded upon this in the README and you can use the picture for reference.

      File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
      Line 479, Patchset 8: if (cross_gap_edge_state == CrossGap::EdgeIntersectionState::kBoth) {
      Alison Maher . resolved

      If they are all considered both, should this be a CHECK_EQ instead and just always return true?

      Javier Contreras

      Done

      Line 528, Patchset 8: IsTrackCovered(track_direction, primary_index, secondary_index - 1)) {
      Alison Maher . resolved

      Why can't we use this same logic for multicol?

      Javier Contreras

      Because for a given multicol (say for example the one in the picture) in which if it was a grid it would have 2 Cross Gaps and 2 row gaps, in multicol we end up having way more cross gaps than we do "visual columns". We could try to retrofit by adding back the additional map and tracking ranges in that map. This way though we don't need to use any other structures or data.

      Line 553, Patchset 8: return intersections.size() == 3 && intersection_index == 1;
      Alison Maher . resolved

      As mentioned elsewhere, what happens if there is more than one (non-contiguous) spanner in a row

      Javier Contreras

      My other reply addresses this

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alison Maher
      • Sam Davis Omekara
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
      Gerrit-Change-Number: 6972503
      Gerrit-PatchSet: 8
      Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
      Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
      Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
      Gerrit-CC: Lkaye Handley <handle...@gmail.com>
      Gerrit-Attention: Alison Maher <alm...@microsoft.com>
      Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
      Gerrit-Comment-Date: Wed, 24 Sep 2025 23:41:20 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Alison Maher <alm...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sam Davis Omekara (Gerrit)

      unread,
      11:57 AM (12 hours ago) 11:57 AM
      to Javier Contreras, Lkaye Handley, Alison Maher, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
      Attention needed from Alison Maher and Javier Contreras

      Sam Davis Omekara added 5 comments

      Commit Message
      Line 27, Patchset 2:`CrossGap`s end at both spanners and row gaps, and start right after.
      Sam Davis Omekara . unresolved

      nit: "... at all main gaps (spanners and row gaps)"

      File third_party/blink/renderer/core/layout/gap/gap_geometry.h
      Line 311, Patchset 9 (Latest): bool IsGapSpannerAdjacent(GridTrackSizingDirection direction,
      Sam Davis Omekara . unresolved

      This is called IsGapSpannerAdjacent. So shouldn't it be only checking num of intersections?

      Line 109, Patchset 9 (Latest):using GapToRangesMap =
      Sam Davis Omekara . unresolved

      Should this be renamed back since we don't end up needing in this CL?

      File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
      Line 538, Patchset 9 (Latest):bool GapGeometry::IsGapSpannerAdjacent(
      Sam Davis Omekara . unresolved

      Ahh, I see what this is doing now. So I'll restructure it this way:

      IsGapSpannerAdjacent should only take in intersections. But the comment should hint that it's *_only_* used multi col cross gaps, when the main gap below it is a spanner gap. I think Adjacent could also mean side by side too if I'm not mistaken ... so maybe `IsMainGapBelowSpanner` might be clearer ...

      Then when we use this `IsMainGapBelowSpanner` , we can check secondary index == 1 to mark as BlockedAfter...

      File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
      Line 191, Patchset 9 (Latest): const LayoutUnit center =
      Sam Davis Omekara . unresolved

      Can this knowledge belong to GapGeometry::GetGapOffset().

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alison Maher
      • Javier Contreras
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
        Gerrit-Change-Number: 6972503
        Gerrit-PatchSet: 9
        Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
        Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
        Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
        Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
        Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
        Gerrit-CC: Lkaye Handley <handle...@gmail.com>
        Gerrit-Attention: Alison Maher <alm...@microsoft.com>
        Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
        Gerrit-Comment-Date: Thu, 25 Sep 2025 15:57:03 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Alison Maher (Gerrit)

        unread,
        12:33 PM (11 hours ago) 12:33 PM
        to Javier Contreras, Lkaye Handley, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
        Attention needed from Javier Contreras

        Alison Maher voted and added 4 comments

        Votes added by Alison Maher

        Code-Review+1

        4 comments

        File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
        Line 1639, Patchset 8: CHECK_GE(main_gaps_.size(), 2u);
        Alison Maher . resolved

        Will it always be 2? (if there are rows or other spanners earlier on?)

        Javier Contreras

        There can be more, but its a CHECK_GE so it will be fine.

        Alison Maher

        Ah missed GE, thanks for the clarification

        Line 1610, Patchset 9: // The only situation where we would expect the range to not be valid is if
        // there are spanners placed back-to-back with no content in between. As far
        // as GapDecorations is related, in these cases we "condense" the sequence
        // of consecutive spanners into a single spanner, by having only two
        // MainGaps (a start and an end) represent the entire sequence of spanners.
        bool spanner_placed_after_spanner_with_no_content_in_between =
        !range_of_cross_gaps_before_current_main_gap_.IsValid();


        // If we have consecutive spanners with no content in between, we remove the
        // last end spanner main gap, and the new spanner's end will become the end
        // of the big condensed spanner.
        if (spanner_placed_after_spanner_with_no_content_in_between) {
        main_gaps_.pop_back();
        } else {
        // As described in third_party/blink/renderer/core/layout/gap/README.md,
        // we create a `MainGap` at the spanner's block start offset when we have
        // a spanner, and another `MainGap` at the spanner's block end offset.
        main_gaps_.emplace_back(offset.block_offset, SpannerMainGapType::kStart);
        }

        // A spanner ends the current range of cross gaps, since it leads to the
        // introduction of new `CrossGap`s.
        CommitRangeOfCrossGapsBeforeCurrentMainGap();

        main_gaps_.emplace_back(offset.block_offset + logical_fragment.BlockSize(),
        SpannerMainGapType::kEnd);

        CHECK_GE(main_gaps_.size(), 2u);

        // Even though this last `MainGap` is a spanner end gap, we set its cross
        // gap before range to be that of the main gap before this one.

        main_gaps_.back().SetRangeOfCrossGapsBefore(
        main_gaps_[main_gaps_.size() - 2].RangeOfCrossGapsBefore());
        CHECK(main_gaps_.back().RangeOfCrossGapsBefore().IsValid());
        Alison Maher . unresolved

        nit: I wonder if we should move to a helper now that this block is getting a bit lengthy

        File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
        Line 466, Patchset 9: }

        if (GetContainerType() == ContainerType::kMultiColumn) {
        Alison Maher . unresolved

        nit: this can be an else if

        Line 551, Patchset 9: if (track_direction == kForColumns) {

        return intersections.size() == 3 && intersection_index == 1;
        Alison Maher . unresolved

        Don't we keep track of gaps that are spanners or not? Can we use that instead?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Javier Contreras
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
        Gerrit-Change-Number: 6972503
        Gerrit-PatchSet: 9
        Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
        Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
        Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
        Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
        Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
        Gerrit-CC: Lkaye Handley <handle...@gmail.com>
        Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
        Gerrit-Comment-Date: Thu, 25 Sep 2025 16:33:17 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Javier Contreras (Gerrit)

        unread,
        1:03 PM (11 hours ago) 1:03 PM
        to Alison Maher, Lkaye Handley, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
        Attention needed from Alison Maher and Sam Davis Omekara

        Javier Contreras added 8 comments

        Commit Message
        Line 27, Patchset 2:`CrossGap`s end at both spanners and row gaps, and start right after.
        Sam Davis Omekara . resolved

        nit: "... at all main gaps (spanners and row gaps)"

        Javier Contreras

        Done

        File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
        Alison Maher . resolved

        nit: I wonder if we should move to a helper now that this block is getting a bit lengthy

        Javier Contreras

        Done

        File third_party/blink/renderer/core/layout/gap/gap_geometry.h
        Line 311, Patchset 9: bool IsGapSpannerAdjacent(GridTrackSizingDirection direction,
        Sam Davis Omekara . resolved

        This is called IsGapSpannerAdjacent. So shouldn't it be only checking num of intersections?

        Javier Contreras

        Done

        Line 109, Patchset 9:using GapToRangesMap =
        Sam Davis Omekara . resolved

        Should this be renamed back since we don't end up needing in this CL?

        Javier Contreras

        Done

        File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
        Line 466, Patchset 9: }

        if (GetContainerType() == ContainerType::kMultiColumn) {
        Alison Maher . resolved

        nit: this can be an else if

        Javier Contreras

        Done

        Line 538, Patchset 9:bool GapGeometry::IsGapSpannerAdjacent(
        Sam Davis Omekara . resolved

        Ahh, I see what this is doing now. So I'll restructure it this way:

        IsGapSpannerAdjacent should only take in intersections. But the comment should hint that it's *_only_* used multi col cross gaps, when the main gap below it is a spanner gap. I think Adjacent could also mean side by side too if I'm not mistaken ... so maybe `IsMainGapBelowSpanner` might be clearer ...

        Then when we use this `IsMainGapBelowSpanner` , we can check secondary index == 1 to mark as BlockedAfter...

        Javier Contreras

        Its checking if a CrossGap is adjacent to a spanner (above it/ ends at a spanner) but you are right, naming should be better to reflect this. Updated.

        Line 551, Patchset 9: if (track_direction == kForColumns) {
        return intersections.size() == 3 && intersection_index == 1;
        Alison Maher . resolved

        Don't we keep track of gaps that are spanners or not? Can we use that instead?

        Javier Contreras

        We keep track of which MainGaps are spanners yes, but we don't have a way of relating a CrossGap to a MainGap. This method is meant to tell if a set of cross gap intersections (not `CrossGap` per se) are above a spanner.

        File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
        Line 191, Patchset 9: const LayoutUnit center =
        Sam Davis Omekara . resolved

        Can this knowledge belong to GapGeometry::GetGapOffset().

        Javier Contreras

        As per our offline discussion, moving there but renaming function to make it clear that we are not just getting the gap offset.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alison Maher
        • Sam Davis Omekara
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
          Gerrit-Change-Number: 6972503
          Gerrit-PatchSet: 12
          Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
          Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
          Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
          Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
          Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
          Gerrit-CC: Lkaye Handley <handle...@gmail.com>
          Gerrit-Attention: Alison Maher <alm...@microsoft.com>
          Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
          Gerrit-Comment-Date: Thu, 25 Sep 2025 17:03:43 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Alison Maher <alm...@microsoft.com>
          Comment-In-Reply-To: Sam Davis Omekara <samome...@microsoft.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Alison Maher (Gerrit)

          unread,
          1:07 PM (11 hours ago) 1:07 PM
          to Javier Contreras, Lkaye Handley, Sam Davis Omekara, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
          Attention needed from Javier Contreras and Sam Davis Omekara

          Alison Maher voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Javier Contreras
          • Sam Davis Omekara
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
            Gerrit-Change-Number: 6972503
            Gerrit-PatchSet: 12
            Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
            Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
            Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
            Gerrit-CC: Lkaye Handley <handle...@gmail.com>
            Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
            Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
            Gerrit-Comment-Date: Thu, 25 Sep 2025 17:06:46 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Sam Davis Omekara (Gerrit)

            unread,
            1:13 PM (10 hours ago) 1:13 PM
            to Javier Contreras, Alison Maher, Lkaye Handley, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org
            Attention needed from Javier Contreras

            Sam Davis Omekara voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Javier Contreras
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
            Gerrit-Change-Number: 6972503
            Gerrit-PatchSet: 13
            Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
            Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
            Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
            Gerrit-CC: Lkaye Handley <handle...@gmail.com>
            Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
            Gerrit-Comment-Date: Thu, 25 Sep 2025 17:13:03 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Javier Contreras (Gerrit)

            unread,
            1:19 PM (10 hours ago) 1:19 PM
            to Sam Davis Omekara, Alison Maher, Lkaye Handley, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org

            Javier Contreras voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
            Gerrit-Change-Number: 6972503
            Gerrit-PatchSet: 13
            Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
            Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
            Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
            Gerrit-CC: Lkaye Handley <handle...@gmail.com>
            Gerrit-Comment-Date: Thu, 25 Sep 2025 17:19:24 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Blink W3C Test Autoroller (Gerrit)

            unread,
            1:21 PM (10 hours ago) 1:21 PM
            to Javier Contreras, Sam Davis Omekara, Alison Maher, Lkaye Handley, Chromium LUCI CQ, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org

            Message from Blink W3C Test Autoroller

            Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/55068.

            When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.

            WPT Export docs:
            https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
            Gerrit-Change-Number: 6972503
            Gerrit-PatchSet: 13
            Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
            Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
            Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
            Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
            Gerrit-CC: Lkaye Handley <handle...@gmail.com>
            Gerrit-Comment-Date: Thu, 25 Sep 2025 17:21:46 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: No
            satisfied_requirement
            open
            diffy

            Chromium LUCI CQ (Gerrit)

            unread,
            2:00 PM (10 hours ago) 2:00 PM
            to Javier Contreras, Blink W3C Test Autoroller, Sam Davis Omekara, Alison Maher, Lkaye Handley, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org

            Chromium LUCI CQ submitted the change

            Change information

            Commit message:
            [gap-decorations] Update multicol gap decorations based on new def

            This CL updates the implementation for GapDecorations in multicol. Based
            on some discussions in https://github.com/w3c/csswg-drafts/issues/12784,
            and the definition of gap intersections
            https://drafts.csswg.org/css-gaps-1/#layout-painting we have to update
            how we compute and store the information to generate the intersections
            for gap decorations in multicol.

            The main new behavior is that intersections in the column gap happen
            right before/after where the column gap intersects any row gaps.
            Previously this happened at the middle of where these two gaps met.

            There are couple of tweaks needed for this, which overall at the end of
            the day reduces the code complexity of painting multicol gap
            decorations.

            1. Instead of having ONE `MainGap` being generated by a spanner, we now
            generate TWO, one at the start of the spanner and one at the end.

            2. Instead of having `CrossGap`s end only at spanners, we instead simply
            have `CrossGap`s end at all main gaps (spanners and row gaps), and start
            right after. This way, we can easily generate the intersections there,
            which is what the discussion seems to have settled on.

            3. Using the two above, along with a transient map which maps from an
            intersection to a `MainGap`, we can now determine in constant time
            whether a given intersection is `blocked before/after` or if it should
            be treated like an Edge intersection, which enables us to fix the rule
            breaking behavior that was broken for multicol.

            This also enables us to get rid of a lot of the complex logic of
            advancing indices of spanner main gaps when generating the intersections
            for multicol.

            This CL also makes two more changes:

            a) Some of the expectation files had to be updated to match the new
            behavior.

            b) We add a test case of a multicol container with multiple spanners

            c) `column-height-009.html` test is now technically incorrect given the
            dicussion at https://github.com/w3c/csswg-drafts/issues/12784, so this
            CL updates the expectation for it.

            This brings the behavior to exactly what we had with the original
            GapDecorations, before the optimized pipeline.
            Bug: 357648037, 436140061, 446616449
            Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
            Commit-Queue: Javier Contreras <javi...@microsoft.com>
            Reviewed-by: Alison Maher <alm...@microsoft.com>
            Reviewed-by: Sam Davis Omekara <samome...@microsoft.com>
            Cr-Commit-Position: refs/heads/main@{#1520744}
            Files:
            • M third_party/blink/renderer/core/layout/column_layout_algorithm.cc
            • M third_party/blink/renderer/core/layout/column_layout_algorithm.h
            • M third_party/blink/renderer/core/layout/column_layout_algorithm_test.cc
            • M third_party/blink/renderer/core/layout/gap/README.md
            • M third_party/blink/renderer/core/layout/gap/gap_geometry.cc
            • M third_party/blink/renderer/core/layout/gap/gap_geometry.h
            • M third_party/blink/renderer/core/layout/gap/main_gap.h
            • M third_party/blink/renderer/core/layout/gap/resources/multicol-mc.png
            • M third_party/blink/renderer/core/paint/gap_decorations_painter.cc
            • M third_party/blink/web_tests/TestExpectations
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-004-ref.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-007-ref.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-008-ref.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-009-ref.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-009.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-010-ref.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-011-ref.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-012-ref.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-014-ref.html
            • M third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-017-ref.html
            • A third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-020-ref.html
            • A third_party/blink/web_tests/external/wpt/css/css-gaps/multicol/multicol-gap-decorations-020.html
            • M third_party/blink/web_tests/external/wpt/css/css-multicol/column-height-009-ref.html
            Change size: L
            Delta: 23 files changed, 476 insertions(+), 297 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Alison Maher, +1 by Sam Davis Omekara
            Open in Gerrit
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: merged
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
            Gerrit-Change-Number: 6972503
            Gerrit-PatchSet: 14
            Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
            Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
            open
            diffy
            satisfied_requirement

            Blink W3C Test Autoroller (Gerrit)

            unread,
            3:08 PM (9 hours ago) 3:08 PM
            to Chromium LUCI CQ, Javier Contreras, Sam Davis Omekara, Alison Maher, Lkaye Handley, chromium...@chromium.org, Javier Fernandez, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, zol...@webkit.org

            Message from Blink W3C Test Autoroller

            The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/55068

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Ie132c4f7c81c1db57e87c1a9b0601ff5c691fdfd
            Gerrit-Change-Number: 6972503
            Gerrit-PatchSet: 14
            Gerrit-Owner: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
            Gerrit-Reviewer: Sam Davis Omekara <samome...@microsoft.com>
            Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
            Gerrit-CC: Javier Fernandez <jfern...@igalia.com>
            Gerrit-CC: Lkaye Handley <handle...@gmail.com>
            Gerrit-Comment-Date: Thu, 25 Sep 2025 19:08:25 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: No
            satisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages