Commit e4d96955 authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by moz-wptsync-bot
Browse files

Bug 1720398 [wpt PR 29656] - [TableNG] Fix restricted block-size child behaviour., a=testonly

Automatic update from web-platform-tests
[TableNG] Fix restricted block-size child behaviour.

The restricted block-size behaviour effectively sizing some children
at their min-block-size for the purposes of measuring, but also layout.

Previously we only applied this behaviour when measuring a child.

However for the example in: crbug.com/1227868
 - we'd measure the item at 120px.
 - then layout at 200px.

This was incorrect. The legacy implementation never triggered the 2nd
layout for this case to the existing code within the
NGBlockLayoutAlgorithm just "worked".

What we really need to do is apply this "min-size" behaviour if the
%-block-size child can't resolve. This ensures that its height is
consistent between the measure, and layout passes.

This also stops considering a <td style="height: 100%"> as "restricted".
This was necessary for this change, but also matches what EdgeHTML
did previously.

Bug: 1227868
Change-Id: I3eaa60dec8409367bee20eebd5e155f2b6ec70db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3025024


Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#901243}

--

wpt-commits: 5b7e97f430b589d3e38fdf8bb8c4abbc5a659eef
wpt-pr: 29656
parent 12afc3a2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<table>
  <td>
    <div style="width: 100px; height: 100px; overflow-y: scroll;">
      <div style="height: 200px; background: green;"></div>
    </div>
  </td>
</table>
+10 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1227868">
<link rel="match" href="percentage-sizing-of-table-cell-007-ref.html">
<table style="height: 100%;">
  <td>
    <div style="width: 100px; min-height: 100px; height: 100%; overflow-y: scroll;">
      <div style="height: 200px; background: green;"></div>
    </div>
  </td>
</table>