Bug 1768003 [wpt PR 33946] - Always create an anonymous contents wrapper inside a fieldset., a=testonly

Automatic update from web-platform-tests
Always create an anonymous contents wrapper inside a fieldset.

This way we'll have less to worry about in the layout algorithm.
Padding handling was incorrect, and it caused an infinite loop, because
the algorithm expected the anonymous child to take care of trailing
padding, and therefore didn't pass it to FinishFragmentation(). We
therefore failed to treat the trailing padding as monolithic.

We need to treat padding as monolithic, or we might never get past it if
it's taller than the fragmentainer (and push it ahead of us into the
next fragmentainer infinitely). The fragmentation code would believe
that we managed to fit some of it in one fragmentainer, but we'd in fact
try again from the start of the padding-block-end in the next
fragmentainer (because it should be monolithic, that's why!) - forever.

Just making sure that there's always an anonymous contents wrapper
simplifies things and fixes bugs, including a minor correctness bug;
see the new test empty-scrollable.html

Some unit tests had to be updated. These expectations were mostly last
touched by CL:2960239 , which eliminated the need for anonymous content
wrappers if the fieldset only had a legend child. Now we'll always
create them.

Bug: 1322426
Change-Id: I215ecd6387e388d0a6801476b6269cb8fb84cba3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3629580
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1000277}

--

wpt-commits: 2b9cfbf0c87d9d0130a0dfc5f2da3b81eb1b86be
wpt-pr: 33946
This commit is contained in:
Morten Stenshorne 2022-05-08 17:50:41 +00:00 коммит произвёл moz-wptsync-bot
Родитель 6d7ebb596c
Коммит 1f1512e918
3 изменённых файлов: 14 добавлений и 0 удалений

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

@ -0,0 +1,6 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1322426">
<div style="columns:2; height:100px; column-fill:auto;">
<fieldset style="margin:0; border:none; padding:0; border-bottom:1px solid; padding-bottom:200px;"></fieldset>
</div>

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

@ -0,0 +1,3 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<div style="all:initial; display:block; overflow:scroll; width:100px; height:100px; background:blue;"></div>

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

@ -0,0 +1,5 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements">
<link rel="match" href="empty-scrollable-ref.html">
<fieldset style="all:initial; display:block; overflow:scroll; width:100px; height:100px; background:blue;"></fieldset>