2010-01-08 Luiz Agostini <luiz.agostini@openbossa.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jan 2010 21:48:02 +0000 (21:48 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jan 2010 21:48:02 +0000 (21:48 +0000)
        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Delegation client
        https://bugs.webkit.org/show_bug.cgi?id=32826

        Factory related code removed from QtAbstractWebPopup. Popups are now created
        by ChromeClientQt.
        Popup content information struct added to class QtAbstractWebPopup.
        PopupMenuClient is now hidden from higher layers.
        QtAbstractWebPopup now receives content information and font as parameters
        of method populate.
        QtFallbackWebPopup moved to WebKit/qt/WebCoreSupport.

        * WebCore.pro:
        * platform/qt/PopupMenuQt.cpp:
        (WebCore::PopupMenu::PopupMenu):
        (WebCore::getItems):
        (WebCore::PopupMenu::show):
        * platform/qt/QtAbstractWebPopup.cpp:
        (WebCore::QtAbstractWebPopup::QtAbstractWebPopup):
        (WebCore::QtAbstractWebPopup::popupDidHide):
        (WebCore::QtAbstractWebPopup::valueChanged):
        * platform/qt/QtAbstractWebPopup.h:
        (WebCore::QtAbstractWebPopup::Item::):
        * platform/qt/QtFallbackWebPopup.cpp: Removed.
        * platform/qt/QtFallbackWebPopup.h: Removed.
2010-01-08  Luiz Agostini  <luiz.agostini@openbossa.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Delegation client
        https://bugs.webkit.org/show_bug.cgi?id=32826

        Added method createPopup to ChromeClientQt used to create popups.
        QtFallbackWebPopup moved from WebCore/platform/qt to
        WebKit/qt/WebCoreSupport.

        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::createPopup):
        * WebCoreSupport/ChromeClientQt.h:
        * WebCoreSupport/QtFallbackWebPopup.cpp: Added.
        (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
        (WebCore::QtFallbackWebPopup::show):
        (WebCore::QtFallbackWebPopup::populate):
        (WebCore::QtFallbackWebPopup::showPopup):
        (WebCore::QtFallbackWebPopup::hidePopup):
        (WebCore::QtFallbackWebPopup::activeChanged):
        (WebCore::QtFallbackWebPopup::setParent):
        * WebCoreSupport/QtFallbackWebPopup.h: Added.
        (WebCore::QtFallbackWebPopup::hide):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/WebCore.pro
WebCore/platform/qt/PopupMenuQt.cpp
WebCore/platform/qt/QtAbstractWebPopup.cpp
WebCore/platform/qt/QtAbstractWebPopup.h
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
WebKit/qt/WebCoreSupport/ChromeClientQt.h
WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp [moved from WebCore/platform/qt/QtFallbackWebPopup.cpp with 77% similarity]
WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h [moved from WebCore/platform/qt/QtFallbackWebPopup.h with 90% similarity]

index b95f5b2..7a62cd1 100644 (file)
@@ -1,3 +1,32 @@
+2010-01-08  Luiz Agostini  <luiz.agostini@openbossa.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Delegation client
+        https://bugs.webkit.org/show_bug.cgi?id=32826
+
+        Factory related code removed from QtAbstractWebPopup. Popups are now created
+        by ChromeClientQt.
+        Popup content information struct added to class QtAbstractWebPopup.
+        PopupMenuClient is now hidden from higher layers.
+        QtAbstractWebPopup now receives content information and font as parameters
+        of method populate.
+        QtFallbackWebPopup moved to WebKit/qt/WebCoreSupport.
+
+        * WebCore.pro:
+        * platform/qt/PopupMenuQt.cpp:
+        (WebCore::PopupMenu::PopupMenu):
+        (WebCore::getItems):
+        (WebCore::PopupMenu::show):
+        * platform/qt/QtAbstractWebPopup.cpp:
+        (WebCore::QtAbstractWebPopup::QtAbstractWebPopup):
+        (WebCore::QtAbstractWebPopup::popupDidHide):
+        (WebCore::QtAbstractWebPopup::valueChanged):
+        * platform/qt/QtAbstractWebPopup.h:
+        (WebCore::QtAbstractWebPopup::Item::):
+        * platform/qt/QtFallbackWebPopup.cpp: Removed.
+        * platform/qt/QtFallbackWebPopup.h: Removed.
+
 2010-01-08  Yuzo Fujishima  <yuzo@google.com>
 
         Reviewed by Darin Adler.
 2010-01-08  Yuzo Fujishima  <yuzo@google.com>
 
         Reviewed by Darin Adler.
index 6636b21..6f03838 100644 (file)
@@ -1983,7 +1983,6 @@ HEADERS += \
     platform/qt/ClipboardQt.h \
     platform/qt/QWebPageClient.h \
     platform/qt/QtAbstractWebPopup.h \
     platform/qt/ClipboardQt.h \
     platform/qt/QWebPageClient.h \
     platform/qt/QtAbstractWebPopup.h \
-    platform/qt/QtFallbackWebPopup.h \
     platform/qt/RenderThemeQt.h \
     platform/qt/ScrollbarThemeQt.h \
     platform/Scrollbar.h \
     platform/qt/RenderThemeQt.h \
     platform/qt/ScrollbarThemeQt.h \
     platform/Scrollbar.h \
@@ -2385,6 +2384,7 @@ HEADERS += \
     xml/XSLTProcessor.h \
     xml/XSLTUnicodeSort.h \
     $$PWD/../WebKit/qt/Api/qwebplugindatabase_p.h \
     xml/XSLTProcessor.h \
     xml/XSLTUnicodeSort.h \
     $$PWD/../WebKit/qt/Api/qwebplugindatabase_p.h \
+    $$PWD/../WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h \
     $$PWD/../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
     $$PWD/platform/network/qt/DnsPrefetchHelper.h
 
     $$PWD/../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
     $$PWD/platform/network/qt/DnsPrefetchHelper.h
 
@@ -2446,7 +2446,6 @@ SOURCES += \
     platform/qt/PlatformTouchPointQt.cpp \
     platform/qt/PopupMenuQt.cpp \
     platform/qt/QtAbstractWebPopup.cpp \
     platform/qt/PlatformTouchPointQt.cpp \
     platform/qt/PopupMenuQt.cpp \
     platform/qt/QtAbstractWebPopup.cpp \
-    platform/qt/QtFallbackWebPopup.cpp \
     platform/qt/RenderThemeQt.cpp \
     platform/qt/ScrollbarQt.cpp \
     platform/qt/ScrollbarThemeQt.cpp \
     platform/qt/RenderThemeQt.cpp \
     platform/qt/ScrollbarQt.cpp \
     platform/qt/ScrollbarThemeQt.cpp \
@@ -2463,6 +2462,7 @@ SOURCES += \
     platform/qt/WheelEventQt.cpp \
     platform/qt/WidgetQt.cpp \
     plugins/qt/PluginDataQt.cpp \
     platform/qt/WheelEventQt.cpp \
     platform/qt/WidgetQt.cpp \
     plugins/qt/PluginDataQt.cpp \
+    ../WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp \
     ../WebKit/qt/WebCoreSupport/ChromeClientQt.cpp \
     ../WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp \
     ../WebKit/qt/WebCoreSupport/DragClientQt.cpp \
     ../WebKit/qt/WebCoreSupport/ChromeClientQt.cpp \
     ../WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp \
     ../WebKit/qt/WebCoreSupport/DragClientQt.cpp \
index 498ef7b..63e1565 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the popup menu implementation for <select> elements in WebCore.
  *
 /*
  * This file is part of the popup menu implementation for <select> elements in WebCore.
  *
- * Copyright (C) 2008, 2009 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2008, 2009, 2010 Nokia Corporation and/or its subsidiary(-ies)
  * Copyright (C) 2006 Apple Computer, Inc.
  * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 
  * Coypright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2006 Apple Computer, Inc.
  * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 
  * Coypright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
 #include "config.h"
 #include "PopupMenu.h"
 
 #include "config.h"
 #include "PopupMenu.h"
 
+#include "Chrome.h"
+#include "ChromeClientQt.h"
 #include "FrameView.h"
 #include "PopupMenuClient.h"
 #include "FrameView.h"
 #include "PopupMenuClient.h"
+#include "QWebPageClient.h"
 #include "QtAbstractWebPopup.h"
 #include "QtAbstractWebPopup.h"
-#include "QtFallbackWebPopup.h"
 
 namespace WebCore {
 
 PopupMenu::PopupMenu(PopupMenuClient* client)
     : m_popupClient(client)
 
 namespace WebCore {
 
 PopupMenu::PopupMenu(PopupMenuClient* client)
     : m_popupClient(client)
+    , m_popup(0)
 {
 {
-    m_popup = QtAbstractWebPopup::create(client);
 }
 
 PopupMenu::~PopupMenu()
 }
 
 PopupMenu::~PopupMenu()
@@ -44,11 +46,47 @@ PopupMenu::~PopupMenu()
     delete m_popup;
 }
 
     delete m_popup;
 }
 
-void PopupMenu::show(const IntRect& r, FrameView* v, int index)
+static QList<QtAbstractWebPopup::Item> getItems(PopupMenuClient* client)
 {
 {
-    QRect rect = r;
-    rect.moveTopLeft(v->contentsToWindow(r.topLeft()));
-    m_popup->show(rect, index);
+    QList<QtAbstractWebPopup::Item> result;
+
+    int size = client->listSize();
+    for (int i = 0; i < size; ++i) {
+        QtAbstractWebPopup::Item item;
+
+        if (client->itemIsSeparator(i))
+            item.type = QtAbstractWebPopup::Item::Separator;
+        else if (client->itemIsLabel(i))
+            item.type = QtAbstractWebPopup::Item::Group;
+        else
+            item.type = QtAbstractWebPopup::Item::Option;
+
+        item.text = client->itemText(i);
+        item.toolTip = client->itemToolTip(i);
+        item.enabled = client->itemIsEnabled(i);
+        result.append(item);
+    }
+    return result;
+}
+
+void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
+{
+    ChromeClientQt* chromeClient = static_cast<ChromeClientQt*>(
+        view->frame()->page()->chrome()->client());
+    ASSERT(chromeClient);
+
+    if (!m_popup) {
+        m_popup = chromeClient->createPopup();
+        m_popup->m_client = m_popupClient;
+    }
+
+    m_popup->setParent(chromeClient->platformPageClient()->ownerWidget());
+    m_popup->populate(m_popupClient->menuStyle().font().font(),
+                      getItems(m_popupClient));
+
+    QRect bounds = rect;
+    bounds.moveTopLeft(view->contentsToWindow(rect.topLeft()));
+    m_popup->show(bounds, index);
 }
 
 void PopupMenu::hide()
 }
 
 void PopupMenu::hide()
index cbe7174..75d8fb5 100644 (file)
 #include "QtAbstractWebPopup.h"
 
 #include "PopupMenuClient.h"
 #include "QtAbstractWebPopup.h"
 
 #include "PopupMenuClient.h"
-#include "QtFallbackWebPopup.h"
 
 
 namespace WebCore {
 
 
 
 namespace WebCore {
 
-QtAbstractWebPopupFactory* QtAbstractWebPopup::m_factory = 0;
-
-QtAbstractWebPopup::QtAbstractWebPopup(PopupMenuClient* client)
-    : m_client(client)
+QtAbstractWebPopup::QtAbstractWebPopup()
+    : m_client(0)
 {
 {
-    Q_ASSERT(m_client);
 }
 
 QtAbstractWebPopup::~QtAbstractWebPopup()
 {
 }
 
 }
 
 QtAbstractWebPopup::~QtAbstractWebPopup()
 {
 }
 
-PopupMenuClient* QtAbstractWebPopup::client()
+void QtAbstractWebPopup::popupDidHide(bool acceptSuggestions)
 {
 {
-    return m_client;
-}
-
-void QtAbstractWebPopup::setFactory(QtAbstractWebPopupFactory* factory)
-{
-    m_factory = factory;
+    Q_ASSERT(m_client);
+    m_client->popupDidHide(acceptSuggestions);
 }
 
 }
 
-QtAbstractWebPopup* QtAbstractWebPopup::create(PopupMenuClient* client)
+void QtAbstractWebPopup::valueChanged(int index)
 {
 {
-    return m_factory ? m_factory->create(client) : new QtFallbackWebPopup(client);
+    Q_ASSERT(m_client);
+    m_client->valueChanged(index);
 }
 
 } // namespace WebCore
 }
 
 } // namespace WebCore
index b8cab4a..c890441 100644 (file)
 #ifndef QtAbstractWebPopup_h
 #define QtAbstractWebPopup_h
 
 #ifndef QtAbstractWebPopup_h
 #define QtAbstractWebPopup_h
 
+#include <QFont>
+#include <QList>
 #include <QRect>
 
 namespace WebCore {
 
 #include <QRect>
 
 namespace WebCore {
 
-class QtAbstractWebPopup;
 class PopupMenuClient;
 
 class PopupMenuClient;
 
-class QtAbstractWebPopupFactory {
-public:
-    virtual QtAbstractWebPopup* create(PopupMenuClient* client) = 0;
-};
-
 class QtAbstractWebPopup {
 public:
 class QtAbstractWebPopup {
 public:
-    QtAbstractWebPopup(PopupMenuClient* client);
+    struct Item {
+        enum { Option, Group, Separator } type;
+        QString text;
+        QString toolTip;
+        bool enabled;
+    };
+
+    QtAbstractWebPopup();
     virtual ~QtAbstractWebPopup();
 
     virtual void show(const QRect& geometry, int selectedIndex) = 0;
     virtual void hide() = 0;
     virtual ~QtAbstractWebPopup();
 
     virtual void show(const QRect& geometry, int selectedIndex) = 0;
     virtual void hide() = 0;
-
-    static void setFactory(QtAbstractWebPopupFactory* factory);
-    static QtAbstractWebPopup* create(PopupMenuClient* client);
+    virtual void populate(const QFont& font, const QList<Item>& items) = 0;
+    virtual void setParent(QWidget* parent) = 0;
 
 protected:
 
 protected:
-    PopupMenuClient* client();
+    void popupDidHide(bool acceptSuggestions);
+    void valueChanged(int index);
 
 private:
 
 private:
+    friend class PopupMenu;
     PopupMenuClient* m_client;
     PopupMenuClient* m_client;
-    static QtAbstractWebPopupFactory* m_factory;
 };
 
 }
 };
 
 }
index 9da774b..c303b43 100644 (file)
@@ -1,3 +1,28 @@
+2010-01-08  Luiz Agostini  <luiz.agostini@openbossa.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Delegation client
+        https://bugs.webkit.org/show_bug.cgi?id=32826
+
+        Added method createPopup to ChromeClientQt used to create popups.
+        QtFallbackWebPopup moved from WebCore/platform/qt to
+        WebKit/qt/WebCoreSupport.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::createPopup):
+        * WebCoreSupport/ChromeClientQt.h:
+        * WebCoreSupport/QtFallbackWebPopup.cpp: Added.
+        (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
+        (WebCore::QtFallbackWebPopup::show):
+        (WebCore::QtFallbackWebPopup::populate):
+        (WebCore::QtFallbackWebPopup::showPopup):
+        (WebCore::QtFallbackWebPopup::hidePopup):
+        (WebCore::QtFallbackWebPopup::activeChanged):
+        (WebCore::QtFallbackWebPopup::setParent):
+        * WebCoreSupport/QtFallbackWebPopup.h: Added.
+        (WebCore::QtFallbackWebPopup::hide):
+
 2010-01-07  Yael Aharon  <yael.aharon@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
 2010-01-07  Yael Aharon  <yael.aharon@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
index 73cb4d7..f62bc86 100644 (file)
@@ -38,8 +38,9 @@
 #include "NotImplemented.h"
 #include "WindowFeatures.h"
 #include "DatabaseTracker.h"
 #include "NotImplemented.h"
 #include "WindowFeatures.h"
 #include "DatabaseTracker.h"
-#include "SecurityOrigin.h"
+#include "QtFallbackWebPopup.h"
 #include "QWebPageClient.h"
 #include "QWebPageClient.h"
+#include "SecurityOrigin.h"
 
 #include "qwebpage.h"
 #include "qwebpage_p.h"
 
 #include "qwebpage.h"
 #include "qwebpage_p.h"
@@ -465,4 +466,9 @@ void ChromeClientQt::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
     notImplemented();
 }
 
     notImplemented();
 }
 
+QtAbstractWebPopup* ChromeClientQt::createPopup()
+{
+    return new QtFallbackWebPopup;
+}
+
 }
 }
index 939fe04..106d4cc 100644 (file)
@@ -42,6 +42,7 @@ namespace WebCore {
     class FloatRect;
     class Page;
     struct FrameLoadRequest;
     class FloatRect;
     class Page;
     struct FrameLoadRequest;
+    class QtAbstractWebPopup;
 
     class ChromeClientQt : public ChromeClient
     {
 
     class ChromeClientQt : public ChromeClient
     {
@@ -134,6 +135,8 @@ namespace WebCore {
 
         virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
 
 
         virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
 
+        QtAbstractWebPopup* createPopup();
+
         QWebPage* m_webPage;
         WebCore::KURL lastHoverURL;
         WebCore::String lastHoverTitle;
         QWebPage* m_webPage;
         WebCore::KURL lastHoverURL;
         WebCore::String lastHoverTitle;
similarity index 77%
rename from WebCore/platform/qt/QtFallbackWebPopup.cpp
rename to WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
index fd14b32..344d58a 100644 (file)
@@ -33,11 +33,10 @@ namespace WebCore {
 
 // QtFallbackWebPopup
 
 
 // QtFallbackWebPopup
 
-QtFallbackWebPopup::QtFallbackWebPopup(PopupMenuClient* client)
-    : QtAbstractWebPopup(client)
+QtFallbackWebPopup::QtFallbackWebPopup()
+    : QtAbstractWebPopup()
     , m_popupVisible(false)
 {
     , m_popupVisible(false)
 {
-    setFont(QtAbstractWebPopup::client()->menuStyle().font().font());
     connect(this, SIGNAL(activated(int)),
             SLOT(activeChanged(int)), Qt::QueuedConnection);
 }
     connect(this, SIGNAL(activated(int)),
             SLOT(activeChanged(int)), Qt::QueuedConnection);
 }
@@ -45,14 +44,16 @@ QtFallbackWebPopup::QtFallbackWebPopup(PopupMenuClient* client)
 
 void QtFallbackWebPopup::show(const QRect& geometry, int selectedIndex)
 {
 
 void QtFallbackWebPopup::show(const QRect& geometry, int selectedIndex)
 {
-    populate();
     setCurrentIndex(selectedIndex);
 
     setCurrentIndex(selectedIndex);
 
+    /*
     QWidget* parent = 0;
     if (client()->hostWindow() && client()->hostWindow()->platformPageClient())
        parent = client()->hostWindow()->platformPageClient()->ownerWidget();
 
     setParent(parent);
     QWidget* parent = 0;
     if (client()->hostWindow() && client()->hostWindow()->platformPageClient())
        parent = client()->hostWindow()->platformPageClient()->ownerWidget();
 
     setParent(parent);
+    */
+
     setGeometry(QRect(geometry.left(), geometry.top(), geometry.width(), sizeHint().height()));
 
     QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
     setGeometry(QRect(geometry.left(), geometry.top(), geometry.width(), sizeHint().height()));
 
     QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
@@ -60,22 +61,27 @@ void QtFallbackWebPopup::show(const QRect& geometry, int selectedIndex)
     QCoreApplication::sendEvent(this, &event);
 }
 
     QCoreApplication::sendEvent(this, &event);
 }
 
-void QtFallbackWebPopup::populate()
+void QtFallbackWebPopup::populate(const QFont& font, const QList<Item>& items)
 {
     clear();
 
     QStandardItemModel* model = qobject_cast<QStandardItemModel*>(QComboBox::model());
     Q_ASSERT(model);
 
 {
     clear();
 
     QStandardItemModel* model = qobject_cast<QStandardItemModel*>(QComboBox::model());
     Q_ASSERT(model);
 
-    int size = client()->listSize();
-    for (int i = 0; i < size; i++) {
-        if (client()->itemIsSeparator(i))
+    setFont(font);
+    for (int i = 0; i < items.size(); ++i) {
+        switch (items[i].type) {
+        case QtAbstractWebPopup::Item::Separator:
             insertSeparator(i);
             insertSeparator(i);
-        else {
-            insertItem(i, client()->itemText(i));
-
-            if (model && !client()->itemIsEnabled(i))
-                model->item(i)->setEnabled(false);
+            break;
+        case QtAbstractWebPopup::Item::Group:
+            insertItem(i, items[i].text);
+            model->item(i)->setEnabled(false);
+            break;
+        case QtAbstractWebPopup::Item::Option:
+            insertItem(i, items[i].text);
+            model->item(i)->setEnabled(items[i].enabled);
+            break;
         }
     }
 }
         }
     }
 }
@@ -103,7 +109,7 @@ void QtFallbackWebPopup::hidePopup()
         return;
 
     m_popupVisible = false;
         return;
 
     m_popupVisible = false;
-    client()->popupDidHide(true);
+    popupDidHide(true);
 }
 
 void QtFallbackWebPopup::activeChanged(int index)
 }
 
 void QtFallbackWebPopup::activeChanged(int index)
@@ -111,7 +117,12 @@ void QtFallbackWebPopup::activeChanged(int index)
     if (index < 0)
         return;
 
     if (index < 0)
         return;
 
-    client()->valueChanged(index);
+    valueChanged(index);
+}
+
+void QtFallbackWebPopup::setParent(QWidget* parent)
+{
+    QComboBox::setParent(parent);
 }
 
 }
 }
 
 }
similarity index 90%
rename from WebCore/platform/qt/QtFallbackWebPopup.h
rename to WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
index 039270c..5affe0a 100644 (file)
@@ -28,10 +28,12 @@ namespace WebCore {
 class QtFallbackWebPopup : private QComboBox, public QtAbstractWebPopup {
     Q_OBJECT
 public:
 class QtFallbackWebPopup : private QComboBox, public QtAbstractWebPopup {
     Q_OBJECT
 public:
-    QtFallbackWebPopup(PopupMenuClient* client);
+    QtFallbackWebPopup();
 
     virtual void show(const QRect& geometry, int selectedIndex);
     virtual void hide() { hidePopup(); }
 
     virtual void show(const QRect& geometry, int selectedIndex);
     virtual void hide() { hidePopup(); }
+    virtual void populate(const QFont& font, const QList<Item>& items);
+    virtual void setParent(QWidget* parent);
 
 private slots:
     void activeChanged(int);
 
 private slots:
     void activeChanged(int);
@@ -39,7 +41,6 @@ private slots:
 private:
     bool m_popupVisible;
 
 private:
     bool m_popupVisible;
 
-    void populate();
 
     virtual void showPopup();
     virtual void hidePopup();
 
     virtual void showPopup();
     virtual void hidePopup();