Block-direction borders of an orthogonal child result in incorrect sizing of the parent
Categories
(Core :: Layout, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox138 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
See testcase. The red <div> should be exactly as tall as its green (orthogonal) child, but is incorrectly extended by the height of the child's top/bottom borders.
Note that in contrast to bug 1949148 and bug 1949149, zooming does NOT "fix" the rendering here; the layout is stable (but wrong).
Assignee | ||
Updated•7 days ago
|
Assignee | ||
Comment 1•5 days ago
|
||
The parent block here ends up with the wrong size because we end up in the IntrinsicForAxis codepath that uses the child's block-size (which may not be correct yet, but that issue is bug 1949148), but then having assigned the block-size to result
, we later end up adding offsets for the margins/borders/padding -- but the block's rect already included its borders and padding, so in effect they're being doubled.
Hence, ignoring the cases where the child's size is not yet set, or out-of-date (see bug 1949148 and bug 1949149), the "stable" layout we end up with has the parent incorrectly sized.
To avoid this, we should subtract the border/padding amounts from the child's BSize()
before using it as the basis of the result here.
Assignee | ||
Comment 2•5 days ago
|
||
This corrects the rendering of the example here; a WPT reftest version
of the test is added in following patch.
(There are a number of existing layout tests in css/css-writing-modes
that are also impacted, but still fail for the time being due to
bug 1949148.)
Updated•5 days ago
|
Assignee | ||
Comment 3•5 days ago
|
||
Comment 6•2 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e945f6e2e27c
https://hg.mozilla.org/mozilla-central/rev/e91bff5f1b5e
Description
•