Bug 1526296 [wpt PR 15138] - [LayoutNG] Always pass block %-resolution size to legacy., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Always pass block %-resolution size to legacy.

Computed block-size is one thing, and then there's {min,max}-block-size.
We cannot just determine what resolution size to pass based on
block-size. Block-size may very well be non-percentage based with
min-block-size and/or max-block-size being percentage based.

The obvious solution would perhaps be to pass both available block size
and percentage resolution block size, by setting
OverrideBlockPercentageResolutionSize to the percentage resolution size,
but there's some height quirkiness complexity in the legacy engine that
doesn't make this very easy.

Luckily, it turns out that legacy layout simply behaves better when
always being passed just the percentage resolution size, so let's do
that.

(note that we cannot do the same in the inline direction, because of
floats; space taken up by adjacent floats is subtracted from available
inline size, but not from the percentage resolution size)

Bug: 923796
Change-Id: I116cdf892ac73c552e5ff8065532cea216168da4
Reviewed-on: https://chromium-review.googlesource.com/c/1442237
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627120}

--

wpt-commits: 0b1c4c543958ffb73b6a72063b4dd67623c8f29d
wpt-pr: 15138
This commit is contained in:
Morten Stenshorne 2019-02-12 13:49:49 +00:00 коммит произвёл moz-wptsync-bot
Родитель 32b2a3b661
Коммит 2250799a7e
2 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,11 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#max-size-properties">
<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="width:100px; height:100px; background:red;">
<span>
<!-- The image is a 1x1 transparent one. -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" style="display:block; max-width:100px; height:1000px; max-height:100%; background:green;">
</span>
</div>

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#max-size-properties">
<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="width:100px; height:100px; background:red;">
<div></div>
<!-- The image is a 1x1 transparent one. -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" style="max-width:100px; height:1000px; max-height:100%; background:green;">
</div>