Title: [123693] trunk/Source/WebKit/blackberry
Revision
123693
Author
commit-qu...@webkit.org
Date
2012-07-25 19:14:27 -0700 (Wed, 25 Jul 2012)

Log Message

[BlackBerry] Support RTSP in browser
https://bugs.webkit.org/show_bug.cgi?id=92233

Patch by Jonathan Dong <jonathan.d...@torchmobile.com.cn> on 2012-07-25
Reviewed by Rob Buis.

Handle URL scheme "rtsp://" before creating the DocumentLoader
and send the request to webkit. As we don't have any application
which can deal with rtsp invocation for now, we need to create
a media document to wrap the rtsp url within a video tag which
makes it load as a normal video clip.

RIM PR: 169669
Internally reviewed by Charles Wei <charles....@torchmobile.com.cn>.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (123692 => 123693)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-07-26 02:05:51 UTC (rev 123692)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-07-26 02:14:27 UTC (rev 123693)
@@ -1,3 +1,22 @@
+2012-07-25  Jonathan Dong  <jonathan.d...@torchmobile.com.cn>
+
+        [BlackBerry] Support RTSP in browser
+        https://bugs.webkit.org/show_bug.cgi?id=92233
+
+        Reviewed by Rob Buis.
+
+        Handle URL scheme "rtsp://" before creating the DocumentLoader
+        and send the request to webkit. As we don't have any application
+        which can deal with rtsp invocation for now, we need to create
+        a media document to wrap the rtsp url within a video tag which
+        makes it load as a normal video clip.
+
+        RIM PR: 169669
+        Internally reviewed by Charles Wei <charles....@torchmobile.com.cn>.
+
+        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+        (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
+
 2012-07-25  Jakob Petsovits  <jpetsov...@rim.com>
 
         [BlackBerry] Rephrase suspend/resume condition to guard against crashes

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp (123692 => 123693)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2012-07-26 02:05:51 UTC (rev 123692)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2012-07-26 02:14:27 UTC (rev 123693)
@@ -66,6 +66,7 @@
 #include "WebPageClient.h"
 
 #include <BlackBerryPlatformLog.h>
+#include <BlackBerryPlatformMediaDocument.h>
 #include <BlackBerryPlatformScreen.h>
 #include <_javascript_Core/APICast.h>
 #include <network/FilterStream.h>
@@ -388,10 +389,15 @@
     }
 
     SubstituteData substituteDataLocal = substituteData;
-    if (isMainFrame() && request.url().protocolIs("about")) {
-        // The first 6 letters is "about:"
-        String aboutWhat = request.url().string().substring(6);
-        String source = aboutData(aboutWhat);
+    if (isMainFrame()) {
+        String source;
+        if (request.url().protocolIs("about")) {
+            // The first 6 letters is "about:"
+            String aboutWhat = request.url().string().substring(6);
+            source = aboutData(aboutWhat);
+        } else if (request.url().protocolIs("rtsp"))
+            source = BlackBerry::Platform::mediaDocument(request.url().string().utf8().data()).c_str();
+
         if (!source.isEmpty()) {
             // Always ignore existing substitute data if any.
             WTF::RefPtr<SharedBuffer> buffer = SharedBuffer::create(source.is8Bit() ? reinterpret_cast<const char*>(source.characters8()) : source.latin1().data(), source.length());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to