[Qt] X11 plugins need to be reworked for Qt5
authorkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Nov 2011 17:32:31 +0000 (17:32 +0000)
committerkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Nov 2011 17:32:31 +0000 (17:32 +0000)
commitbab5961d48e24e9027ff1d0cb19521cd08115675
treefea825cccc8f9d3cd4cac316871578b21da02fe8
parentee5031c6c41ab37ac82bf4d7b2e5ed59c91e8c4a
[Qt] X11 plugins need to be reworked for Qt5
https://bugs.webkit.org/show_bug.cgi?id=70023

Reviewed by Simon Hausmann.

.:

Rework our basic plugin support in a way that does
not need a bridge between Qt and X. The solution is
based on getting the content drawed by the plugin
from the server as an image and creating a QImage
from it.

* Source/api.pri: Link to xlib if necessary.

Source/WebCore:

Rework our basic plugin support in a way that does
not need a bridge between Qt and X. The solution is
based on getting the content drawed by the plugin
from the server as an image and creating a QImage
from it.

No new tests. Existing plugin test are sufficient.

* Target.pri:
* bridge/npruntime_internal.h: Added yet another undef
to fix build with Qt5 + X11 headers.
* plugins/qt/QtX11ImageConversion.cpp: Added.
(WebCore::qimageFromXImage):
* plugins/qt/QtX11ImageConversion.h: Added.
Added a helper function to create a QImage from an XImage.
Put it in a new file into WebCore to avoid copyright issues - as
the code has been taken directly from Qt - and to be able to resuse
it for the WK1 plugin support in the future.

Source/WebKit2:

* Target.pri:
* UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
(WebKit::PluginInfoStore::pluginsDirectories):
Kill the last dependency from the WebKit1 plugin system.
This is necessary because currently we don't build the WebKit1
plugin code. The function is equivalent with the XP_UNIX part of
PluginDatabase::defaultPluginDirectories.

* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::getPluginDisplay):
(WebKit::x11Screen):
(WebKit::displayDepth):
(WebKit::rootWindowID):
(WebKit::NetscapePlugin::x11HostDisplay):
(WebKit::NetscapePlugin::platformPostInitialize):
(WebKit::NetscapePlugin::platformDestroy):
(WebKit::NetscapePlugin::platformGeometryDidChange):
(WebKit::NetscapePlugin::platformPaint):
(WebKit::initializeXEvent):
Rework plugin initialization and drawing model.

Tools:

Rework our basic plugin support in a way that does
not need a bridge between Qt and X. The solution is
based on getting the content drawed by the plugin
from the server as an image and creating a QImage
from it.

* qmake/mkspecs/features/features.prf: Enable X11
plugins if Qt is built with the xcb-xlib backend.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/Target.pri
Source/WebCore/bridge/npruntime_internal.h
Source/WebCore/plugins/qt/QtX11ImageConversion.cpp [new file with mode: 0644]
Source/WebCore/plugins/qt/QtX11ImageConversion.h [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
Source/api.pri
Tools/ChangeLog
Tools/qmake/mkspecs/features/features.prf