[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
kevino at webkit.org
kevino at webkit.org
Thu Dec 3 13:39:33 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 44d4128685fa223222821741357060398c9af94a
Author: kevino at webkit.org <kevino at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 18 23:18:33 2009 +0000
Reviewed by Kevin Ollivier.
Enable wx plugin support using the Windows implementation as a base.
https://bugs.webkit.org/show_bug.cgi?id=31636
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 350325d..760c59f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2009-11-18 Kevin Watters <kevinwatters at gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Enable wx plugin support using the Windows implementation as a base.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31636
+
+ * platform/graphics/GraphicsContext.h:
+ (WebCore::GraphicsContext::inTransparencyLayer):
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::getWindowsContext):
+ (WebCore::GraphicsContext::releaseWindowsContext):
+ * platform/wx/FileSystemWx.cpp:
+ (WebCore::unloadModule):
+ (WebCore::listDirectory):
+ * plugins/PluginDatabase.cpp:
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::stop):
+ (WebCore::PluginView::PluginView):
+ * plugins/PluginView.h:
+ * plugins/win/PluginViewWin.cpp:
+ (windowHandleForPageClient):
+ (WebCore::PluginView::handleMouseEvent):
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::snapshot):
+ * wscript:
+
2009-11-18 Andrei Popescu <andreip at google.com>
Reviewed by Dimitri Glazkov.
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index 88fa0cc..dbfa84b 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -361,12 +361,16 @@ namespace WebCore {
void drawWindowsBitmap(WindowsBitmap*, const IntPoint&);
#endif
-#if PLATFORM(QT) && defined(Q_WS_WIN)
+#if (PLATFORM(QT) && defined(Q_WS_WIN)) || (PLATFORM(WX) && PLATFORM(WIN_OS))
HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true);
void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true);
bool shouldIncludeChildWindows() const { return false; }
#endif
+#if PLATFORM(WX)
+ bool inTransparencyLayer() const { return false; }
+#endif
+
#if PLATFORM(QT)
bool inTransparencyLayer() const;
PlatformPath* currentPath();
diff --git a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
index a4dde2a..9c05ce5 100644
--- a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
+++ b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
@@ -566,4 +566,72 @@ void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
notImplemented();
}
+#if PLATFORM(WIN_OS)
+HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap)
+{
+ if (dstRect.isEmpty())
+ return 0;
+
+ // Create a bitmap DC in which to draw.
+ BITMAPINFO bitmapInfo;
+ bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bitmapInfo.bmiHeader.biWidth = dstRect.width();
+ bitmapInfo.bmiHeader.biHeight = dstRect.height();
+ bitmapInfo.bmiHeader.biPlanes = 1;
+ bitmapInfo.bmiHeader.biBitCount = 32;
+ bitmapInfo.bmiHeader.biCompression = BI_RGB;
+ bitmapInfo.bmiHeader.biSizeImage = 0;
+ bitmapInfo.bmiHeader.biXPelsPerMeter = 0;
+ bitmapInfo.bmiHeader.biYPelsPerMeter = 0;
+ bitmapInfo.bmiHeader.biClrUsed = 0;
+ bitmapInfo.bmiHeader.biClrImportant = 0;
+
+ void* pixels = 0;
+ HBITMAP bitmap = ::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0);
+ if (!bitmap)
+ return 0;
+
+ HDC displayDC = ::GetDC(0);
+ HDC bitmapDC = ::CreateCompatibleDC(displayDC);
+ ::ReleaseDC(0, displayDC);
+
+ ::SelectObject(bitmapDC, bitmap);
+
+ // Fill our buffer with clear if we're going to alpha blend.
+ if (supportAlphaBlend) {
+ BITMAP bmpInfo;
+ GetObject(bitmap, sizeof(bmpInfo), &bmpInfo);
+ int bufferSize = bmpInfo.bmWidthBytes * bmpInfo.bmHeight;
+ memset(bmpInfo.bmBits, 0, bufferSize);
+ }
+ return bitmapDC;
+}
+
+void GraphicsContext::releaseWindowsContext(HDC hdc, const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap)
+{
+ if (hdc) {
+
+ if (!dstRect.isEmpty()) {
+
+ HBITMAP bitmap = static_cast<HBITMAP>(GetCurrentObject(hdc, OBJ_BITMAP));
+ BITMAP info;
+ GetObject(bitmap, sizeof(info), &info);
+ ASSERT(info.bmBitsPixel == 32);
+
+ wxBitmap bmp;
+ bmp.SetHBITMAP(bitmap);
+#if !wxCHECK_VERSION(2,9,0)
+ if (supportAlphaBlend)
+ bmp.UseAlpha();
+#endif
+ m_data->context->DrawBitmap(bmp, dstRect.x(), dstRect.y(), supportAlphaBlend);
+
+ ::DeleteObject(bitmap);
+ }
+
+ ::DeleteDC(hdc);
+ }
+}
+#endif
+
}
diff --git a/WebCore/platform/wx/FileSystemWx.cpp b/WebCore/platform/wx/FileSystemWx.cpp
index 109278f..a56d81e 100644
--- a/WebCore/platform/wx/FileSystemWx.cpp
+++ b/WebCore/platform/wx/FileSystemWx.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2007 Kevin Ollivier
* Copyright (C) 2008 Collabora, Ltd.
+ * Copyright (C) 2009 Peter Laufenberg @ Inhance Digital Corp
*
* All rights reserved.
*
@@ -35,6 +36,10 @@
#include <wx/wx.h>
#include <wx/filename.h>
+#include <wx/dir.h>
+#include <wx/file.h>
+#include <wx/datetime.h>
+#include <wx/filefn.h>
namespace WebCore {
@@ -114,16 +119,29 @@ int writeToFile(PlatformFileHandle, const char* data, int length)
return 0;
}
-bool unloadModule(PlatformModule)
+bool unloadModule(PlatformModule mod)
{
+#if PLATFORM(WIN_OS)
+ return ::FreeLibrary(mod);
+#else
notImplemented();
return false;
+#endif
}
Vector<String> listDirectory(const String& path, const String& filter)
{
+ wxArrayString file_paths;
+
+ int n_files = wxDir::GetAllFiles(path, &file_paths, _T(""), wxDIR_FILES);
+
Vector<String> entries;
- notImplemented();
+
+ for (int i = 0; i < n_files; i++)
+ {
+ entries.append(file_paths[i]);
+ }
+
return entries;
}
diff --git a/WebCore/plugins/PluginDatabase.cpp b/WebCore/plugins/PluginDatabase.cpp
index ea8e4ad..fc8cef2 100644
--- a/WebCore/plugins/PluginDatabase.cpp
+++ b/WebCore/plugins/PluginDatabase.cpp
@@ -320,7 +320,7 @@ void PluginDatabase::clear()
m_preferredPlugins.clear();
}
-#if (!PLATFORM(WINCE)) && (!PLATFORM(SYMBIAN)) && (!PLATFORM(WIN_OS) || PLATFORM(WX) || !ENABLE(NETSCAPE_PLUGIN_API))
+#if (!PLATFORM(WINCE)) && (!PLATFORM(SYMBIAN)) && (!PLATFORM(WIN_OS) || !ENABLE(NETSCAPE_PLUGIN_API))
// For Safari/Win the following three methods are implemented
// in PluginDatabaseWin.cpp, but if we can use WebCore constructs
// for the logic we should perhaps move it here under XP_WIN?
diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp
index d2518d7..91aa83a 100644
--- a/WebCore/plugins/PluginView.cpp
+++ b/WebCore/plugins/PluginView.cpp
@@ -46,7 +46,7 @@
#include "Page.h"
#include "FocusController.h"
#include "PlatformMouseEvent.h"
-#if PLATFORM(WIN_OS) && !PLATFORM(WX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
#include "PluginMessageThrottlerWin.h"
#endif
#include "PluginPackage.h"
@@ -306,7 +306,6 @@ void PluginView::stop()
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
#if ENABLE(NETSCAPE_PLUGIN_API)
-#if !PLATFORM(WX) // FIXME: Revisit this when implementing plugins for wx
#ifdef XP_WIN
// Unsubclass the window
if (m_isWindowed) {
@@ -323,7 +322,6 @@ void PluginView::stop()
#endif
}
#endif // XP_WIN
-#endif // !PLATFORM(WX)
#endif // ENABLE(NETSCAPE_PLUGIN_API)
#if !defined(XP_MACOSX)
@@ -804,7 +802,7 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p
#if defined(XP_UNIX) || defined(Q_WS_X11)
, m_needsXEmbed(false)
#endif
-#if PLATFORM(WIN_OS) && !PLATFORM(WX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
, m_pluginWndProc(0)
, m_lastMessage(0)
, m_isCallingPluginWndProc(false)
diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h
index 1115773..fd86187 100644
--- a/WebCore/plugins/PluginView.h
+++ b/WebCore/plugins/PluginView.h
@@ -45,7 +45,7 @@
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
-#if PLATFORM(WIN_OS) && PLATFORM(QT)
+#if PLATFORM(WIN_OS) && (PLATFORM(QT) || PLATFORM(WX))
typedef struct HWND__* HWND;
typedef HWND PlatformPluginWidget;
#else
@@ -65,7 +65,7 @@ namespace WebCore {
class KeyboardEvent;
class MouseEvent;
class KURL;
-#if PLATFORM(WIN_OS) && !PLATFORM(WX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
class PluginMessageThrottlerWin;
#endif
class PluginPackage;
@@ -183,7 +183,7 @@ namespace WebCore {
const String& mimeType() const { return m_mimeType; }
const KURL& url() const { return m_url; }
-#if PLATFORM(WIN_OS) && !PLATFORM(WX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
static LRESULT CALLBACK PluginViewWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
WNDPROC pluginWndProc() const { return m_pluginWndProc; }
@@ -226,7 +226,7 @@ namespace WebCore {
void invalidateWindowlessPluginRect(const IntRect&);
-#if PLATFORM(WIN_OS) && !PLATFORM(WX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
void paintWindowedPluginIntoContext(GraphicsContext*, const IntRect&);
static HDC WINAPI hookedBeginPaint(HWND, PAINTSTRUCT*);
static BOOL WINAPI hookedEndPaint(HWND, const PAINTSTRUCT*);
@@ -296,7 +296,7 @@ namespace WebCore {
bool m_needsXEmbed;
#endif
-#if PLATFORM(WIN_OS) && !PLATFORM(WX) && ENABLE(NETSCAPE_PLUGIN_API)
+#if PLATFORM(WIN_OS) && ENABLE(NETSCAPE_PLUGIN_API)
OwnPtr<PluginMessageThrottlerWin> m_messageThrottler;
WNDPROC m_pluginWndProc;
unsigned m_lastMessage;
@@ -305,7 +305,7 @@ namespace WebCore {
bool m_haveUpdatedPluginWidget;
#endif
-#if (PLATFORM(QT) && PLATFORM(WIN_OS)) || defined(XP_MACOSX)
+#if ((PLATFORM(QT) || PLATFORM(WX)) && PLATFORM(WIN_OS)) || defined(XP_MACOSX)
// On Mac OSX and Qt/Windows the plugin does not have its own native widget,
// but is using the containing window as its reference for positioning/painting.
PlatformPluginWidget m_window;
diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
index 5ccce0e..5d4902c 100644
--- a/WebCore/plugins/win/PluginViewWin.cpp
+++ b/WebCore/plugins/win/PluginViewWin.cpp
@@ -30,7 +30,9 @@
#include "PluginView.h"
#include "BitmapImage.h"
+#if !PLATFORM(WX)
#include "BitmapInfo.h"
+#endif
#include "Document.h"
#include "DocumentLoader.h"
#include "Element.h"
@@ -81,12 +83,21 @@
#include <QWidget>
#endif
+#if PLATFORM(WX)
+#include <wx/defs.h>
+#include <wx/window.h>
+#endif
+
static inline HWND windowHandleForPageClient(PlatformPageClient client)
{
#if PLATFORM(QT)
if (!client)
return 0;
return client->ownerWidget()->winId();
+#elif PLATFORM(WX)
+ if (!client)
+ return 0;
+ return (HWND)client->GetHandle();
#else
return client;
#endif
@@ -702,7 +713,7 @@ void PluginView::handleMouseEvent(MouseEvent* event)
if (!dispatchNPEvent(npEvent))
event->setDefaultHandled();
-#if !PLATFORM(QT) && !PLATFORM(WINCE)
+#if !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(WINCE)
// Currently, Widget::setCursor is always called after this function in EventHandler.cpp
// and since we don't want that we set ignoreNextSetCursor to true here to prevent that.
ignoreNextSetCursor = true;
@@ -987,7 +998,7 @@ bool PluginView::platformStart()
HWND window = ::CreateWindowEx(0, kWebPluginViewdowClassName, 0, flags,
0, 0, 0, 0, parentWindowHandle, 0, Page::instanceHandle(), 0);
-#if PLATFORM(WIN_OS) && PLATFORM(QT)
+#if PLATFORM(WIN_OS) && (PLATFORM(QT) || PLATFORM(WX))
m_window = window;
#else
setPlatformWidget(window);
@@ -1030,6 +1041,7 @@ void PluginView::platformDestroy()
PassRefPtr<Image> PluginView::snapshot()
{
+#if !PLATFORM(WX)
OwnPtr<HDC> hdc(CreateCompatibleDC(0));
if (!m_isWindowed) {
@@ -1059,6 +1071,9 @@ PassRefPtr<Image> PluginView::snapshot()
SelectObject(hdc.get(), hbmpOld);
return BitmapImage::create(hbmp.get());
+#else
+ return 0;
+#endif
}
void PluginView::halt()
diff --git a/WebCore/wscript b/WebCore/wscript
index 3719b84..ba67c2d 100644
--- a/WebCore/wscript
+++ b/WebCore/wscript
@@ -30,29 +30,35 @@ from settings import *
webcore_sources = {}
if build_port == "wx":
- webcore_sources['plugins'] = [ 'plugins/PluginDataNone.cpp',
- 'plugins/PluginViewNone.cpp'
- ]
+ no_plugins = [ 'plugins/PluginDataNone.cpp',
+ 'plugins/PluginViewNone.cpp',
+ 'plugins/PluginPackageNone.cpp'
+ ]
if building_on_win32:
- webcore_dirs.append('platform/wx/wxcode/win')
+ webcore_dirs.extend(['platform/wx/wxcode/win', 'plugins/win'])
webcore_sources['wx-win'] = [
# wxTimer on Windows has a bug that causes it to eat crashes in callbacks
# so we need to use the Win port's implementation until the wx bug fix is
# widely available (it was fixed in 2.8.10).
'platform/win/SharedTimerWin.cpp',
+ # Use the Windows plugin architecture
'page/win/PageWin.cpp',
+ 'plugins/win/PluginDataWin.cpp',
+ 'plugins/win/PluginDatabaseWin.cpp',
+ 'plugins/win/PluginMessageThrottlerWin.cpp',
'plugins/win/PluginPackageWin.cpp',
+ 'plugins/win/PluginViewWin.cpp',
]
elif sys.platform.startswith('darwin'):
webcore_dirs.append('platform/wx/wxcode/mac/carbon')
webcore_sources['wx-mac'] = [
'platform/mac/PurgeableBufferMac.cpp',
]
- webcore_sources['plugins'].append('plugins/PluginPackageNone.cpp')
+ webcore_sources['plugins'] = no_plugins
else:
webcore_dirs.append('platform/wx/wxcode/gtk')
- webcore_sources['plugins'].append('plugins/PluginPackageNone.cpp')
+ webcore_sources['plugins'] = no_plugins
from TaskGen import taskgen, feature, after
import Task, ccroot
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 12ad3fd..d1a33c8 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,22 @@
+2009-11-18 Kevin Watters <kevinwatters at gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Enable wx plugin support using the Windows implementation as a base.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31636
+
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+ (WebCore::FrameLoaderClientWx::FrameLoaderClientWx):
+ (WebCore::FrameLoaderClientWx::finishedLoading):
+ (WebCore::FrameLoaderClientWx::committedLoad):
+ (WebCore::FrameLoaderClientWx::createPlugin):
+ (WebCore::FrameLoaderClientWx::redirectDataToPlugin):
+ (WebCore::FrameLoaderClientWx::shouldUsePluginDocument):
+ * WebKitSupport/FrameLoaderClientWx.h:
+ * WebView.cpp:
+ (wxWebView::Create):
+
2009-11-13 Kevin Ollivier <kevino at theolliviers.com>
wx build fix after r50923 change to externalRepresentation.
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
index 7a42560..ed63130 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
@@ -39,9 +39,11 @@
#include "FrameTree.h"
#include "HTMLFormElement.h"
#include "HTMLFrameOwnerElement.h"
+#include "HTMLPluginElement.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PlatformString.h"
+#include "PluginView.h"
#include "ProgressTracker.h"
#include "RenderPart.h"
#include "ResourceError.h"
@@ -80,7 +82,10 @@ inline int wxNavTypeFromWebNavType(NavigationType type){
}
FrameLoaderClientWx::FrameLoaderClientWx()
- : m_webFrame(0)
+ : m_frame(0)
+ , m_pluginView(0)
+ , m_hasSentResponseToPlugin(false)
+ , m_webFrame(0)
{
}
@@ -408,7 +413,11 @@ void FrameLoaderClientWx::didChangeTitle(DocumentLoader *l)
void FrameLoaderClientWx::finishedLoading(DocumentLoader*)
{
- notImplemented();
+ if (m_pluginView) {
+ m_pluginView->didFinishLoading();
+ m_pluginView = 0;
+ m_hasSentResponseToPlugin = false;
+ }
}
@@ -567,9 +576,25 @@ void FrameLoaderClientWx::committedLoad(WebCore::DocumentLoader* loader, const c
{
if (!m_webFrame)
return;
- FrameLoader* fl = loader->frameLoader();
- fl->setEncoding(m_response.textEncodingName(), false);
- fl->addData(data, length);
+ if (!m_pluginView) {
+ FrameLoader* fl = loader->frameLoader();
+ fl->setEncoding(m_response.textEncodingName(), false);
+ fl->addData(data, length);
+ }
+
+ // We re-check here as the plugin can have been created
+ if (m_pluginView) {
+ if (!m_hasSentResponseToPlugin) {
+ m_pluginView->didReceiveResponse(loader->response());
+ // didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in
+ // setting up this stream can cause the main document load to be cancelled, setting m_pluginView
+ // to null
+ if (!m_pluginView)
+ return;
+ m_hasSentResponseToPlugin = true;
+ }
+ m_pluginView->didReceiveData(data, length);
+ }
}
WebCore::ResourceError FrameLoaderClientWx::cancelledError(const WebCore::ResourceRequest& request)
@@ -800,16 +825,21 @@ ObjectContentType FrameLoaderClientWx::objectContentType(const KURL& url, const
return ObjectContentType();
}
-PassRefPtr<Widget> FrameLoaderClientWx::createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually)
+PassRefPtr<Widget> FrameLoaderClientWx::createPlugin(const IntSize& size, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
{
- notImplemented();
+#if PLATFORM(WIN_OS)
+ RefPtr<PluginView> pv = PluginView::create(m_frame, size, element, url, paramNames, paramValues, mimeType, loadManually);
+ if (pv->status() == PluginStatusLoadedSuccessfully)
+ return pv;
+#endif
return 0;
}
void FrameLoaderClientWx::redirectDataToPlugin(Widget* pluginWidget)
{
- notImplemented();
- return;
+ ASSERT(!m_pluginView);
+ m_pluginView = static_cast<PluginView*>(pluginWidget);
+ m_hasSentResponseToPlugin = false;
}
ResourceError FrameLoaderClientWx::pluginWillHandleLoadError(const ResourceResponse& response)
@@ -888,4 +918,11 @@ void FrameLoaderClientWx::transitionToCommittedForNewPage()
m_frame->createView(size, backgroundColor, transparent, IntSize(), false);
}
+bool FrameLoaderClientWx::shouldUsePluginDocument(const String &mimeType) const
+{
+ // NOTE: Plugin Documents are used for viewing PDFs, etc. inline, and should
+ // not be used for pages with plugins in them.
+ return false;
+}
+
}
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
index 75bca4d..b6cea12 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
@@ -31,7 +31,9 @@
#include "FrameLoaderClient.h"
#include "FrameLoader.h"
#include "KURL.h"
+#include "PluginView.h"
#include "ResourceResponse.h"
+#include "HTMLPlugInElement.h"
class wxWebFrame;
class wxWebView;
@@ -208,11 +210,15 @@ namespace WebCore {
virtual void didPerformFirstNavigation() const;
virtual void registerForIconNotification(bool listen = true);
+
+ virtual bool shouldUsePluginDocument(const String &mimeType) const;
private:
wxWebFrame *m_webFrame;
Frame* m_frame;
wxWebView *m_webView;
+ PluginView* m_pluginView;
+ bool m_hasSentResponseToPlugin;
ResourceResponse m_response;
bool m_firstData;
};
diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp
index a112c79..06ae28f 100644
--- a/WebKit/wx/WebView.cpp
+++ b/WebKit/wx/WebView.cpp
@@ -338,6 +338,10 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position,
settings->setDatabasesEnabled(true);
#endif
+#if __WXMSW__
+ settings->setPluginsEnabled(true);
+#endif
+
m_isInitialized = true;
return true;
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 8012c33..d818de4 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-18 Kevin Watters <kevinwatters at gmail.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Enable wx plugin support using the Windows implementation as a base.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31636
+
+ * wx/build/settings.py:
+
2009-11-18 Kenneth Rohde Christiansen <kenneth at webkit.org>
Reviewed by Simon Hausmann.
diff --git a/WebKitTools/wx/build/settings.py b/WebKitTools/wx/build/settings.py
index 652a880..f7f75b6 100644
--- a/WebKitTools/wx/build/settings.py
+++ b/WebKitTools/wx/build/settings.py
@@ -337,7 +337,7 @@ def common_configure(conf):
# common win libs
conf.env.append_value('LIB', [
'kernel32', 'user32','gdi32','comdlg32','winspool','winmm',
- 'shell32', 'comctl32', 'ole32', 'oleaut32', 'uuid', 'advapi32',
+ 'shell32', 'shlwapi', 'comctl32', 'ole32', 'oleaut32', 'uuid', 'advapi32',
'wsock32', 'gdiplus', 'version'])
conf.env['LIB_ICU'] = ['icudt', 'icule', 'iculx', 'icuuc', 'icuin', 'icuio', 'icutu']
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list