Undoing mess: committing test code
authorkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Sep 2009 02:11:40 +0000 (02:11 +0000)
committerkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Sep 2009 02:11:40 +0000 (02:11 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@48383 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/wtf/GOwnPtr.cpp
JavaScriptCore/wtf/GOwnPtr.h
WebCore/plugins/gtk/PluginPackageGtk.cpp
WebCore/plugins/gtk/PluginViewGtk.cpp
WebKit/gtk/webkit/webkitwebview.cpp

index 7b763ec..432885f 100644 (file)
@@ -62,10 +62,4 @@ template <> void freeOwnedGPtr<GHashTable>(GHashTable* ptr)
         g_hash_table_unref(ptr);
 }
 
-template <> void freeOwnedGPtr<GFile>(GFile* file)
-{
-    if (file)
-        g_object_unref(file);
-}
-
 } // namespace WTF
index b62ff7c..4993348 100644 (file)
@@ -26,7 +26,6 @@
 #include <glib.h>
 #include <wtf/Assertions.h>
 #include <wtf/Noncopyable.h>
-#include <gio/gio.h>
 
 namespace WTF {
     template <typename T> inline void freeOwnedGPtr(T* ptr) { g_free(reinterpret_cast<void*>(ptr)); }
@@ -37,7 +36,6 @@ namespace WTF {
     template<> void freeOwnedGPtr<GPatternSpec>(GPatternSpec*);
     template<> void freeOwnedGPtr<GDir>(GDir*);
     template<> void freeOwnedGPtr<GHashTable>(GHashTable*);
-    template<> void freeOwnedGPtr<GFile>(GFile*);
 
     template <typename T> class GOwnPtr : public Noncopyable {
     public:
index 951fa84..bcbd519 100644 (file)
 #include "config.h"
 #include "PluginPackage.h"
 
+#include <stdio.h>
+
 #include "CString.h"
-#include <GOwnPtr.h>
 #include "MIMETypeRegistry.h"
 #include "NotImplemented.h"
 #include "npruntime_impl.h"
 #include "PluginDebug.h"
 
-#include <stdio.h>
-#include <gio/gio.h>
-
 namespace WebCore {
 
 bool PluginPackage::fetchInfo()
@@ -107,16 +105,7 @@ bool PluginPackage::load()
         return true;
     }
 
-    GOwnPtr<gchar> finalPath(g_strdup(m_path.utf8().data()));
-    while (g_file_test(finalPath.get(), G_FILE_TEST_IS_SYMLINK)) {
-        GOwnPtr<GFile> file(g_file_new_for_path(finalPath.get()));
-        GOwnPtr<gchar> linkPath(g_file_read_link(finalPath.get(), NULL));
-
-        GOwnPtr<GFile> resolvedFile(g_file_resolve_relative_path(file.get(), linkPath.get()));
-        finalPath.set(g_file_get_path(resolvedFile.get()));
-    }
-
-    m_module = g_module_open(finalPath.get(), G_MODULE_BIND_LOCAL);
+    m_module = g_module_open((m_path.utf8()).data(), G_MODULE_BIND_LOCAL);
 
     if (!m_module) {
         LOG(Plugins,"Module Load Failed :%s, Error:%s\n", (m_path.utf8()).data(), g_module_error());
index 89f952c..46b0fc7 100644 (file)
@@ -342,55 +342,57 @@ NPError PluginView::getValue(NPNVariable variable, void* value)
             return NPERR_GENERIC_ERROR;
 #endif
 
-    case NPNVWindowNPObject: {
-        if (m_isJavaScriptPaused)
-            return NPERR_GENERIC_ERROR;
+#if ENABLE(NETSCAPE_PLUGIN_API)
+        case NPNVWindowNPObject: {
+            if (m_isJavaScriptPaused)
+                return NPERR_GENERIC_ERROR;
 
-        NPObject* windowScriptObject = m_parentFrame->script()->windowScriptNPObject();
+            NPObject* windowScriptObject = m_parentFrame->script()->windowScriptNPObject();
 
-        // Return value is expected to be retained, as described here: <http://www.mozilla.org/projects/plugin/npruntime.html>
-        if (windowScriptObject)
-            _NPN_RetainObject(windowScriptObject);
+            // Return value is expected to be retained, as described here: <http://www.mozilla.org/projects/plugin/npruntime.html>
+            if (windowScriptObject)
+                _NPN_RetainObject(windowScriptObject);
 
-        void** v = (void**)value;
-        *v = windowScriptObject;
-        
-        return NPERR_NO_ERROR;
-    }
+            void** v = (void**)value;
+            *v = windowScriptObject;
+            
+            return NPERR_NO_ERROR;
+        }
 
-    case NPNVPluginElementNPObject: {
-        if (m_isJavaScriptPaused)
-            return NPERR_GENERIC_ERROR;
+        case NPNVPluginElementNPObject: {
+            if (m_isJavaScriptPaused)
+                return NPERR_GENERIC_ERROR;
 
-        NPObject* pluginScriptObject = 0;
+            NPObject* pluginScriptObject = 0;
 
-        if (m_element->hasTagName(appletTag) || m_element->hasTagName(embedTag) || m_element->hasTagName(objectTag))
-            pluginScriptObject = static_cast<HTMLPlugInElement*>(m_element)->getNPObject();
+            if (m_element->hasTagName(appletTag) || m_element->hasTagName(embedTag) || m_element->hasTagName(objectTag))
+                pluginScriptObject = static_cast<HTMLPlugInElement*>(m_element)->getNPObject();
 
-        // Return value is expected to be retained, as described here: <http://www.mozilla.org/projects/plugin/npruntime.html>
-        if (pluginScriptObject)
-            _NPN_RetainObject(pluginScriptObject);
+            // Return value is expected to be retained, as described here: <http://www.mozilla.org/projects/plugin/npruntime.html>
+            if (pluginScriptObject)
+                _NPN_RetainObject(pluginScriptObject);
 
-        void** v = (void**)value;
-        *v = pluginScriptObject;
+            void** v = (void**)value;
+            *v = pluginScriptObject;
 
-        return NPERR_NO_ERROR;
-    }
+            return NPERR_NO_ERROR;
+        }
+#endif
 
-    case NPNVnetscapeWindow: {
+        case NPNVnetscapeWindow: {
 #if defined(XP_UNIX)
-        void* w = reinterpret_cast<void*>(value);
-        *((XID *)w) = GDK_WINDOW_XWINDOW(m_parentFrame->view()->hostWindow()->platformWindow()->window);
+            void* w = reinterpret_cast<void*>(value);
+            *((XID *)w) = GDK_WINDOW_XWINDOW(m_parentFrame->view()->hostWindow()->platformWindow()->window);
 #endif
-#if defined(GDK_WINDOWING_WIN32)
-        HGDIOBJ* w = reinterpret_cast<HGDIOBJ*>(value);
-        *w = GDK_WINDOW_HWND(m_parentFrame->view()->hostWindow()->platformWindow()->window);
+#ifdef GDK_WINDOWING_WIN32
+            HGDIOBJ* w = reinterpret_cast<HGDIOBJ*>(value);
+            *w = GDK_WINDOW_HWND(m_parentFrame->view()->hostWindow()->platformWindow()->window);
 #endif
-        return NPERR_NO_ERROR;
-     }
+            return NPERR_NO_ERROR;
+        }
 
-    default:
-        return getValueStatic(variable, value);
+        default:
+            return getValueStatic(variable, value);
     }
 }
 
index 53ba124..5173682 100644 (file)
@@ -2433,8 +2433,6 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
     settings->setEditingBehavior(core(editingBehavior));
     settings->setAllowUniversalAccessFromFileURLs(enableUniversalAccessFromFileURI);
 
-    settings->setJavaEnabled(true);
-
     g_free(defaultEncoding);
     g_free(cursiveFontFamily);
     g_free(defaultFontFamily);