Changeset 99903 in webkit


Ignore:
Timestamp:
Nov 10, 2011, 3:01:27 PM (14 years ago)
Author:
luiz@webkit.org
Message:

[Qt] Adding methods setGeometry and setFont to QWebSelectMethod class.
https://bugs.webkit.org/show_bug.cgi?id=71530

Reviewed by Simon Hausmann.

Adding methods setGeometry and setFont so that users of platform plugin may show the
popup menus in proper position and using proper font.

  • Api/qwebkitplatformplugin.h:
  • WebCoreSupport/PopupMenuQt.cpp:

(WebCore::PopupMenuQt::show):

  • examples/platformplugin/WebPlugin.h:

(WebPopup::setGeometry):
(WebPopup::setFont):

  • examples/platformplugin/qwebkitplatformplugin.h:
Location:
trunk/Source/WebKit/qt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/Api/qwebkitplatformplugin.h

    r99535 r99903  
    3131#endif
    3232#include <QtCore/QObject>
     33#include <QtCore/QRect>
    3334#include <QtCore/QUrl>
    3435#include <QtGui/QColor>
     36#include <QtGui/QFont>
    3537
    3638class QWebSelectData {
     
    6062    virtual void show(const QWebSelectData&) = 0;
    6163    virtual void hide() = 0;
     64    virtual void setGeometry(const QRect&) = 0;
     65    virtual void setFont(const QFont&) = 0;
    6266
    6367Q_SIGNALS:
     
    177181
    178182QT_BEGIN_NAMESPACE
    179 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.7");
     183Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.8");
    180184QT_END_NAMESPACE
    181185
  • trunk/Source/WebKit/qt/ChangeLog

    r99845 r99903  
     12011-11-03  Luiz Agostini  <luiz.agostini@palm.com>
     2
     3        [Qt] Adding methods setGeometry and setFont to QWebSelectMethod class.
     4        https://bugs.webkit.org/show_bug.cgi?id=71530
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Adding methods setGeometry and setFont so that users of platform plugin may show the
     9        popup menus in proper position and using proper font.
     10
     11        * Api/qwebkitplatformplugin.h:
     12        * WebCoreSupport/PopupMenuQt.cpp:
     13        (WebCore::PopupMenuQt::show):
     14        * examples/platformplugin/WebPlugin.h:
     15        (WebPopup::setGeometry):
     16        (WebPopup::setFont):
     17        * examples/platformplugin/qwebkitplatformplugin.h:
     18
    1192011-11-10  Alexis Menard  <alexis.menard@openbossa.org>
    220
  • trunk/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp

    r95901 r99903  
    108108    }
    109109
    110     if (QtFallbackWebPopup* fallback = qobject_cast<QtFallbackWebPopup*>(m_popup.get())) {
    111         QRect geometry(rect);
    112         geometry.moveTopLeft(view->contentsToWindow(rect.location()));
    113         fallback->setGeometry(geometry);
    114         fallback->setFont(m_popupClient->menuStyle().font().font());
    115     }
     110    QRect geometry(rect);
     111    geometry.moveTopLeft(view->contentsToWindow(rect.location()));
     112    m_popup->setGeometry(geometry);
     113    m_popup->setFont(m_popupClient->menuStyle().font().font());
    116114
    117115    m_selectData = adoptPtr(new SelectData(m_popupClient));
  • trunk/Source/WebKit/qt/examples/platformplugin/WebPlugin.h

    r95901 r99903  
    7373    virtual void show(const QWebSelectData& data);
    7474    virtual void hide();
     75    virtual void setGeometry(const QRect&) { }
     76    virtual void setFont(const QFont&) { }
    7577
    7678private slots:
  • trunk/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h

    r99535 r99903  
    3131#endif
    3232#include <QtCore/QObject>
     33#include <QtCore/QRect>
    3334#include <QtCore/QUrl>
    3435#include <QtGui/QColor>
     36#include <QtGui/QFont>
    3537
    3638class QWebSelectData {
     
    6062    virtual void show(const QWebSelectData&) = 0;
    6163    virtual void hide() = 0;
     64    virtual void setGeometry(const QRect&) = 0;
     65    virtual void setFont(const QFont&) = 0;
    6266
    6367Q_SIGNALS:
     
    177181
    178182QT_BEGIN_NAMESPACE
    179 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.7");
     183Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.8");
    180184QT_END_NAMESPACE
    181185
Note: See TracChangeset for help on using the changeset viewer.