Closed
Bug 1886745
Opened 8 months ago
Closed 6 months ago
object-fit is broken for elements with contain: size
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Core
Layout: Images, Video, and HTML Frames
Tracking
()
RESOLVED
FIXED
128 Branch
People
(Reporter: zcorpan, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
See https://github.com/whatwg/html/issues/10079#issuecomment-2010809133
object-fit
doesn't work with contain: size
. Demo: https://codepen.io/eeeps/pen/dyLNEdN
From the spec issue, it's not clear if we want to use the aspect ratio from the image data, as in img.naturalWidth/img.naturalHeight
or use contain-intrinsic-size
. But right now we just stretch the image.
Reporter | ||
Comment 1•7 months ago
|
||
Comment 2•7 months ago
|
||
This issue (on today's CSSWG agenda) seems related, too: https://github.com/w3c/csswg-drafts/issues/10116
Updated•7 months ago
|
Severity: -- → S3
Updated•7 months ago
|
Reporter | ||
Updated•7 months ago
|
Updated•6 months ago
|
status-firefox127:
--- → affected
status-firefox128:
--- → affected
Assignee | ||
Comment 4•6 months ago
|
||
We were already doing the right thing for canvas/video.
Updated•6 months ago
|
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/685ef9cd0166
Ignore containment for object-fit computation. r=dholbert,layout-reviewers
Comment 6•6 months ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Comment 7•6 months ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox127
towontfix
.
For more information, please visit BugBot documentation.
Flags: needinfo?(emilio)
Assignee | ||
Updated•6 months ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•