[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 11:15:09 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4de18ccfdd7328ed96fc248ebb8f920778d9a2da
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 16 00:06:59 2010 +0000
If needed, NPN_GetURL the src URL
https://bugs.webkit.org/show_bug.cgi?id=42424
Reviewed by Sam Weinig.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NPP_GetValue):
Add NPP_GetValue wrapper.
(WebKit::NetscapePlugin::shouldLoadSrcURL):
Check whether the src url should be cancelled.
(WebKit::NetscapePlugin::initialize):
If the src URL should be loaded, then load it.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 51f3f64..9faee8f 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -9,6 +9,23 @@
Reviewed by Sam Weinig.
+ If needed, NPN_GetURL the src URL
+ https://bugs.webkit.org/show_bug.cgi?id=42424
+
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ (WebKit::NetscapePlugin::NPP_GetValue):
+ Add NPP_GetValue wrapper.
+
+ (WebKit::NetscapePlugin::shouldLoadSrcURL):
+ Check whether the src url should be cancelled.
+
+ (WebKit::NetscapePlugin::initialize):
+ If the src URL should be loaded, then load it.
+
+2010-07-15 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
Stop the plug-in stream when it's finished loading
https://bugs.webkit.org/show_bug.cgi?id=42423
diff --git a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
index cc41f66..e2c5272 100644
--- a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
+++ b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
@@ -195,6 +195,11 @@ void NetscapePlugin::NPP_URLNotify(const char* url, NPReason reason, void* notif
m_pluginModule->pluginFuncs().urlnotify(&m_npp, url, reason, notifyData);
}
+NPError NetscapePlugin::NPP_GetValue(NPPVariable variable, void *value)
+{
+ return m_pluginModule->pluginFuncs().getvalue(&m_npp, variable, value);
+}
+
void NetscapePlugin::callSetWindow()
{
m_npWindow.x = m_frameRect.x();
@@ -209,6 +214,17 @@ void NetscapePlugin::callSetWindow()
NPP_SetWindow(&m_npWindow);
}
+bool NetscapePlugin::shouldLoadSrcURL()
+{
+ // Check if we should cancel the load
+ NPBool cancelSrcStream = false;
+
+ if (NPP_GetValue(NPPVpluginCancelSrcStream, &cancelSrcStream) != NPERR_NO_ERROR)
+ return true;
+
+ return !cancelSrcStream;
+}
+
NetscapePluginStream* NetscapePlugin::streamFromID(uint64_t streamID)
{
return m_streams.get(streamID).get();
@@ -261,6 +277,10 @@ bool NetscapePlugin::initialize(PluginController* pluginController, const Parame
return false;
}
+ // Load the src URL if needed.
+ if (!parameters.url.isEmpty() && shouldLoadSrcURL())
+ loadURL(parameters.url.string(), String(), false, 0);
+
return true;
}
diff --git a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
index a431c4f..e13fde6 100644
--- a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
+++ b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
@@ -66,14 +66,14 @@ public:
NPError NPP_DestroyStream(NPStream*, NPReason);
int32_t NPP_WriteReady(NPStream*);
int32_t NPP_Write(NPStream*, int32_t offset, int32_t len, void* buffer);
-
- void NPP_URLNotify(const char* url, NPReason reason, void* notifyData);
+ void NPP_URLNotify(const char* url, NPReason, void* notifyData);
+ NPError NPP_GetValue(NPPVariable, void *value);
private:
NetscapePlugin(PassRefPtr<NetscapePluginModule> pluginModule);
void callSetWindow();
-
+ bool shouldLoadSrcURL();
NetscapePluginStream* streamFromID(uint64_t streamID);
bool platformPostInitialize();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list