diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-01-21 13:48:34 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-01-21 13:48:39 (GMT) |
commit | c2573f74fb8a09484b385e4469d887bb0fea8cb9 (patch) | |
tree | 8f6fbc749bf4b871a8f448bad8809f3406f41c20 | |
parent | acc3879ed705aa08c1c97f1823c3f2b12b00d379 (diff) | |
download | Qt-c2573f74fb8a09484b385e4469d887bb0fea8cb9.zip Qt-c2573f74fb8a09484b385e4469d887bb0fea8cb9.tar.gz Qt-c2573f74fb8a09484b385e4469d887bb0fea8cb9.tar.bz2 |
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 8f5ca3ba5da63a47d4f90bbd867d3e8453443dd3 )
Changes in WebKit/qt since the last update:
* Girish: Fix positioning of ComboBox popup in QGraphicsWebView. -- https://bugs.webkit.org/show_bug.cgi?id=33887
-rw-r--r-- | src/3rdparty/webkit/VERSION | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/PopupMenu.h | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp | 21 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp | 5 |
4 files changed, 27 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 9dd9377..6fe71d6 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 - e15bd5454732bab9ffff4e1e5a755f41fd4e2eff + 8f5ca3ba5da63a47d4f90bbd867d3e8453443dd3 diff --git a/src/3rdparty/webkit/WebCore/platform/PopupMenu.h b/src/3rdparty/webkit/WebCore/platform/PopupMenu.h index 2315f02..f2fffb5 100644 --- a/src/3rdparty/webkit/WebCore/platform/PopupMenu.h +++ b/src/3rdparty/webkit/WebCore/platform/PopupMenu.h @@ -44,6 +44,7 @@ typedef struct HBITMAP__* HBITMAP; namespace WebCore { class QWebPopup; } +class QGraphicsProxyWidget; #elif PLATFORM(GTK) typedef struct _GtkMenu GtkMenu; typedef struct _GtkMenuItem GtkMenuItem; @@ -147,6 +148,7 @@ private: void clear(); void populate(const IntRect&); QWebPopup* m_popup; + QGraphicsProxyWidget* m_proxy; #elif PLATFORM(WIN) // ScrollBarClient virtual void valueChanged(Scrollbar*); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp index f6ec4f7..989b34c 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp @@ -1,6 +1,7 @@ /* * This file is part of the popup menu implementation for <select> elements in WebCore. * + * Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) * Copyright (C) 2006 Apple Computer, Inc. * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com @@ -35,6 +36,9 @@ #include <QAction> #include <QDebug> +#include <QGraphicsProxyWidget> +#include <QGraphicsScene> +#include <QGraphicsView> #include <QListWidget> #include <QListWidgetItem> #include <QMenu> @@ -46,6 +50,7 @@ namespace WebCore { PopupMenu::PopupMenu(PopupMenuClient* client) : m_popupClient(client) + , m_proxy(0) { m_popup = new QWebPopup(client); } @@ -53,6 +58,7 @@ PopupMenu::PopupMenu(PopupMenuClient* client) PopupMenu::~PopupMenu() { delete m_popup; + delete m_proxy; } void PopupMenu::clear() @@ -92,8 +98,19 @@ void PopupMenu::show(const IntRect& r, FrameView* v, int index) rect.moveTopLeft(v->contentsToWindow(r.topLeft())); rect.setHeight(m_popup->sizeHint().height()); - m_popup->setParent(client->ownerWidget()); - m_popup->setGeometry(rect); + if (QGraphicsView* view = qobject_cast<QGraphicsView*>(client->ownerWidget())) { + if (!m_proxy) { + m_proxy = new QGraphicsProxyWidget; + m_proxy->setWidget(m_popup); + view->scene()->addItem(m_proxy); + } else + m_proxy->setVisible(true); + m_proxy->setGeometry(rect); + } else { + m_popup->setParent(client->ownerWidget()); + m_popup->setGeometry(rect); + } + m_popup->setCurrentIndex(index); m_popup->exec(); } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp index d077079..f7ebbc7 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp @@ -26,6 +26,7 @@ #include <QApplication> #include <QInputContext> #include <QMouseEvent> +#include <QGraphicsProxyWidget> namespace WebCore { @@ -67,6 +68,10 @@ void QWebPopup::hidePopup() } QComboBox::hidePopup(); + + if (QGraphicsProxyWidget* proxy = graphicsProxyWidget()) + proxy->setVisible(false); + if (!m_popupVisible) return; |