Title: [125388] trunk/Source/WebCore
- Revision
- 125388
- Author
- [email protected]
- Date
- 2012-08-12 21:35:39 -0700 (Sun, 12 Aug 2012)
Log Message
[BlackBerry] use MediaPlayer::userAgent() in MediaPlayerPrivateBlackBerry to avoid layering violation
https://bugs.webkit.org/show_bug.cgi?id=93588
Patch by Jonathan Dong <[email protected]> on 2012-08-12
Reviewed by Antonio Gomes.
Removed helper function MediaPlayerPrivate::userAgent() which has
introduced abstraction layering violation and replaced with
MediaPlayer::userAgent().
No new tests since there's no functional change.
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::load):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (125387 => 125388)
--- trunk/Source/WebCore/ChangeLog 2012-08-13 04:23:57 UTC (rev 125387)
+++ trunk/Source/WebCore/ChangeLog 2012-08-13 04:35:39 UTC (rev 125388)
@@ -1,3 +1,19 @@
+2012-08-12 Jonathan Dong <[email protected]>
+
+ [BlackBerry] use MediaPlayer::userAgent() in MediaPlayerPrivateBlackBerry to avoid layering violation
+ https://bugs.webkit.org/show_bug.cgi?id=93588
+
+ Reviewed by Antonio Gomes.
+
+ Removed helper function MediaPlayerPrivate::userAgent() which has
+ introduced abstraction layering violation and replaced with
+ MediaPlayer::userAgent().
+
+ No new tests since there's no functional change.
+
+ * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
+ (WebCore::MediaPlayerPrivate::load):
+
2012-07-04 Kinuko Yasuda <[email protected]>
Record metrics to measure the usage of WebKitBlobBuilder to eventually deprecate it
Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp (125387 => 125388)
--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp 2012-08-13 04:23:57 UTC (rev 125387)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp 2012-08-13 04:35:39 UTC (rev 125388)
@@ -160,9 +160,9 @@
if (!url.isEmpty())
cookiePairs = cookieManager().getCookie(KURL(ParsedURLString, url.utf8().data()), WithHttpOnlyCookies);
if (!cookiePairs.isEmpty() && cookiePairs.utf8().data())
- m_platformPlayer->load(modifiedUrl.utf8().data(), userAgent(modifiedUrl).utf8().data(), cookiePairs.utf8().data());
+ m_platformPlayer->load(modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), cookiePairs.utf8().data());
else
- m_platformPlayer->load(modifiedUrl.utf8().data(), userAgent(modifiedUrl).utf8().data(), 0);
+ m_platformPlayer->load(modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), 0);
}
void MediaPlayerPrivate::cancelLoad()
@@ -348,20 +348,6 @@
return static_cast<MediaPlayer::MovieLoadType>(m_platformPlayer->movieLoadType());
}
-// This function returns the user agent string associated with the
-// frame loader client of our HTMLMediaElement. The call below will
-// end up in FrameLoaderClientBlackBerry::userAgent().
-String MediaPlayerPrivate::userAgent(const String& url) const
-{
- HTMLMediaElement* element = static_cast<HTMLMediaElement*>(m_webCorePlayer->mediaPlayerClient());
- Document* topdoc = element->document()->topDocument();
- ASSERT(topdoc->frame());
- ASSERT(topdoc->frame()->loader());
- if (topdoc->frame())
- return topdoc->frame()->loader()->userAgent(KURL(KURL(), url));
- return String();
-}
-
void MediaPlayerPrivate::resizeSourceDimensions()
{
if (!m_webCorePlayer)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes