[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
andersca at apple.com
andersca at apple.com
Thu Oct 29 20:31:23 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit caa04f53691e50dae12b7960cce34e40da3b618e
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 21 20:47:47 2009 +0000
<rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource
Reviewed by Adam Roben.
Implement WebFrameLoaderClient::shouldLoadMediaElementURL and have it call the new private policy
delegate method.
* Interfaces/IWebPolicyDelegatePrivate.idl: Added.
* Interfaces/WebKit.idl:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::shouldLoadMediaElementURL):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebKit.vcproj/Interfaces.vcproj:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index afb0983..49949ad 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,19 @@
+2009-09-21 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource
+
+ Implement WebFrameLoaderClient::shouldLoadMediaElementURL and have it call the new private policy
+ delegate method.
+
+ * Interfaces/IWebPolicyDelegatePrivate.idl: Added.
+ * Interfaces/WebKit.idl:
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::shouldLoadMediaElementURL):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebKit.vcproj/Interfaces.vcproj:
+
2009-09-17 Kenneth Rohde Christiansen <kenneth at webkit.org>
Reviewed by Simon Hausmann.
diff --git a/WebKit/win/Interfaces/IWebPolicyDelegatePrivate.idl b/WebKit/win/Interfaces/IWebPolicyDelegatePrivate.idl
new file mode 100644
index 0000000..4bb052c
--- /dev/null
+++ b/WebKit/win/Interfaces/IWebPolicyDelegatePrivate.idl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+import "IWebFrame.idl"
+import "IWebView.idl"
+#endif
+
+interface IWebView;
+interface IWebFrame;
+
+[
+ object,
+ oleautomation,
+ uuid(BA053E15-559F-46ee-A1D4-F8003EFFB658),
+ pointer_default(unique)
+]
+interface IWebPolicyDelegatePrivate : IUnknown
+{
+ HRESULT shouldLoadMediaURL([in] IWebView* webView, [in] BSTR url, [in] IWebFrame* frame, [out, retval] BOOL* retval);
+}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index f1536fe..96009b8 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -103,6 +103,7 @@ import "ocidl.idl";
#include "IWebNotificationCenter.idl"
#include "IWebNotificationObserver.idl"
#include "IWebPolicyDelegate.idl"
+#include "IWebPolicyDelegatePrivate.idl"
#include "IWebPreferences.idl"
#include "IWebPreferencesPrivate.idl"
#include "IWebResource.idl"
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index 1fd3b2b..7c1f939 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -795,3 +795,24 @@ bool WebFrameLoaderClient::shouldUsePluginDocument(const String& mimeType) const
return webView->shouldUseEmbeddedView(mimeType);
}
+
+bool WebFrameLoaderClient::shouldLoadMediaElementURL(const KURL& url) const
+{
+ WebView* webView = m_webFrame->webView();
+ if (!webView)
+ return true;
+
+ COMPtr<IWebPolicyDelegate> policyDelegate;
+ if (FAILED(webView->policyDelegate(&policyDelegate)) || !policyDelegate)
+ return true;
+
+ COMPtr<IWebPolicyDelegatePrivate> policyDelegatePrivate(Query, policyDelegate);
+ if (!policyDelegate)
+ return true;
+
+ BOOL retval;
+ if (FAILED(policyDelegatePrivate->shouldLoadMediaURL(webView, BString(url), m_webFrame, &retval)))
+ return true;
+
+ return retval;
+}
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index 921ae91..a215cf9 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -112,6 +112,7 @@ public:
virtual bool shouldUsePluginDocument(const WebCore::String& mimeType) const;
virtual void dispatchDidFailToStartPlugin(const WebCore::PluginView*) const;
+ virtual bool shouldLoadMediaElementURL(const WebCore::KURL&) const;
protected:
WebFrameLoaderClient(WebFrame*);
diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
index b4c6829..86fb61f 100644
--- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj
+++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
@@ -1104,6 +1104,26 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebPolicyDelegatePrivate.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebPreferences.idl"
>
<FileConfiguration
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list