author | Jeremias Bosch <jeremias.bosch@gmail.com> |
Thu, 03 Feb 2011 08:31:36 +0200 | |
changeset 61828 | 7961753fcc67b2b78b1c747baf3a213a9e5d0f0e |
parent 61827 | d384e2adf22e4c1382bae2a827f55436d68ac2d9 |
child 61829 | 1317342408b9facde40968d5b8a4751a31e9e794 |
push id | 18513 |
push user | romaxa@gmail.com |
push date | Thu, 03 Feb 2011 07:13:56 +0000 |
treeherder | autoland@8c8a1ef2a816 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | romaxa, ted.mielczarek, approval2.0 |
bugs | 626595 |
milestone | 2.0b12pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -546,17 +546,17 @@ MOZ_ENABLE_D3D9_LAYER = @MOZ_ENABLE_D3D9 MOZ_ENABLE_D3D10_LAYER = @MOZ_ENABLE_D3D10_LAYER@ MOZ_GTK2_CFLAGS = @MOZ_GTK2_CFLAGS@ MOZ_GTK2_LIBS = @MOZ_GTK2_LIBS@ MOZ_QT_CFLAGS = @MOZ_QT_CFLAGS@ MOZ_QT_LIBS = @MOZ_QT_LIBS@ MOZ_ENABLE_QTNETWORK = @MOZ_ENABLE_QTNETWORK@ -MOZ_ENABLE_MEEGOTOUCH = @MOZ_ENABLE_MEEGOTOUCH@ +MOZ_ENABLE_CONTENTACTION = @MOZ_ENABLE_CONTENTACTION@ MOZ_ENABLE_MEEGOTOUCHSHARE = @MOZ_ENABLE_MEEGOTOUCHSHARE@ MOZ_DBUS_CFLAGS = @MOZ_DBUS_CFLAGS@ MOZ_DBUS_LIBS = @MOZ_DBUS_LIBS@ MOZ_DBUS_GLIB_CFLAGS = @MOZ_DBUS_GLIB_CFLAGS@ MOZ_DBUS_GLIB_LIBS = @MOZ_DBUS_GLIB_LIBS@ MOZ_ENABLE_DBUS = @MOZ_ENABLE_DBUS@
--- a/configure.in +++ b/configure.in @@ -5415,17 +5415,16 @@ AC_SUBST(MOZ_ENABLE_GTK2) AC_SUBST(MOZ_ENABLE_PHOTON) AC_SUBST(MOZ_ENABLE_QT) AC_SUBST(MOZ_ENABLE_QTNETWORK) AC_SUBST(MOZ_ENABLE_XREMOTE) AC_SUBST(MOZ_GTK2_CFLAGS) AC_SUBST(MOZ_GTK2_LIBS) AC_SUBST(MOZ_QT_CFLAGS) AC_SUBST(MOZ_QT_LIBS) -AC_SUBST(MOZ_ENABLE_MEEGOTOUCH) AC_SUBST(MOC) AC_SUBST(MOZ_DFB) AC_SUBST(MOZ_X11) dnl ======================================================== dnl = @@ -7087,29 +7086,37 @@ if test $MOZ_PLATFORM_MAEMO; then MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBHILDONFM_LIBS" MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBHILDONFM_CFLAGS" if test -z "$_LIB_FOUND"; then AC_MSG_ERROR([Hildon FM-2 is required when building for Maemo]) fi fi if test $MOZ_PLATFORM_MAEMO = 6; then - PKG_CHECK_MODULES(LIBCONTENTACTION, contentaction-0.1, _LIB_FOUND=1, _LIB_FOUND=) - MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBCONTENTACTION_LIBS" - MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBCONTENTACTION_CFLAGS" - if test -z "$_LIB_FOUND"; then - AC_MSG_ERROR([libcontentaction is required when build for Maemo]) + dnl ======================================================== + dnl = Enable meego libcontentaction + dnl ======================================================== + MOZ_ARG_ENABLE_BOOL(meegocontentaction, + [ --enable-meegocontentaction Enable meegocontentaction support], + MOZ_MEEGOCONTENTACTION=1, + MOZ_MEEGOCONTENTACTION=) + + if test -n "$MOZ_MEEGOCONTENTACTION"; then + + PKG_CHECK_MODULES(LIBCONTENTACTION, contentaction-0.1, _LIB_FOUND=1, _LIB_FOUND=) + if test "$_LIB_FOUND"; then + MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBCONTENTACTION_LIBS" + MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBCONTENTACTION_CFLAGS" + MOZ_ENABLE_CONTENTACTION=1 + AC_DEFINE(MOZ_ENABLE_CONTENTACTION) + AC_SUBST(MOZ_ENABLE_CONTENTACTION) + fi fi - - MOZ_THUMB2=1 - PKG_CHECK_MODULES(MOZ_MEEGOTOUCH, meegotouchcore) - MOZ_ENABLE_MEEGOTOUCH=1 - AC_DEFINE(MOZ_ENABLE_MEEGOTOUCH) - MOZ_QT_CFLAGS="$MOZ_MEEGOTOUCH_CFLAGS $MOZ_QT_CFLAGS" - MOZ_QT_LIBS="$MOZ_MEEGOTOUCH_LIBS $MOZ_QT_LIBS" + + MOZ_THUMB2=1 fi PKG_CHECK_MODULES(LIBLOCATION,liblocation, _LIB_FOUND=1, _LIB_FOUND=) MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBLOCATION_LIBS" MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBLOCATION_CFLAGS" if test "$_LIB_FOUND"; then MOZ_MAEMO_LIBLOCATION=1 AC_DEFINE(MOZ_MAEMO_LIBLOCATION)
--- a/intl/locale/src/Makefile.in +++ b/intl/locale/src/Makefile.in @@ -52,16 +52,20 @@ DIRS = $(MOZ_WIDGET_TOOLKIT) else ifeq ($(MOZ_WIDGET_TOOLKIT), cocoa) DIRS = mac else DIRS = unix endif endif +ifeq ($(MOZ_WIDGET_TOOLKIT), qt) +OS_INCLUDES += $(MOZ_QT_CFLAGS) +endif + CPPSRCS = \ nsCollation.cpp \ nsScriptableDateFormat.cpp \ nsLanguageAtomService.cpp \ nsLocale.cpp \ nsLocaleService.cpp \ $(NULL) @@ -78,19 +82,13 @@ EXTRA_JS_MODULES = \ PluralForm.jsm \ $(NULL) # we don't want the shared lib, but we want to force the creation of a static lib. FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk -ifdef MOZ_ENABLE_MEEGOTOUCH -# Meegotouch does not make sense without Qt, -# so there's no need to check MOZ_WIDGET_TOOLKIT -CXXFLAGS += $(MOZ_QT_CFLAGS) $(MOZ_MEEGOTOUCH_CFLAGS) -endif - libs:: $(INSTALL) $(EXPORT_RESOURCE) $(DIST)/bin/res install:: $(SYSINSTALL) $(IFLAGS1) $(EXPORT_RESOURCE) $(DESTDIR)$(mozappdir)/res
--- a/intl/locale/src/nsLocaleService.cpp +++ b/intl/locale/src/nsLocaleService.cpp @@ -30,19 +30,19 @@ * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#ifdef MOZ_ENABLE_MEEGOTOUCH -// It's necessary to include this before realloc gets macroed. -#include <mgconfitem.h> +#ifdef MOZ_WIDGET_QT +#include <QString> +#include <QtCore/QLocale> #endif #include "nsCOMPtr.h" #include "nsAutoPtr.h" #include "nsILocale.h" #include "nsILocaleService.h" #include "nsLocale.h" #include "nsLocaleCID.h" @@ -95,28 +95,16 @@ static int posix_locale_category[LocaleL #ifdef HAVE_I18N_LC_MESSAGES LC_MESSAGES #else LC_CTYPE #endif }; #endif -#ifdef MOZ_ENABLE_MEEGOTOUCH -static void CopyGConfToEnv(const char* gconf, const char* env) -{ - MGConfItem item(gconf); - QVariant value = item.value(); - if (QVariant::String == value.type()) { - const QByteArray& array = value.toString().toAscii(); - setenv(env, array.constData(), 1); - } // else it's an incompatible type or QVariant::Invalid (not set) -} -#endif - // // nsILocaleService implementation // class nsLocaleService: public nsILocaleService { public: // @@ -187,28 +175,24 @@ nsLocaleService::nsLocaleService(void) nsAutoString category, category_platform; int i; nsRefPtr<nsLocale> resultLocale(new nsLocale()); if ( resultLocale == NULL ) { return; } -#ifdef MOZ_ENABLE_MEEGOTOUCH - // Create a snapshot of the gconf locale values into the - // corresponding environment variables to obey system settings - // as accurately as possible. - CopyGConfToEnv("/meegotouch/i18n/language", "LANG"); - CopyGConfToEnv("/meegotouch/i18n/lc_collate", NSILOCALE_COLLATE); - CopyGConfToEnv("/meegotouch/i18n/lc_monetary", NSILOCALE_MONETARY); - CopyGConfToEnv("/meegotouch/i18n/lc_numeric", NSILOCALE_NUMERIC); - CopyGConfToEnv("/meegotouch/i18n/lc_time", NSILOCALE_TIME); -#endif + +#ifdef MOZ_WIDGET_QT + const char* lang = QLocale::languageToString(QLocale::system().language()).toAscii(); +#else // Get system configuration const char* lang = getenv("LANG"); +#endif + for( i = 0; i < LocaleListLength; i++ ) { nsresult result; // setlocale( , "") evaluates LC_* and LANG char* lc_temp = setlocale(posix_locale_category[i], ""); CopyASCIItoUTF16(LocaleList[i], category); category_platform = category; category_platform.AppendLiteral("##PLATFORM"); if (lc_temp != nsnull) {
--- a/intl/unicharutil/tables/Makefile.in +++ b/intl/unicharutil/tables/Makefile.in @@ -51,14 +51,19 @@ include $(topsrcdir)/config/rules.mk html40Special.properties \ transliterate.properties \ $(NULL) ifdef MOZ_MATHML _PROP_TABLES += mathml20.properties endif +ifeq ($(MOZ_WIDGET_TOOLKIT), qt) +CFLAGS += $(MOZ_QT_CFLAGS) +CXXFLAGS += $(MOZ_QT_CFLAGS) +endif + libs:: $(_PROP_TABLES) $(INSTALL) $^ $(DIST)/bin/res/entityTables install:: $(_PROP_TABLES) $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/res/entityTables
--- a/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in @@ -103,20 +103,16 @@ CPPSRCS += nsNativeAppSupportBeOS.cpp else ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) CPPSRCS += nsNativeAppSupportUnix.cpp else ifeq ($(MOZ_WIDGET_TOOLKIT),qt) CPPSRCS += nsNativeAppSupportQt.cpp CPPSRCS += nsQAppInstance.cpp EXPORTS += nsQAppInstance.h -ifdef MOZ_ENABLE_MEEGOTOUCH -MOCSRCS += moc_MozMeegoAppService.cpp -CPPSRCS += moc_MozMeegoAppService.cpp -endif else CPPSRCS += nsNativeAppSupportDefault.cpp endif endif endif endif endif endif
--- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -49,20 +49,16 @@ #define XPCOM_TRANSLATE_NSGM_ENTRY_POINT 1 #if defined(MOZ_WIDGET_QT) #include <QtGui/QApplication> #include <QtCore/QScopedPointer> #include <QtGui/QApplication> #include <QtGui/QInputContextFactory> #include <QtGui/QInputContext> -#ifdef MOZ_ENABLE_MEEGOTOUCH -#include <MApplication> -#include "MozMeegoAppService.h" -#endif // MOZ_ENABLE_MEEGOTOUCH #endif // MOZ_WIDGET_QT #ifdef MOZ_IPC #include "mozilla/dom/ContentParent.h" using mozilla::dom::ContentParent; #endif #include "nsAppRunner.h" @@ -3218,27 +3214,17 @@ XRE_main(int argc, char* argv[], const n #endif #if defined(MOZ_WIDGET_QT) const char* qgraphicssystemARG = NULL; ar = CheckArg("graphicssystem", PR_TRUE, &qgraphicssystemARG, PR_FALSE); if (ar == ARG_FOUND) PR_SetEnv(PR_smprintf("MOZ_QT_GRAPHICSSYSTEM=%s", qgraphicssystemARG)); -#ifdef MOZ_ENABLE_MEEGOTOUCH - QScopedPointer<QApplication> app; - if (XRE_GetProcessType() == GeckoProcessType_Default) { - MozMeegoAppService *appService = new MozMeegoAppService; - app.reset(new MApplication(gArgc, gArgv, appService)); - } else { - app.reset(new QApplication(gArgc, gArgv)); - } -#else QScopedPointer<QApplication> app(new QApplication(gArgc, gArgv)); -#endif #if MOZ_PLATFORM_MAEMO > 5 if (XRE_GetProcessType() == GeckoProcessType_Default) { // try to get the MInputContext if possible to support the MeeGo VKB QInputContext* inputContext = app->inputContext(); if (inputContext && inputContext->identifierName() != "MInputContext") { QInputContext* context = QInputContextFactory::create("MInputContext", app.data());
--- a/uriloader/exthandler/Makefile.in +++ b/uriloader/exthandler/Makefile.in @@ -185,17 +185,17 @@ LOCAL_INCLUDES += $(MOZ_GNOMEVFS_CFLAG EXTRA_DSO_LDOPTS += $(MOZ_GNOMEVFS_LIBS) endif ifdef MOZ_ENABLE_GIO LOCAL_INCLUDES += $(MOZ_GIO_CFLAGS) EXTRA_DSO_LDOPTS += $(MOZ_GIO_LIBS) endif endif -ifeq ($(MOZ_PLATFORM_MAEMO),6) +ifdef MOZ_ENABLE_CONTENTACTION CPPSRCS += nsContentHandlerApp.cpp endif ifeq ($(OS_ARCH),WINNT WINCE) OS_LIBS += shell32.lib GARBAGE += nsOSHelperAppService.cpp $(srcdir)/nsOSHelperAppService.cpp \ nsMIMEInfoWin.cpp $(srcdir)/nsMIMEInfoWin.cpp endif
--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp @@ -39,23 +39,25 @@ * ***** END LICENSE BLOCK ***** */ #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) #include <glib.h> #include <hildon-uri.h> #include <hildon-mime.h> #include <libosso.h> #endif -#if (MOZ_PLATFORM_MAEMO == 6) +#ifdef MOZ_WIDGET_QT #include <QDesktopServices> #include <QUrl> #include <QString> +#if (MOZ_ENABLE_CONTENTACTION) #include <contentaction/contentaction.h> #include "nsContentHandlerApp.h" #endif +#endif #include "nsMIMEInfoUnix.h" #include "nsGNOMERegistry.h" #include "nsIGIOService.h" #include "nsIGnomeVFSService.h" #include "nsAutoPtr.h" #ifdef MOZ_ENABLE_DBUS #include "nsDBusHandlerApp.h" @@ -74,17 +76,17 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI * aURI->GetAsciiSpec(spec); if (hildon_uri_open(spec.get(), action, nsnull)) rv = NS_OK; hildon_uri_action_unref(action); } } #endif -#if (MOZ_PLATFORM_MAEMO == 6) +#ifdef MOZ_WIDGET_QT if (NS_FAILED(rv)) { nsCAutoString spec; aURI->GetAsciiSpec(spec); if (QDesktopServices::openUrl(QUrl(spec.get()))) { rv = NS_OK; } } #endif @@ -114,17 +116,17 @@ nsMIMEInfoUnix::GetHasDefaultHandler(PRB HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nsnull); if (action) { *_retval = PR_TRUE; hildon_uri_action_unref(action); return NS_OK; } #endif -#if (MOZ_PLATFORM_MAEMO == 6) +#if defined(MOZ_ENABLE_CONTENTACTION) ContentAction::Action action = ContentAction::Action::defaultActionForFile(QUrl(), QString(mSchemeOrType.get())); if (action.isValid()) { *_retval = PR_TRUE; return NS_OK; } #endif @@ -138,17 +140,17 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns nsCAutoString nativePath; aFile->GetNativePath(nativePath); #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) if(NS_SUCCEEDED(LaunchDefaultWithDBus(PromiseFlatCString(nativePath).get()))) return NS_OK; #endif -#if (MOZ_PLATFORM_MAEMO == 6) +#if defined(MOZ_ENABLE_CONTENTACTION) QUrl uri = QUrl::fromLocalFile(QString::fromUtf8(nativePath.get())); ContentAction::Action action = ContentAction::Action::defaultActionForFile(uri, QString(mSchemeOrType.get())); if (action.isValid()) { action.trigger(); return NS_OK; } return NS_ERROR_FAILURE; @@ -282,17 +284,17 @@ nsMIMEInfoUnix::GetPossibleApplicationHa } *aPossibleAppHandlers = mPossibleApplications; NS_ADDREF(*aPossibleAppHandlers); return NS_OK; } #endif -#if (MOZ_PLATFORM_MAEMO == 6) +#if defined(MOZ_ENABLE_CONTENTACTION) NS_IMETHODIMP nsMIMEInfoUnix::GetPossibleApplicationHandlers(nsIMutableArray ** aPossibleAppHandlers) { if (!mPossibleApplications) { mPossibleApplications = do_CreateInstance(NS_ARRAY_CONTRACTID); if (!mPossibleApplications) return NS_ERROR_OUT_OF_MEMORY;
--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.h +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.h @@ -56,14 +56,14 @@ protected: virtual NS_HIDDEN_(nsresult) LoadUriInternal(nsIURI *aURI); virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile *aFile); #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) nsresult LaunchDefaultWithDBus(const char *aFilePath); NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleAppHandlers); #endif -#if (MOZ_PLATFORM_MAEMO == 6) +#if defined(MOZ_ENABLE_CONTENTACTION) NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleAppHandlers); #endif }; #endif // nsMIMEInfoUnix_h_
--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp @@ -36,17 +36,17 @@ * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #include <sys/types.h> #include <sys/stat.h> -#if (MOZ_PLATFORM_MAEMO == 6) +#if defined(MOZ_ENABLE_CONTENTACTION) #include <contentaction/contentaction.h> #include <QString> #endif #include "nsOSHelperAppService.h" #include "nsMIMEInfoUnix.h" #ifdef MOZ_WIDGET_GTK2 #include "nsGNOMERegistry.h" @@ -1208,17 +1208,17 @@ nsOSHelperAppService::GetHandlerAndDescr } nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolScheme, PRBool * aHandlerExists) { LOG(("-- nsOSHelperAppService::OSProtocolHandlerExists for '%s'\n", aProtocolScheme)); *aHandlerExists = PR_FALSE; -#if (MOZ_PLATFORM_MAEMO == 6) +#if defined(MOZ_ENABLE_CONTENTACTION) // libcontentaction requires character ':' after scheme ContentAction::Action action = ContentAction::Action::defaultActionForScheme(QString(aProtocolScheme) + ':'); if (action.isValid()) *aHandlerExists = PR_TRUE; #endif
--- a/widget/src/qt/mozqwidget.h +++ b/widget/src/qt/mozqwidget.h @@ -37,24 +37,16 @@ #ifndef MOZQWIDGET_H #define MOZQWIDGET_H #include <QtGui/QApplication> #include <QtGui/QGraphicsView> #include <QtGui/QGraphicsWidget> -#ifdef MOZ_ENABLE_MEEGOTOUCH -#include <QtGui/QGraphicsSceneResizeEvent> -#include <MSceneWindow> -#include <QTimer> -#include <mstatusbar.h> -#include <MInputMethodState> -#endif - #include "nsIWidget.h" #include "prenv.h" #include "nsIObserverService.h" #include "mozilla/Services.h" class QEvent; class QPixmap; @@ -223,139 +215,10 @@ protected: QGraphicsView::closeEvent(aEvent); } private: MozQGraphicsViewEvents mEventHandler; MozQWidget* mTopLevelWidget; }; -#ifdef MOZ_ENABLE_MEEGOTOUCH -class MozMSceneWindow : public MSceneWindow -{ - Q_OBJECT -public: - MozMSceneWindow(MozQWidget* aTopLevel) - : MSceneWindow(aTopLevel->parentItem()) - , mTopLevelWidget(aTopLevel) - , mStatusBar(nsnull) - { - mTopLevelWidget->setParentItem(this); - mTopLevelWidget->installEventFilter(this); - mStatusBar = new MStatusBar(); - mStatusBar->appear(scene()); - connect(mStatusBar, SIGNAL(appeared()), this, SLOT(CheckTopLevelSize())); - connect(mStatusBar, SIGNAL(disappeared()), this, SLOT(CheckTopLevelSize())); - MInputMethodState *inputMethodState = MInputMethodState::instance(); - if (inputMethodState) - connect(inputMethodState, SIGNAL(inputMethodAreaChanged(const QRect &)), - this, SLOT(VisibleScreenAreaChanged(const QRect &))); - } - -protected: - virtual void resizeEvent(QGraphicsSceneResizeEvent* aEvent) { - mCurrentSize = aEvent->newSize(); - MSceneWindow::resizeEvent(aEvent); - CheckTopLevelSize(); - } - - virtual bool eventFilter(QObject* watched, QEvent* e) - { - if (e->type() == QEvent::GraphicsSceneResize || - e->type() == QEvent::GraphicsSceneMove) { - - //Do this in next event loop, or we are in recursion! - QTimer::singleShot(0, this, SLOT(CheckTopLevelSize())); - } - - //false == let event processing continue - return false; - } - -private slots: - void CheckTopLevelSize() { - if (mTopLevelWidget) { - qreal xpos = 0; - qreal ypos = 0; - qreal width = mCurrentSize.width(); - qreal height = mCurrentSize.height(); - - //If statusbar is visible, move toplevel widget down - if (mStatusBar->isVisible()) { - ypos = mStatusBar->size().height(); - height -= ypos; - } - - // transfer new size to graphics widget if changed - QRectF r = mTopLevelWidget->geometry(); - if (r != QRectF(xpos, ypos, width, height)) - mTopLevelWidget->setGeometry(xpos, ypos, width, height); - } - } - - void VisibleScreenAreaChanged(const QRect & region) { - if (mTopLevelWidget) { - QRect r = mTopLevelWidget->geometry().toRect(); - r.setHeight(r.height()-region.height()); - - nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService(); - if (observerService) { - QString rect = QString("{\"left\": %1, \"top\": %2, \"right\": %3, \"bottom\": %4}") - .arg(r.left()) - .arg(r.top()) - .arg(r.right()) - .arg(r.bottom()); - - observerService->NotifyObservers(nsnull, "softkb-change", rect.utf16()); - } - } - } -private: - MozQWidget* mTopLevelWidget; - MStatusBar* mStatusBar; - QSizeF mCurrentSize; -}; - -/** - This is a helper class to synchronize the MWindow window with - its contained QGraphicsWidget for things like resizing and closing - by the user. -*/ -class MozMGraphicsView : public MWindow -{ - -public: - MozMGraphicsView(MozQWidget* aTopLevel, QWidget* aParent = nsnull) - : MWindow(aParent) - , mEventHandler(this) - , mTopLevelWidget(aTopLevel) - { - MozMSceneWindow *page = new MozMSceneWindow(aTopLevel); - if (page) - page->appear(this); - } - -protected: - virtual bool event(QEvent* aEvent) { - mEventHandler.handleEvent(aEvent, mTopLevelWidget); - return MWindow::event(aEvent); - } - - virtual void resizeEvent(QResizeEvent* aEvent) - { - setSceneRect(viewport()->rect()); - MWindow::resizeEvent(aEvent); - } - - virtual void closeEvent (QCloseEvent* aEvent) - { - if (!mEventHandler.handleCloseEvent(aEvent, mTopLevelWidget)) - MWindow::closeEvent(aEvent); - } - -private: - MozQGraphicsViewEvents mEventHandler; - MozQWidget* mTopLevelWidget; -}; - -#endif /* MOZ_ENABLE_MEEGOTOUCH */ #endif
--- a/widget/src/qt/nsScreenQt.cpp +++ b/widget/src/qt/nsScreenQt.cpp @@ -38,21 +38,16 @@ * ***** END LICENSE BLOCK ***** */ #include <qcolor.h> #include <qcolormap.h> #include <qrect.h> #include <qdesktopwidget.h> #include <qapplication.h> -#ifdef MOZ_ENABLE_MEEGOTOUCH -#include <MApplication> -#include <MApplicationWindow> -#endif - #include "nsScreenQt.h" #include "nsXULAppAPI.h" nsScreenQt::nsScreenQt(int aScreen) : mScreen(aScreen) { // nothing else to do. I guess we could cache a bunch of information // here, but we want to ask the device at runtime in case anything @@ -66,27 +61,17 @@ nsScreenQt::~nsScreenQt() // addref, release, QI NS_IMPL_ISUPPORTS1(nsScreenQt, nsIScreen) NS_IMETHODIMP nsScreenQt::GetRect(PRInt32 *outLeft,PRInt32 *outTop, PRInt32 *outWidth,PRInt32 *outHeight) { - QRect r; -#if defined MOZ_IPC && defined MOZ_ENABLE_MEEGOTOUCH - if (XRE_GetProcessType() == GeckoProcessType_Default) { - MWindow *window = MApplication::activeWindow(); - if (window) { - QSize aSceneSize = window->visibleSceneSize(); - r = QRect(QPoint(), aSceneSize); - } - } else -#endif - r = QApplication::desktop()->screenGeometry(mScreen); + QRect r = QApplication::desktop()->screenGeometry(mScreen); *outTop = r.x(); *outLeft = r.y(); *outWidth = r.width(); *outHeight = r.height(); return NS_OK; }
--- a/widget/src/qt/nsWindow.cpp +++ b/widget/src/qt/nsWindow.cpp @@ -66,19 +66,16 @@ #include <QGestureRecognizer> #include "mozSwipeGesture.h" static Qt::GestureType gSwipeGestureId = Qt::CustomGesture; // How many milliseconds mouseevents are blocked after receiving // multitouch. static const float GESTURES_BLOCK_MOUSE_FOR = 200; #endif // QT version check -#ifdef MOZ_ENABLE_MEEGOTOUCH -#include <MApplication> -#endif #ifdef MOZ_X11 #include <QX11Info> #include <X11/Xlib.h> #endif //MOZ_X11 #include "nsXULAppAPI.h" @@ -1066,26 +1063,16 @@ nsWindow::DoPaint(QPainter* aPainter, co // We will paint to 0, 0 position in offscrenn buffer if (renderMode == gfxQtPlatform::RENDER_BUFFERED) { ctx->Translate(gfxPoint(-r.x(), -r.y())); } else if (renderMode == gfxQtPlatform::RENDER_DIRECT) { gfxMatrix matr; matr.Translate(gfxPoint(aPainter->transform().dx(), aPainter->transform().dy())); -#ifdef MOZ_ENABLE_MEEGOTOUCH - MWindow* window = MApplication::activeWindow(); - if (window) { - // This is needed for rotate transformation on MeeGo - // This will work very slow if pixman does not handle rotation very well - M::OrientationAngle angle = window->orientationAngle(); - matr.Rotate((M_PI/180)*angle); - NS_ASSERTION(PIXMAN_VERSION > PIXMAN_VERSION_ENCODE(0, 21, 2) || !angle, "Old pixman and rotate transform, it is going to be slow"); - } -#endif ctx->SetMatrix(matr); } nsPaintEvent event(PR_TRUE, NS_PAINT, this); event.refPoint.x = rect.x; event.refPoint.y = rect.y; event.region = nsIntRegion(rect); { @@ -2271,73 +2258,60 @@ nsWindow::SetWindowClass(const nsAString void nsWindow::NativeResize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint) { LOG(("nsWindow::NativeResize [%p] %d %d\n", (void *)this, aWidth, aHeight)); mNeedsResize = PR_FALSE; -#ifdef MOZ_IPC -#ifndef MOZ_ENABLE_MEEGOTOUCH - if (mIsTopLevel && XRE_GetProcessType() == GeckoProcessType_Default) { + if (mIsTopLevel) { QWidget *widget = GetViewWidget(); NS_ENSURE_TRUE(widget,); widget->resize(aWidth, aHeight); } -#endif -#endif - - mWidget->resize( aWidth, aHeight); + + mWidget->resize(aWidth, aHeight); if (aRepaint) mWidget->update(); } void nsWindow::NativeResize(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint) { LOG(("nsWindow::NativeResize [%p] %d %d %d %d\n", (void *)this, aX, aY, aWidth, aHeight)); mNeedsResize = PR_FALSE; mNeedsMove = PR_FALSE; -#ifdef MOZ_IPC -#ifndef MOZ_ENABLE_MEEGOTOUCH if (mIsTopLevel) { - if (XRE_GetProcessType() == GeckoProcessType_Default) { - QWidget *widget = GetViewWidget(); - NS_ENSURE_TRUE(widget,); - widget->setGeometry(aX, aY, aWidth, aHeight); - } + QWidget *widget = GetViewWidget(); + NS_ENSURE_TRUE(widget,); + widget->setGeometry(aX, aY, aWidth, aHeight); } -#endif -#endif mWidget->setGeometry(aX, aY, aWidth, aHeight); if (aRepaint) mWidget->update(); } void nsWindow::NativeShow(PRBool aAction) { if (aAction) { QWidget *widget = GetViewWidget(); // On e10s, we never want the child process or plugin process // to go fullscreen because if we do the window because visible // do to disabled Qt-Xembed if (widget && -#ifdef MOZ_IPC - (XRE_GetProcessType() == GeckoProcessType_Default) && -#endif !widget->isVisible()) MakeFullScreen(mSizeMode == nsSizeMode_Fullscreen); mWidget->show(); // unset our flag now that our window has been shown mNeedsShow = PR_FALSE; } else @@ -2577,26 +2551,18 @@ nsWindow::createQWidget(MozQWidget *pare if (eWindowType_child == mWindowType || eWindowType_plugin == mWindowType) { widget->setFlag(QGraphicsItem::ItemIsFocusable); widget->setFocusPolicy(Qt::WheelFocus); } // create a QGraphicsView if this is a new toplevel window if (mIsTopLevel) { - QGraphicsView* newView = nsnull; -#if defined MOZ_IPC && defined MOZ_ENABLE_MEEGOTOUCH - if (XRE_GetProcessType() == GeckoProcessType_Default) { - newView = new MozMGraphicsView(widget); - } else -#else - { - newView = new MozQGraphicsView(widget); - } -#endif + QGraphicsView* newView = new MozQGraphicsView(widget); + if (!newView) { delete widget; return nsnull; } if (!IsAcceleratedQView(newView) && GetShouldAccelerate()) { newView->setViewport(new QGLWidget()); }
--- a/xpcom/io/Makefile.in +++ b/xpcom/io/Makefile.in @@ -200,12 +200,12 @@ endif LOCAL_INCLUDES += -I.. ifeq ($(MOZ_PLATFORM_MAEMO),5) CFLAGS += $(MOZ_DBUS_CFLAGS) CXXFLAGS += $(MOZ_DBUS_CFLAGS) endif ifdef MOZ_PLATFORM_MAEMO -CFLAGS += $(MOZ_PLATFORM_MAEMO_CFLAGS) -CXXFLAGS += $(MOZ_PLATFORM_MAEMO_CFLAGS) +CFLAGS += $(MOZ_PLATFORM_MAEMO_CFLAGS) $(MOZ_QT_CFLAGS) +CXXFLAGS += $(MOZ_PLATFORM_MAEMO_CFLAGS) $(MOZ_QT_CFLAGS) endif
--- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -70,18 +70,20 @@ #if defined(HAVE_SYS_QUOTA_H) && defined(HAVE_LINUX_QUOTA_H) #define USE_LINUX_QUOTACTL #include <sys/quota.h> #endif #if (MOZ_PLATFORM_MAEMO == 6) #include <QUrl> #include <QString> +#if (MOZ_ENABLE_CONTENTACTION) #include <contentaction/contentaction.h> #endif +#endif #include "nsDirectoryServiceDefs.h" #include "nsCRT.h" #include "nsCOMPtr.h" #include "nsMemory.h" #include "nsIFile.h" #include "nsString.h" #include "nsReadableUtils.h" @@ -1894,17 +1896,17 @@ nsLocalFile::Launch() return giovfs->ShowURIForInput(mPath); } else if (gnomevfs) { /* GnomeVFS fallback */ return gnomevfs->ShowURIForInput(mPath); } return NS_ERROR_FAILURE; #endif -#elif (MOZ_PLATFORM_MAEMO == 6) +#elif defined(MOZ_ENABLE_CONTENTACTION) QUrl uri = QUrl::fromLocalFile(QString::fromUtf8(mPath.get())); ContentAction::Action action = ContentAction::Action::defaultActionForFile(uri); if (action.isValid()) { action.trigger(); return NS_OK; }