Changeset 79925 in webkit


Ignore:
Timestamp:
Feb 28, 2011 2:48:29 PM (13 years ago)
Author:
kbalazs@webkit.org
Message:

2011-02-28 Balazs Kelemen <kbalazs@webkit.org>

Reviewed by Anders Carlsson.

[Qt][WK2] Plugin initialization
https://bugs.webkit.org/show_bug.cgi?id=48127

  • Source/WebKit.pri: Lift the definition of the XP_UNIX macro from WebCore.pri to WebKit.pri to apply it to WebKit2 as well.

2011-02-28 Balazs Kelemen <kbalazs@webkit.org>

Reviewed by Anders Carlsson.

[Qt][WK2] Plugin initialization
https://bugs.webkit.org/show_bug.cgi?id=48127

No function change so no new tests.

  • WebCore.pri: Lift the definition of the XP_UNIX macro from WebCore.pri to WebKit.pri to apply it to WebKit2 as well.

2011-02-28 Balazs Kelemen <kbalazs@webkit.org>

Reviewed by Anders Carlsson.

[Qt][WK2] Plugin initialization
https://bugs.webkit.org/show_bug.cgi?id=48127

Specialize the way of initializing the plugin for X11.
Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
across platforms.

  • Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad):
  • config.h:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r79848 r79925  
     12011-02-28  Balazs Kelemen  <kbalazs@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        [Qt][WK2] Plugin initialization
     6        https://bugs.webkit.org/show_bug.cgi?id=48127
     7
     8        * Source/WebKit.pri: Lift the definition of the XP_UNIX macro
     9        from WebCore.pri to WebKit.pri to apply it to WebKit2 as well.
     10
    1112011-02-28  Kristian Amlie  <kristian.amlie@nokia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r79922 r79925  
     12011-02-28  Balazs Kelemen  <kbalazs@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        [Qt][WK2] Plugin initialization
     6        https://bugs.webkit.org/show_bug.cgi?id=48127
     7
     8        No function change so no new tests.
     9
     10        * WebCore.pri: Lift the definition of the XP_UNIX macro
     11        from WebCore.pri to WebKit.pri to apply it to WebKit2 as well.
     12
    1132011-02-28  Dean Jackson  <dino@apple.com>
    214
  • trunk/Source/WebCore/WebCore.pri

    r79548 r79925  
    211211                DEFINES += MOZ_PLATFORM_MAEMO=6
    212212            }
    213             DEFINES += XP_UNIX
    214213            DEFINES += ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE=1
    215214        }
  • trunk/Source/WebKit.pri

    r79814 r79925  
    147147
    148148contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
     149
     150# Needed by npapi.h.
     151unix:!mac:!symbian: DEFINES += XP_UNIX
  • trunk/Source/WebKit2/ChangeLog

    r79914 r79925  
     12011-02-28  Balazs Kelemen  <kbalazs@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        [Qt][WK2] Plugin initialization
     6        https://bugs.webkit.org/show_bug.cgi?id=48127
     7
     8        Specialize the way of initializing the plugin for X11.
     9        Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
     10        across platforms.
     11
     12        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
     13        (WebKit::NetscapePluginModule::tryLoad):
     14        * config.h:
     15
    1162011-02-28  Sam Weinig  <sam@webkit.org>
    217
  • trunk/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp

    r78611 r79925  
    219219        return false;
    220220
     221#if !PLUGIN_ARCHITECTURE(X11)
    221222    NP_GetEntryPointsFuncPtr getEntryPointsFuncPtr = m_module->functionPointer<NP_GetEntryPointsFuncPtr>("NP_GetEntryPoints");
    222223    if (!getEntryPointsFuncPtr)
    223224        return false;
     225#endif
    224226
    225227    m_shutdownProcPtr = m_module->functionPointer<NPP_ShutdownProcPtr>("NP_Shutdown");
     
    233235    // reversed. Failing to follow this order results in crashes (e.g., in Silverlight on Mac and
    234236    // in Flash and QuickTime on Windows).
    235 #if PLATFORM(MAC)
     237#if PLUGIN_ARCHITECTURE(MAC)
    236238    if (initializeFuncPtr(netscapeBrowserFuncs()) != NPERR_NO_ERROR || getEntryPointsFuncPtr(&m_pluginFuncs) != NPERR_NO_ERROR)
    237239        return false;
    238 #elif PLATFORM(WIN)
     240#elif PLUGIN_ARCHITECTURE(WIN)
    239241    if (getEntryPointsFuncPtr(&m_pluginFuncs) != NPERR_NO_ERROR || initializeFuncPtr(netscapeBrowserFuncs()) != NPERR_NO_ERROR)
    240242        return false;
     243#elif PLUGIN_ARCHITECTURE(X11)
     244    if (initializeFuncPtr(netscapeBrowserFuncs(), &m_pluginFuncs) != NPERR_NO_ERROR)
     245        return false;
    241246#endif
    242247
  • trunk/Source/WebKit2/config.h

    r79335 r79925  
    137137#endif /* defined(WIN32) || defined(_WIN32) */
    138138
     139#if PLATFORM(MAC) || (OS(MAC_OS_X) && PLATFORM(QT))
     140#define PLUGIN_ARCHITECTURE_MAC 1
     141#elif PLATFORM(WIN) || (OS(WIN) && PLATFORM(QT))
     142#define PLUGIN_ARCHITECTURE_WIN 1
     143#elif (PLATFORM(QT) && defined(Q_WS_X11)) || (PLATFORM(GTK) && OS(UNIX) && !OS(MAC_OS_X))
     144#define PLUGIN_ARCHITECTURE_X11 1
     145#endif
     146
     147#define PLUGIN_ARCHITECTURE(ARCH) (defined(PLUGIN_ARCHITECTURE_##ARCH) && PLUGIN_ARCHITECTURE_##ARCH)
Note: See TracChangeset for help on using the changeset viewer.