This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5941 - <video>.width/height should have default values defined
Summary: <video>.width/height should have default values defined
Status: CLOSED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-07 13:53 UTC by Simon Pieters
Modified: 2010-10-04 14:49 UTC (History)
5 users (show)

See Also:


Attachments

Description Simon Pieters 2008-08-07 13:53:45 UTC
AFAICT the <video>.width/height DOM attributes don't have default values defines as far as reflecting attributes go, and so getting .width or .height will return 0 when the content attributes aren't there (or won't parse). This seems unhelpful.

We think the width/height DOM attributes should return the rendered width/height of the element, if it's being rendered, or else the intristic width/height of the video element's playback area.
Comment 1 Olivier Gendrin 2008-08-07 14:40:34 UTC
For example, width should be 100% of parent width (see CSS) and height 100%*3/4 of parent width.
Comment 2 Ian 'Hixie' Hickson 2008-08-11 23:32:07 UTC
If you want the video dimensions, use videoWidth and videoHeight. If you want the dimensions of the rendering, use the CSS object model (clientHeight, etc). As a general rule, the DOM attributes don't return values other than what the content attributes have. There are some exceptions, like Image.height, but I think we want to keep the platform as consistent as possible.