Skip to content

Commit

Permalink
Only disable further fragmentation if fragmentation is on.
Browse files Browse the repository at this point in the history
With the new call to DisableFurtherFragmentation() in
NGOutOfFlowLayoutPart::GenerateFragment(), we might attempt to disable
fragmentation even if we weren't participating in block fragmentation (a
monolithic OOF, for instance). This would lead to a crash if the
constraint space didn't have a rare-data object.

(cherry picked from commit b06d93b)

Bug: 1403467
Change-Id: Icd2e005440f93263511ff68949d40672d4030dd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4127783
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1088065}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4133345
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5481@{#111}
Cr-Branched-From: 130f3e4-refs/heads/main@{#1084008}
  • Loading branch information
mstensho authored and Chromium LUCI CQ committed Jan 3, 2023
1 parent fdda60a commit 404cb94
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1676,6 +1676,9 @@ class CORE_EXPORT NGConstraintSpace final {
}

void DisableFurtherFragmentation() {
if (!HasBlockFragmentation()) {
return;
}
DCHECK(rare_data_);
rare_data_->block_direction_fragmentation_type = kFragmentNone;
rare_data_->is_block_fragmentation_forced_off = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1403467">
<div style="columns:2; column-fill:auto; height:250px;">
<div style="position:relative; overflow:clip; width:100px; height:100px;">
<div style="position:absolute; contain:size; width:100px; height:100px;"></div>
</div>
</div>

0 comments on commit 404cb94

Please sign in to comment.