Commit b40dbcad authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Fieldset NG: Supports size containment

Bug: 875235
Change-Id: Id85c0c5ad52bef9309e201416f9d47c30468efff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2348231
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796880}
parent 79b8d2f1
......@@ -448,11 +448,14 @@ MinMaxSizesResult NGFieldsetLayoutAlgorithm::ComputeMinMaxSizes(
const MinMaxSizesInput& input) const {
MinMaxSizesResult result;
// TODO(crbug.com/1011842): Need to consider content-size here.
bool apply_size_containment = Node().ShouldApplySizeContainment();
// Size containment does not consider the legend for sizing.
if (!apply_size_containment) {
if (apply_size_containment) {
// Size containment does not consider the legend for sizing.
base::Optional<MinMaxSizesResult> result_without_children =
CalculateMinMaxSizesIgnoringChildren(Node(), BorderScrollbarPadding());
if (result_without_children)
return *result_without_children;
} else {
if (NGBlockNode legend = Node().GetRenderedLegend()) {
result = ComputeMinAndMaxContentContribution(Style(), legend, input);
result.sizes += ComputeMinMaxMargins(Style(), legend).InlineSum();
......
......@@ -1273,13 +1273,6 @@ virtual/layout_ng_fragment_traversal/external/wpt/css/CSS2/normal-flow/inline-re
virtual/layout_ng_fragment_traversal/external/wpt/css/CSS2/cascade/* [ Skip ]
virtual/layout_ng_fragment_traversal/external/wpt/css/CSS2/text/* [ Skip ]
# Fieldset in NG
#
# Size containment
crbug.com/875235 external/wpt/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-014.html [ Failure ]
# ====== LayoutNG-only failures until here ======
# ====== MathMLCore-only tests from here ======
......
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