Commit 54df2286 authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by Commit Bot

Move IsFixedBlockSizeIndefinite into AreSizeConstraintsEqual.

In https://chromium-review.googlesource.com/c/chromium/src/+/1966385
we move IsFixedBlockSizeIndefinite out of MaySkipLayout and into the
caching layer.

This wasn't paired with moving this bit into AreSizeConstraintsEqual.

This caused us to skip a layout, when we couldn't. :(

Bug: 1043071
Change-Id: Idbb68e136efe21b77394466a16a7ec3b06abe06d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015101Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Reviewed-by: default avatarDavid Grogan <dgrogan@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734201}
parent 787cd93f
...@@ -1014,7 +1014,6 @@ class CORE_EXPORT NGConstraintSpace final { ...@@ -1014,7 +1014,6 @@ class CORE_EXPORT NGConstraintSpace final {
is_new_formatting_context(false), is_new_formatting_context(false),
is_orthogonal_writing_mode_root(false), is_orthogonal_writing_mode_root(false),
is_painted_atomically(false), is_painted_atomically(false),
is_fixed_block_size_indefinite(false),
use_first_line_style(false), use_first_line_style(false),
ancestor_has_clearance_past_adjoining_floats(false), ancestor_has_clearance_past_adjoining_floats(false),
needs_baseline(false), needs_baseline(false),
...@@ -1023,6 +1022,7 @@ class CORE_EXPORT NGConstraintSpace final { ...@@ -1023,6 +1022,7 @@ class CORE_EXPORT NGConstraintSpace final {
is_shrink_to_fit(false), is_shrink_to_fit(false),
is_fixed_inline_size(false), is_fixed_inline_size(false),
is_fixed_block_size(false), is_fixed_block_size(false),
is_fixed_block_size_indefinite(false),
table_cell_child_layout_mode(static_cast<unsigned>( table_cell_child_layout_mode(static_cast<unsigned>(
NGTableCellChildLayoutMode::kNotTableCellChild)), NGTableCellChildLayoutMode::kNotTableCellChild)),
percentage_inline_storage(kSameAsAvailable), percentage_inline_storage(kSameAsAvailable),
...@@ -1050,6 +1050,8 @@ class CORE_EXPORT NGConstraintSpace final { ...@@ -1050,6 +1050,8 @@ class CORE_EXPORT NGConstraintSpace final {
return is_shrink_to_fit == other.is_shrink_to_fit && return is_shrink_to_fit == other.is_shrink_to_fit &&
is_fixed_inline_size == other.is_fixed_inline_size && is_fixed_inline_size == other.is_fixed_inline_size &&
is_fixed_block_size == other.is_fixed_block_size && is_fixed_block_size == other.is_fixed_block_size &&
is_fixed_block_size_indefinite ==
other.is_fixed_block_size_indefinite &&
table_cell_child_layout_mode == other.table_cell_child_layout_mode; table_cell_child_layout_mode == other.table_cell_child_layout_mode;
} }
...@@ -1064,7 +1066,6 @@ class CORE_EXPORT NGConstraintSpace final { ...@@ -1064,7 +1066,6 @@ class CORE_EXPORT NGConstraintSpace final {
unsigned is_orthogonal_writing_mode_root : 1; unsigned is_orthogonal_writing_mode_root : 1;
unsigned is_painted_atomically : 1; unsigned is_painted_atomically : 1;
unsigned is_fixed_block_size_indefinite : 1;
unsigned use_first_line_style : 1; unsigned use_first_line_style : 1;
unsigned ancestor_has_clearance_past_adjoining_floats : 1; unsigned ancestor_has_clearance_past_adjoining_floats : 1;
...@@ -1075,6 +1076,7 @@ class CORE_EXPORT NGConstraintSpace final { ...@@ -1075,6 +1076,7 @@ class CORE_EXPORT NGConstraintSpace final {
unsigned is_shrink_to_fit : 1; unsigned is_shrink_to_fit : 1;
unsigned is_fixed_inline_size : 1; unsigned is_fixed_inline_size : 1;
unsigned is_fixed_block_size : 1; unsigned is_fixed_block_size : 1;
unsigned is_fixed_block_size_indefinite : 1;
unsigned table_cell_child_layout_mode : 2; // NGTableCellChildLayoutMode unsigned table_cell_child_layout_mode : 2; // NGTableCellChildLayoutMode
unsigned percentage_inline_storage : 2; // NGPercentageStorage unsigned percentage_inline_storage : 2; // NGPercentageStorage
......
...@@ -84,6 +84,8 @@ bool SizeMayChange(const NGBlockNode& node, ...@@ -84,6 +84,8 @@ bool SizeMayChange(const NGBlockNode& node,
DCHECK_EQ(new_space.IsFixedInlineSize(), old_space.IsFixedInlineSize()); DCHECK_EQ(new_space.IsFixedInlineSize(), old_space.IsFixedInlineSize());
DCHECK_EQ(new_space.IsFixedBlockSize(), old_space.IsFixedBlockSize()); DCHECK_EQ(new_space.IsFixedBlockSize(), old_space.IsFixedBlockSize());
DCHECK_EQ(new_space.IsFixedBlockSizeIndefinite(),
old_space.IsFixedBlockSizeIndefinite());
DCHECK_EQ(new_space.IsShrinkToFit(), old_space.IsShrinkToFit()); DCHECK_EQ(new_space.IsShrinkToFit(), old_space.IsShrinkToFit());
DCHECK_EQ(new_space.TableCellChildLayoutMode(), DCHECK_EQ(new_space.TableCellChildLayoutMode(),
old_space.TableCellChildLayoutMode()); old_space.TableCellChildLayoutMode());
......
...@@ -1328,6 +1328,7 @@ crbug.com/845235 virtual/layout_ng_flex_box/css3/flexbox/relpos-with-percentage- ...@@ -1328,6 +1328,7 @@ crbug.com/845235 virtual/layout_ng_flex_box/css3/flexbox/relpos-with-percentage-
crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/flex-aspect-ratio-img-column-004.html [ Failure ] crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/flex-aspect-ratio-img-column-004.html [ Failure ]
crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/hittest-overlapping-margin.html [ Failure ] crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/hittest-overlapping-margin.html [ Failure ]
crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/hittest-overlapping-order.html [ Failure ] crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/hittest-overlapping-order.html [ Failure ]
crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/percentage-heights-010.html [ Failure ]
crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/quirks-auto-block-size-with-percentage-item.html [ Pass Failure ] crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/css-flexbox/quirks-auto-block-size-with-percentage-item.html [ Pass Failure ]
crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-003.html [ Failure ] crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-003.html [ Failure ]
crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-004.html [ Failure ] crbug.com/845235 virtual/layout_ng_flex_box/external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-004.html [ Failure ]
......
<!DOCTYPE html>
<title>A height: 100% descendant should trigger a relayout when stretching.</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#definite-sizes" />
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1043071" />
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="display: flex; width: 100px;">
<div style="display: flex; flex-direction: column; flex: 1; min-height: 100px;">
<div style="flex: 1; background: red;">
<div style="height: 100%; background-color: green;"></div>
</div>
</div>
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment