[Webkit-unassigned] [Bug 221341] New: Video element doesn't respect width: 100%, also changes on window resize despite not being affected

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 3 10:15:42 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221341

            Bug ID: 221341
           Summary: Video element doesn't respect width: 100%, also
                    changes on window resize despite not being affected
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Mac (Intel)
                OS: macOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: naktinis at gmail.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Created attachment 419152

  --> https://bugs.webkit.org/attachment.cgi?id=419152&action=review

Video fails to adapt to parent width

Tested a simple scenario: fixed width (in pixels) <div> containing a "width: 100%" <video> whose height is allowed to adapt freely (according to the video's aspect ratio).

However, the video element didn't fully span the parent element width and rendered bars on the sides (that have video background color).


In a related scenario. The parent <div> had both fixed width and height and the child <video> had its width and height both set to "100%". In this case, if the video's aspect ratio doesn't exactly match the parents it is epxected that we will see some video background that fills the remaining space.

This is what happened at first after the page loaded. However, after resizing the window (which should have no effect on the elements as they have fixed size) the video suddenly resized and revealed the background of the parent.


I've attached full HTML examples and screenshots. Most visible on Retina (tried two retina MacBook Pros), but similar unexplained subpixel values were visible on a non-retina external display (also the color change on window resize was faint, but visible).

-- 
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/20210203/2d01e33c/attachment.htm>


More information about the webkit-unassigned mailing list