2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
authorcommit-queue <commit-queue@webkit.org>
Sat, 28 Aug 2010 04:32:17 +0000 (04:32 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 30 Aug 2010 17:40:35 +0000 (14:40 -0300)
commit4ed6900e3c028f1a2ace5d2f6d5ae9d7230ea8fe
tree839a4cf82dce63c47e66c8dff6150cc7e05d755f
parent7c8ea628dd2c7d5c05e1682059d6178b2f8bc7e6
2010-08-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
        https://bugs.webkit.org/show_bug.cgi?id=43179

        Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
        NPAPI Plugin Cache. The flag is enabled by default.

        * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
2010-08-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Cache plugin info to a persistent database

        https://bugs.webkit.org/show_bug.cgi?id=43179

        Implement a cache of NPAPI plugin metadata. Write the metadata to aa
        file that gets rewritten if any plugin is added / removed.  Compilation
        of the feature is controlled by #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)

        Currently only enabled for Qt UNIX flavors.

        * WebCore.pro:  Enable NETSCAPE_PLUGIN_METADATA_CACHE for UNIX builds
        * platform/qt/FileSystemQt.cpp:
        (WebCore::openFile): Added.
        (WebCore::readFromFile): Added.
        * plugins/PluginDatabase.cpp:
        (WebCore::persistentPluginMetadataCachePath): Static accessor for the path
        (WebCore::PluginDatabase::PluginDatabase): Add instance variable.
        (WebCore::PluginDatabase::refresh):
        (WebCore::PluginDatabase::pluginForMIMEType): Ensure returned plugin is loaded.
        (WebCore::PluginDatabase::MIMETypeForExtension): Ensure returned plugin is loaded.
        (WebCore::PluginDatabase::clear):
        (WebCore::fillBufferWithContentsOfFile): Static helper function.
        (WebCore::readUTF8String): Static helper function.
        (WebCore::readTime): Static helper function.
        (WebCore::PluginDatabase::loadPersistentMetadataCache):
        (WebCore::writeUTF8String): Static helper function.
        (WebCore::writeTime): Static helper function.
        (WebCore::PluginDatabase::updatePersistentMetadataCache): Added.
        (WebCore::PluginDatabase::isPersistentMetadataCacheEnabled): Added.
        (WebCore::PluginDatabase::setPersistentMetadataCacheEnabled):Added.
        (WebCore::PluginDatabase::persistentMetadataCachePath): Added.
        (WebCore::PluginDatabase::setPersistentMetadataCachePath): Added.
        * plugins/PluginDatabase.h:
        * plugins/PluginPackage.cpp:
        (WebCore::PluginPackage::PluginPackage): Add instance variable.
        (WebCore::PluginPackage::createPackageFromCache): Added.
        (WebCore::PluginPackage::ensurePluginLoaded): Added.
        * plugins/PluginPackage.h:
        (WebCore::PluginPackage::fullMIMEDescription): Added.
        * plugins/qt/PluginPackageQt.cpp:
        (WebCore::PluginPackage::fetchInfo): Split mime parsing.
        (WebCore::PluginPackage::setMIMEDescription): Added. Mime parsing.
2010-08-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Cache plugin info to a persistent database

        https://bugs.webkit.org/show_bug.cgi?id=43179

        Implement a cache of NPAPI plugin metadata. Write the metadata to aa
        file that gets rewritten if any plugin is added / removed.  Compilation
        of the feature is controlled by #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)

        Currently only enabled for Qt UNIX flavors.

        * Api/qwebplugindatabase.cpp:
        (QWebPluginDatabase::plugins):  Match previous behavior: ensure all returned plugins are loaded.
        * Api/qwebsettings.cpp:
        (QWebSettings::enablePersistentStorage): Set plugin cache path.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/Platform.h
WebCore/ChangeLog
WebCore/WebCore.pro
WebCore/platform/qt/FileSystemQt.cpp
WebCore/plugins/PluginDatabase.cpp
WebCore/plugins/PluginDatabase.h
WebCore/plugins/PluginPackage.cpp
WebCore/plugins/PluginPackage.h
WebCore/plugins/qt/PluginPackageQt.cpp
WebKit/qt/Api/qwebplugindatabase.cpp
WebKit/qt/Api/qwebsettings.cpp
WebKit/qt/ChangeLog