Title: [113178] trunk
- Revision
- 113178
- Author
- [email protected]
- Date
- 2012-04-04 05:43:45 -0700 (Wed, 04 Apr 2012)
Log Message
[EFL][DRT] FrameloaderClientEfl needs to handle media content correctly
https://bugs.webkit.org/show_bug.cgi?id=83020
Patch by Dominik Röttsches <[email protected]> on 2012-04-04
Reviewed by Hajime Morita.
Source/WebKit/efl:
Implementing handling of media content type and media documents
in the respective FrameLoaderClientEfl callbacks.
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::committedLoad): Cancel loading for media documents.
(WebCore::FrameLoaderClientEfl::canShowMIMEType): Let media content types through.
(WebCore):
(WebCore::FrameLoaderClientEfl::pluginWillHandleLoadError): Returning appropriate error type.
(WebCore::FrameLoaderClientEfl::shouldFallBack): Falling back as well for media handled by media player.
LayoutTests:
* platform/efl/Skipped: Unskipping those MediaDocument related cases which now pass.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (113177 => 113178)
--- trunk/LayoutTests/ChangeLog 2012-04-04 12:41:45 UTC (rev 113177)
+++ trunk/LayoutTests/ChangeLog 2012-04-04 12:43:45 UTC (rev 113178)
@@ -1,3 +1,12 @@
+2012-04-04 Dominik Röttsches <[email protected]>
+
+ [EFL][DRT] FrameloaderClientEfl needs to handle media content correctly
+ https://bugs.webkit.org/show_bug.cgi?id=83020
+
+ Reviewed by Hajime Morita.
+
+ * platform/efl/Skipped: Unskipping those MediaDocument related cases which now pass.
+
2012-04-04 Andrey Kosyakov <[email protected]>
Web Inspector: make padding and client window width part of timeline calculator's state
Modified: trunk/LayoutTests/platform/efl/Skipped (113177 => 113178)
--- trunk/LayoutTests/platform/efl/Skipped 2012-04-04 12:41:45 UTC (rev 113177)
+++ trunk/LayoutTests/platform/efl/Skipped 2012-04-04 12:43:45 UTC (rev 113178)
@@ -1196,10 +1196,6 @@
# https://bugs.webkit.org/show_bug.cgi?id=60206
http/tests/navigation/response204.html
-# BUG: test timing out. Also fails on Qt.
-# https://bugs.webkit.org/show_bug.cgi?id=70110
-fast/events/media-focus-in-standalone-media-document.html
-
# http/tests/multipart/stop-crash.html fails on GTK and Qt missing multipart/x-mixed-replace support in libsoup
# https://bugs.webkit.org/show_bug.cgi?id=47060
http/tests/multipart/stop-crash.html
@@ -1486,7 +1482,6 @@
media/controls-without-preload.html
media/event-attributes.html
media/media-document-audio-repaint.html
-media/media-document-audio-size.html
media/media-ended.html
media/media-fullscreen-inline.html
media/media-fullscreen-not-in-document.html
@@ -1515,10 +1510,8 @@
media/video-buffered.html
media/video-canvas-alpha.html
media/video-canvas-source.html
-media/video-click-dblckick-standalone.html
media/video-controls-rendering.html
media/video-controls.html
-media/video-controls-in-media-document.html
media/video-controls-no-scripting.html
media/video-currentTime.html
media/video-currentTime-delay.html
@@ -1532,7 +1525,6 @@
media/video-dom-autoplay.html
media/video-dom-src.html
media/video-duration-known-after-eos.html
-media/video-element-other-namespace-crash.html
media/video-layer-crash.html
media/video-load-networkState.html
media/video-load-preload-none.html
@@ -1721,9 +1713,6 @@
http/tests/security/local-video-src-from-remote.html
media/csp-blocks-video.html
-# BUG: iframe with src="" is not opened in a MediaDocument
-media/video-document-types.html
-
# BUG: Only works if --gui is passed (due to the current implementation of PlatformScreenEfl::screenRect).
fast/media/invalid-lengths.html
fast/media/matchmedium-query-api.html
Modified: trunk/Source/WebKit/efl/ChangeLog (113177 => 113178)
--- trunk/Source/WebKit/efl/ChangeLog 2012-04-04 12:41:45 UTC (rev 113177)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-04-04 12:43:45 UTC (rev 113178)
@@ -1,3 +1,20 @@
+2012-04-04 Dominik Röttsches <[email protected]>
+
+ [EFL][DRT] FrameloaderClientEfl needs to handle media content correctly
+ https://bugs.webkit.org/show_bug.cgi?id=83020
+
+ Reviewed by Hajime Morita.
+
+ Implementing handling of media content type and media documents
+ in the respective FrameLoaderClientEfl callbacks.
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::committedLoad): Cancel loading for media documents.
+ (WebCore::FrameLoaderClientEfl::canShowMIMEType): Let media content types through.
+ (WebCore):
+ (WebCore::FrameLoaderClientEfl::pluginWillHandleLoadError): Returning appropriate error type.
+ (WebCore::FrameLoaderClientEfl::shouldFallBack): Falling back as well for media handled by media player.
+
2012-04-04 Grzegorz Czajkowski <[email protected]>
[EFL] Change ewk_settings_icon_database_icon_object_add to proper API name.
Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (113177 => 113178)
--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp 2012-04-04 12:41:45 UTC (rev 113177)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp 2012-04-04 12:43:45 UTC (rev 113178)
@@ -50,6 +50,7 @@
#include "ProgressTracker.h"
#include "RenderPart.h"
#include "ResourceRequest.h"
+#include "ResourceResponse.h"
#include "Settings.h"
#include "WebKitVersion.h"
#include "ewk_logging.h"
@@ -122,9 +123,15 @@
void FrameLoaderClientEfl::committedLoad(DocumentLoader* loader, const char* data, int length)
{
- if (!m_pluginView)
+ if (!m_pluginView) {
loader->commitData(data, length);
+ // Let the media document handle the rest of loading itself, cancel here.
+ Frame* coreFrame = loader->frame();
+ if (coreFrame && coreFrame->document()->isMediaDocument())
+ loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response()));
+ }
+
// We re-check here as the plugin can have been created
if (m_pluginView) {
if (!m_hasSentResponseToPlugin) {
@@ -657,12 +664,11 @@
bool FrameLoaderClientEfl::canShowMIMEType(const String& MIMEType) const
{
- if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType))
+ if (MIMETypeRegistry::isSupportedImageMIMEType(MIMEType)
+ || MIMETypeRegistry::isSupportedNonImageMIMEType(MIMEType)
+ || MIMETypeRegistry::isSupportedMediaMIMEType(MIMEType))
return true;
- if (MIMETypeRegistry::isSupportedNonImageMIMEType(MIMEType))
- return true;
-
#if 0 // PluginDatabase is disabled until we have Plugin system done.
if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(MIMEType))
return true;
@@ -780,6 +786,7 @@
WebKitErrorCannotFindPlugIn = 200,
WebKitErrorCannotLoadPlugIn = 201,
WebKitErrorJavaUnavailable = 202,
+ WebKitErrorPluginWillHandleLoad = 204
};
ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& request)
@@ -820,15 +827,15 @@
"File does not exist");
}
-ResourceError FrameLoaderClientEfl::pluginWillHandleLoadError(const ResourceResponse&)
+ResourceError FrameLoaderClientEfl::pluginWillHandleLoadError(const ResourceResponse& response)
{
- notImplemented();
- return ResourceError("Error", 0, "", "");
+ return ResourceError("Error", WebKitErrorPluginWillHandleLoad, response.url().string(),
+ "Plugin will handle load");
}
bool FrameLoaderClientEfl::shouldFallBack(const ResourceError& error)
{
- return !(error.isCancellation() || (error.errorCode() == WebKitErrorFrameLoadInterruptedByPolicyChange));
+ return !(error.isCancellation() || error.errorCode() == WebKitErrorFrameLoadInterruptedByPolicyChange || error.errorCode() == WebKitErrorPluginWillHandleLoad);
}
bool FrameLoaderClientEfl::canCachePage() const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes