RESOLVED FIXED Bug 35374
MediaPlayer has no reliable method of accessing it's owning document
https://bugs.webkit.org/show_bug.cgi?id=35374
Summary MediaPlayer has no reliable method of accessing it's owning document
Nick Young
Reported 2010-02-24 18:13:47 PST
It is sometimes desirable for the MediaPlayer to access information about its owning document. Currently there is a method MediaPlayer::frameView(), which returns the FrameView which renders the MediaPlayer. However, there are some situations where a renderer is not created for a Media element, and as such there is no way for the MediaPlayer to access its owning document. An example of one of these situations can be seen here: http://people.freedesktop.org/~company/stuff/video-demo.html (Credit goes to Bug 30679 for this link) In this demonstration, the video elements are never added to the DOM, so a renderer is never created. As discussed in Bug 35328, the proposed solution is to add a MediaPlayerClient::mediaPlayerOwningDocument(). A patch is coming.
Attachments
Initial Patch (2.54 KB, patch)
2010-02-24 18:19 PST, Nick Young
no flags
Nick Young
Comment 1 2010-02-24 18:19:02 PST
Created attachment 49458 [details] Initial Patch
WebKit Commit Bot
Comment 2 2010-02-24 23:14:14 PST
Comment on attachment 49458 [details] Initial Patch Clearing flags on attachment: 49458 Committed r55225: <http://trac.webkit.org/changeset/55225>
WebKit Commit Bot
Comment 3 2010-02-24 23:14:18 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 4 2010-02-25 07:44:31 PST
Comment on attachment 49458 [details] Initial Patch > +Document* HTMLMediaElement::mediaPlayerOwningDocument() > +{ > + Document* d = document(); > + > + if (!d) > + d = ownerDocument(); > + > + return d; > +} The implementation of this function is needlessly complex. The Node::document() function never returns 0 for an element, and ownerDocument() always returns the same thing as document() except when ownerDocument() returns 0.
Note You need to log in before you can comment on or make changes to this bug.