diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
commit | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch) | |
tree | 8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/WebKit2/WebProcess/Plugins | |
parent | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff) | |
download | qtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz |
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins')
7 files changed, 21 insertions, 15 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp index 5aadd13f4..b4657f95f 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp @@ -163,7 +163,7 @@ void NPRuntimeObjectMap::convertJSValueToNPVariant(ExecState* exec, JSValue valu } if (value.isString()) { - NPString npString = createNPString(value.toString(exec).utf8()); + NPString npString = createNPString(value.toString(exec)->value(exec).utf8()); STRINGN_TO_NPVARIANT(npString.UTF8Characters, npString.UTF8Length, variant); return; } diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h b/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h index bef701bee..deffd5431 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h @@ -26,9 +26,7 @@ #ifndef NPJSObjectWrapperMap_h #define NPJSObjectWrapperMap_h - -#include "RunLoop.h" - +#include <WebCore/RunLoop.h> #include <heap/Weak.h> #include <wtf/Forward.h> #include <wtf/HashMap.h> @@ -98,7 +96,7 @@ private: HashMap<JSC::JSObject*, NPJSObject*> m_npJSObjects; HashMap<NPObject*, JSC::Weak<JSNPObject> > m_jsNPObjects; Vector<NPObject*> m_npObjectsToFinalize; - RunLoop::Timer<NPRuntimeObjectMap> m_finalizationTimer; + WebCore::RunLoop::Timer<NPRuntimeObjectMap> m_finalizationTimer; }; } // namespace WebKit diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp index a8a806e01..e09ada40a 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp @@ -408,6 +408,9 @@ static const unsigned WKNVSupportsCompositingCoreAnimationPluginsBool = 74656; // Whether the browser expects a non-retained Core Animation layer. static const unsigned WKNVExpectsNonretainedLayer = 74657; +// Whether plug-in code is allowed to enter (arbitrary) sandbox for the process. +static const unsigned WKNVAllowedToEnterSandbox = 74658; + // The Core Animation render server port. static const unsigned WKNVCALayerRenderServerPort = 71879; @@ -495,6 +498,10 @@ static NPError NPN_GetValue(NPP npp, NPNVariable variable, void *value) break; } + case WKNVAllowedToEnterSandbox: + *(NPBool*)value = true; + break; + #ifndef NP_NO_QUICKDRAW case NPNVsupportsQuickDrawBool: // We don't support the QuickDraw drawing model. diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h index 84541820c..adad2d015 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h @@ -28,10 +28,10 @@ #include "NetscapePluginModule.h" #include "Plugin.h" -#include "RunLoop.h" #include <WebCore/AffineTransform.h> #include <WebCore/GraphicsLayer.h> #include <WebCore/IntRect.h> +#include <WebCore/RunLoop.h> #include <wtf/HashMap.h> #include <wtf/text/CString.h> #include <wtf/text/StringHash.h> @@ -291,7 +291,7 @@ private: bool m_repeat; TimerFunc m_timerFunc; - RunLoop::Timer<Timer> m_timer; + WebCore::RunLoop::Timer<Timer> m_timer; }; typedef HashMap<unsigned, Timer*> TimerMap; TimerMap m_timers; @@ -332,7 +332,7 @@ private: // FIXME: It's a bit wasteful to have one null event timer per plug-in. // We should investigate having one per window. - RunLoop::Timer<NetscapePlugin> m_nullEventTimer; + WebCore::RunLoop::Timer<NetscapePlugin> m_nullEventTimer; NP_CGContext m_npCGContext; #endif #elif PLUGIN_ARCHITECTURE(WIN) diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp index 23a83fe6d..5e496e306 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp @@ -28,6 +28,8 @@ #include "NetscapePlugin.h" #include <utility> +#include <wtf/PassOwnPtr.h> +#include <wtf/Vector.h> using namespace WebCore; using namespace std; diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h index de26827fc..05873e4f4 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h @@ -26,8 +26,8 @@ #ifndef NetscapePluginStream_h #define NetscapePluginStream_h -#include "RunLoop.h" #include <WebCore/FileSystem.h> +#include <WebCore/RunLoop.h> #include <WebCore/npruntime_internal.h> #include <wtf/Forward.h> #include <wtf/PassRefPtr.h> @@ -36,7 +36,7 @@ #include <wtf/text/CString.h> namespace WebCore { - class KURL; +class KURL; } namespace WebKit { @@ -103,7 +103,7 @@ private: CString m_mimeType; CString m_headers; - RunLoop::Timer<NetscapePluginStream> m_deliveryDataTimer; + WebCore::RunLoop::Timer<NetscapePluginStream> m_deliveryDataTimer; OwnPtr< Vector<uint8_t> > m_deliveryData; bool m_stopStreamWhenDoneDelivering; }; diff --git a/Source/WebKit2/WebProcess/Plugins/PluginView.h b/Source/WebKit2/WebProcess/Plugins/PluginView.h index 9624ac954..cd6363a58 100644 --- a/Source/WebKit2/WebProcess/Plugins/PluginView.h +++ b/Source/WebKit2/WebProcess/Plugins/PluginView.h @@ -29,13 +29,12 @@ #include "NPRuntimeObjectMap.h" #include "Plugin.h" #include "PluginController.h" -#include "RunLoop.h" #include "WebFrame.h" - #include <WebCore/MediaCanStartListener.h> +#include <WebCore/PluginViewBase.h> #include <WebCore/ResourceError.h> #include <WebCore/ResourceResponse.h> -#include <WebCore/PluginViewBase.h> +#include <WebCore/RunLoop.h> #include <wtf/Deque.h> // FIXME: Eventually this should move to WebCore. @@ -180,7 +179,7 @@ private: // Pending URLRequests that the plug-in has made. Deque<RefPtr<URLRequest> > m_pendingURLRequests; - RunLoop::Timer<PluginView> m_pendingURLRequestsTimer; + WebCore::RunLoop::Timer<PluginView> m_pendingURLRequestsTimer; // Pending frame loads that the plug-in has made. typedef HashMap<RefPtr<WebFrame>, RefPtr<URLRequest> > FrameLoadMap; |