Bug 20994 - HTMLVideoElement width and height attributes are now unsigned
Summary: HTMLVideoElement width and height attributes are now unsigned
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-22 09:21 PDT by Eric Carlson
Modified: 2008-09-27 22:46 PDT (History)
0 users

See Also:


Attachments
proposed patch (1.34 KB, patch)
2008-09-22 09:25 PDT, Eric Carlson
sam: review-
Details | Formatted Diff | Diff
Revised patch (3.95 KB, patch)
2008-09-22 10:59 PDT, Eric Carlson
sam: review-
Details | Formatted Diff | Diff
Revised patch (4.99 KB, patch)
2008-09-25 09:56 PDT, Eric Carlson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2008-09-22 09:21:21 PDT
HTMLVideoElement width and height attributes were originally signed, now they are unsigned.

http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#htmlvideoelement
Comment 1 Eric Carlson 2008-09-22 09:25:08 PDT
Created attachment 23653 [details]
proposed patch
Comment 2 Sam Weinig 2008-09-22 10:30:31 PDT
Comment on attachment 23653 [details]
proposed patch

You need to change the c++ files to return unsigned as well.

r-
Comment 3 Eric Carlson 2008-09-22 10:59:47 PDT
Created attachment 23656 [details]
Revised patch

Update c++ files to take and return unsigned, make videoWidth and videoHeight return unsigned to match idl.
Comment 4 Sam Weinig 2008-09-22 14:17:31 PDT
Comment on attachment 23656 [details]
Revised patch

+    unsigned w = getAttribute(widthAttr).toInt(&ok);

+    unsigned h = getAttribute(heightAttr).toInt(&ok);

These need to use toUInt().
Comment 5 Eric Carlson 2008-09-25 09:56:56 PDT
Created attachment 23801 [details]
Revised patch

Convert all unsigned attributes with toUInt().
Comment 6 Sam Weinig 2008-09-27 13:11:12 PDT
Comment on attachment 23801 [details]
Revised patch

Woot!  r=me
Comment 7 Eric Carlson 2008-09-27 22:46:19 PDT
Third time was a charm. Committed as revision 37030.