From 14521856dcdcd59d5a8edda9e52d70ec16057928 Mon Sep 17 00:00:00 2001 From: Alison Maher Date: Thu, 28 Apr 2022 08:56:29 -0700 Subject: [PATCH] [LayoutNG] RequiresContentBeforeBreaking() and OOF fragmentation We would previously always set RequiresContentBeforeBreaking() to true for OOF positioned elements (see CL:3310887 for more details). However, we should use the value of RequiresContentBeforeBreaking() of the CB as the basis, instead. Store an extra bit in NGContainingBlock to keep track of what RequiresContentBeforeBreaking() should be for the CB. This will get set when adjusting the newly created OOF fragmentainer descendant in NGOutOfFlowLayoutPart. As a result, NGBoxFragmentBuilder:: AdjustOffsetsForFragmentainerDescendant() was renamed to AdjustFragmentainerDescendant() since the method no longer is just adjusting offsets. tall-content-inside-constrained-block-003.tentative.html and tall-content-inside-constrained-block-004.tentative.html were updated based on the new logic, and two similar tests were added to ensure this gets set correctly for |fixedpos_containing_block|. Bug: 1319280 Change-Id: I450adb7e4a07c6948d76dcd3ec808a848483e8a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3611135 Reviewed-by: Morten Stenshorne Commit-Queue: Alison Maher Cr-Commit-Position: refs/heads/main@{#997220} --- .../out-of-flow-in-multicolumn-093-ref.html | 10 ++++++++++ .../out-of-flow-in-multicolumn-093.html | 13 ++++++++++++ ...nside-constrained-block-003.tentative.html | 2 +- ...nside-constrained-block-004.tentative.html | 2 +- ...nside-constrained-block-005.tentative.html | 20 +++++++++++++++++++ ...nside-constrained-block-006.tentative.html | 20 +++++++++++++++++++ 6 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 css/css-break/out-of-flow-in-multicolumn-093-ref.html create mode 100644 css/css-break/out-of-flow-in-multicolumn-093.html create mode 100644 css/css-break/tall-content-inside-constrained-block-005.tentative.html create mode 100644 css/css-break/tall-content-inside-constrained-block-006.tentative.html diff --git a/css/css-break/out-of-flow-in-multicolumn-093-ref.html b/css/css-break/out-of-flow-in-multicolumn-093-ref.html new file mode 100644 index 000000000000000..a2fdde0cd91d8f8 --- /dev/null +++ b/css/css-break/out-of-flow-in-multicolumn-093-ref.html @@ -0,0 +1,10 @@ + + +

There should be a bullet to the left of the word "Bullet".

+
    +
  • Bullet
  • +
diff --git a/css/css-break/out-of-flow-in-multicolumn-093.html b/css/css-break/out-of-flow-in-multicolumn-093.html new file mode 100644 index 000000000000000..7cd94c10b38fa29 --- /dev/null +++ b/css/css-break/out-of-flow-in-multicolumn-093.html @@ -0,0 +1,13 @@ + + + + +

There should be a bullet to the left of the word "Bullet".

+
    +
  • Bullet
  • +
  • Bullet
  • +
diff --git a/css/css-break/tall-content-inside-constrained-block-003.tentative.html b/css/css-break/tall-content-inside-constrained-block-003.tentative.html index bc20950dac2914e..78148780a949758 100644 --- a/css/css-break/tall-content-inside-constrained-block-003.tentative.html +++ b/css/css-break/tall-content-inside-constrained-block-003.tentative.html @@ -8,7 +8,7 @@
-
+
diff --git a/css/css-break/tall-content-inside-constrained-block-004.tentative.html b/css/css-break/tall-content-inside-constrained-block-004.tentative.html index 567d4ccf3bceeae..c44a65841cd35fa 100644 --- a/css/css-break/tall-content-inside-constrained-block-004.tentative.html +++ b/css/css-break/tall-content-inside-constrained-block-004.tentative.html @@ -7,7 +7,7 @@
-
+
diff --git a/css/css-break/tall-content-inside-constrained-block-005.tentative.html b/css/css-break/tall-content-inside-constrained-block-005.tentative.html new file mode 100644 index 000000000000000..6e834e78daeee12 --- /dev/null +++ b/css/css-break/tall-content-inside-constrained-block-005.tentative.html @@ -0,0 +1,20 @@ + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/css/css-break/tall-content-inside-constrained-block-006.tentative.html b/css/css-break/tall-content-inside-constrained-block-006.tentative.html new file mode 100644 index 000000000000000..f907e38a2a0e428 --- /dev/null +++ b/css/css-break/tall-content-inside-constrained-block-006.tentative.html @@ -0,0 +1,20 @@ + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+