User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2b5) Gecko/20091204 Firefox/3.6b5 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2b5) Gecko/20091204 Firefox/3.6b5 When you have a small firefox window (or in general a small screen) and you visit http://domain.org/somvid.ogv, the video will be bigger than your browser. So you cannot see the whole video in one piece. I suggest to implement something like for images. When the image is bigger than the window, than downscale that image to fit the window. So when the video is smaller than the window, downscale the video so it fits the screen. When hovering the video, controls should be added to zoom the video to the normal format. This is really needed for netbooks and fennec! Reproducible: Always Steps to Reproduce: 1. set your screen resolution below or equal to 1440x900 2. open firefox 3. goto http://download.blender.org/peach/trailer/trailer_1080p.ogg Actual Results: the movie is bigger than the window. The only way to see the full movie is to scroll. Expected Results: the movie adapts himself to the window and is maximum the size of the window
Created attachment 553474 [details] [diff] [review] Patch v0 - Resize the video if it is larger that the window in a synthetic document. Provide context menu to toggle the resizing. Here is a patch which implements this feature, which is likely to be useful since video are increasing in resolution, whereas monitor (especially on laptop) are bound to a low screen resolution. This patch adds two strings, which may not be the best formulation, though.
Comment on attachment 553474 [details] [diff] [review] Patch v0 - Resize the video if it is larger that the window in a synthetic document. Provide context menu to toggle the resizing. Hmm. We should avoid adding additional UI if at all possible... I can't think of a very compelling use-case for _wanting_ the current behavior (unscaled, overflowing window size), and so the starting point should be to just clamp the maximum video size to the window (ie, scale down when needed). This is in contrast to images, where it's not uncommon to find extreme width/height ratios (eg, web comics) that makes the scaled version unreadable even on large screens. Unless there's some compelling reason to support it, I'd say someone wanting to view the 1:1 version should (1) do it in a tiny .html wrapper (2) use VLC (3) use an addon. Oh, and maybe page zoom? Other nits: 1) Will "max-width: 100%" fix the width overflow? And just clamp the height to the window when needed? 2) Instead of the ratio just round and subtract a few pixels? Or, really, just use CSS and set a margin/padding? See bug 376997 / bug 472942.
We usually don't assign a target milestone until the patch has been landed in mozilla-central.
Unassigning due to lack of activity. Please see this patch attachment 569847 [details] [diff] [review] [diff] [details] [review] for the necessary CSS parts to change to make this work for videos, as well as try to keep it consistent with that patch so as to create as-little-as-possible bitrot for bug 376997.
Created attachment 573602 [details] [diff] [review] Patch for bug 537718 dependent upon bug 700856 If/when bug 700856 lands, we will only need to apply this patch to achieve the wanted behavior.
Comment on attachment 573602 [details] [diff] [review] Patch for bug 537718 dependent upon bug 700856 Pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=d976af0736d2
Comment on attachment 573602 [details] [diff] [review] Patch for bug 537718 dependent upon bug 700856 I'm not a peer for this code. roc or some other layout peer should review this still.
Verified on latest Aurora (11.0a2) builds accross platforms (XP, Win7 x86, Win 7 64 bit, Ubuntu 11.04 x86, Ubuntu 11.04 64 bit, Mac 10.6) and video scales to fit browser window when it is larger than the window. Marking as VERIFIED.