Add some tests for 'stretch' size keyword in scenarios with abspos content and orthogonal writing-modes
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox135 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Filing this bug to add some WPT tests as generalizations of the testcase in bug 1933408 comment 9.
Assignee | ||
Comment 1•8 months ago
|
||
This patch adds an initial testcase, and subsequent patches will add some
variants.
The testcase in this patch and its variants will give us code-coverage
for some of Gecko's positioning code that has to sort out the
absolutely-positioned element's position while reasoning about coordinates in
as many as three different writing-modes simultaneously:
- the writing-mode of the abspos element itself.
- the writing-mode of its in-flow box-tree parent.
- the writing-mode of its absolutely-positioned containing block.
See e.g. mozilla::ReflowInput::CalculateHypotheticalPosition() for where some
of this code lives; particularly the areas around 'hypotheticalPosWillUseCbwm'.
Assignee | ||
Comment 2•8 months ago
|
||
This test is identical to the block-size equivalent, but with inline/block
property-values swapped (and with 'data-expected-{width,height}' swapped
accordingly so that we're still testing the resolved value of 'stretch' which
is now being specified in the other axis).
Assignee | ||
Comment 3•8 months ago
|
||
This forces the browser to compute the static position, which is a bit
complicated in this situation (since the static position comes from doing
layout in the in-flow parent, whose writing mode is potentially different from
the abspos child itself and also different from the abspos containing block).
In Gecko at least, this leads to a special case where we're forced to resolve
the abspos element's block-size a bit earlier-than-we-would-otherwise, as part
of the writing-mode conversion, here:
https://searchfox.org/mozilla-central/rev/66aaf96f955d9bdc4bdb087a5075d5fbff2b9c8d/layout/generic/ReflowInput.cpp#1508-1538
This patch's "stretch-block-size-003.html" testcase provides code-coverage for
that codepath, to ensure we're handling the 'stretch' keyword properly
there. And the inline-size variant is just included for symmetry/completeness.
I'm generating these testcases as modified variants of their -002 siblings,
where I've removed the explicit 0
insets, but I've also removed the padding
on their box-tree parent. The intent is to make their static position exactly
the same as the absolute position in the -002 test, so that the expected sizing
(when stretching to reach the abspos container's far edge) will still be the
same.
Comment 6•8 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d141be9adb7c
https://hg.mozilla.org/mozilla-central/rev/9a1aa8165693
https://hg.mozilla.org/mozilla-central/rev/4c5fe4075067
Description
•