1. 13 May, 2008 1 commit
  2. 07 May, 2008 1 commit
    • hausmann@webkit.org's avatar
      2008-05-07 Ariya Hidayat <ariya.hidayat@trolltech.com> · dc5d54b7
      hausmann@webkit.org authored
              Reviewed by Simon.
      
              Share the plug-in directories between Gtk and Qt/X11 port.
      
              * platform/qt/FileSystemQt.cpp:
              (WebCore::homeDirectoryPath): Implement it for Qt.
              * plugins/PluginDatabase.cpp:
              (WebCore::addMozillaPluginDirectories): Shared code.
              (WebCore::PluginDatabase::defaultPluginDirectories):
              (WebCore::PluginDatabase::isPreferredPluginDirectory): Shared code.
              * plugins/gtk/PluginDatabaseGtk.cpp:
              (WebCore::PluginDatabase::isPreferredPluginDirectory): Refactored.
              * plugins/qt/PluginDatabaseQt.cpp: Refactored.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc5d54b7
  3. 21 Apr, 2008 1 commit
  4. 31 Mar, 2008 4 commits
    • aroben@apple.com's avatar
      Fix Bug 18208: Acid3 test 65 takes >33ms due to plugin refreshing on Windows · ec80c826
      aroben@apple.com authored
              <http://bugs.webkit.org/show_bug.cgi?id=18208>
      
              We now keep track of all the plugin paths found each time refresh() is
              called. We'll only instantiate PluginPackages if there are new paths
              or paths with changed timestamps since the last time refresh() was
              called.
      
              Reviewed by Darin Adler and Anders Carlsson.
      
              * plugins/PluginDatabase.cpp:
              (WebCore::PluginDatabase::refresh):
                - Only instantiate PluginPackages if there is a new path or a path
                  with a changed timestamp since we last ran refresh().
                - Cache the set of plugin paths found and their timestamps for the
                  next call to refresh().
                - Only re-register MIME types if our set of plugins changed.
              * plugins/PluginDatabase.h: Added a new member to cache plugin paths
              and their timestamps.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec80c826
    • aroben@apple.com's avatar
      Separate filesystem crawling from PluginPackage instantiation · d1b744a2
      aroben@apple.com authored
              Part of Bug 18208: Acid3 test 65 takes >33ms due to plugin refreshing
              on Windows
              <http://bugs.webkit.org/show_bug.cgi?id=18208>
      
              refresh() is now the only place where PluginPackages are instantiated.
              refresh() now asks for a set of plugins that no longer exist on disk,
              and the set of all plugin files in our plugin directories. Using these
              two sets we can update our instantiated plugins without copying any
              HashSets. The code in refresh() and in the platform-specific methods
              to crawl the filesystem is now quite a bit simpler.
      
              PluginDatabase now stores both a PluginSet and a HashMap that maps
              plugin paths to PluginPackages. This allows us to quickly determine
              whether we already have a PluginPackage instantiated for a particular
              path. The new add/remove methods handle the modification of these two
              collections.
      
              A nice side effect of all this is that refresh() no longer copies any
              HashSets.
      
              Reviewed by Mitz Pettel.
      
              * plugins/PluginDatabase.cpp:
              (WebCore::PluginDatabase::refresh): Unload any plugins that have been
              deleted from disk, and add any plugins that either weren't installed
              last time, or have changed since last time.
              (WebCore::PluginDatabase::getDeletedPlugins): Added.
              (WebCore::PluginDatabase::add): Added. Returns whether or not the
              PluginPackage was actually added to the database (duplicates won't be
              added).
              (WebCore::PluginDatabase::remove): Added.
              * plugins/PluginDatabase.h:
              * plugins/PluginPackage.h:
              (WebCore::PluginPackage::path): Added.
              (WebCore::PluginPackage::lastModified): Added.
              * plugins/gtk/PluginDatabaseGtk.cpp:
              (WebCore::PluginDatabase::getPluginPathsInDirectories): Renamed from
              getPluginsInDirectories. Now fills a HashSet of Strings instead of
              instantiated PluginPackages.
              * plugins/win/PluginDatabaseWin.cpp:
              (WebCore::addPluginPathsFromRegistry): Ditto.
              (WebCore::PluginDatabase::getPluginPathsInDirectories): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1b744a2
    • aroben@apple.com's avatar
      Change getPluginsInDirectories to use an out parameter · 94a563de
      aroben@apple.com authored
              This avoids copying a HashSet.
      
              Reviewed by Mitz Pettel.
      
              * plugins/PluginDatabase.cpp:
              (WebCore::PluginDatabase::refresh):
              * plugins/PluginDatabase.h:
              * plugins/gtk/PluginDatabaseGtk.cpp:
              (WebCore::PluginDatabase::getPluginsInDirectories):
              * plugins/win/PluginDatabaseWin.cpp:
              (WebCore::PluginDatabase::getPluginsInDirectories):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94a563de
    • aroben@apple.com's avatar
      Rename PluginDatabase's "PluginPaths" to "PluginDirectories" · 225cc4b7
      aroben@apple.com authored
      WebCore:
      
              Rename PluginDatabase's "PluginPaths" to "PluginDirectories"
      
              The code expects these paths to all be directories, so it seems good
              to refer to them as such.
      
              This patch just changes "Paths" to "Directories" and "Path" to
              "Directory".
      
              Reviewed by Mitz Pettel.
      
              * platform/qt/TemporaryLinkStubs.cpp:
              * platform/wx/TemporaryLinkStubs.cpp:
              * plugins/PluginDatabase.cpp:
              (WebCore::PluginDatabase::installedPlugins):
              (WebCore::PluginDatabase::refresh):
              * plugins/PluginDatabase.h:
              (WebCore::PluginDatabase::setPluginDirectories):
              * plugins/gtk/PluginDatabaseGtk.cpp:
              (WebCore::PluginDatabase::getPluginsInDirectories):
              * plugins/win/PluginDatabaseWin.cpp:
              (WebCore::PluginDatabase::getPluginsInDirectories):
              (WebCore::safariPluginsDirectory):
              (WebCore::PluginDatabase::defaultPluginDirectories):
            ...
      225cc4b7
  5. 01 Mar, 2008 1 commit
    • jhoneycutt@apple.com's avatar
      2008-03-01 Jon Honeycutt <jhoneycutt@apple.com> · 9cb630a8
      jhoneycutt@apple.com authored
              Reviewed by Darin.
      
              <rdar://problem/5772987> Crashing viewing page with two VLC plug-in
              instances
      
              The VLC Netscape plug-in crashes if more than one instance is created.
      
              Added a quirk that disallows a plug-in from having more than one
              instance and set this for the VLC plug-in.
      
              In addition, we now sort plug-ins that handle the same MIME
              type to choose the most appropriate one. This sorting first sorts by
              whether a plug-in has an issue that should put it at the end of the
              list, then whether it appears in a "preferred" plug-in directory.
      
              * plugins/PluginQuirkSet.h: Added PluginQuirkDontAllowMultipleInstances.
              * plugins/PluginDatabase.cpp:
              (WebCore::PluginDatabase::preferredPluginCompare): Comparator for
              sorting plug-ins; calls PluginPackage::compare().
              (WebCore::PluginDatabase::pluginForMIMEType): Add all of the plug-ins
              that handle this MIME type to a list, sort the list, and return the
              first item.
              (WebCore::PluginDatabase::MIMETypeForExtension): Add all of the plug-ins
              that handle this extension to a list, sort the list, and return the MIME
              type used by the plug-in at the beginning of the list.
              * plugins/PluginDatabase.h:
              * plugins/PluginPackage.h:
              (WebCore::PluginPackage::version): Added; returns the module version.
              * plugins/win/PluginDatabaseWin.cpp:
              (WebCore::PluginDatabase::isPreferredPluginPath): Made static; removed
              const.
              * plugins/win/PluginPackageWin.cpp:
              (WebCore::PluginPackage::compare): Sorts plug-ins with known issues to
              the end, then plug-ins in preferred directories to the beginning, then
              alphabetically by file name, numerically by version, and alphabetically
              by parent directory.
              (WebCore::PluginPackage::determineQuirks): Set the "don't allow multiple
              instances" quirk for VLC.
              (WebCore::PluginPackage::load): Return false if the plug-in library has
              already been loaded and the "don't allow multiple instances" quirk is
              set.
              * platform/gtk/TemporaryLinkStubs.cpp:
              (PluginPackage::compare): Added stub.
              (PluginDatabase::IsPreferredPluginPath): Update the GTK stub.
              * platform/qt/TemporaryLinkStubs.cpp:
              (PluginPackage::compare): Added stub.
              (PluginDatabase::IsPreferredPluginPath): Update the Qt stub.
              * platform/wx/TemporaryLinkStubs.cpp:
              (PluginPackage::compare): Added stub.
              (PluginDatabase::IsPreferredPluginPath): Update the wx stub.
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9cb630a8
  6. 25 Feb, 2008 1 commit
    • mrowe@apple.com's avatar
      2008-02-25 Rodney Dawes <dobey@wayofthemonkey.com> · 81bf662c
      mrowe@apple.com authored
              Reviewed by Jon Honeycutt.
      
              http://bugs.webkit.org/show_bug.cgi?id=16924
              Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations
      
              Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports.
              Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code.
              Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build.
              Add new PluginDatabase.cpp to Windows build.
              Add temporary stubs for new PluginDatabase and PluginPackage.
              shared classes to GTK+, Qt, and Wx ports.
              Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history.
              Remove shared code from PluginDatabaseWin.cpp.
              Remove Windows-specific code from PluginDatabase.cpp.
              Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME.
              Remove extraneous PluginPackage:: from hash() class method prototype.
              Subsume storeFileVersion into PluginPackage::fetchInfo.
              Add cross-platform PlatformModuleVersion type definition.
              Use PlatformModuleVersion to store the module version.
              Rename m_fileVersion[ML]S to m_moduleVersion.
              Change compareFileVersion to use PlatformModuleVersion as the argument.
              Move PluginView::determineQuirks and m_quirks to PluginPackage.
              Updated determineQuirks for the PlatformModuleVersion.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCoreSources.bkl:
              * webcore-base.bkl:
              * WebCore.vcproj/WebCore.vcproj:
              * Platform/FileSystem.h:
              * platform/qt/PlugInInfoStoreQt.cpp:
              * platform/gtk/TemporaryLinkStubs.cpp:
              * platform/qt/TemporaryLinkStubs.cpp:
              * platform/wx/TemporaryLinkStubs.cpp:
              * plugins/PluginDatabase.cpp:
              * plugins/PluginDatabase.h:
              * plugins/win/PluginDatabaseWin.cpp:
              * plugins/PluginPackage.h:
              * plugins/win/PluginPackageWin.cpp:
              * plugins/PluginView.h:
              * plugins/win/PluginViewWin.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81bf662c