Commit 200a141d authored by kenneth@webkit.org's avatar kenneth@webkit.org

Do not use a proxy widget for the QComboBox on Maemo 5, as it

is not working properly and it is not needed at all, as the
comboboxes comes up in their full width on the screen and
do not depend on view.

Reviewed by Ariya Hidayat.

* WebCoreSupport/QtFallbackWebPopup.cpp:
(WebCore::QtFallbackWebPopup::show):

git-svn-id: svn://svn.chromium.org/blink/trunk@54241 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7f8e6e2b
2010-02-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Ariya Hidayat.
Do not use a proxy widget for the QComboBox on Maemo 5, as it
is not working properly and it is not needed at all, as the
comboboxes comes up in their full width on the screen and
do not depend on view.
* WebCoreSupport/QtFallbackWebPopup.cpp:
(WebCore::QtFallbackWebPopup::show):
2010-02-02 Jessie Berlin <jberlin@webkit.org> 2010-02-02 Jessie Berlin <jberlin@webkit.org>
Rubber Stamped by Holger Freyther. Rubber Stamped by Holger Freyther.
......
...@@ -95,6 +95,15 @@ void QtFallbackWebPopup::show() ...@@ -95,6 +95,15 @@ void QtFallbackWebPopup::show()
{ {
populate(); populate();
m_combo->setCurrentIndex(currentIndex()); m_combo->setCurrentIndex(currentIndex());
#if defined(Q_WS_MAEMO_5)
// Comboboxes with Qt on Maemo 5 come up in their full width on the screen, so neither
// the proxy widget, nor the coordinates are needed.
m_combo->setParent(pageClient()->ownerWidget());
m_combo->showPopup();
return;
#endif
QRect rect = geometry(); QRect rect = geometry();
if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(pageClient()->pluginParent())) { if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(pageClient()->pluginParent())) {
if (!m_proxy) { if (!m_proxy) {
...@@ -110,16 +119,11 @@ void QtFallbackWebPopup::show() ...@@ -110,16 +119,11 @@ void QtFallbackWebPopup::show()
} }
// QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates // QCursor::pos() is not a great idea for a touch screen, but as Maemo 5 is handled
// as comboboxes with Qt on Maemo 5 come up in their full width on the screen. // separately above, this should be okay.
// On the other platforms it's okay to use QCursor::pos().
#if defined(Q_WS_MAEMO_5)
m_combo->showPopup();
#else
QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton, QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
Qt::LeftButton, Qt::NoModifier); Qt::LeftButton, Qt::NoModifier);
QCoreApplication::sendEvent(m_combo, &event); QCoreApplication::sendEvent(m_combo, &event);
#endif
} }
void QtFallbackWebPopup::hide() void QtFallbackWebPopup::hide()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment