Title: [151958] trunk/Source/WebCore
- Revision
- 151958
- Author
- [email protected]
- Date
- 2013-06-25 02:00:16 -0700 (Tue, 25 Jun 2013)
Log Message
HTMLMediaElement should inherit from MediaPlayerClient privately
https://bugs.webkit.org/show_bug.cgi?id=117874
Reviewed by Andreas Kling.
Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
MediaPlayerClient due to the Chromium and Qt port.
The Qt port is changed to not cast from MediaPlayerClient to HTMLMediaElement.
* html/HTMLMediaElement.h:
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::commitLoad):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (151957 => 151958)
--- trunk/Source/WebCore/ChangeLog 2013-06-25 08:44:38 UTC (rev 151957)
+++ trunk/Source/WebCore/ChangeLog 2013-06-25 09:00:16 UTC (rev 151958)
@@ -1,3 +1,19 @@
+2013-06-25 Allan Sandfeld Jensen <[email protected]>
+
+ HTMLMediaElement should inherit from MediaPlayerClient privately
+ https://bugs.webkit.org/show_bug.cgi?id=117874
+
+ Reviewed by Andreas Kling.
+
+ Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
+ MediaPlayerClient due to the Chromium and Qt port.
+
+ The Qt port is changed to not cast from MediaPlayerClient to HTMLMediaElement.
+
+ * html/HTMLMediaElement.h:
+ * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
+ (WebCore::MediaPlayerPrivateQt::commitLoad):
+
2013-06-25 Csaba Osztrogonác <[email protected]>
Checking if frame is complete and access duration doesn't need a decode
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (151957 => 151958)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2013-06-25 08:44:38 UTC (rev 151957)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2013-06-25 09:00:16 UTC (rev 151958)
@@ -88,11 +88,7 @@
typedef Vector<CueInterval> CueList;
#endif
-// FIXME: The inheritance from MediaPlayerClient here should be private inheritance.
-// But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it
-// no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement.
-
-class HTMLMediaElement : public HTMLElement, public MediaPlayerClient, public MediaPlayerSupportsTypeClient, private MediaCanStartListener, public ActiveDOMObject, public MediaControllerInterface
+class HTMLMediaElement : public HTMLElement, private MediaPlayerClient, public MediaPlayerSupportsTypeClient, private MediaCanStartListener, public ActiveDOMObject, public MediaControllerInterface
#if ENABLE(VIDEO_TRACK)
, private AudioTrackClient
, private TextTrackClient
Modified: trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp (151957 => 151958)
--- trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp 2013-06-25 08:44:38 UTC (rev 151957)
+++ trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp 2013-06-25 09:00:16 UTC (rev 151958)
@@ -195,17 +195,12 @@
const QUrl rUrl = kUrl;
const QString scheme = rUrl.scheme().toLower();
- // Grab the client media element
- HTMLMediaElement* element = static_cast<HTMLMediaElement*>(m_webCorePlayer->mediaPlayerClient());
-
// Construct the media content with a network request if the resource is http[s]
if (scheme == QString::fromLatin1("http") || scheme == QString::fromLatin1("https")) {
QNetworkRequest request = QNetworkRequest(rUrl);
// Grab the current document
- Document* document = element->document();
- if (!document)
- document = element->ownerDocument();
+ Document* document = m_webCorePlayer->mediaPlayerClient()->mediaPlayerOwningDocument();
// Grab the frame and network manager
Frame* frame = document ? document->frame() : 0;
@@ -241,15 +236,15 @@
// We get these from the element, rather than the player, in case we have
// transitioned from a media engine which doesn't support muting, to a media
// engine which does.
- m_mediaPlayer->setMuted(element->muted());
- m_mediaPlayer->setVolume(static_cast<int>(element->volume() * 100.0));
+ m_mediaPlayer->setMuted(m_webCorePlayer->muted());
+ m_mediaPlayer->setVolume(static_cast<int>(m_webCorePlayer->volume() * 100.0));
// Don't send PlaybackChanged notification for pre-roll.
m_suppressNextPlaybackChanged = true;
// Setting a media source will start loading the media, but we need
// to pre-roll as well to get video size-hints and buffer-status
- if (element->paused())
+ if (m_webCorePlayer->paused())
m_mediaPlayer->pause();
else
m_mediaPlayer->play();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes