summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-01-21 13:48:34 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-01-21 13:48:39 (GMT)
commitc2573f74fb8a09484b385e4469d887bb0fea8cb9 (patch)
tree8f6fbc749bf4b871a8f448bad8809f3406f41c20 /src/3rdparty/webkit/WebCore
parentacc3879ed705aa08c1c97f1823c3f2b12b00d379 (diff)
downloadQt-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
Diffstat (limited to 'src/3rdparty/webkit/WebCore')
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PopupMenu.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp21
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp5
3 files changed, 26 insertions, 2 deletions
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;