Commit c78c300c authored by Ana SollanoKim's avatar Ana SollanoKim Committed by Commit Bot

[LayoutNG] Make fieldset legends monolithic

Previously, we had made the legends fragment in the following change
https://chromium-review.googlesource.com/c/chromium/src/+/2090762. In
this other change
https://chromium-review.googlesource.com/c/chromium/src/+/2263353
we decided to not break borders for now. Because the legend is part of
the fieldset border, we now want to treat the legend as monolithic.

We still have logic for breaking the fieldset border, this will be
addressed in a follow up change.

Bug: 1097012
Change-Id: Iace252447063eb694c47fb9eea2a406ba2fe79d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353354
Commit-Queue: Ana Sollano Kim <ansollan@microsoft.com>
Reviewed-by: default avatarAlison Maher <almaher@microsoft.com>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798528}
parent 1bf739db
...@@ -37,9 +37,7 @@ class CORE_EXPORT NGFieldsetLayoutAlgorithm ...@@ -37,9 +37,7 @@ class CORE_EXPORT NGFieldsetLayoutAlgorithm
private: private:
NGBreakStatus LayoutChildren(); NGBreakStatus LayoutChildren();
NGBreakStatus LayoutLegend( void LayoutLegend(NGBlockNode& legend);
NGBlockNode& legend,
scoped_refptr<const NGBlockBreakToken> legend_break_token);
NGBreakStatus LayoutFieldsetContent( NGBreakStatus LayoutFieldsetContent(
NGBlockNode& fieldset_content, NGBlockNode& fieldset_content,
scoped_refptr<const NGBlockBreakToken> content_break_token, scoped_refptr<const NGBlockBreakToken> content_break_token,
...@@ -49,13 +47,11 @@ class CORE_EXPORT NGFieldsetLayoutAlgorithm ...@@ -49,13 +47,11 @@ class CORE_EXPORT NGFieldsetLayoutAlgorithm
const NGConstraintSpace CreateConstraintSpaceForLegend( const NGConstraintSpace CreateConstraintSpaceForLegend(
NGBlockNode legend, NGBlockNode legend,
LogicalSize available_size, LogicalSize available_size,
LogicalSize percentage_size, LogicalSize percentage_size);
LayoutUnit block_offset);
const NGConstraintSpace CreateConstraintSpaceForFieldsetContent( const NGConstraintSpace CreateConstraintSpaceForFieldsetContent(
NGBlockNode fieldset_content, NGBlockNode fieldset_content,
LogicalSize padding_box_size, LogicalSize padding_box_size,
LayoutUnit block_offset); LayoutUnit block_offset);
bool IsFragmentainerOutOfSpace(LayoutUnit block_offset) const; bool IsFragmentainerOutOfSpace(LayoutUnit block_offset) const;
const WritingMode writing_mode_; const WritingMode writing_mode_;
...@@ -76,10 +72,6 @@ class CORE_EXPORT NGFieldsetLayoutAlgorithm ...@@ -76,10 +72,6 @@ class CORE_EXPORT NGFieldsetLayoutAlgorithm
// fragments. // fragments.
LayoutUnit consumed_border_block_start_; LayoutUnit consumed_border_block_start_;
// If true, this indicates that the legend broke during the current layout
// pass.
bool legend_broke_ = false;
// If true, the legend is taller than the block-start border, so that it // If true, the legend is taller than the block-start border, so that it
// sticks below it, allowing for a class C breakpoint [1] before any fieldset // sticks below it, allowing for a class C breakpoint [1] before any fieldset
// content. // content.
......
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