[Webkit-unassigned] [Bug 275210] New: Video element with object-fit: cover initially displays incorrectly, depending on padding of surrounding element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 6 07:08:17 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=275210
Bug ID: 275210
Summary: Video element with object-fit: cover initially
displays incorrectly, depending on padding of
surrounding element
Product: WebKit
Version: Safari 17
Hardware: iPhone / iPad
OS: iOS 17
Status: NEW
Severity: Normal
Priority: P2
Component: Media
Assignee: webkit-unassigned at lists.webkit.org
Reporter: alex at pixelverse.ch
In some cases, if the video element has the object-fit property set to 'cover', the video is not initially scaled to fit into the video element.
The sample obtains a video stream from the device's environment-facing camera and sets it on the video element.
Toggling the object-fit style attribute from 'cover' to 'fill' and shortly afterwards back to 'cover' resolves the issue.
Other ways of "tickling" the video element like setting display to 'none' and back to 'block' work as well.
The behavior appears to be related to the padding of the surrounding element. In the reproducer the padding is to 15px, which triggers the issue (see screen recording in repo).
If the padding is changed slightly, e.g. to 16px, the issue does not appear. I did not do an exhaustive search of values that trigger the behavior.
Minimum-reproducible sample repo:
https://github.com/pixelverse-llc/ios-gum-video-element-object-fit-cover-lost
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240606/82a125b1/attachment.htm>
More information about the webkit-unassigned
mailing list