Bug 38811 - Safari scales the video width and height only for controls, not for video
Summary: Safari scales the video width and height only for controls, not for video
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-09 00:56 PDT by Silvia Pfeiffer
Modified: 2010-07-21 00:58 PDT (History)
1 user (show)

See Also:


Attachments
Safari bug with width only specified on <video> (95.81 KB, image/png)
2010-05-09 00:56 PDT, Silvia Pfeiffer
no flags Details
the picture for "height" only specified (with 15px padding and a border to see the difference) (133.38 KB, image/png)
2010-05-09 00:59 PDT, Silvia Pfeiffer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Silvia Pfeiffer 2010-05-09 00:56:58 PDT
Created attachment 55492 [details]
Safari bug with width only specified on <video>

Safari has a weird way of scaling the video element width and height, if only width is given. In contrast to all other browsers (that include Google Chrome, Firefox and Opera), Safari scaling of a video element results in only the video controls being scaled to the appropriate width, while the video itself stays smaller. See the attached screenshot safari_width_bug.tiff.

This is the spec with which it was created:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Guide to HTML5 video: chapter 3: example 1</title>
    <style type="text/css">
    video {
      width:   800px;
    }
    </style>
  </head>
  <body>
    <h1>Chapter 3: example 1</h1>
    <video controls>
        <source src="HelloWorld.mp4" type="video/mp4">
        <source src="HelloWorld.ogv" type="video/ogg">
    </video>
  </body>
</html>

A problem also occurs when only height is set and not width - the video the has quite a massive white space at top and bottom.
Comment 1 Silvia Pfeiffer 2010-05-09 00:59:14 PDT
Created attachment 55493 [details]
the picture for "height" only specified (with 15px padding and a border to see the difference)

the picture for "height" only specified (with 15px padding and a border to see the difference)
Comment 2 Eric Carlson 2010-07-18 10:00:57 PDT
I believe this has been fixed. Can you please recheck this in a currently nightly build?
Comment 3 Silvia Pfeiffer 2010-07-21 00:58:22 PDT
Looks like it's working (sorry about the mis-nomer on "height" i the picture attachment).