Skip to content
  • zecke@webkit.org's avatar
    2008-05-14 Marc Ordinas i Llopis <marc.ordinasillopis@collabora.co.uk> · b3b076ce
    zecke@webkit.org authored
            Reviewed by Holger.
    
            https://bugs.webkit.org/show_bug.cgi?id=18882
            https://bugs.webkit.org/show_bug.cgi?id=18892
            Based also on work by Chris Lord.
    
            Provides support for NPAPI plugins that pass NULL as their instance
            info. There are two kinds:
            - Some call NPN_UserAgent and NPN_GetValue before a PluginView has
            been created. For those we provide static versions of those functions.
            - Others call NPN_* functions with a NULL instance inside NPP_*
            calls, for those we've added extra currentPluginView guards.
    
            * plugins/PluginView.cpp: Add additional currentPluginView guards and
            some small style changes.
            (WebCore::PluginView::start):
            (WebCore::PluginView::performRequest):
            (WebCore::PluginView::bindingInstance):
            (WebCore::PluginView::handlePost):
            * plugins/PluginView.h: Added static versions of NPN_UserAgent and
            NPN_GetValue.
            * plugins/gtk/PluginViewGtk.cpp: Add additional currentPluginView
            guards and some small style changes.
            (WebCore::PluginView::setNPWindowRect):
            (WebCore::PluginView::stop):
            (WebCore::PluginView::userAgentStatic): Added to deal with plugins
            that query this before having a PluginView.
            (WebCore::PluginView::getValueStatic): Added to deal with plugins
            that call this before we have created a PluginView.
            (WebCore::PluginView::getValue): Moved some code to getValueStatic.
            (WebCore::PluginView::init):
            * plugins/npapi.cpp: Call PluginView::userAgentStatic
            and PluginView::getValueStatic if no PluginView is
            present.
            (NPN_UserAgent):
            (NPN_GetValue):
            * plugins/qt/PluginPackageQt.cpp:
            (WebCore::PluginPackage::fetchInfo): Corrected split args because ignoring
            empty entries crashed.
            (WebCore::PluginPackage::load): Resolve all symbols when loading plugins
            to protect against XPCOM dependencies.
            * plugins/qt/PluginViewQt.cpp: Add additional currentPluginView guards and
            some small style changes.
            (WebCore::PluginView::updateWindow):
            (WebCore::PluginView::setNPWindowRect):
            (WebCore::PluginView::stop):
            (WebCore::PluginView::userAgentStatic): Added to deal with plugins
            that query this before having a PluginView.
            (WebCore::PluginView::handlePostReadFile):
            (WebCore::PluginView::getValueStatic): Added to deal with plugins
            that call this before we have created a PluginView.
            (WebCore::PluginView::getValue): Moved some code to getValueStatic.
            (WebCore::PluginView::init): m_needsXEmbed init was moved to constructor.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b3b076ce