Commit a6ab2dd6 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

css-flexbox: narrow special case for deprecated flex box

https://chromium-review.googlesource.com/c/chromium/src/+/1845506
modified LayoutBox::SizesLogicalWidthToFitContent() to return true
for webkit-blox/webkit-inline-box. This is problematic as the display
type does not necessarily correlate to the LayoutObject that is used.
The right fix is to look at the display type *and* the LayoutObject
used.

BUG=1014001
TEST=external/wpt/compat/webkit-box-fieldset.html

Change-Id: I80cc6d166e02c1e2ec6c2c0c58bcf770793ca41e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874250
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709205}
parent 24daa462
...@@ -3247,7 +3247,9 @@ bool LayoutBox::SizesLogicalWidthToFitContent( ...@@ -3247,7 +3247,9 @@ bool LayoutBox::SizesLogicalWidthToFitContent(
// their intrinsic widths. // their intrinsic widths.
// FIXME: Think about writing-mode here. // FIXME: Think about writing-mode here.
// https://bugs.webkit.org/show_bug.cgi?id=46473 // https://bugs.webkit.org/show_bug.cgi?id=46473
if (Parent()->StyleRef().IsDeprecatedWebkitBox() && if ((Parent()->IsDeprecatedFlexibleBox() ||
(Parent()->StyleRef().IsDeprecatedWebkitBox() &&
Parent()->IsFlexibleBox())) &&
(Parent()->StyleRef().BoxOrient() == EBoxOrient::kHorizontal || (Parent()->StyleRef().BoxOrient() == EBoxOrient::kHorizontal ||
Parent()->StyleRef().BoxAlign() != EBoxAlignment::kStretch)) Parent()->StyleRef().BoxAlign() != EBoxAlignment::kStretch))
return true; return true;
......
<!DOCTYPE html>
<p>Fieldset should contain a green div spanning the width.
<fieldset>
<div id="child" style="background:green; height:10px"></div>
</fieldset>
<!DOCTYPE html>
<link rel="match" href="webkit-box-fieldset-ref.html">
<p>Fieldset should contain a green div spanning the width.
<fieldset style="display: -webkit-box">
<div id="child" style="background:green; height:10px"></div>
</fieldset>
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