Bug 24817 - Slider fails to draw for empty video element (divide by zero in slider code)
Summary: Slider fails to draw for empty video element (divide by zero in slider code)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-25 14:46 PDT by Simon Fraser (smfr)
Modified: 2009-03-25 15:13 PDT (History)
1 user (show)

See Also:


Attachments
Testcase (520 bytes, text/html)
2009-03-25 14:46 PDT, Simon Fraser (smfr)
no flags Details
Patch, testcase, changelog (5.48 KB, patch)
2009-03-25 14:53 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Final patch (5.90 KB, patch)
2009-03-25 15:13 PDT, Simon Fraser (smfr)
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-03-25 14:46:14 PDT
For a media element with no src attribute, the slider in the controls ends up with a min and max of zero, which results in a divide by zero in the SliderRange code. This causes the slider to fail to draw.
Comment 1 Simon Fraser (smfr) 2009-03-25 14:46:36 PDT
Created attachment 28948 [details]
Testcase
Comment 2 Darin Adler 2009-03-25 14:47:26 PDT
Oops! This should be trivial to fix.
Comment 3 Simon Fraser (smfr) 2009-03-25 14:53:27 PDT
Created attachment 28949 [details]
Patch, testcase, changelog
Comment 4 Simon Fraser (smfr) 2009-03-25 14:55:48 PDT
Comment on attachment 28949 [details]
Patch, testcase, changelog

Verbal r=darin
Comment 5 Simon Fraser (smfr) 2009-03-25 15:07:14 PDT
Comment on attachment 28949 [details]
Patch, testcase, changelog

Better patch coming.
Comment 6 Simon Fraser (smfr) 2009-03-25 15:13:09 PDT
Created attachment 28950 [details]
Final patch

Carry Darin's review forward.
Comment 7 Simon Fraser (smfr) 2009-03-25 15:13:20 PDT
http://trac.webkit.org/changeset/41987