diff options
6 files changed, 51 insertions, 14 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 5bc2492..a8889b3 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - c39615d8e78f083b23f34ac24cf7d3a7ce765122 + e9151b11e974f0aa47fd40c225f88f35ced91496 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 76374f3..2bd506b 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,22 @@ +2010-03-25 yael aharon <yael.aharon@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Windowed netscape plugins don't work with QGraphicsWebView on Symbian + https://bugs.webkit.org/show_bug.cgi?id=35112 + + Add a proxy widget when loading a QWidget based plugin in a QGraphicsWebView. + + * plugins/symbian/PluginContainerSymbian.cpp: + (PluginContainerSymbian::PluginContainerSymbian): + (PluginContainerSymbian::focusInEvent): + * plugins/symbian/PluginContainerSymbian.h: + (WebCore::PluginContainerSymbian::proxy): + * plugins/symbian/PluginViewSymbian.cpp: + (WebCore::PluginView::updatePluginWidget): + (WebCore::PluginView::platformStart): + (WebCore::PluginView::platformDestroy): + 2010-03-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed for the Qt 4.6 branch by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp index aece0e4..b839870 100644 --- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.cpp @@ -32,12 +32,12 @@ using namespace WebCore; -PluginContainerSymbian::PluginContainerSymbian(PluginView* view, QWidget* parent) - : m_parent(parent) +PluginContainerSymbian::PluginContainerSymbian(PluginView* view, QWidget* parent, QGraphicsProxyWidget* proxy) + : QWidget(parent) , m_pluginView(view) + , m_proxy(proxy) , m_hasPendingGeometryChange(false) { - setParent(m_parent); } PluginContainerSymbian::~PluginContainerSymbian() @@ -62,7 +62,7 @@ void PluginContainerSymbian::adjustGeometry() } } -void PluginContainerSymbian::focusInEvent(QFocusEvent* event) +void PluginContainerSymbian::focusInEvent(QFocusEvent*) { if (Page* page = m_pluginView->parentFrame()->page()) page->focusController()->setActive(true); diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h index fce4a71..fead872 100644 --- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h +++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginContainerSymbian.h @@ -22,6 +22,8 @@ #include <QWidget> +class QGraphicsProxyWidget; + namespace WebCore { class PluginView; @@ -29,18 +31,19 @@ namespace WebCore { class PluginContainerSymbian : public QWidget { Q_OBJECT public: - PluginContainerSymbian(PluginView*, QWidget* parent); + PluginContainerSymbian(PluginView*, QWidget* parent, QGraphicsProxyWidget* proxy = 0); ~PluginContainerSymbian(); void requestGeometry(const QRect&, const QRegion& clip = QRegion()); void adjustGeometry(); + QGraphicsProxyWidget* proxy() { return m_proxy; } protected: virtual void focusInEvent(QFocusEvent*); virtual void focusOutEvent(QFocusEvent*); private: PluginView* m_pluginView; - QWidget* m_parent; + QGraphicsProxyWidget* m_proxy; QRect m_windowRect; QRegion m_clipRegion; bool m_hasPendingGeometryChange; diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp index cf69723..86f5f6c 100644 --- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp @@ -52,6 +52,8 @@ #include "runtime.h" #include "runtime_root.h" #include "QWebPageClient.h" +#include "qgraphicswebview.h" +#include <QGraphicsProxyWidget> #include <QKeyEvent> #include <QPixmap.h> #include <QRegion> @@ -84,6 +86,7 @@ void PluginView::updatePluginWidget() IntRect oldClipRect = m_clipRect; m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size()); + m_clipRect = windowClipRect(); m_clipRect.move(-m_windowRect.x(), -m_windowRect.y()); if (m_windowRect == oldWindowRect && m_clipRect == oldClipRect) @@ -425,12 +428,15 @@ bool PluginView::platformStart() if (m_isWindowed) { QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient(); - // FIXME this will not work for QGraphicsView. - // But we cannot use winId because it will create a window and on S60, - // QWidgets should not create a window. - Q_ASSERT(qobject_cast<QWidget*>(client->pluginParent())); - setPlatformWidget(new PluginContainerSymbian(this, - qobject_cast<QWidget*>(client->pluginParent()))); + QGraphicsProxyWidget* proxy = 0; + if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(client->pluginParent())) + proxy = new QGraphicsProxyWidget(webView); + + PluginContainerSymbian* container = new PluginContainerSymbian(this, proxy ? 0 : client->ownerWidget(), proxy); + setPlatformWidget(container); + if (proxy) + proxy->setWidget(container); + m_npWindow.type = NPWindowTypeWindow; m_npWindow.window = (void*)platformPluginWidget(); @@ -446,7 +452,11 @@ bool PluginView::platformStart() void PluginView::platformDestroy() { - delete platformPluginWidget(); + QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient(); + if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(client->pluginParent())) + delete static_cast<PluginContainerSymbian*>(platformPluginWidget())->proxy(); + else + delete platformPluginWidget(); } void PluginView::halt() diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index a133b48..d126a2e 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -39,6 +39,11 @@ ** ****************************************************************************/ +#if _WIN32_WINNT < 0x0500 +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif + #include "qfontengine_p.h" #include "qtextengine_p.h" #include <qglobal.h> |