Bug 35876 - HTMLMediaElement style improvements
Summary: HTMLMediaElement style improvements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-08 13:24 PST by Darin Adler
Modified: 2010-03-08 14:16 PST (History)
2 users (show)

See Also:


Attachments
Patch (12.62 KB, patch)
2010-03-08 13:31 PST, Darin Adler
jhoneycutt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2010-03-08 13:24:35 PST
HTMLMediaElement style improvements
Comment 1 Darin Adler 2010-03-08 13:31:57 PST
Created attachment 50243 [details]
Patch
Comment 2 WebKit Review Bot 2010-03-08 13:38:40 PST
Attachment 50243 [details] did not build on chromium:
Build output: http://webkit-commit-queue.appspot.com/results/354047
Comment 3 Jon Honeycutt 2010-03-08 13:42:10 PST
Comment on attachment 50243 [details]
Patch

r=me
Comment 4 Darin Adler 2010-03-08 13:45:32 PST
src/WebMediaPlayerClientImpl.cpp:141: error: ‘WebCore::MediaPlayerClient’ is an
inaccessible base of ‘WebCore::HTMLMediaElement’

    Frame* frame = static_cast<HTMLMediaElement*>(
        m_mediaPlayer->mediaPlayerClient())->document()->frame();
    m_webMediaPlayer.set(createWebMediaPlayer(this, frame));

If the MediaPlayer is in fact always an HTMLMediaElement, then the class should
hold an HTMLMediaElement*, not a MediaPlayer*. It's not safe to downcast.
Comment 5 Darin Adler 2010-03-08 13:53:29 PST
My mistake, it’s MediaPlayerClient* that is being downcast.

If we really need to find out the Frame* then I think we should add a function to MediaPlayerClient* that returns it rather than doing this cast.
Comment 6 Darin Adler 2010-03-08 14:16:16 PST
Committed r55682: <http://trac.webkit.org/changeset/55682>