[gap-decorations] Implement Paint for multicol GapDecorations [chromium/src : main]

0 views
Skip to first unread message

Javier Contreras (Gerrit)

unread,
Sep 5, 2025, 4:08:02 PM (4 days ago) Sep 5
to Sam Davis Omekara, Alison Maher, Chromium LUCI CQ, Olga Gerchikov, Alexis Menard, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@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: I81470c10c6a4fdc40ffcfbae8611bcfa8d2de4de
Gerrit-Change-Number: 6907139
Gerrit-PatchSet: 10
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: Alexis Menard <alexis...@intel.com>
Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
Gerrit-Attention: Alison Maher <alm...@microsoft.com>
Gerrit-Comment-Date: Fri, 05 Sep 2025 20:07:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alison Maher (Gerrit)

unread,
Sep 5, 2025, 5:32:06 PM (4 days ago) Sep 5
to Javier Contreras, Sam Davis Omekara, Chromium LUCI CQ, Olga Gerchikov, Alexis Menard, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, zol...@webkit.org
Attention needed from Javier Contreras and Sam Davis Omekara

Alison Maher added 10 comments

File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
Line 1612, Patchset 10 (Latest): spanner_main_gaps_indices_.push_back(main_gaps_.size() - 1);
Alison Maher . unresolved

Instead of storing these in a temp var, can we just emplace them directly in the gap geometry instead?

File third_party/blink/renderer/core/layout/gap/gap_geometry.h
Line 319, Patchset 10 (Latest): void AdvanceMulticolRunningIndices(bool& should_add_content_end) const;
Alison Maher . unresolved

This could likely use a comment

