2007-12-20 Jon Honeycutt <jhoneycutt@apple.com>
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Dec 2007 06:57:52 +0000 (06:57 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Dec 2007 06:57:52 +0000 (06:57 +0000)
        Reviewed by Kevin Decker.

        <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
        shockwave plugin on freshly installed OS

        Look for Director plugin in its native directory.

        * plugins/win/PluginDatabaseWin.cpp:
        (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
        doesn't start with "np," so special case its filename.
        (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
        directories to the plugin paths.
        (WebCore::PluginDatabaseWin::defaultPluginPaths):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28928 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/plugins/win/PluginDatabaseWin.cpp

index 423e20491e5b03cff3d82e996eca6456b0ce8409..3c5bdb03fa9073fbfa250d0fd9a6dedb7c29bf9c 100644 (file)
@@ -1,3 +1,19 @@
+2007-12-20  Jon Honeycutt  <jhoneycutt@apple.com>
+
+        Reviewed by Kevin Decker.
+
+        <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
+        shockwave plugin on freshly installed OS
+
+        Look for Director plugin in its native directory.
+
+        * plugins/win/PluginDatabaseWin.cpp:
+        (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
+        doesn't start with "np," so special case its filename.
+        (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
+        directories to the plugin paths.
+        (WebCore::PluginDatabaseWin::defaultPluginPaths):
+
 2007-12-20  Peter Kasting  <zerodpx@gmail.com>
 
         Reviewed by Alp Toker.
index 43654a3c281db95e75cfdaf47ff48e464515f6b7..8b7174bf05e3f908d019b1851e1923f064c6669f 100644 (file)
@@ -188,7 +188,8 @@ PluginSet PluginDatabaseWin::getPluginsInPaths() const
                 continue;
 
             String filename = String(findFileData.cFileName, wcslen(findFileData.cFileName));
-            if (!filename.startsWith("np", false) || !filename.endsWith(".dll", false))
+            if ((!filename.startsWith("np", false) || !filename.endsWith("dll", false)) &&
+                (!equalIgnoringCase(filename, "Plugin.dll") || !it->endsWith("Shockwave 10", false)))
                 continue;
 
             String fullPath = *it + "\\" + filename;
@@ -405,18 +406,20 @@ exit:
     return pluginsPath;
 }
 
-static inline void addFlashPluginPath(Vector<String>& paths)
+static inline void addMacromediaPluginPaths(Vector<String>& paths)
 {
     WCHAR systemDirectoryStr[MAX_PATH];
 
     if (GetSystemDirectory(systemDirectoryStr, _countof(systemDirectoryStr)) == 0)
         return;
 
-    WCHAR flashDirectoryStr[MAX_PATH];
+    WCHAR macromediaDirectoryStr[MAX_PATH];
 
-    PathCombine(flashDirectoryStr, systemDirectoryStr, TEXT("macromed\\Flash"));
+    PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Flash"));
+    paths.append(macromediaDirectoryStr);
 
-    paths.append(flashDirectoryStr);
+    PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Shockwave 10"));
+    paths.append(macromediaDirectoryStr);
 }
 
 Vector<String> PluginDatabaseWin::defaultPluginPaths()
@@ -430,7 +433,7 @@ Vector<String> PluginDatabaseWin::defaultPluginPaths()
     addAdobeAcrobatPluginPath(paths);
     addMozillaPluginPaths(paths);
     addWindowsMediaPlayerPluginPath(paths);
-    addFlashPluginPath(paths);
+    addMacromediaPluginPaths(paths);
 
     return paths;
 }