Bug 23407 - Implement MediaPlayerPrivate::hasVideo() on Windows
Summary: Implement MediaPlayerPrivate::hasVideo() on Windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-17 16:24 PST by Eric Carlson
Modified: 2009-03-02 11:51 PST (History)
0 users

See Also:


Attachments
proposed patch (47.73 KB, patch)
2009-01-22 21:57 PST, Eric Carlson
adele: 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 2009-01-17 16:24:39 PST
The Windows implementation of MediaPlayerPrivate::hasVideo() is hard coded to return true. The method is used by RenderMedia to make sure the controls for a <video> element without any video media are always visible (just like an <audio> element).
Comment 1 Eric Carlson 2009-01-22 21:57:57 PST
Created attachment 26958 [details]
proposed patch
Comment 2 Eric Seidel (no email) 2009-01-23 00:49:43 PST
Comment on attachment 26958 [details]
proposed patch

WebKit style would not check != NULL (or use NULL at all)...

+    return (GetMovieIndTrackType(m_private->m_movie, 1, VisualMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly) != NULL);

Should be:
+    return GetMovieIndTrackType(m_private->m_movie, 1, VisualMediaCharacteristic, movieTrackCharacteristic | movieTrackEnabledOnly);

Why is your test case being added to the platform/mac directory if this is a windows test?
Comment 3 Eric Carlson 2009-01-23 15:41:52 PST
The fix is Windows only, but the test is for the feature (controller always visible on a <video> element with no visual media), which had no test case before now. The test and results are in platform/mac/media/ because it has an expected image and the cygwin version of run-webkit-tests looks there (don't know why that is).
Comment 4 Eric Carlson 2009-01-23 15:42:33 PST
Removed the NULL check. Committed as revision 40193.