Line 261, Patchset 10 (Latest): void SetSpannerMainGapsIndices(Vector<wtf_size_t>&& indices) {
Alison Maher . unresolved

As mentioned above, maybe AddSpannerMainGapIndex() and emplace back here directly

File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
Line 235, Patchset 10 (Latest): // of each column gap that intersects this main gap, namely this the
Alison Maher . unresolved

"is"

Line 246, Patchset 10 (Latest): if (GetMainGaps()[gap_index].IsSpannerMainGap()) {
return Vector<LayoutUnit>();
}
Alison Maher . unresolved

If we don't use these at paint, do we need to store them at all?

Line 253, Patchset 10 (Latest): const CrossGap& cross_gap = GetCrossGaps()[i];
Alison Maher . unresolved

nit: var not needed, can be plugged in directly below

Line 338, Patchset 10 (Latest): if (next_spanner_main_gap_index_ < spanner_main_gaps_indices_.size() &&
main_gaps_[main_gap_running_index_].HasCrossGapsBefore() &&
gap_index >
main_gaps_[main_gap_running_index_].GetCrossGapBeforeEnd()) {
Alison Maher . unresolved

This check is quite complex and could likely use a comment

Line 350, Patchset 10 (Latest): if (spanner_main_gaps_indices_.empty() ||
next_spanner_main_gap_index_ == kNotFound) {
end_main_gap = main_gaps_.size() - 1;
should_add_content_end = true;
} else {
CHECK_LT(next_spanner_main_gap_index_,
spanner_main_gaps_indices_.size());
end_main_gap = spanner_main_gaps_indices_[next_spanner_main_gap_index_];
}

CHECK_LT(end_main_gap, main_gaps_.size());
for (wtf_size_t i = main_gap_running_index_; i <= end_main_gap; ++i) {
intersections.push_back(main_gaps_[i].GetGapOffset());
}
Alison Maher . unresolved

What if there are multiple spanners? Will this work?

Or are we only getting the cross intersections for the current main gap?

Line 513, Patchset 10 (Latest): if (main_gap_running_index_ == main_gaps_.size() - 1 &&
main_gaps_.back().IsSpannerMainGap()) {
should_add_content_end = true;
}
Alison Maher . unresolved

Do we need this as an out param or can we do this in the method above?

File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
Line 172, Patchset 10 (Latest): // Make sure we skip any multicol `MainGap`s generated by spanners.
Alison Maher . unresolved

Might be worth expanding on why

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: I81470c10c6a4fdc40ffcfbae8611bcfa8d2de4de
    Gerrit-Change-Number: 6907139
    Gerrit-PatchSet: 10
    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: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
    Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-Comment-Date: Fri, 05 Sep 2025 21:31:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Javier Contreras (Gerrit)

    unread,
    Sep 5, 2025, 7:15:37 PM (4 days ago) Sep 5
    to Sam Davis Omekara, Alison Maher, Chromium LUCI CQ, Olga Gerchikov, Alexis Menard, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, zol...@webkit.org
    Attention needed from Alison Maher and Sam Davis Omekara

    Javier Contreras added 10 comments

    File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
    Line 1612, Patchset 10: spanner_main_gaps_indices_.push_back(main_gaps_.size() - 1);
    Alison Maher . resolved

    Instead of storing these in a temp var, can we just emplace them directly in the gap geometry instead?

    Javier Contreras

    The gap geometry is not created until after we have finish laying everything out, and this is the pattern we use in flex and grid as well, so we can't do this.

    File third_party/blink/renderer/core/layout/gap/gap_geometry.h
    Line 319, Patchset 10: void AdvanceMulticolRunningIndices(bool& should_add_content_end) const;
    Alison Maher . resolved

    This could likely use a comment

    Javier Contreras

    Done

    Line 261, Patchset 10: void SetSpannerMainGapsIndices(Vector<wtf_size_t>&& indices) {
    Alison Maher . resolved

    As mentioned above, maybe AddSpannerMainGapIndex() and emplace back here directly

    Javier Contreras

    Ditto as my response above, the gap geometry isn't created until after we have finished laying out.

    File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
    Line 235, Patchset 10: // of each column gap that intersects this main gap, namely this the
    Alison Maher . resolved

    "is"

    Javier Contreras

    Done

    Line 246, Patchset 10: if (GetMainGaps()[gap_index].IsSpannerMainGap()) {
    return Vector<LayoutUnit>();
    }
    Alison Maher . resolved

    If we don't use these at paint, do we need to store them at all?

    Javier Contreras

    We don't paint them, but we do use them at paint. They are used to know from where to where a CrossGap should be painted. See `GenereateCrossIntersectionList` below for the multicol case.

    Line 253, Patchset 10: const CrossGap& cross_gap = GetCrossGaps()[i];
    Alison Maher . resolved

    nit: var not needed, can be plugged in directly below

    Javier Contreras

    Done

    Line 338, Patchset 10: if (next_spanner_main_gap_index_ < spanner_main_gaps_indices_.size() &&

    main_gaps_[main_gap_running_index_].HasCrossGapsBefore() &&
    gap_index >
    main_gaps_[main_gap_running_index_].GetCrossGapBeforeEnd()) {
    Alison Maher . resolved

    This check is quite complex and could likely use a comment

    Javier Contreras

    Done

    Line 350, Patchset 10: if (spanner_main_gaps_indices_.empty() ||

    next_spanner_main_gap_index_ == kNotFound) {
    end_main_gap = main_gaps_.size() - 1;
    should_add_content_end = true;
    } else {
    CHECK_LT(next_spanner_main_gap_index_,
    spanner_main_gaps_indices_.size());
    end_main_gap = spanner_main_gaps_indices_[next_spanner_main_gap_index_];
    }

    CHECK_LT(end_main_gap, main_gaps_.size());
    for (wtf_size_t i = main_gap_running_index_; i <= end_main_gap; ++i) {
    intersections.push_back(main_gaps_[i].GetGapOffset());
    }
    Alison Maher . resolved

    What if there are multiple spanners? Will this work?

    Or are we only getting the cross intersections for the current main gap?

    Javier Contreras

    It will work, there are two tests `multicol-gap-decorations-015.html` and `-016.html` that test similar scenarios.

    `AdvanceMulticolRunningIndices` is what is used to advance the indices (with which we decide what `end_main_gap` should be) so that we know from what main gap to what main gap we should paint.

    Line 513, Patchset 10: if (main_gap_running_index_ == main_gaps_.size() - 1 &&
    main_gaps_.back().IsSpannerMainGap()) {
    should_add_content_end = true;
    }
    Alison Maher . resolved

    Do we need this as an out param or can we do this in the method above?

    Javier Contreras

    need it as an out param since it needs to be modified inside this loop sometimes, and read/used outside of this method

    File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
    Line 172, Patchset 10: // Make sure we skip any multicol `MainGap`s generated by spanners.
    Alison Maher . resolved

    Might be worth expanding on why

    Javier Contreras

    Done

    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: I81470c10c6a4fdc40ffcfbae8611bcfa8d2de4de
    Gerrit-Change-Number: 6907139
    Gerrit-PatchSet: 11
    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: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
    Gerrit-Attention: Alison Maher <alm...@microsoft.com>
    Gerrit-Comment-Date: Fri, 05 Sep 2025 23:15:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alison Maher <alm...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alison Maher (Gerrit)

    unread,
    Sep 8, 2025, 11:41:12 AM (yesterday) Sep 8
    to Javier Contreras, Sam Davis Omekara, Chromium LUCI CQ, Olga Gerchikov, Alexis Menard, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, zol...@webkit.org
    Attention needed from Javier Contreras and Sam Davis Omekara

    Alison Maher voted and added 6 comments

    Votes added by Alison Maher

    Code-Review+1

    6 comments

    File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
    Line 1612, Patchset 10: spanner_main_gaps_indices_.push_back(main_gaps_.size() - 1);
    Alison Maher . unresolved

    Instead of storing these in a temp var, can we just emplace them directly in the gap geometry instead?

    Javier Contreras

    The gap geometry is not created until after we have finish laying everything out, and this is the pattern we use in flex and grid as well, so we can't do this.

    Alison Maher

    Something we can maybe discuss offline and doesn't need to be in this change, but I wonder if we should just create the gap geometry up front across the board, then we can emplace these directly there, and then at the end finalize any remaining info needed. But maybe there is a good reason for the temp var that I'm blanking on

    File third_party/blink/renderer/core/layout/gap/gap_geometry.h
    Line 331, Patchset 11 (Latest): // towards the next spanner main gap that we will paint until.
    Alison Maher . unresolved

    nit: "up until"?

    Line 328, Patchset 11 (Latest): // move `main_gap_running_index_` forward as we progress.
    // After we are done painting a cross gap that goes from one spanner to the
    Alison Maher . unresolved

    nit: This can either be re-wrapped or add a // spacer between the two paragraphs if meant to be a separate paragraph

    File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
    Line 513, Patchset 10: if (main_gap_running_index_ == main_gaps_.size() - 1 &&
    main_gaps_.back().IsSpannerMainGap()) {
    should_add_content_end = true;
    }
    Alison Maher . unresolved

    Do we need this as an out param or can we do this in the method above?

    Javier Contreras

    need it as an out param since it needs to be modified inside this loop sometimes, and read/used outside of this method

    Alison Maher

    To confirm, if we hit this, is there a chance the loop will continue? I would have guessed this only happens at the end, in which case, we could check this outside the loop

    File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
    Line 173, Patchset 11 (Latest): // These is because those `MainGap`s are not painted, only used to generate
    Alison Maher . unresolved

    nit: and

    Line 173, Patchset 11 (Latest): // These is because those `MainGap`s are not painted, only used to generate
    Alison Maher . unresolved

    nit: "This"

    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 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: I81470c10c6a4fdc40ffcfbae8611bcfa8d2de4de
      Gerrit-Change-Number: 6907139
      Gerrit-PatchSet: 11
      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: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
      Gerrit-Attention: Sam Davis Omekara <samome...@microsoft.com>
      Gerrit-Comment-Date: Mon, 08 Sep 2025 15:41:01 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Javier Contreras <javi...@microsoft.com>
      Comment-In-Reply-To: Alison Maher <alm...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sam Davis Omekara (Gerrit)

      unread,
      Sep 8, 2025, 12:05:13 PM (yesterday) Sep 8
      to Javier Contreras, Alison Maher, Chromium LUCI CQ, Olga Gerchikov, Alexis Menard, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, zol...@webkit.org
      Attention needed from Javier Contreras

      Sam Davis Omekara voted and added 1 comment

      Votes added by Sam Davis Omekara

      Code-Review+1

      1 comment

      File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
      Line 175, Patchset 11 (Latest): if (track_direction == kForRows &&
      gap_index < gap_geometry.GetMainGaps().size() &&
      gap_geometry.GetMainGaps()[gap_index].IsSpannerMainGap()) {
      continue;
      }
      Sam Davis Omekara . unresolved

      I believe the intent here is to avoid painting spanners as main gaps for multi col.

      It might be neater if gap_geometry tells us this. Something along the lines of,

      ```
      GapGeometry::IsMultiColSpanner(track_direction) {
      if (container_type == MultiCol && IsMainDirection(track_direction))
      { return main_gaps_[gap_index].IsSpannerMainGap();
      }

      return false;
      }
      ```

      We would then use `gap_geometry.IsMultiColSpanner()` and `continue` accordingly.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Javier Contreras
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I81470c10c6a4fdc40ffcfbae8611bcfa8d2de4de
      Gerrit-Change-Number: 6907139
      Gerrit-PatchSet: 11
      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: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
      Gerrit-Comment-Date: Mon, 08 Sep 2025 16:05:01 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sam Davis Omekara (Gerrit)

      unread,
      Sep 8, 2025, 2:05:15 PM (yesterday) Sep 8
      to Javier Contreras, Alison Maher, Chromium LUCI CQ, Olga Gerchikov, Alexis Menard, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, zol...@webkit.org
      Attention needed from Javier Contreras

      Sam Davis Omekara added 1 comment

      File third_party/blink/web_tests/TestExpectations
      Line 6786, Patchset 11 (Latest):# These tests are failing for Multicol because they are testing rule breaking behavior
      Sam Davis Omekara . unresolved

      Actually re-looking at these, the code for painting with rule breaking behavior has landed so I'm guessing these should pass now right?

      Gerrit-Comment-Date: Mon, 08 Sep 2025 18:05:04 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Javier Contreras (Gerrit)

      unread,
      11:45 AM (7 hours ago) 11:45 AM
      to Sam Davis Omekara, Alison Maher, Chromium LUCI CQ, Olga Gerchikov, Alexis Menard, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, zol...@webkit.org

      Javier Contreras added 8 comments

      File third_party/blink/renderer/core/layout/column_layout_algorithm.cc
      Line 1612, Patchset 10: spanner_main_gaps_indices_.push_back(main_gaps_.size() - 1);
      Alison Maher . resolved

      Instead of storing these in a temp var, can we just emplace them directly in the gap geometry instead?

      Javier Contreras

      The gap geometry is not created until after we have finish laying everything out, and this is the pattern we use in flex and grid as well, so we can't do this.

      Alison Maher

      Something we can maybe discuss offline and doesn't need to be in this change, but I wonder if we should just create the gap geometry up front across the board, then we can emplace these directly there, and then at the end finalize any remaining info needed. But maybe there is a good reason for the temp var that I'm blanking on

      Javier Contreras

      I do agree with this though, I do think we should instead go that route but also can't remember exactly why we originally went down this route. Adding this to the bug for clean up tasks.

      File third_party/blink/renderer/core/layout/gap/gap_geometry.h
      Line 331, Patchset 11: // towards the next spanner main gap that we will paint until.
      Alison Maher . resolved

      nit: "up until"?

      Javier Contreras

      Done

      Line 328, Patchset 11: // move `main_gap_running_index_` forward as we progress.

      // After we are done painting a cross gap that goes from one spanner to the
      Alison Maher . resolved

      nit: This can either be re-wrapped or add a // spacer between the two paragraphs if meant to be a separate paragraph

      Javier Contreras

      Done

      File third_party/blink/renderer/core/layout/gap/gap_geometry.cc
      Line 513, Patchset 10: if (main_gap_running_index_ == main_gaps_.size() - 1 &&
      main_gaps_.back().IsSpannerMainGap()) {
      should_add_content_end = true;
      }
      Alison Maher . resolved

      Do we need this as an out param or can we do this in the method above?

      Javier Contreras

      need it as an out param since it needs to be modified inside this loop sometimes, and read/used outside of this method

      Alison Maher

      To confirm, if we hit this, is there a chance the loop will continue? I would have guessed this only happens at the end, in which case, we could check this outside the loop

      Javier Contreras

      Ah I see what you meant, I thought you meant in the method above as in outside this method.

      File third_party/blink/renderer/core/paint/gap_decorations_painter.cc
      Line 173, Patchset 11: // These is because those `MainGap`s are not painted, only used to generate
      Alison Maher . resolved

      nit: "This"

      Javier Contreras

      Done

      Line 173, Patchset 11: // These is because those `MainGap`s are not painted, only used to generate
      Alison Maher . resolved

      nit: and

      Javier Contreras

      Done

      Line 175, Patchset 11: if (track_direction == kForRows &&

      gap_index < gap_geometry.GetMainGaps().size() &&
      gap_geometry.GetMainGaps()[gap_index].IsSpannerMainGap()) {
      continue;
      }
      Sam Davis Omekara . resolved

      I believe the intent here is to avoid painting spanners as main gaps for multi col.

      It might be neater if gap_geometry tells us this. Something along the lines of,

      ```
      GapGeometry::IsMultiColSpanner(track_direction) {
      if (container_type == MultiCol && IsMainDirection(track_direction))
      { return main_gaps_[gap_index].IsSpannerMainGap();
      }

      return false;
      }
      ```

      We would then use `gap_geometry.IsMultiColSpanner()` and `continue` accordingly.

      Javier Contreras

      Great idea, much cleaner.

      File third_party/blink/web_tests/TestExpectations
      Line 6786, Patchset 11:# These tests are failing for Multicol because they are testing rule breaking behavior
      Sam Davis Omekara . resolved

      Actually re-looking at these, the code for painting with rule breaking behavior has landed so I'm guessing these should pass now right?

      Javier Contreras

      They do not pass, there is some tweaking needed to the code so that they pass. I am addressing that in a follow up CL.

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I81470c10c6a4fdc40ffcfbae8611bcfa8d2de4de
      Gerrit-Change-Number: 6907139
      Gerrit-PatchSet: 11
      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: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Comment-Date: Tue, 09 Sep 2025 15:45:32 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Javier Contreras <javi...@microsoft.com>
      Comment-In-Reply-To: Sam Davis Omekara <samome...@microsoft.com>
      Comment-In-Reply-To: Alison Maher <alm...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages