Source/WebKit2/ChangeLog

 12011-03-23 Balazs Kelemen <kbalazs@webkit.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [WK2] Introduce an option for no NPAPI support
 6 https://bugs.webkit.org/show_bug.cgi?id=55828
 7
 8 Stub out NPAPI support for platform and OS combinations that are
 9 not supported yet. Ancestor patch was made by Laszlo Gombos.
 10
 11 * GNUmakefile.am: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
 12 to the build system.
 13
 14 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
 15 Remove the sanity check because from now all combinations that
 16 don't have an explicitly set plugin architecture fall into
 17 the PLUGIN_ARCHITECTURE(UNSUPPORTED) category and has a stubbed
 18 implementation.
 19
 20 * Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp: Added.
 21 Stubbed implementation.
 22 (WebKit::NetscapePluginModule::getPluginInfo):
 23 (WebKit::NetscapePluginModule::determineQuirks):
 24
 25 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Guard with
 26 PLUGIN_ARCHITECTURE(X11).
 27
 28 * WebKit2.pro: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
 29 to the build system.
 30
 31 * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp: Added.
 32 Stubbed implementation
 33 (WebKit::NetscapePlugin::platformPostInitialize):
 34 (WebKit::NetscapePlugin::platformDestroy):
 35 (WebKit::NetscapePlugin::platformInvalidate):
 36 (WebKit::NetscapePlugin::platformGeometryDidChange):
 37 (WebKit::NetscapePlugin::platformPaint):
 38 (WebKit::NetscapePlugin::platformHandleMouseEvent):
 39 (WebKit::NetscapePlugin::platformHandleWheelEvent):
 40 (WebKit::NetscapePlugin::platformSetFocus):
 41 (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
 42 (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
 43 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
 44
 45 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Guard with
 46 PLUGIN_ARCHITECTURE(X11)
 47
 48 * config.h: Introduce PLUGIN_ARCHITECTURE(UNSOPPORTED) as another
 49 option. Make platform and OS combinations that are not supported
 50 yet fall into this. Don't use Q_WS_X11 to test the window system
 51 for Qt because it is not defined without including <QtGlobal>.
 52 No clue about how could it work so far.
 53
1542011-03-24 Enrica Casucci <enrica@apple.com>
255
356 Reviewed by Alexey Proskuryakov.

Source/WebKit2/GNUmakefile.am

@@libWebKit2_la_SOURCES = \
212212 Source/WebKit2/Shared/PrintInfo.h \
213213 Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp \
214214 Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.h \
 215 Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp \
215216 Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp \
216217 Source/WebKit2/Shared/Plugins/NPIdentifierData.cpp \
217218 Source/WebKit2/Shared/Plugins/NPIdentifierData.h \

@@libWebKit2_la_SOURCES = \
585586 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h \
586587 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp \
587588 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h \
 589 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginNone.cpp \
588590 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp \
589591 Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h \
590592 Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp \

Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp

3232#include <wtf/PassOwnPtr.h>
3333#include <wtf/text/CString.h>
3434
35 #if !PLUGIN_ARCHITECTURE(MAC) && !PLUGIN_ARCHITECTURE(WIN) && !PLUGIN_ARCHITECTURE(X11)
36 #error Unknown plug-in architecture
37 #endif
38 
3935namespace WebKit {
4036
4137static Vector<NetscapePluginModule*>& initializedNetscapePluginModules()

Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 24 * THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#include "config.h"
 28#if PLUGIN_ARCHITECTURE(UNSUPPORTED)
 29
 30#include "NetscapePluginModule.h"
 31
 32using namespace WebCore;
 33
 34namespace WebKit {
 35
 36bool NetscapePluginModule::getPluginInfo(const String&, PluginInfoStore::Plugin&)
 37{
 38 return false;
 39}
 40
 41void NetscapePluginModule::determineQuirks()
 42{
 43}
 44
 45} // namespace WebKit
 46
 47#endif

Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp

2424 */
2525
2626#include "config.h"
 27#if PLUGIN_ARCHITECTURE(X11)
 28
2729#include "NetscapePluginModule.h"
2830
2931#include "PluginDatabase.h"

@@void NetscapePluginModule::determineQuirks()
98100}
99101
100102} // namespace WebKit
 103
 104#endif // PLUGIN_ARCHITECTURE(X11)

Source/WebKit2/WebKit2.pro

@@SOURCES += \
308308 Platform/qt/SharedMemoryQt.cpp \
309309 Platform/qt/WorkQueueQt.cpp \
310310 Shared/Plugins/Netscape/NetscapePluginModule.cpp \
 311 Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp \
311312 Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp \
312313 Shared/ShareableBitmap.cpp \
313314 Shared/Plugins/NPRemoteObjectMap.cpp \

@@SOURCES += \
465466 WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp \
466467 WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp \
467468 WebProcess/Plugins/Netscape/NetscapePlugin.cpp \
 469 WebProcess/Plugins/Netscape/NetscapePluginNone.cpp \
468470 WebProcess/Plugins/Netscape/NetscapePluginStream.cpp \
469471 WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp \
470472 WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp \

Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginNone.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 24 * THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#include "config.h"
 28#if PLUGIN_ARCHITECTURE(UNSUPPORTED)
 29
 30#include "NetscapePlugin.h"
 31
 32using namespace WebCore;
 33
 34namespace WebKit {
 35
 36bool NetscapePlugin::platformPostInitialize()
 37{
 38 return false;
 39}
 40
 41void NetscapePlugin::platformDestroy()
 42{
 43}
 44
 45bool NetscapePlugin::platformInvalidate(const IntRect&)
 46{
 47 return false;
 48}
 49
 50void NetscapePlugin::platformGeometryDidChange()
 51{
 52}
 53
 54void NetscapePlugin::platformPaint(GraphicsContext*, const IntRect&, bool)
 55{
 56}
 57
 58bool NetscapePlugin::platformHandleMouseEvent(const WebMouseEvent&)
 59{
 60 return false;
 61}
 62
 63bool NetscapePlugin::platformHandleWheelEvent(const WebWheelEvent&)
 64{
 65 return false;
 66}
 67
 68void NetscapePlugin::platformSetFocus(bool)
 69{
 70}
 71
 72bool NetscapePlugin::platformHandleMouseEnterEvent(const WebMouseEvent&)
 73{
 74 return false;
 75}
 76
 77bool NetscapePlugin::platformHandleMouseLeaveEvent(const WebMouseEvent&)
 78{
 79 return false;
 80}
 81
 82bool NetscapePlugin::platformHandleKeyboardEvent(const WebKeyboardEvent& event)
 83{
 84 return false;
 85}
 86
 87} // namespace WebKit
 88
 89#endif // PLUGIN_ARCHITECTURE(UNSUPPORTED)

Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp

2525 */
2626
2727#include "config.h"
 28#if PLUGIN_ARCHITECTURE(X11)
 29
2830#include "NetscapePlugin.h"
2931
3032#include "WebEvent.h"

@@bool NetscapePlugin::platformHandleKeyboardEvent(const WebKeyboardEvent& event)
423425}
424426
425427} // namespace WebKit
 428
 429#endif // PLUGIN_ARCHITECTURE(X11)

Source/WebKit2/config.h

@@static const type& name() \
141141
142142#endif
143143
144 #if PLATFORM(MAC) || (OS(MAC_OS_X) && PLATFORM(QT))
 144#if PLATFORM(MAC)
145145#define PLUGIN_ARCHITECTURE_MAC 1
146 #elif PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(QT))
 146#elif PLATFORM(WIN)
147147#define PLUGIN_ARCHITECTURE_WIN 1
148 #elif (PLATFORM(QT) && defined(Q_WS_X11)) || (PLATFORM(GTK) && OS(UNIX) && !OS(MAC_OS_X))
 148#elif (PLATFORM(QT) || (PLATFORM(GTK))) && (OS(UNIX) && !OS(MAC_OS_X))
149149#define PLUGIN_ARCHITECTURE_X11 1
 150#else
 151#define PLUGIN_ARCHITECTURE_UNSUPPORTED 1
150152#endif
151153
152154#define PLUGIN_ARCHITECTURE(ARCH) (defined PLUGIN_ARCHITECTURE_##ARCH && PLUGIN_ARCHITECTURE_##ARCH)