[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
eric at webkit.org
eric at webkit.org
Wed Mar 17 18:39:23 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 453db0ca2758e717de89f6be0730921e300093f1
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Mar 15 01:28:02 2010 +0000
2010-03-14 Chang Shu <chang.shu at nokia.com>
Reviewed by Simon Hausmann.
[Qt] [Symbian] Added block for ENABLE_SYMBIAN_DIALOG_PROVIDERS
on Symbian platform.
https://bugs.webkit.org/show_bug.cgi?id=35919
* WebCore.pro:
2010-03-14 Chang Shu <chang.shu at nokia.com>
Reviewed by Simon Hausmann.
[Qt] [Symbian] Use Symbian native dialog providers for combo pupups.
https://bugs.webkit.org/show_bug.cgi?id=35919
* WebCoreSupport/QtFallbackWebPopup.cpp:
(WebCore::QtFallbackWebPopup::show):
(WebCore::ResetAndDestroy):
(WebCore::QtFallbackWebPopup::showS60BrowserDialog):
* WebCoreSupport/QtFallbackWebPopup.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d4ebacd..115656c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-03-14 Chang Shu <chang.shu at nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] [Symbian] Added block for ENABLE_SYMBIAN_DIALOG_PROVIDERS
+ on Symbian platform.
+ https://bugs.webkit.org/show_bug.cgi?id=35919
+
+ * WebCore.pro:
+
2010-03-14 Yael Aharon <yael.aharon at nokia.com>
Reviewed by Darin Adler.
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 9813c5c..2a081ab 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2807,6 +2807,13 @@ SOURCES += \
}
+contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) {
+ # this feature requires the S60 platform private BrowserDialogsProvider.h header file
+ # and is therefore not enabled by default but only meant for platform builds.
+ symbian {
+ LIBS += -lbrowserdialogsprovider
+ }
+}
include($$PWD/../WebKit/qt/Api/headers.pri)
include(../include/QtWebKit/classheaders.pri)
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index d4bf1f0..37f112b 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-14 Chang Shu <chang.shu at nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] [Symbian] Use Symbian native dialog providers for combo pupups.
+ https://bugs.webkit.org/show_bug.cgi?id=35919
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+ (WebCore::ResetAndDestroy):
+ (WebCore::QtFallbackWebPopup::showS60BrowserDialog):
+ * WebCoreSupport/QtFallbackWebPopup.h:
+
2010-03-14 Antti Koivisto <koivisto at iki.fi>
Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
index c553c45..3f60225 100644
--- a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
+++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
@@ -23,8 +23,8 @@
#include "HostWindow.h"
#include "PopupMenuClient.h"
-#include "qgraphicswebview.h"
#include "QWebPageClient.h"
+#include "qgraphicswebview.h"
#include <QAbstractItemView>
#include <QApplication>
#include <QGraphicsProxyWidget>
@@ -34,6 +34,12 @@
#include <QMouseEvent>
#include <QStandardItemModel>
+#if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
+#include <BrCtlDialogsProvider.h>
+#include <BrowserDialogsProvider.h> // S60 platform private header file
+#include <e32base.h>
+#endif
+
namespace WebCore {
QtFallbackWebPopupCombo::QtFallbackWebPopupCombo(QtFallbackWebPopup& ownerPopup)
@@ -93,6 +99,9 @@ QtFallbackWebPopup::~QtFallbackWebPopup()
void QtFallbackWebPopup::show()
{
+#if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
+ TRAP_IGNORE(showS60BrowserDialog());
+#else
populate();
m_combo->setCurrentIndex(currentIndex());
@@ -124,7 +133,61 @@ void QtFallbackWebPopup::show()
QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
Qt::LeftButton, Qt::NoModifier);
QCoreApplication::sendEvent(m_combo, &event);
+#endif
+}
+
+#if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
+
+static void ResetAndDestroy(TAny* aPtr)
+{
+ RPointerArray<HBufC>* items = reinterpret_cast<RPointerArray<HBufC>* >(aPtr);
+ items->ResetAndDestroy();
+}
+
+void QtFallbackWebPopup::showS60BrowserDialog()
+{
+ static MBrCtlDialogsProvider* dialogs = CBrowserDialogsProvider::NewL(0);
+ if (!dialogs)
+ return;
+
+ int size = itemCount();
+ CArrayFix<TBrCtlSelectOptionData>* options = new CArrayFixFlat<TBrCtlSelectOptionData>(qMax(1, size));
+ RPointerArray<HBufC> items(qMax(1, size));
+ CleanupStack::PushL(TCleanupItem(&ResetAndDestroy, &items));
+
+ for (int i = 0; i < size; i++) {
+ if (itemType(i) == Separator) {
+ TBrCtlSelectOptionData data(_L("----------"), false, false, false);
+ options->AppendL(data);
+ } else {
+ HBufC16* itemStr = HBufC16::NewL(itemText(i).length());
+ itemStr->Des().Copy((const TUint16*)itemText(i).utf16(), itemText(i).length());
+ CleanupStack::PushL(itemStr);
+ TBrCtlSelectOptionData data(*itemStr, i == currentIndex(), false, itemIsEnabled(i));
+ options->AppendL(data);
+ items.AppendL(itemStr);
+ CleanupStack::Pop();
+ }
+ }
+
+ dialogs->DialogSelectOptionL(KNullDesC(), (TBrCtlSelectOptionType)(ESelectTypeSingle | ESelectTypeWithFindPane), *options);
+
+ CleanupStack::PopAndDestroy(&items);
+
+ int newIndex;
+ for (newIndex = 0; newIndex < options->Count() && !options->At(newIndex).IsSelected(); newIndex++) {}
+ if (newIndex == options->Count())
+ newIndex = currentIndex();
+
+ m_popupVisible = false;
+ popupDidHide();
+
+ if (currentIndex() != newIndex && newIndex >= 0)
+ valueChanged(newIndex);
+
+ delete options;
}
+#endif
void QtFallbackWebPopup::hide()
{
diff --git a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
index 3924bf6..9d1183f 100644
--- a/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
+++ b/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
@@ -48,6 +48,9 @@ private:
QGraphicsProxyWidget* m_proxy;
void populate();
+#if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
+ void showS60BrowserDialog();
+#endif
};
class QtFallbackWebPopupCombo : public QComboBox {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list