Orthogonal content's block size that contributes to the intrinsic inline size of an element should be transferred
Categories
(Core :: Layout, defect)
Tracking
()
People
(Reporter: zsun, Unassigned)
References
Details
Attachments
(1 file)
767 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0
Steps to reproduce:
Run attached test file in Firefox.
Actual results:
Inline size of the element for the vertical writing mode cases (1st and 2nd sub cases) are smaller than the content block size. The block size of the content is not transferred to the element's inline size.
Expected results:
In the case that inline size of an element is intrinsic and the content of the element is orthogonal, if the content has the block size that contributes to the inline size of the element, the content's block size should be transferred to the inline size of the element.
This issue also causes the failure of wpt test -
testing/web-platform/tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-008.html
Comment 2•2 years ago
|
||
Does https://phabricator.services.mozilla.com/D155998 fix this?
Comment 3•2 years ago
|
||
Ah, no, it doesn't, nvm. This is a bit tricky, I think, because generally we don't have a good way of computing that block size without running layout. Do you know how other engines deal with this? Do they just check for explicit lengths or something? Or do they actually flow the orthogonal element?
I'm pretty sure we have a bug on file for this, let me try to find it...
Comment 5•2 years ago
|
||
WebKit is also affected.
I guess Blink addresses this with
void LayoutBlock::ComputeChildPreferredLogicalWidths(
LayoutObject& child,
LayoutUnit& min_preferred_logical_width,
LayoutUnit& max_preferred_logical_width) const {
NOT_DESTROYED();
if (child.IsBox() &&
child.IsHorizontalWritingMode() != IsHorizontalWritingMode()) {
// If the child is an orthogonal flow, child's height determines the width,
// but the height is not available until layout.
// https://drafts.csswg.org/css-writing-modes/#orthogonal-shrink-to-fit
if (!child.NeedsLayout()) {
min_preferred_logical_width = max_preferred_logical_width =
To<LayoutBox>(child).LogicalHeight();
return;
}
min_preferred_logical_width = max_preferred_logical_width =
To<LayoutBox>(child).ComputeLogicalHeightWithoutLayout();
return;
}
Updated•2 years ago
|
Comment 6•1 year ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
I think this is just bug 1473789.
I think so. bug 1310551 is the older version of this bug; duping there.
Description
•