Bug 20994

Summary: HTMLVideoElement width and height attributes are now unsigned
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
Attachments:
Description Flags
proposed patch
sam: review-
Revised patch
sam: review-
Revised patch sam: review+

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.