Bug 380196: Kill QT graphics code, p=sciguyryan, r/sr=roc
authormozilla@weilbacher.org
Sun, 10 Jun 2007 15:13:08 -0700
changeset 2229 9f2b70e8364844781a5602ab3184f7a8a6910327
parent 2228 2c33e0da1fc52a4a66f5aa228683b1134f4cca56
child 2230 d6e6af5804b5b7bcd411f0b2aff98de137058cff
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs380196
milestone1.9a6pre
Bug 380196: Kill QT graphics code, p=sciguyryan, r/sr=roc
allmakefiles.sh
config/autoconf.mk.in
config/rules.mk
config/system-headers
configure.in
embedding/browser/qt/Makefile.in
embedding/browser/qt/plugin/Makefile.in
embedding/browser/qt/plugin/plugin.cpp
embedding/browser/qt/plugin/plugin.h
embedding/browser/qt/plugin/plugin.xpm
embedding/browser/qt/qgeckoembed.pkg
embedding/browser/qt/src/EmbedContentListener.cpp
embedding/browser/qt/src/EmbedContentListener.h
embedding/browser/qt/src/EmbedEventListener.cpp
embedding/browser/qt/src/EmbedEventListener.h
embedding/browser/qt/src/EmbedGlobalHistory.cpp
embedding/browser/qt/src/EmbedGlobalHistory.h
embedding/browser/qt/src/EmbedModules.cpp
embedding/browser/qt/src/EmbedProgress.cpp
embedding/browser/qt/src/EmbedProgress.h
embedding/browser/qt/src/EmbedStream.cpp
embedding/browser/qt/src/EmbedStream.h
embedding/browser/qt/src/EmbedWindow.cpp
embedding/browser/qt/src/EmbedWindow.h
embedding/browser/qt/src/EmbedWindowCreator.cpp
embedding/browser/qt/src/EmbedWindowCreator.h
embedding/browser/qt/src/Makefile.in
embedding/browser/qt/src/QtPromptService.cpp
embedding/browser/qt/src/QtPromptService.h
embedding/browser/qt/src/alert.ui
embedding/browser/qt/src/config/qtconfig.mk
embedding/browser/qt/src/config/qtrules.mk
embedding/browser/qt/src/confirm.ui
embedding/browser/qt/src/prompt.ui
embedding/browser/qt/src/qgeckoembed.cpp
embedding/browser/qt/src/qgeckoembed.h
embedding/browser/qt/src/qgeckoglobals.cpp
embedding/browser/qt/src/qgeckoglobals.h
embedding/browser/qt/src/select.ui
embedding/browser/qt/src/userpass.ui
embedding/browser/qt/tests/Makefile.in
embedding/browser/qt/tests/TestQGeckoEmbed.cpp
embedding/browser/qt/tests/back.png
embedding/browser/qt/tests/fileopen.png
embedding/browser/qt/tests/forward.png
embedding/browser/qt/tests/mainwindow.cpp
embedding/browser/qt/tests/mainwindow.h
embedding/browser/qt/tests/reload.png
embedding/browser/qt/tests/stop.png
embedding/components/build/Makefile.in
embedding/components/printingui/src/Makefile.in
gfx/src/Makefile.in
gfx/src/qt/Makefile.in
gfx/src/qt/nsDeviceContextQt.cpp
gfx/src/qt/nsDeviceContextQt.h
gfx/src/qt/nsDeviceContextSpecQt.cpp
gfx/src/qt/nsDeviceContextSpecQt.h
gfx/src/qt/nsDrawingSurfaceQt.cpp
gfx/src/qt/nsDrawingSurfaceQt.h
gfx/src/qt/nsFontMetricsQt.cpp
gfx/src/qt/nsFontMetricsQt.h
gfx/src/qt/nsGfxFactoryQt.cpp
gfx/src/qt/nsImageQt.cpp
gfx/src/qt/nsImageQt.h
gfx/src/qt/nsRegionQt.cpp
gfx/src/qt/nsRegionQt.h
gfx/src/qt/nsRenderingContextQt.cpp
gfx/src/qt/nsRenderingContextQt.h
gfx/src/qt/nsScreenManagerQt.cpp
gfx/src/qt/nsScreenManagerQt.h
gfx/src/qt/nsScreenQt.cpp
gfx/src/qt/nsScreenQt.h
gfx/src/qt/qtlog.h
layout/build/Makefile.in
modules/plugin/base/src/Makefile.in
modules/plugin/base/src/nsPluginHostImpl.cpp
toolkit/components/remote/Makefile.in
toolkit/library/Makefile.in
toolkit/library/libxul-config.mk
toolkit/library/nsStaticXULComponents.cpp
toolkit/xre/nsAppRunner.cpp
widget/src/Makefile.in
widget/src/os2/nsDeviceContextSpecOS2.cpp
widget/src/qt/Makefile.in
widget/src/qt/mozqwidget.cpp
widget/src/qt/mozqwidget.h
widget/src/qt/nsAppShell.cpp
widget/src/qt/nsAppShell.h
widget/src/qt/nsBidiKeyboard.cpp
widget/src/qt/nsBidiKeyboard.h
widget/src/qt/nsClipboard.cpp
widget/src/qt/nsClipboard.h
widget/src/qt/nsCommonWidget.cpp
widget/src/qt/nsCommonWidget.h
widget/src/qt/nsDragService.cpp
widget/src/qt/nsDragService.h
widget/src/qt/nsEventQueueWatcher.cpp
widget/src/qt/nsEventQueueWatcher.h
widget/src/qt/nsFilePicker.cpp
widget/src/qt/nsFilePicker.h
widget/src/qt/nsIDragSessionQt.h
widget/src/qt/nsLookAndFeel.cpp
widget/src/qt/nsLookAndFeel.h
widget/src/qt/nsMime.cpp
widget/src/qt/nsMime.h
widget/src/qt/nsNativeThemeQt.cpp
widget/src/qt/nsNativeThemeQt.h
widget/src/qt/nsQtEventDispatcher.cpp
widget/src/qt/nsQtEventDispatcher.h
widget/src/qt/nsScreenManagerQt.cpp
widget/src/qt/nsScreenManagerQt.h
widget/src/qt/nsScreenQt.cpp
widget/src/qt/nsScreenQt.h
widget/src/qt/nsScrollbar.cpp
widget/src/qt/nsScrollbar.h
widget/src/qt/nsSound.cpp
widget/src/qt/nsSound.h
widget/src/qt/nsToolkit.cpp
widget/src/qt/nsToolkit.h
widget/src/qt/nsWidgetFactory.cpp
widget/src/qt/nsWindow.cpp
widget/src/qt/nsWindow.h
widget/src/xpwidgets/Makefile.in
xpfe/bootstrap/nsAppRunner.cpp
--- a/allmakefiles.sh
+++ b/allmakefiles.sh
@@ -155,17 +155,16 @@ gfx/idl/Makefile
 gfx/public/Makefile
 gfx/src/Makefile
 gfx/src/beos/Makefile
 gfx/src/gtk/Makefile
 gfx/src/ps/Makefile
 gfx/src/psshared/Makefile
 gfx/src/photon/Makefile
 gfx/src/mac/Makefile
-gfx/src/qt/Makefile
 gfx/src/os2/Makefile
 gfx/src/xlibrgb/Makefile
 gfx/src/windows/Makefile
 gfx/src/thebes/Makefile
 gfx/tests/Makefile
 "
 
 if [ "$MOZ_TREE_CAIRO" ] ; then
@@ -561,17 +560,16 @@ webshell/public/Makefile
 
 MAKEFILES_widget="
 widget/Makefile
 widget/public/Makefile
 widget/src/Makefile
 widget/src/beos/Makefile
 widget/src/build/Makefile
 widget/src/gtkxtbin/Makefile
-widget/src/qt/Makefile
 widget/src/photon/Makefile
 widget/src/mac/Makefile
 widget/src/cocoa/Makefile
 widget/src/os2/Makefile
 widget/src/windows/Makefile
 widget/src/xpwidgets/Makefile
 widget/src/support/Makefile
 "
@@ -760,19 +758,16 @@ embedding/browser/activex/src/Makefile
 embedding/browser/activex/src/control/Makefile
 embedding/browser/activex/src/control_kicker/Makefile
 embedding/browser/build/Makefile
 embedding/browser/chrome/Makefile
 embedding/browser/webBrowser/Makefile
 embedding/browser/gtk/Makefile
 embedding/browser/gtk/src/Makefile
 embedding/browser/gtk/tests/Makefile
-embedding/browser/qt/Makefile
-embedding/browser/qt/src/Makefile
-embedding/browser/qt/tests/Makefile
 embedding/browser/photon/Makefile
 embedding/browser/photon/src/Makefile
 embedding/browser/photon/tests/Makefile
 embedding/browser/cocoa/Makefile
 embedding/components/Makefile
 embedding/components/build/Makefile
 embedding/components/windowwatcher/Makefile
 embedding/components/windowwatcher/public/Makefile
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -452,31 +452,27 @@ MOZ_TOOLKIT_REGISTRY_CFLAGS = \
 	$(TK_CFLAGS)
 
 CAIRO_FT_CFLAGS		= @CAIRO_FT_CFLAGS@
 
 MOZ_ENABLE_CAIRO_GFX	= @MOZ_ENABLE_CAIRO_GFX@
 MOZ_ENABLE_CAIRO_FT	= @MOZ_ENABLE_CAIRO_FT@
 MOZ_ENABLE_GLITZ        = @MOZ_ENABLE_GLITZ@
 MOZ_ENABLE_GTK2		= @MOZ_ENABLE_GTK2@
-MOZ_ENABLE_QT		= @MOZ_ENABLE_QT@
 MOZ_ENABLE_PHOTON	= @MOZ_ENABLE_PHOTON@
 MOZ_ENABLE_COCOA	= @MOZ_ENABLE_COCOA@
 MOZ_ENABLE_XREMOTE	= @MOZ_ENABLE_XREMOTE@
 
 MOZ_GTK2_CFLAGS		= @MOZ_GTK2_CFLAGS@
 MOZ_GTK2_LIBS		= @MOZ_GTK2_LIBS@
 
 MOZ_DBUS_GLIB_CFLAGS    = @MOZ_DBUS_GLIB_CFLAGS@
 MOZ_DBUS_GLIB_LIBS      = @MOZ_DBUS_GLIB_LIBS@
 MOZ_ENABLE_DBUS         = @MOZ_ENABLE_DBUS@
 
-MOZ_QT_CFLAGS		= @MOZ_QT_CFLAGS@
-MOZ_QT_LDFLAGS		= @MOZ_QT_LDFLAGS@
-
 MOZ_XPRINT_CFLAGS	= @MOZ_XPRINT_CFLAGS@
 MOZ_XPRINT_LDFLAGS	= @MOZ_XPRINT_LDFLAGS@
 MOZ_ENABLE_XPRINT	= @MOZ_ENABLE_XPRINT@
 
 MOZ_ENABLE_FREETYPE2   = @MOZ_ENABLE_FREETYPE2@
 FT2_CFLAGS             = @FT2_CFLAGS@
 FT2_LIBS               = @FT2_LIBS@
 
@@ -535,19 +531,16 @@ HAVE_XIE=@HAVE_XIE@
 
 MOZ_MOVEMAIL=@MOZ_MOVEMAIL@
 MOZ_PSM=@MOZ_PSM@
 
 # Gssapi (krb5) libraries and headers for the Negotiate auth method
 GSSAPI_INCLUDES = @GSSAPI_INCLUDES@
 USE_GSSAPI	= @USE_GSSAPI@
 
-# for Qt build
-MOC=@MOC@
-
 MOZILLA_OFFICIAL = @MOZILLA_OFFICIAL@
 BUILD_OFFICIAL = @BUILD_OFFICIAL@
 MOZ_MILESTONE_RELEASE = @MOZ_MILESTONE_RELEASE@
 
 # Win32 options
 MOZ_PROFILE	= @MOZ_PROFILE@
 MOZ_BROWSE_INFO	= @MOZ_BROWSE_INFO@
 MOZ_TOOLS_DIR	= @MOZ_TOOLS_DIR@
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -298,20 +298,16 @@ ALL_TRASH = \
 	$(SHARED_LIBRARY:$(DLL_SUFFIX)=.exp) $(wildcard *.ilk) \
 	$(PROGRAM:$(BIN_SUFFIX)=.exp) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.exp) \
 	$(PROGRAM:$(BIN_SUFFIX)=.lib) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.lib) \
 	$(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.$(OBJ_SUFFIX)) \
 	$(wildcard gts_tmp_*) $(LIBRARY:%.a=.%.timestamp)
 ALL_TRASH_DIRS = \
 	$(GARBAGE_DIRS) /no-such-file
 
-ifdef QTDIR
-GARBAGE			+= $(MOCSRCS)
-endif
-
 ifdef SIMPLE_PROGRAMS
 GARBAGE			+= $(SIMPLE_PROGRAMS:%=%.$(OBJ_SUFFIX))
 endif
 
 ifdef HOST_SIMPLE_PROGRAMS
 GARBAGE			+= $(HOST_SIMPLE_PROGRAMS:%=%.$(OBJ_SUFFIX))
 endif
 
--- a/config/system-headers
+++ b/config/system-headers
@@ -554,72 +554,21 @@ process.h
 Process.h
 proto/dos.h
 proto/exec.h
 psap.h
 Pt.h
 pthread.h
 pwd.h
 Python.h
-qaction.h
-qapplication.h
-qcheckbox.h
-qclipboard.h
-qcolor.h
-qcombobox.h
-qcstring.h
-qcursor.h
-qdesktopwidget.h
-qdir.h
 QDOffscreen.h
-qdragobject.h
-qevent.h
-qeventloop.h
-qfiledialog.h
-qfile.h
-qfontdatabase.h
-qfont.h
-qfontmetrics.h
-qhbox.h
-qimage.h
-qintdict.h
-qlabel.h
-qlayout.h
-qlineedit.h
-qmainwindow.h
-qmenubar.h
-qmessagebox.h
-qmetaobject.h
-qmime.h
-qobject.h
-qpaintdevicemetrics.h
-qpainter.h
-qpalette.h
-qpixmap.h
-qpopupmenu.h
-qpushbutton.h
-qregion.h
-qscrollbar.h
-qshared.h
-qsocketnotifier.h
-qstatusbar.h
-qstring.h
-qstringlist.h
-qstyle.h
-qtoolbar.h
-qtooltip.h
 Quickdraw.h
 QuickDraw.h
 QuickTimeComponents.h
 quipu/attr.h
-qvbox.h
-qwidget.h
-qwidgetlist.h
-qwidgetplugin.h
-qwindowdefs.h
 rasdlg.h
 raserror.h
 ras.h
 regex.h
 Region.h
 resolv.h
 Resources.h
 Retrace.h
--- a/configure.in
+++ b/configure.in
@@ -106,21 +106,18 @@ MOZJPEG=62
 MOZPNG=10207
 MOZZLIB=0x1230
 NSPR_VERSION=4
 NSS_VERSION=3
 
 dnl Set the minimum version of toolkit libs used by mozilla
 dnl ========================================================
 GLIB_VERSION=1.2.0
-GTK_VERSION=1.2.0
 LIBIDL_VERSION=0.6.3
 PERL_VERSION=5.006
-QT_VERSION=3.2.0
-QT_VERSION_NUM=320
 LIBART_VERSION=2.3.4
 CAIRO_VERSION=1.4.2
 GLITZ_VERSION=0.4.0
 GTK2_VERSION=1.3.7
 MAKE_VERSION=3.78
 WINDRES_VERSION=2.14.90
 W32API_VERSION=3.8
 GNOMEVFS_VERSION=2.0
@@ -4427,54 +4424,42 @@ MOZ_ARG_HEADER(Toolkit Options)
                             Neutrino/QNX - photon
                             OS/2 - cairo-os2
                             Win32 - cairo-windows
                             WinCE - windows
                             * - cairo-gtk2],
     [ _DEFAULT_TOOLKIT=$enableval ],
     [ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT])
 
-    if test "$_DEFAULT_TOOLKIT" = "qt" \
-        -o "$_DEFAULT_TOOLKIT" = "photon" \
+    if test "$_DEFAULT_TOOLKIT" = "photon" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-windows" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-beos" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-os2" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-mac" \
         -o "$_DEFAULT_TOOLKIT" = "cairo-cocoa"
     then
         dnl nglayout only supports building with one toolkit,
         dnl so ignore everything after the first comma (",").
         MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"`
     else
         if test "$no_x" != "yes"; then
-            AC_MSG_ERROR([Toolkit must be cairo-gtk2 or qt.])
+            AC_MSG_ERROR([Toolkit must be cairo-gtk2.])
         else
             AC_MSG_ERROR([Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT (if supported).])
         fi
     fi
 
 AC_DEFINE_UNQUOTED(MOZ_DEFAULT_TOOLKIT,"$MOZ_WIDGET_TOOLKIT")
 
 dnl ========================================================
 dnl = Enable the toolkit as needed                         =
 dnl ========================================================
 
 case "$MOZ_WIDGET_TOOLKIT" in
-qt)
-    MOZ_ENABLE_QT=1
-    if test "$_HAVE_FREETYPE2"; then
-        MOZ_ENABLE_FREETYPE2=1
-    fi
-    MOZ_ENABLE_XPRINT=1
-    TK_CFLAGS='$(MOZ_QT_CFLAGS)'
-    TK_LIBS='$(MOZ_QT_LDFLAGS)'
-    AC_DEFINE(MOZ_WIDGET_QT)
-    ;;
-
 photon)
 	MOZ_ENABLE_PHOTON=1
 	AC_DEFINE(MOZ_WIDGET_PHOTON)
     ;;
 
 cairo-windows)
     MOZ_WIDGET_TOOLKIT=windows
     MOZ_GFX_TOOLKIT=cairo
@@ -4532,85 +4517,16 @@ if test "$MOZ_ENABLE_XREMOTE"; then
     AC_DEFINE(MOZ_ENABLE_XREMOTE)
 fi
 
 if test "$COMPILE_ENVIRONMENT"; then
 if test "$MOZ_ENABLE_GTK2"
 then
     PKG_CHECK_MODULES(MOZ_GTK2, gtk+-2.0 >= 1.3.7 gdk-x11-2.0 glib-2.0 gobject-2.0)
 fi
-
-if test "$MOZ_ENABLE_QT"
-then
-    MOZ_ARG_WITH_STRING(qtdir,
-    [  --with-qtdir=\$dir       Specify Qt directory ],
-    [ QTDIR=$withval])
-
-    if test -z "$QTDIR"; then
-      QTDIR="/usr"
-    fi
-    QTINCDIR="/include/qt"
-    if test ! -d "$QTDIR$QTINCDIR"; then
-       QTINCDIR="/include/X11/qt"
-    fi
-    if test ! -d "$QTDIR$QTINCDIR"; then
-       QTINCDIR="/include"
-    fi
-
-    if test -x "$QTDIR/bin/moc"; then
-      HOST_MOC="$QTDIR/bin/moc"
-    else
-      AC_CHECK_PROGS(HOST_MOC, moc, "")
-    fi
-    if test -z "$HOST_MOC"; then
-      AC_MSG_ERROR([no acceptable moc preprocessor found])
-    fi
-    MOC=$HOST_MOC
-
-    QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR -DQT_NO_STL"
-    if test -z "$MOZ_DEBUG"; then
-      QT_CFLAGS="$QT_CFLAGS -DQT_NO_DEBUG -DNO_DEBUG"
-    fi
-    _SAVE_LDFLAGS=$LDFLAGS
-    QT_LDFLAGS=-L${QTDIR}/lib
-    LDFLAGS="$LDFLAGS $QT_LDFLAGS"
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    AC_CHECK_LIB(qt, main, QT_LIB=-lqt,
-        AC_CHECK_LIB(qt-mt, main, QT_LIB=-lqt-mt,
-            AC_MSG_ERROR([Cannot find QT libraries.])))
-    LDFLAGS=$_SAVE_LDFLAGS
-    QT_LIBS="-L/usr/X11R6/lib $QT_LDFLAGS $QT_LIB -lXext -lX11"
-
-    MOZ_QT_LDFLAGS=$QT_LIBS
-    MOZ_QT_CFLAGS=$QT_CFLAGS
-
-    _SAVE_CXXFLAGS=$CXXFLAGS
-    _SAVE_LIBS=$LIBS
-
-    CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
-    LIBS="$LIBS $QT_LIBS"
-    
-    AC_MSG_CHECKING(Qt - version >= $QT_VERSION)
-    AC_TRY_COMPILE([#include <qglobal.h>],
-    [
-        #if (QT_VERSION < $QT_VERSION_NUM)
-            #error  "QT_VERSION too old"
-        #endif
-    ],result="yes",result="no")
-
-    AC_MSG_RESULT("$result")
-    if test "$result" = "no"; then
-        AC_MSG_ERROR([Qt Mozilla requires at least version $QT_VERSION of Qt])
-    fi
-    CXXFLAGS=$_SAVE_CXXFLAGS
-    LIBS=$_SAVE_LIBS
-
-    AC_LANG_RESTORE
-fi
 fi # COMPILE_ENVIRONMENT
 
 AC_SUBST(MOZ_DEFAULT_TOOLKIT)
 
 dnl ========================================================
 dnl = startup-notification support module
 dnl ========================================================
 
@@ -4645,37 +4561,33 @@ AC_SUBST(MOZ_ENABLE_STARTUP_NOTIFICATION
 AC_SUBST(MOZ_STARTUP_NOTIFICATION_CFLAGS)
 AC_SUBST(MOZ_STARTUP_NOTIFICATION_LIBS)
 
 AC_SUBST(GTK_CONFIG)
 AC_SUBST(TK_CFLAGS)
 AC_SUBST(TK_LIBS)
 
 AC_SUBST(MOZ_ENABLE_GTK2)
-AC_SUBST(MOZ_ENABLE_QT)
 AC_SUBST(MOZ_ENABLE_PHOTON)
 AC_SUBST(MOZ_ENABLE_COCOA)
 AC_SUBST(MOZ_ENABLE_CAIRO_GFX)
 AC_SUBST(MOZ_ENABLE_GLITZ)
 AC_SUBST(MOZ_ENABLE_XREMOTE)
 AC_SUBST(MOZ_GTK2_CFLAGS)
 AC_SUBST(MOZ_GTK2_LIBS)
-AC_SUBST(MOZ_QT_CFLAGS)
-AC_SUBST(MOZ_QT_LDFLAGS)
 
 AC_SUBST(MOC)
 
 if test "$MOZ_ENABLE_CAIRO_GFX"
 then
     AC_DEFINE(MOZ_THEBES)
     AC_DEFINE(MOZ_CAIRO_GFX)
 fi
 
-if test "$MOZ_ENABLE_QT" \
-|| test "$MOZ_ENABLE_GTK2"
+if test "$MOZ_ENABLE_GTK2"
 then
     AC_DEFINE(MOZ_X11)
     MOZ_X11=1
 fi
 AC_SUBST(MOZ_X11)
 
 dnl ========================================================
 dnl =
deleted file mode 100644
--- a/embedding/browser/qt/Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= qgeckoembed
-DIRS=src plugin tests
-
-PACKAGE_FILE = qgeckoembed.pkg
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/embedding/browser/qt/plugin/Makefile.in
+++ /dev/null
@@ -1,32 +0,0 @@
-DEPTH		= ../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= qgeckoembed
-LIBRARY_NAME	= qgeckoplugin
-REQUIRES	= qgeckoembed \
-		  $(NULL)
-
-CPPSRCS		= \
-		plugin.cpp \
-		$(NULL)
-
-# Include config.mk 
-include $(topsrcdir)/config/config.mk
-
-#don't link with qgeckoembed and mozilla
-EXTRA_DSO_LDOPTS += \
-		    $(MOZ_QT_LDFLAGS) \
-		    $(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
-CXXFLAGS        += $(MOZ_QT_CFLAGS)
-CFLAGS          += $(MOZ_QT_CFLAGS)
-
-#FIXME this should come from configure ?
-CXXFLAGS        += -DQT_THREAD_SUPPORT
-CFLAGS        += -DQT_THREAD_SUPPORT
deleted file mode 100644
--- a/embedding/browser/qt/plugin/plugin.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Lixto GmbH.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Michal Ceresna <ceresna@amos.sturak.sk>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-#include <dlfcn.h>
-
-#include <qdir.h>
-#include <qlabel.h>
-
-#include "qgeckoembed.h"
-#include "plugin.h"
-#include "plugin.xpm"
-
-QGeckoPlugin::QGeckoPlugin()
-{
-}
-
-QStringList QGeckoPlugin::keys() const
-{
-    QStringList list;
-    list << "QGeckoEmbed";
-    return list;
-}
-
-QWidget* QGeckoPlugin::create(const QString& key,
-                              QWidget* parent,
-                              const char* name)
-{
-    if (key=="QGeckoEmbed") {
-        //nicer would be to use the QLibrary, but it uses only
-        //the RTLD_LAZY flag and we need the RTLD_GLOBAL
-        //to successfully load the rest of mozilla libs
-        void *handle1 = dlopen("libxpcom.so", RTLD_NOW|RTLD_GLOBAL);
-        void *handle2 = dlopen("libqgeckoembed.so", RTLD_NOW|RTLD_GLOBAL);
-        if (!handle1 || !handle2) {
-            QLabel *l = new QLabel(parent, name);
-            l->setText("<html><body>"
-                       "Unable to initialize Mozilla.<br>"
-                       "Try to set <b>MOZILLA_FIVE_HOME</b> and "
-#ifdef Q_WS_WIN
-                       "<b>PATH</b>"
-#else
-                       "<b>LD_LIBRARY_PATH</b>"
-#endif
-                       " variables before starting the Qt Designer."
-                       "</body></html>");
-            return l;
-        }
-        else {
-            //this is a workaround for mozilla bug:
-            //call to NS_InitEmbedding works only once
-            static bool initialized = FALSE;
-            if (!initialized) {
-                QGeckoEmbed::
-                initialize(QDir::
-                           convertSeparators(QDir::home().absPath()+
-                                             "/.qgeckoembed-qtdesigner"),
-                           "QtDesigner");
-                //QGeckoGlobals::pushStartup()
-                static QGeckoEmbed *sentinel;
-                sentinel = new QGeckoEmbed(NULL, "sentinel");
-                initialized = TRUE;
-            }
-            QGeckoEmbed *me = new QGeckoEmbed(parent, name);
-            me->loadURL("about:");
-            return me;
-        }
-    }
-    else {
-        return NULL;
-    }
-
-}
-
-QString QGeckoPlugin::includeFile(const QString& key) const
-{
-    return
-        key=="QGeckoEmbed"?
-        "qgeckoembed.h":
-        QString::null;
-}
-
-QString QGeckoPlugin::group(const QString& key) const
-{
-    return
-        key=="QGeckoEmbed"?
-        "Display (Mozilla)":
-        QString::null;
-}
-
-QIconSet QGeckoPlugin::iconSet(const QString&) const
-{
-    return QIconSet(QPixmap(mozilla_pixmap));
-}
-
-QString QGeckoPlugin::toolTip(const QString& key) const
-{
-    return
-        key=="QGeckoEmbed"?
-        "Mozilla Browser Control":
-        QString::null;
-}
-
-QString QGeckoPlugin::whatsThis(const QString& key) const
-{
-    return
-        key=="QGeckoEmbed"?
-        "A widget with Mozilla Web Browser":
-        QString::null;
-}
-
-
-bool QGeckoPlugin::isContainer(const QString&) const
-{
-    return FALSE;
-}
-
-Q_EXPORT_PLUGIN(QGeckoPlugin)
-
deleted file mode 100644
--- a/embedding/browser/qt/plugin/plugin.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Lixto GmbH.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Michal Ceresna <ceresna@amos.sturak.sk>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-#ifndef qgeckoplugin_h
-#define qgeckoplugin_h
-
-#include <qwidgetplugin.h>
-
-/**
- * Implements an interface for
- * the Qt-Designer plugin
- */
-class QGeckoPlugin : public QWidgetPlugin
-{
-public:
-
-    QGeckoPlugin();
-
-    QStringList keys() const;
-    QWidget* create(const QString& key,
-                    QWidget* parent = 0,
-                    const char* name = 0);
-    QString group(const QString& key) const;
-    QIconSet iconSet(const QString& key) const;
-    QString includeFile(const QString& key) const;
-    QString toolTip(const QString& key) const;
-    QString whatsThis(const QString& key) const;
-    bool isContainer(const QString&) const;
-
-};
-
-#endif /* qgeckoplugin_h */
deleted file mode 100644
--- a/embedding/browser/qt/plugin/plugin.xpm
+++ /dev/null
@@ -1,393 +0,0 @@
-/* XPM */
-static const char *mozilla_pixmap[] = {
-"22 21 368 2",
-"  	c None",
-". 	c #FDFDFD",
-"+ 	c #FF0A0A",
-"@ 	c #FF2121",
-"# 	c #FF3737",
-"$ 	c #FF3939",
-"% 	c #FF3434",
-"& 	c #FF2E2F",
-"* 	c #FE302D",
-"= 	c #FB3A2B",
-"- 	c #F84628",
-"; 	c #F64A26",
-"> 	c #F74723",
-", 	c #F83E21",
-"' 	c #FC2A1E",
-") 	c #FF1B1C",
-"! 	c #FF171A",
-"~ 	c #FF1919",
-"{ 	c #FF1818",
-"] 	c #FE0303",
-"^ 	c #FB0000",
-"/ 	c #EEEEEE",
-"( 	c #F8F8F8",
-"_ 	c #FAFAFA",
-": 	c #FF1F1F",
-"< 	c #FF8F8F",
-"[ 	c #FFC0C0",
-"} 	c #FFC1C2",
-"| 	c #FFBABE",
-"1 	c #FBC3B6",
-"2 	c #F7CFAF",
-"3 	c #F2D6A3",
-"4 	c #EFDA97",
-"5 	c #EDD98D",
-"6 	c #ECD582",
-"7 	c #ECCD7B",
-"8 	c #EFBB73",
-"9 	c #F49B6D",
-"0 	c #FD6A69",
-"a 	c #FF626D",
-"b 	c #FF4043",
-"c 	c #F90404",
-"d 	c #E90000",
-"e 	c #D9D9D9",
-"f 	c #F7F7F7",
-"g 	c #FF3535",
-"h 	c #FFC2C2",
-"i 	c #FFEBEC",
-"j 	c #FEEDED",
-"k 	c #FBF5E9",
-"l 	c #F8F1D6",
-"m 	c #F6E6C6",
-"n 	c #F8E0B5",
-"o 	c #F7DDA5",
-"p 	c #F7DA9A",
-"q 	c #F7D590",
-"r 	c #ECCC89",
-"s 	c #EFCB82",
-"t 	c #F6D67E",
-"u 	c #F1E186",
-"v 	c #F57C4A",
-"w 	c #FD0B07",
-"x 	c #F10000",
-"y 	c #CE0000",
-"z 	c #C5C5C5",
-"A 	c #E4E4E4",
-"B 	c #F4F4F4",
-"C 	c #FFBFC0",
-"D 	c #FFEBEA",
-"E 	c #FBF3E9",
-"F 	c #F9EED9",
-"G 	c #F6E1BF",
-"H 	c #FADEAF",
-"I 	c #ECD2A0",
-"J 	c #B6AA91",
-"K 	c #B1AB87",
-"L 	c #92917E",
-"M 	c #A38277",
-"N 	c #9A7B70",
-"O 	c #9D8F74",
-"P 	c #E9BF69",
-"Q 	c #F0A905",
-"R 	c #EF5F00",
-"S 	c #F40800",
-"T 	c #D50000",
-"U 	c #B8B8B8",
-"V 	c #DDDDDD",
-"W 	c #F3F3F3",
-"X 	c #FF2F30",
-"Y 	c #FEBABB",
-"Z 	c #FBF3E5",
-"` 	c #FAEDD7",
-" .	c #F7E3C1",
-"..	c #F8DBA8",
-"+.	c #FADA99",
-"@.	c #A49C8A",
-"#.	c #8F7A7F",
-"$.	c #AB7A75",
-"%.	c #D27C6D",
-"&.	c #D27967",
-"*.	c #C07365",
-"=.	c #C26A60",
-"-.	c #331E19",
-";.	c #CA8401",
-">.	c #EDB704",
-",.	c #F14F01",
-"'.	c #E30000",
-").	c #B4B4B4",
-"!.	c #DADADA",
-"~.	c #F2F2F2",
-"{.	c #FF2C2D",
-"].	c #FBC6B7",
-"^.	c #F9F0D6",
-"/.	c #FAE5C1",
-"(.	c #FBE2AD",
-"_.	c #F0D997",
-":.	c #B4B088",
-"<.	c #8A7F7B",
-"[.	c #867D7C",
-"}.	c #B37166",
-"|.	c #A16A5F",
-"1.	c #CE6D5A",
-"2.	c #87635C",
-"3.	c #F54932",
-"4.	c #430500",
-"5.	c #140D00",
-"6.	c #836402",
-"7.	c #EAA904",
-"8.	c #E60B00",
-"9.	c #B2B2B2",
-"0.	c #FC332A",
-"a.	c #F4D5AD",
-"b.	c #F8E8C1",
-"c.	c #EAD7AC",
-"d.	c #C2B59A",
-"e.	c #AF8984",
-"f.	c #D88377",
-"g.	c #EF7E68",
-"h.	c #CA6F5F",
-"i.	c #DB6B56",
-"j.	c #AF6050",
-"k.	c #92594D",
-"l.	c #E25C43",
-"m.	c #F72D05",
-"n.	c #6D1100",
-"o.	c #0A0700",
-"p.	c #503901",
-"q.	c #C29603",
-"r.	c #DD4702",
-"s.	c #FA3D27",
-"t.	c #F0DDA1",
-"u.	c #FAE1B3",
-"v.	c #BEBA9F",
-"w.	c #B78C8D",
-"x.	c #FF8E77",
-"y.	c #FF8569",
-"z.	c #DF765E",
-"A.	c #735A54",
-"B.	c #B25D4C",
-"C.	c #FC6345",
-"D.	c #FF6645",
-"E.	c #B9402B",
-"F.	c #D21D00",
-"G.	c #CA2600",
-"H.	c #150100",
-"I.	c #442901",
-"J.	c #A77803",
-"K.	c #DD6203",
-"L.	c #F84225",
-"M.	c #EEDF95",
-"N.	c #F7DAA5",
-"O.	c #C7AC92",
-"P.	c #D48B81",
-"Q.	c #E3836B",
-"R.	c #B87467",
-"S.	c #575C5E",
-"T.	c #2D4549",
-"U.	c #4E4341",
-"V.	c #FE5C3C",
-"W.	c #FC623F",
-"X.	c #49170E",
-"Y.	c #BB1F00",
-"Z.	c #FB3400",
-"`.	c #060000",
-" +	c #3D2100",
-".+	c #AF7703",
-"++	c #DE7103",
-"@+	c #F84022",
-"#+	c #EDDA8B",
-"$+	c #F6D799",
-"%+	c #C2B088",
-"&+	c #7B7782",
-"*+	c #697278",
-"=+	c #7C6968",
-"-+	c #9D5850",
-";+	c #CE5640",
-">+	c #E65C39",
-",+	c #E65635",
-"'+	c #D1452C",
-")+	c #731305",
-"!+	c #E32800",
-"~+	c #9A1A00",
-"{+	c #100A00",
-"]+	c #653C02",
-"^+	c #D49804",
-"/+	c #DC6E03",
-"(+	c #FA3520",
-"_+	c #EECD82",
-":+	c #F3D391",
-"<+	c #EEC87F",
-"[+	c #B7A371",
-"}+	c #805F5C",
-"|+	c #925950",
-"1+	c #685C46",
-"2+	c #564D3A",
-"3+	c #362D32",
-"4+	c #603531",
-"5+	c #ED3B18",
-"6+	c #EF2701",
-"7+	c #FC2D00",
-"8+	c #490D00",
-"9+	c #1E0E01",
-"0+	c #B07405",
-"a+	c #EFBA07",
-"b+	c #DA5A04",
-"c+	c #FD241E",
-"d+	c #F2B47C",
-"e+	c #F0D28B",
-"f+	c #F4CB7B",
-"g+	c #F9CE6C",
-"h+	c #DFB95B",
-"i+	c #E0B950",
-"j+	c #F9C845",
-"k+	c #F1C83B",
-"l+	c #877C33",
-"m+	c #6F2426",
-"n+	c #EC2403",
-"o+	c #FD2900",
-"p+	c #EB2700",
-"q+	c #4A0B00",
-"r+	c #382402",
-"s+	c #E5AF08",
-"t+	c #F1CA09",
-"u+	c #DC3302",
-"v+	c #FF1A1D",
-"w+	c #F98C76",
-"x+	c #F0D286",
-"y+	c #EFC776",
-"z+	c #EFC369",
-"A+	c #F1C159",
-"B+	c #F1BF4D",
-"C+	c #EFBC42",
-"D+	c #F5C43C",
-"E+	c #F5C830",
-"F+	c #2C090B",
-"G+	c #B11700",
-"H+	c #FD2A00",
-"I+	c #FB2A00",
-"J+	c #CD2100",
-"K+	c #0D0700",
-"L+	c #715704",
-"M+	c #E8A808",
-"N+	c #ED0400",
-"O+	c #FF1A1B",
-"P+	c #FF6670",
-"Q+	c #F4B481",
-"R+	c #EECF73",
-"S+	c #EEC365",
-"T+	c #EEBE57",
-"U+	c #EFBD4E",
-"V+	c #EFBD46",
-"W+	c #EFBA32",
-"X+	c #FBC909",
-"Y+	c #261600",
-"Z+	c #8E1100",
-"`+	c #F42900",
-" @	c #FF2900",
-".@	c #FF2E00",
-"+@	c #5A0E00",
-"@@	c #000000",
-"#@	c #740500",
-"$@	c #FF0000",
-"%@	c #FF1A1A",
-"&@	c #FF696D",
-"*@	c #FE7B7E",
-"=@	c #F5A870",
-"-@	c #EECB66",
-";@	c #EEC359",
-">@	c #EEBE4F",
-",@	c #ECB52D",
-"'@	c #EDAF0B",
-")@	c #FBCC06",
-"!@	c #0D1401",
-"~@	c #440900",
-"{@	c #E32600",
-"]@	c #E92A00",
-"^@	c #541000",
-"/@	c #250100",
-"(@	c #DC0300",
-"_@	c #FF6A6A",
-":@	c #FF7D80",
-"<@	c #FE7378",
-"[@	c #F78D67",
-"}@	c #EEBA4D",
-"|@	c #ECBE24",
-"1@	c #F0B403",
-"2@	c #D8A604",
-"3@	c #D3B608",
-"4@	c #110B00",
-"5@	c #370800",
-"6@	c #AB1D00",
-"7@	c #FC2A00",
-"8@	c #FF2C00",
-"9@	c #AF2100",
-"0@	c #350900",
-"a@	c #420000",
-"b@	c #FF1717",
-"c@	c #FE6C6C",
-"d@	c #FE3F3F",
-"e@	c #FE3639",
-"f@	c #FE1A22",
-"g@	c #FA2409",
-"h@	c #F94700",
-"i@	c #B65D01",
-"j@	c #4B2201",
-"k@	c #692202",
-"l@	c #A81500",
-"m@	c #4C0B00",
-"n@	c #D92400",
-"o@	c #E42800",
-"p@	c #D12200",
-"q@	c #FE2B00",
-"r@	c #E12600",
-"s@	c #580E00",
-"t@	c #3F0A00",
-"u@	c #E00000",
-"v@	c #CC0000",
-"w@	c #CB0000",
-"x@	c #D20000",
-"y@	c #D70000",
-"z@	c #DC0000",
-"A@	c #260600",
-"B@	c #770400",
-"C@	c #0F0000",
-"D@	c #320800",
-"E@	c #DB2500",
-"F@	c #CF2100",
-"G@	c #DA2200",
-"H@	c #C32200",
-"I@	c #6A0E00",
-"J@	c #FE0000",
-"K@	c #B30000",
-"L@	c #B10000",
-"M@	c #B40000",
-"N@	c #B70000",
-"O@	c #A30100",
-"P@	c #020100",
-"Q@	c #690100",
-"R@	c #370000",
-"S@	c #4B0C00",
-"T@	c #BC1E00",
-"U@	c #BB1D00",
-"V@	c #771200",
-"W@	c #330900",
-"X@	c #821400",
-"Y@	c #B11500",
-"Z@	c #C90C00",
-"`@	c #FFFFFF",
-". + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / ( ",
-"_ : < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e / ",
-"f g h i j k l m n o p q r s t u v w x y z A ",
-"B % C D E F G H I J K L M N O P Q R S T U V ",
-"W X Y Z `  ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.",
-"~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.e ",
-"~.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.9.e ",
-"~.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K.9.e ",
-"~.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++9.e ",
-"~.@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+9.e ",
-"~.(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+9.e ",
-"~.c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+9.e ",
-"~.v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+9.e ",
-"~.O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@9.e ",
-"~.%@&@*@=@-@;@>@,@'@)@!@~@{@ @ @]@^@/@(@9.e ",
-"~.{ _@:@<@[@}@|@1@2@3@4@5@6@7@o+8@9@0@a@9.e ",
-"W b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@).!.",
-"B ^ u@v@w@x@y@z@y@A@B@C@D@E@F@D@p@G@H@I@U V ",
-"f J@T K@L@M@N@N@O@P@Q@R@S@T@U@V@W@X@Y@Z@z A ",
-"_ / e z U ).9.9.9.9.9.9.9.9.9.9.9.).U z e / ",
-". ( / A V !.e e e e e e e e e e e !.V A / ( ",
-"`@. _ f B W ~.~.~.~.~.~.~.~.~.~.~.W B f _ . "};
deleted file mode 100644
--- a/embedding/browser/qt/qgeckoembed.pkg
+++ /dev/null
@@ -1,3 +0,0 @@
-[qeckoembed]
-dist/bin/@DLLP@qeckoembed@DLLS@
-dist/bin/TestQeckoEmbed
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedContentListener.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include <strings.h>
-#include <nsXPIDLString.h>
-
-#include "nsIURI.h"
-
-#include "EmbedContentListener.h"
-#include "qgeckoembed.h"
-
-#include "nsServiceManagerUtils.h"
-#include "nsIWebNavigationInfo.h"
-#include "nsDocShellCID.h"
-
-EmbedContentListener::EmbedContentListener(QGeckoEmbed *aOwner)
-{
-    mOwner = aOwner;
-}
-
-EmbedContentListener::~EmbedContentListener()
-{
-}
-
-NS_IMPL_ISUPPORTS2(EmbedContentListener,
-                   nsIURIContentListener,
-                   nsISupportsWeakReference)
-
-NS_IMETHODIMP
-EmbedContentListener::OnStartURIOpen(nsIURI     *aURI,
-                                     PRBool     *aAbortOpen)
-{
-    nsresult rv;
-
-    nsCAutoString specString;
-    rv = aURI->GetSpec(specString);
-
-    if (NS_FAILED(rv))
-        return rv;
-
-    //we stop loading here because we want to pass the
-    //control to kio to check for mimetypes and all the other jazz
-    bool abort = false;
-    mOwner->startURIOpen(specString.get(), abort);
-    *aAbortOpen = abort;
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedContentListener::DoContent(const char         *aContentType,
-                                PRBool             aIsContentPreferred,
-                                nsIRequest         *aRequest,
-                                nsIStreamListener **aContentHandler,
-                                PRBool             *aAbortProcess)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-EmbedContentListener::IsPreferred(const char        *aContentType,
-                                  char             **aDesiredContentType,
-                                  PRBool            *aCanHandleContent)
-{
-    return CanHandleContent(aContentType, PR_TRUE, aDesiredContentType,
-                            aCanHandleContent);
-}
-
-NS_IMETHODIMP
-EmbedContentListener::CanHandleContent(const char        *aContentType,
-                                       PRBool           aIsContentPreferred,
-                                       char             **aDesiredContentType,
-                                       PRBool            *_retval)
-{
-    *_retval = PR_FALSE;
-    *aDesiredContentType = nsnull;
-    qDebug("HANDLING:");
-
-    if (aContentType) {
-        nsCOMPtr<nsIWebNavigationInfo> webNavInfo(
-           do_GetService(NS_WEBNAVIGATION_INFO_CONTRACTID));
-        if (webNavInfo) {
-            PRUint32 canHandle;
-            nsresult rv =
-                webNavInfo->IsTypeSupported(nsDependentCString(aContentType),
-                                            mOwner ?
-                                              mOwner->d->navigation.get() :
-                                              nsnull,
-                                            &canHandle);
-            NS_ENSURE_SUCCESS(rv, rv);
-            *_retval = (canHandle != nsIWebNavigationInfo::UNSUPPORTED);
-        }
-    }
-
-    qDebug("\tCan handle content %s: %d", aContentType, *_retval);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedContentListener::GetLoadCookie(nsISupports **aLoadCookie)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-EmbedContentListener::SetLoadCookie(nsISupports *aLoadCookie)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-EmbedContentListener::GetParentContentListener(nsIURIContentListener **aParent)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-EmbedContentListener::SetParentContentListener(nsIURIContentListener *aParent)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedContentListener.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef EMBEDCONTENTLISTENER_H
-#define EMBEDCONTENTLISTENER_H
-
-#include <nsIURIContentListener.h>
-#include <nsWeakReference.h>
-
-class QGeckoEmbed;
-
-class EmbedContentListener : public nsIURIContentListener,
-                             public nsSupportsWeakReference
-{
-public:
-
-    EmbedContentListener(QGeckoEmbed *aOwner);
-    ~EmbedContentListener();
-
-    NS_DECL_ISUPPORTS
-
-    NS_DECL_NSIURICONTENTLISTENER
-
-private:
-    QGeckoEmbed *mOwner;
-};
-
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedEventListener.cpp
+++ /dev/null
@@ -1,271 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include "EmbedEventListener.h"
-
-#include <nsCOMPtr.h>
-#include <nsIDOMMouseEvent.h>
-
-#include "nsIDOMKeyEvent.h"
-#include "nsIDOMUIEvent.h"
-
-#include "EmbedEventListener.h"
-#include "qgeckoembed.h"
-
-EmbedEventListener::EmbedEventListener(QGeckoEmbed *aOwner)
-{
-    mOwner = aOwner;
-}
-
-EmbedEventListener::~EmbedEventListener()
-{
-
-}
-
-NS_IMPL_ADDREF(EmbedEventListener)
-NS_IMPL_RELEASE(EmbedEventListener)
-NS_INTERFACE_MAP_BEGIN(EmbedEventListener)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMKeyListener)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMKeyListener)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMMouseListener)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMUIListener)
-NS_INTERFACE_MAP_END
-
-NS_IMETHODIMP
-EmbedEventListener::HandleEvent(nsIDOMEvent* aEvent)
-{
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::KeyDown(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMKeyEvent> keyEvent;
-    keyEvent = do_QueryInterface(aDOMEvent);
-    if (!keyEvent)
-        return NS_OK;
-
-    // Return FALSE to this function to mark the event as not
-    // consumed ?
-    bool returnVal = mOwner->domKeyDownEvent(keyEvent);
-
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::KeyUp(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMKeyEvent> keyEvent;
-    keyEvent = do_QueryInterface(aDOMEvent);
-    if (!keyEvent)
-        return NS_OK;
-    // return FALSE to this function to mark this event as not
-    // consumed...
-
-    bool returnVal = mOwner->domKeyUpEvent(keyEvent);
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::KeyPress(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMKeyEvent> keyEvent;
-    keyEvent = do_QueryInterface(aDOMEvent);
-    if (!keyEvent)
-        return NS_OK;
-
-    // return FALSE to this function to mark this event as not
-    // consumed...
-    bool returnVal = mOwner->domKeyPressEvent(keyEvent);
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::MouseDown(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
-    mouseEvent = do_QueryInterface(aDOMEvent);
-    if (!mouseEvent)
-        return NS_OK;
-    // return FALSE to this function to mark this event as not
-    // consumed...
-
-    bool returnVal = mOwner->domMouseDownEvent(mouseEvent);
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::MouseUp(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
-    mouseEvent = do_QueryInterface(aDOMEvent);
-    if (!mouseEvent)
-        return NS_OK;
-    // Return FALSE to this function to mark the event as not
-    // consumed...
-
-    bool returnVal = mOwner->domMouseUpEvent(mouseEvent);
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::MouseClick(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
-    mouseEvent = do_QueryInterface(aDOMEvent);
-    if (!mouseEvent)
-        return NS_OK;
-    // Return FALSE to this function to mark the event as not
-    // consumed...
-    bool returnVal = mOwner->domMouseClickEvent(mouseEvent);
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::MouseDblClick(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
-    mouseEvent = do_QueryInterface(aDOMEvent);
-    if (!mouseEvent)
-        return NS_OK;
-    // return FALSE to this function to mark this event as not
-    // consumed...
-    bool returnVal = mOwner->domMouseDblClickEvent(mouseEvent);
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::MouseOver(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
-    mouseEvent = do_QueryInterface(aDOMEvent);
-    if (!mouseEvent)
-        return NS_OK;
-    // return FALSE to this function to mark this event as not
-    // consumed...
-    bool returnVal = mOwner->domMouseOverEvent(mouseEvent);
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::MouseOut(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
-    mouseEvent = do_QueryInterface(aDOMEvent);
-    if (!mouseEvent)
-        return NS_OK;
-    // return FALSE to this function to mark this event as not
-    // consumed...
-    bool returnVal = mOwner->domMouseOutEvent(mouseEvent);
-    if (returnVal) {
-        aDOMEvent->StopPropagation();
-        aDOMEvent->PreventDefault();
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedEventListener::Activate(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMUIEvent> uiEvent = do_QueryInterface(aDOMEvent);
-    if (!uiEvent)
-        return NS_OK;
-    // return NS_OK to this function to mark this event as not
-    // consumed...
-
-    return mOwner->domActivateEvent(uiEvent);
-}
-
-NS_IMETHODIMP
-EmbedEventListener::FocusIn(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMUIEvent> uiEvent = do_QueryInterface(aDOMEvent);
-    if (!uiEvent)
-        return NS_OK;
-    // return NS_OK to this function to mark this event as not
-    // consumed...
-
-    return mOwner->domFocusInEvent(uiEvent);
-}
-
-NS_IMETHODIMP
-EmbedEventListener::FocusOut(nsIDOMEvent* aDOMEvent)
-{
-    nsCOMPtr <nsIDOMUIEvent> uiEvent = do_QueryInterface(aDOMEvent);
-    if (!uiEvent)
-        return NS_OK;
-    // return NS_OK to this function to mark this event as not
-    // consumed...
-
-    return mOwner->domFocusOutEvent(uiEvent);
-}
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedEventListener.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef EMBEDEVENTLISTENER_H
-#define EMBEDEVENTLISTENER_H
-
-#include <nsIDOMKeyListener.h>
-#include <nsIDOMMouseListener.h>
-#include <nsIDOMUIListener.h>
-
-class QGeckoEmbed;
-
-class EmbedEventListener : public nsIDOMKeyListener,
-                           public nsIDOMMouseListener,
-                           public nsIDOMUIListener
-{
-public:
-    EmbedEventListener(QGeckoEmbed *q);
-    ~EmbedEventListener();
-
-    NS_DECL_ISUPPORTS
-
-    // nsIDOMEventListener
-
-    NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
-
-    // nsIDOMKeyListener
-
-    NS_IMETHOD KeyDown(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD KeyUp(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD KeyPress(nsIDOMEvent* aDOMEvent);
-
-    // nsIDOMMouseListener
-
-    NS_IMETHOD MouseDown(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD MouseUp(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD MouseClick(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD MouseDblClick(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD MouseOver(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD MouseOut(nsIDOMEvent* aDOMEvent);
-
-    // nsIDOMUIListener
-
-    NS_IMETHOD Activate(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD FocusIn(nsIDOMEvent* aDOMEvent);
-    NS_IMETHOD FocusOut(nsIDOMEvent* aDOMEvent);
-
-private:
-
-    QGeckoEmbed *mOwner;
-};
-
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedGlobalHistory.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include "EmbedGlobalHistory.h"
-
-#include <qstring.h>
-
-/* Implementation file */
-NS_IMPL_ISUPPORTS1(EmbedGlobalHistory, nsIGlobalHistory)
-
-EmbedGlobalHistory::EmbedGlobalHistory()
-{
-  /* member initializers and constructor code */
-}
-
-EmbedGlobalHistory::~EmbedGlobalHistory()
-{
-  /* destructor code */
-}
-
-/* void addPage (in string aURL); */
-NS_IMETHODIMP EmbedGlobalHistory::AddPage(const char *aURL)
-{
-    qDebug("here");
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/* boolean isVisited (in string aURL); */
-NS_IMETHODIMP EmbedGlobalHistory::IsVisited(const char *aURL, PRBool *_retval)
-{
-    qDebug("HERE");
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP EmbedGlobalHistory::Init()
-{
-    qDebug("initing embedglobal");
-    return NS_OK;
-}
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedGlobalHistory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef EMBEDGLOBALHISTORY_H
-#define EMBEDGLOBALHISTORY_H
-
-#include "nsIGlobalHistory.h"
-
-#define NS_EMBEDGLOBALHISTORY_CID \
-  { 0x2f977d51, 0x5485, 0x11d4, \
-  { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 } }
-
-/* Header file */
-class EmbedGlobalHistory : public nsIGlobalHistory
-{
-public:
-    EmbedGlobalHistory();
-
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIGLOBALHISTORY
-
-    NS_IMETHOD        Init();
-
-
-
-private:
-    ~EmbedGlobalHistory();
-};
-
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedModules.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include "nsIGenericFactory.h"
-#include "EmbedGlobalHistory.h"
-#include "nsIGlobalHistory.h"
-
-#if 0
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(EmbedGlobalHistory, Init)
-
-static const nsModuleComponentInfo components[] =
-{
-    { "Global History",
-      NS_EMBEDGLOBALHISTORY_CID,
-      "@mozilla.org/browser/global-history;1",
-      EmbedGlobalHistoryConstructor,
-    }
-};
-
-NS_IMPL_NSGETMODULE(QtComponents, components)
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedProgress.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include "EmbedProgress.h"
-
-#include "qgeckoembed.h"
-
-#include <nsXPIDLString.h>
-#include <nsIChannel.h>
-#include <nsIWebProgress.h>
-#include <nsIDOMWindow.h>
-
-#include "nsIURI.h"
-#include "nsCRT.h"
-#include "nsString.h"
-
-EmbedProgress::EmbedProgress(QGeckoEmbed *aOwner)
-{
-    qDebug("XXX EMBEDPROGRSS");
-    mOwner = aOwner;
-}
-
-EmbedProgress::~EmbedProgress()
-{
-    qDebug("#########################################################################################");
-}
-
-NS_IMPL_ISUPPORTS2(EmbedProgress,
-                   nsIWebProgressListener,
-                   nsISupportsWeakReference)
-
-NS_IMETHODIMP
-EmbedProgress::OnStateChange(nsIWebProgress *aWebProgress,
-                             nsIRequest     *aRequest,
-                             PRUint32        aStateFlags,
-                             nsresult        aStatus)
-{
-    // give the widget a chance to attach any listeners
-    mOwner->contentStateChanged();
-    // if we've got the start flag, emit the signal
-    if ((aStateFlags & STATE_IS_NETWORK) &&
-        (aStateFlags & STATE_START))
-    {
-        qDebug("net start");
-        emit mOwner->netStart();
-    }
-
-    //XXX: emit state all here
-
-    if ((aStateFlags & STATE_IS_NETWORK) &&
-             (aStateFlags & STATE_STOP)) {
-        //qDebug("progress: --stop");
-        emit mOwner->netStop();
-        mOwner->contentFinishedLoading();
-    }
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedProgress::OnProgressChange(nsIWebProgress *aWebProgress,
-                                nsIRequest     *aRequest,
-                                PRInt32         aCurSelfProgress,
-                                PRInt32         aMaxSelfProgress,
-                                PRInt32         aCurTotalProgress,
-                                PRInt32         aMaxTotalProgress)
-{
-#if 0
-    nsString tmpString;
-    RequestToURIString(aRequest, tmpString);
-    // is it the same as the current uri?
-    if (mOwner->mURI.Equals(tmpString))
-        mOwner->progressAll(QString(tmpString.get()), aCurTotalProgress, aMaxTotalProgress);
-#endif
-    //qDebug("progress self: %d %d", aCurSelfProgress, aMaxSelfProgress);
-
-    mOwner->progress(aCurTotalProgress, aMaxTotalProgress);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedProgress::OnLocationChange(nsIWebProgress *aWebProgress,
-                                nsIRequest     *aRequest,
-                                nsIURI         *aLocation)
-{
-    nsCAutoString newURI;
-    NS_ENSURE_ARG_POINTER(aLocation);
-    aLocation->GetSpec(newURI);
-
-    // Make sure that this is the primary frame change and not
-    // just a subframe.
-    PRBool isSubFrameLoad = PR_FALSE;
-    if (aWebProgress) {
-        nsCOMPtr<nsIDOMWindow> domWindow;
-        nsCOMPtr<nsIDOMWindow> topDomWindow;
-
-        aWebProgress->GetDOMWindow(getter_AddRefs(domWindow));
-
-        // get the root dom window
-        if (domWindow)
-            domWindow->GetTop(getter_AddRefs(topDomWindow));
-
-        if (domWindow != topDomWindow)
-            isSubFrameLoad = PR_TRUE;
-    }
-
-    if (!isSubFrameLoad)
-        emit mOwner->locationChanged(newURI.get());
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedProgress::OnStatusChange(nsIWebProgress  *aWebProgress,
-                              nsIRequest      *aRequest,
-                              nsresult         aStatus,
-                              const PRUnichar *aMessage)
-{
-    QString message = QString::fromUcs2(aMessage);
-    emit mOwner->linkMessage(message);
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedProgress::OnSecurityChange(nsIWebProgress *aWebProgress,
-                                nsIRequest     *aRequest,
-                                PRUint32         aState)
-{
-    //FIXME:
-    //emit mOwner->securityChange(aRequest, aState);
-
-    return NS_OK;
-}
-
-/* static */
-void
-EmbedProgress::RequestToURIString(nsIRequest *aRequest, nsString &aString)
-{
-    // is it a channel
-    nsCOMPtr<nsIChannel> channel;
-    channel = do_QueryInterface(aRequest);
-    if (!channel)
-        return;
-
-    nsCOMPtr<nsIURI> uri;
-    channel->GetURI(getter_AddRefs(uri));
-    if (!uri)
-        return;
-
-    nsCAutoString uriString;
-    uri->GetSpec(uriString);
-
-    CopyUTF8toUTF16(uriString, aString);
-}
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedProgress.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef EMBEDPROGRESS_H
-#define EMBEDPROGRESS_H
-
-#include <nsIWebProgressListener.h>
-#include <nsWeakReference.h>
-
-#include "nsStringFwd.h"
-
-class QGeckoEmbed;
-
-class EmbedProgress : public nsIWebProgressListener,
-                      public nsSupportsWeakReference
-{
-public:
-    EmbedProgress(QGeckoEmbed *aOwner);
-    ~EmbedProgress();
-
-    NS_DECL_ISUPPORTS
-
-    NS_DECL_NSIWEBPROGRESSLISTENER
-
-private:
-
-    static void RequestToURIString(nsIRequest *aRequest, nsString &aString);
-
-    QGeckoEmbed *mOwner;
-};
-
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedStream.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include <nsIPipe.h>
-#include <nsIInputStream.h>
-#include <nsIOutputStream.h>
-#include <nsIContentViewerContainer.h>
-#include <nsIDocumentLoaderFactory.h>
-#include <nsNetUtil.h>
-#include <prmem.h>
-
-#include "nsXPCOMCID.h"
-#include "nsICategoryManager.h"
-
-#include "nsIContentViewer.h"
-
-#include "EmbedStream.h"
-#include "qgeckoembed.h"
-#include "EmbedWindow.h"
-#include "nsReadableUtils.h"
-
-// nsIInputStream interface
-
-NS_IMPL_ISUPPORTS1(EmbedStream, nsIInputStream)
-
-    EmbedStream::EmbedStream()
-{
-    mOwner       = nsnull;
-    mOffset      = 0;
-    mDoingStream = PR_FALSE;
-}
-
-EmbedStream::~EmbedStream()
-{
-}
-
-void
-EmbedStream::InitOwner(QGeckoEmbed *aOwner)
-{
-    mOwner = aOwner;
-}
-
-NS_METHOD
-EmbedStream::Init(void)
-{
-    nsresult rv = NS_OK;
-
-    nsCOMPtr<nsIInputStream> bufInStream;
-    nsCOMPtr<nsIOutputStream> bufOutStream;
-
-    rv = NS_NewPipe(getter_AddRefs(bufInStream),
-                    getter_AddRefs(bufOutStream));
-
-    if (NS_FAILED(rv)) return rv;
-
-    mInputStream  = bufInStream;
-    mOutputStream = bufOutStream;
-    return NS_OK;
-}
-
-NS_METHOD
-EmbedStream::OpenStream(const char *aBaseURI, const char *aContentType)
-{
-    qDebug("==================> OpenStream: %s (%s)", aBaseURI, aContentType);
-    NS_ENSURE_ARG_POINTER(aBaseURI);
-    NS_ENSURE_ARG_POINTER(aContentType);
-
-    nsresult rv = NS_OK;
-
-    // if we're already doing a stream then close the current one
-    if (mDoingStream)
-        CloseStream();
-
-    // set our state
-    mDoingStream = PR_TRUE;
-
-    // initialize our streams
-    rv = Init();
-    if (NS_FAILED(rv))
-        return rv;
-
-    // get the content area of our web browser
-    nsCOMPtr<nsIWebBrowser> browser;
-
-
-    mOwner->window()->GetWebBrowser(getter_AddRefs(browser));
-
-    // get the viewer container
-    nsCOMPtr<nsIContentViewerContainer> viewerContainer;
-    viewerContainer = do_GetInterface(browser);
-
-    // create a new uri object
-    nsCOMPtr<nsIURI> uri;
-    nsCAutoString spec(aBaseURI);
-    rv = NS_NewURI(getter_AddRefs(uri), spec.get());
-
-    if (NS_FAILED(rv))
-        return rv;
-
-    // create a new load group
-    rv = NS_NewLoadGroup(getter_AddRefs(mLoadGroup), nsnull);
-    if (NS_FAILED(rv))
-        return rv;
-
-    // create a new input stream channel
-    rv = NS_NewInputStreamChannel(getter_AddRefs(mChannel), uri,
-                                  this,
-                                  nsDependentCString(aContentType));
-    if (NS_FAILED(rv))
-        return rv;
-
-    // set the channel's load group
-    rv = mChannel->SetLoadGroup(mLoadGroup);
-    if (NS_FAILED(rv))
-        return rv;
-
-    // find a document loader for this content type
-
-    nsXPIDLCString docLoaderContractID;
-    nsCOMPtr<nsICategoryManager> catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
-    if (NS_FAILED(rv))
-        return rv;
-    rv = catMan->GetCategoryEntry("Gecko-Content-Viewers", aContentType,
-                                  getter_Copies(docLoaderContractID));
-    if (NS_FAILED(rv))
-        return rv;
-
-    nsCOMPtr<nsIDocumentLoaderFactory> docLoaderFactory;
-    docLoaderFactory = do_GetService(docLoaderContractID.get(), &rv);
-    if (NS_FAILED(rv))
-        return rv;
-
-    // ok, create an instance of the content viewer for that command and
-    // mime type
-    nsCOMPtr<nsIContentViewer> contentViewer;
-    rv = docLoaderFactory->CreateInstance("view", mChannel, mLoadGroup,
-                                          aContentType, viewerContainer,
-                                          nsnull,
-                                          getter_AddRefs(mStreamListener),
-                                          getter_AddRefs(contentViewer));
-    if (NS_FAILED(rv))
-        return rv;
-
-    // set the container viewer container for this content view
-    rv = contentViewer->SetContainer(viewerContainer);
-    if (NS_FAILED(rv))
-        return rv;
-
-    // embed this sucker
-    rv = viewerContainer->Embed(contentViewer, "view", nsnull);
-    if (NS_FAILED(rv))
-        return rv;
-
-    // start our request
-    nsCOMPtr<nsIRequest> request = do_QueryInterface(mChannel);
-    rv = mStreamListener->OnStartRequest(request, NULL);
-    if (NS_FAILED(rv))
-        return rv;
-
-    return NS_OK;
-}
-
-NS_METHOD
-EmbedStream::AppendToStream(const char *aData, PRInt32 aLen)
-{
-    nsresult rv;
-
-    // append the data
-    rv = Append(aData, aLen);
-    if (NS_FAILED(rv))
-        return rv;
-
-    // notify our listeners
-    nsCOMPtr<nsIRequest> request = do_QueryInterface(mChannel);
-    rv = mStreamListener->OnDataAvailable(request,
-                                          NULL,
-                                          NS_STATIC_CAST(nsIInputStream *, this),
-                                          mOffset, /* offset */
-                                          aLen); /* len */
-    // move our counter
-    mOffset += aLen;
-    if (NS_FAILED(rv))
-        return rv;
-
-    return NS_OK;
-}
-
-NS_METHOD
-EmbedStream::CloseStream(void)
-{
-    nsresult rv = NS_OK;
-
-    NS_ENSURE_STATE(mDoingStream);
-    mDoingStream = PR_FALSE;
-
-    nsCOMPtr<nsIRequest> request = do_QueryInterface(mChannel, &rv);
-    if (NS_FAILED(rv))
-        goto loser;
-
-    rv = mStreamListener->OnStopRequest(request, NULL, NS_OK);
-    if (NS_FAILED(rv))
-        return rv;
-
- loser:
-    mLoadGroup = nsnull;
-    mChannel = nsnull;
-    mStreamListener = nsnull;
-    mOffset = 0;
-
-    return rv;
-}
-
-NS_METHOD
-EmbedStream::Append(const char *aData, PRUint32 aLen)
-{
-    nsresult rv = NS_OK;
-    PRUint32 bytesWritten = 0;
-    rv = mOutputStream->Write(aData, aLen, &bytesWritten);
-    if (NS_FAILED(rv))
-        return rv;
-
-    NS_ASSERTION(bytesWritten == aLen,
-                 "underlying byffer couldn't handle the write");
-    return rv;
-}
-
-NS_IMETHODIMP
-EmbedStream::Available(PRUint32 *_retval)
-{
-    return mInputStream->Available(_retval);
-}
-
-NS_IMETHODIMP
-EmbedStream::Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval)
-{
-    return mInputStream->Read(aBuf, aCount, _retval);
-}
-
-NS_IMETHODIMP EmbedStream::Close(void)
-{
-    return mInputStream->Close();
-}
-
-NS_IMETHODIMP
-EmbedStream::ReadSegments(nsWriteSegmentFun aWriter, void * aClosure,
-                          PRUint32 aCount, PRUint32 *_retval)
-{
-    char *readBuf = (char *)nsMemory::Alloc(aCount);
-    PRUint32 nBytes;
-
-    if (!readBuf)
-        return NS_ERROR_OUT_OF_MEMORY;
-
-    nsresult rv = mInputStream->Read(readBuf, aCount, &nBytes);
-
-    *_retval = 0;
-
-    if (NS_SUCCEEDED(rv)) {
-        PRUint32 writeCount = 0;
-        rv = aWriter(this, aClosure, readBuf, 0, nBytes, &writeCount);
-
-        // XXX writeCount may be less than nBytes!!  This is the wrong
-        // way to synthesize ReadSegments.
-        NS_ASSERTION(writeCount == nBytes, "data loss");
-
-        // errors returned from the writer end here!
-        rv = NS_OK;
-    }
-
-    nsMemory::Free(readBuf);
-
-    return rv;
-}
-
-NS_IMETHODIMP
-EmbedStream::IsNonBlocking(PRBool *aNonBlocking)
-{
-    return mInputStream->IsNonBlocking(aNonBlocking);
-}
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedStream.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include <nsISupports.h>
-#include <nsCOMPtr.h>
-#include <nsIOutputStream.h>
-#include <nsIInputStream.h>
-#include <nsILoadGroup.h>
-#include <nsIChannel.h>
-#include <nsIStreamListener.h>
-
-class QGeckoEmbed;
-
-class EmbedStream : public nsIInputStream
-{
-public:
-
-    EmbedStream();
-    ~EmbedStream();
-
-    void      InitOwner      (QGeckoEmbed *aOwner);
-    NS_METHOD Init           (void);
-
-    NS_METHOD OpenStream     (const char *aBaseURI, const char *aContentType);
-    NS_METHOD AppendToStream (const char *aData, PRInt32 aLen);
-    NS_METHOD CloseStream    (void);
-
-    NS_METHOD Append         (const char *aData, PRUint32 aLen);
-
-    // nsISupports
-    NS_DECL_ISUPPORTS
-    // nsIInputStream
-    NS_DECL_NSIINPUTSTREAM
-
-private:
-    nsCOMPtr<nsIOutputStream>   mOutputStream;
-    nsCOMPtr<nsIInputStream>    mInputStream;
-
-    nsCOMPtr<nsILoadGroup>      mLoadGroup;
-    nsCOMPtr<nsIChannel>        mChannel;
-    nsCOMPtr<nsIStreamListener> mStreamListener;
-
-    PRUint32                    mOffset;
-    PRBool                      mDoingStream;
-
-    QGeckoEmbed *mOwner;
-
-};
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedWindow.cpp
+++ /dev/null
@@ -1,467 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include "EmbedWindow.h"
-
-#include "qgeckoembed.h"
-
-#include <nsCWebBrowser.h>
-#include <nsIComponentManager.h>
-#include <nsIDocShellTreeItem.h>
-#include "nsIWidget.h"
-#include "nsIWebNavigation.h"
-#include "nsReadableUtils.h"
-#include "nsIDOMNode.h"
-#include "nsIDOMElement.h"
-#include "nsIDOMEvent.h"
-
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qvbox.h>
-#include <qwidget.h>
-#include <qtooltip.h>
-#include <qcursor.h>
-#include <qlabel.h>
-
-class MozTipLabel : public QLabel
-{
-public:
-    MozTipLabel( QWidget* parent)
-        : QLabel( parent, "toolTipTip",
-                  Qt::WStyle_StaysOnTop | Qt::WStyle_Customize | Qt::WStyle_NoBorder
-                  | Qt::WStyle_Tool | Qt::WX11BypassWM )
-    {
-        setMargin(1);
-        setAutoMask( FALSE );
-        setFrameStyle( QFrame::Plain | QFrame::Box );
-        setLineWidth( 1 );
-        setAlignment( AlignAuto | AlignTop );
-        setIndent(0);
-        polish();
-        adjustSize();
-        setFont(QToolTip::font());
-        setPalette(QToolTip::palette());
-    }
-};
-
-
-EmbedWindow::EmbedWindow()
-    : mOwner(nsnull),
-      mVisibility(PR_FALSE),
-      mIsModal(PR_FALSE),
-      tooltip(0)
-{
-}
-
-EmbedWindow::~EmbedWindow(void)
-{
-    ExitModalEventLoop(PR_FALSE);
-    if (tooltip)
-        delete tooltip;
-}
-
-void
-EmbedWindow::Init(QGeckoEmbed *aOwner)
-{
-    // save our owner for later
-    mOwner = aOwner;
-
-    // create our nsIWebBrowser object and set up some basic defaults.
-    mWebBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID);
-    if (!mWebBrowser) {
-        //log an error
-        return;
-    }
-
-    mWebBrowser->SetContainerWindow(NS_STATIC_CAST(nsIWebBrowserChrome *, this));
-
-    nsCOMPtr<nsIDocShellTreeItem> item = do_QueryInterface(mWebBrowser);
-    item->SetItemType(nsIDocShellTreeItem::typeContentWrapper);
-
-}
-
-nsresult
-EmbedWindow::CreateWindow(void)
-{
-    nsresult rv;
-
-    // Get the base window interface for the web browser object and
-    // create the window.
-    mBaseWindow = do_QueryInterface(mWebBrowser);
-    rv = mBaseWindow->InitWindow(mOwner,
-                                 nsnull,
-                                 0, 0,
-                                 mOwner->width(),
-                                 mOwner->height());
-    if (NS_FAILED(rv))
-        return rv;
-
-    rv = mBaseWindow->Create();
-    if (NS_FAILED(rv))
-        return rv;
-
-    return NS_OK;
-}
-
-void
-EmbedWindow::ReleaseChildren(void)
-{
-    ExitModalEventLoop(PR_FALSE);
-
-    mBaseWindow->Destroy();
-    mBaseWindow = 0;
-    mWebBrowser = 0;
-}
-
-// nsISupports
-
-NS_IMPL_ADDREF(EmbedWindow)
-    NS_IMPL_RELEASE(EmbedWindow)
-
-    NS_INTERFACE_MAP_BEGIN(EmbedWindow)
-    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWebBrowserChrome)
-    NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome)
-    NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChromeFocus)
-    NS_INTERFACE_MAP_ENTRY(nsIEmbeddingSiteWindow)
-    NS_INTERFACE_MAP_ENTRY(nsITooltipListener)
-    NS_INTERFACE_MAP_ENTRY(nsIContextMenuListener)
-    NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
-    NS_INTERFACE_MAP_END
-
-// nsIWebBrowserChrome
-
-NS_IMETHODIMP
-EmbedWindow::SetStatus(PRUint32 aStatusType, const PRUnichar *aStatus)
-{
-    switch (aStatusType) {
-    case STATUS_SCRIPT:
-    {
-        mOwner->emitScriptStatus(QString::fromUcs2(aStatus));
-    }
-    break;
-    case STATUS_SCRIPT_DEFAULT:
-        // Gee, that's nice.
-        break;
-    case STATUS_LINK:
-    {
-        mLinkMessage = aStatus;
-        mOwner->emitLinkStatus(QString::fromUcs2(aStatus));
-    }
-    break;
-    }
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::GetWebBrowser(nsIWebBrowser **aWebBrowser)
-{
-    *aWebBrowser = mWebBrowser;
-    NS_IF_ADDREF(*aWebBrowser);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::SetWebBrowser(nsIWebBrowser *aWebBrowser)
-{
-    mWebBrowser = aWebBrowser;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::GetChromeFlags(PRUint32 *aChromeFlags)
-{
-    *aChromeFlags = mOwner->chromeMask();
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::SetChromeFlags(PRUint32 aChromeFlags)
-{
-    mOwner->setChromeMask(aChromeFlags);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::DestroyBrowserWindow(void)
-{
-    emit mOwner->destroyBrowser();
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
-{
-    emit mOwner->sizeTo(aCX, aCY);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::ShowAsModal(void)
-{
-    qDebug("setting modal");
-    mIsModal = PR_TRUE;
-    qApp->eventLoop()->enterLoop();
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::IsWindowModal(PRBool *_retval)
-{
-    *_retval = mIsModal;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::ExitModalEventLoop(nsresult aStatus)
-{
-    qDebug("exiting modal");
-    qApp->eventLoop()->exitLoop();
-    return NS_OK;
-}
-
-// nsIWebBrowserChromeFocus
-
-NS_IMETHODIMP
-EmbedWindow::FocusNextElement()
-{
-    //FIXME:
-    //i think gecko handles that internally
-    //mOwner->focusNextPrevChild(TRUE);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::FocusPrevElement()
-{
-    //FIXME: same story as above
-    //mOwner->focusNextPrevChild(FALSE);
-    return NS_OK;
-}
-
-// nsIEmbeddingSiteWindow
-
-NS_IMETHODIMP
-EmbedWindow::SetDimensions(PRUint32 aFlags, PRInt32 aX, PRInt32 aY,
-                           PRInt32 aCX, PRInt32 aCY)
-{
-    if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION &&
-        (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER |
-                   nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER))) {
-        return mBaseWindow->SetPositionAndSize(aX, aY, aCX, aCY, PR_TRUE);
-    }
-    else if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION) {
-        return mBaseWindow->SetPosition(aX, aY);
-    }
-    else if (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER |
-                       nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER)) {
-        return mBaseWindow->SetSize(aCX, aCY, PR_TRUE);
-    }
-    return NS_ERROR_INVALID_ARG;
-}
-
-NS_IMETHODIMP
-EmbedWindow::GetDimensions(PRUint32 aFlags, PRInt32 *aX,
-                           PRInt32 *aY, PRInt32 *aCX, PRInt32 *aCY)
-{
-    if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION &&
-        (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER |
-                   nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER))) {
-        return mBaseWindow->GetPositionAndSize(aX, aY, aCX, aCY);
-    }
-    else if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION) {
-        return mBaseWindow->GetPosition(aX, aY);
-    }
-    else if (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER |
-                       nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER)) {
-        return mBaseWindow->GetSize(aCX, aCY);
-    }
-    return NS_ERROR_INVALID_ARG;
-}
-
-NS_IMETHODIMP
-EmbedWindow::SetFocus(void)
-{
-    // XXX might have to do more here.
-    return mBaseWindow->SetFocus();
-}
-
-NS_IMETHODIMP
-EmbedWindow::GetTitle(PRUnichar **aTitle)
-{
-    *aTitle = ToNewUnicode(mTitle);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::SetTitle(const PRUnichar *aTitle)
-{
-    mTitle = aTitle;
-    emit mOwner->windowTitleChanged(QString::fromUcs2(aTitle));
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::GetSiteWindow(void **aSiteWindow)
-{
-    *aSiteWindow = NS_STATIC_CAST(void *, mOwner);
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::GetVisibility(PRBool *aVisibility)
-{
-    *aVisibility = mVisibility;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::SetVisibility(PRBool aVisibility)
-{
-    // We always set the visibility so that if it's chrome and we finish
-    // the load we know that we have to show the window.
-    mVisibility = aVisibility;
-
-    // if this is a chrome window and the chrome hasn't finished loading
-    // yet then don't show the window yet.
-    if (mOwner->isChrome() && !mOwner->chromeLoaded())
-        return NS_OK;
-
-    emit mOwner->visibilityChanged(aVisibility);
-
-    return NS_OK;
-}
-
-// nsITooltipListener
-
-NS_IMETHODIMP
-EmbedWindow::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText)
-{
-    QString tipText = QString::fromUcs2(aTipText);
-
-    // get the root origin for this content window
-    nsCOMPtr<nsIWidget> mainWidget;
-    mBaseWindow->GetMainWidget(getter_AddRefs(mainWidget));
-    QWidget *window;
-    window = NS_STATIC_CAST(QWidget*, mainWidget->GetNativeData(NS_NATIVE_WINDOW));
-
-    if (!window) {
-        NS_ERROR("no qt window in hierarchy!\n");
-        return NS_ERROR_FAILURE;
-    }
-
-    int screen = qApp->desktop()->screenNumber(window);
-    if (!tooltip || qApp->desktop()->screenNumber(tooltip) != screen) {
-        delete tooltip;
-        QWidget *s = QApplication::desktop()->screen(screen);
-        tooltip = new MozTipLabel(s);
-    }
-
-    tooltip->setText(tipText);
-    tooltip->resize(tooltip->sizeHint());
-    QPoint pos(aXCoords, aYCoords+24);
-    pos = window->mapToGlobal(pos);
-    tooltip->move(pos);
-    tooltip->show();
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP
-EmbedWindow::OnHideTooltip(void)
-{
-    if (tooltip)
-        tooltip->hide();
-    return NS_OK;
-}
-
-
-NS_IMETHODIMP
-EmbedWindow::OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode)
-{
-//     if (!aEvent->type == NS_CONTEXTMENU)
-//         return NS_OK;
-    qDebug("EmbedWindow::OnShowContextMenu");
-
-    QString url = mOwner->url();
-
-    PRUint16 nodeType;
-    aNode->GetNodeType(&nodeType);
-    if (nodeType == nsIDOMNode::ELEMENT_NODE) {
-        nsIDOMElement *element = static_cast<nsIDOMElement *>(aNode);
-        nsString tagname;
-        element->GetTagName(tagname);
-        nsCString ctagname;
-        LossyCopyUTF16toASCII(tagname, ctagname);
-        if (!strcasecmp(ctagname.get(), "a")) {
-            nsString href;
-            nsString attr;
-            attr.AssignLiteral("href");
-            element->GetAttribute(attr, href);
-            url = mOwner->resolvedUrl(QString::fromUcs2(href.get()));
-        } else if (!strcasecmp(ctagname.get(), "img")) {
-            nsString href;
-            nsString attr;
-            attr.AssignLiteral("src");
-            element->GetAttribute(attr, href);
-            url = mOwner->resolvedUrl(QString::fromUcs2(href.get()));
-        }
-    }
-
-    emit mOwner->showContextMenu(QCursor::pos(), url);
-    return NS_OK;
-}
-
-// nsIInterfaceRequestor
-
-NS_IMETHODIMP
-EmbedWindow::GetInterface(const nsIID &aIID, void** aInstancePtr)
-{
-    nsresult rv;
-
-    rv = QueryInterface(aIID, aInstancePtr);
-
-    // pass it up to the web browser object
-    if (NS_FAILED(rv) || !*aInstancePtr) {
-        nsCOMPtr<nsIInterfaceRequestor> ir = do_QueryInterface(mWebBrowser);
-        return ir->GetInterface(aIID, aInstancePtr);
-    }
-
-    return rv;
-}
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedWindow.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef EMBEDWINDOW_H
-#define EMBEDWINDOW_H
-
-#include <nsString.h>
-#include <nsIWebBrowserChrome.h>
-#include <nsIWebBrowserChromeFocus.h>
-#include <nsIEmbeddingSiteWindow.h>
-#include <nsITooltipListener.h>
-#include <nsIContextMenuListener.h>
-#include <nsISupports.h>
-#include <nsIWebBrowser.h>
-#include <nsIBaseWindow.h>
-#include <nsIInterfaceRequestor.h>
-#include <nsCOMPtr.h>
-#include "nsString.h"
-
-class QGeckoEmbed;
-class MozTipLabel;
-
-class EmbedWindow : public nsIWebBrowserChrome,
-                    public nsIWebBrowserChromeFocus,
-                    public nsIEmbeddingSiteWindow,
-                    public nsITooltipListener,
-                    public nsIContextMenuListener,
-                    public nsIInterfaceRequestor
-{
-public:
-    EmbedWindow();
-    ~EmbedWindow();
-    void Init(QGeckoEmbed *aOwner);
-
-    nsresult CreateWindow    (void);
-    void     ReleaseChildren (void);
-
-    NS_DECL_ISUPPORTS
-
-    NS_DECL_NSIWEBBROWSERCHROME
-
-    NS_DECL_NSIWEBBROWSERCHROMEFOCUS
-
-    NS_DECL_NSIEMBEDDINGSITEWINDOW
-
-    NS_DECL_NSITOOLTIPLISTENER
-
-    NS_DECL_NSICONTEXTMENULISTENER
-
-    NS_DECL_NSIINTERFACEREQUESTOR
-
-    nsString                 mTitle;
-    nsString                 mJSStatus;
-    nsString                 mLinkMessage;
-
-    nsCOMPtr<nsIBaseWindow>  mBaseWindow; // [OWNER]
-
-private:
-    QGeckoEmbed              *mOwner;
-    nsCOMPtr<nsIWebBrowser>  mWebBrowser; // [OWNER]
-    PRBool                   mVisibility;
-    PRBool                   mIsModal;
-    MozTipLabel *tooltip;
-};
-
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedWindowCreator.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include "EmbedWindowCreator.h"
-
-#include "qgeckoembed.h"
-#include "qgeckoglobals.h"
-#include "EmbedWindow.h"
-
-
-EmbedWindowCreator::EmbedWindowCreator()
-{
-}
-
-EmbedWindowCreator::~EmbedWindowCreator()
-{
-}
-
-NS_IMPL_ISUPPORTS1(EmbedWindowCreator, nsIWindowCreator)
-
-NS_IMETHODIMP
-EmbedWindowCreator::CreateChromeWindow(nsIWebBrowserChrome *aParent,
-                                       PRUint32 aChromeFlags,
-                                       nsIWebBrowserChrome **_retval)
-{
-    NS_ENSURE_ARG_POINTER(_retval);
-
-    QGeckoEmbed *newEmbed = 0;
-
-    // No parent?  Ask via the singleton object instead.
-    if (!aParent) {
-        //create single create window
-        qDebug("XXXXXXXXXXXXXXXXXXXXXXXXXXXXX not implemented");
-    }
-    else {
-        // Find the QGeckoEmbed object for this web browser chrome object.
-        QGeckoEmbed *qecko = QGeckoGlobals::findPrivateForBrowser(aParent);
-
-        if (!qecko)
-            return NS_ERROR_FAILURE;
-        newEmbed = qecko;
-        emit newEmbed->newWindow(newEmbed, aChromeFlags);
-    }
-
-    // check to make sure that we made a new window
-    if (!newEmbed)
-        return NS_ERROR_FAILURE;
-
-    qDebug("MMMMM here");
-    // set the chrome flag on the new window if it's a chrome open
-    if (aChromeFlags & nsIWebBrowserChrome::CHROME_OPENAS_CHROME)
-        newEmbed->setIsChrome(PR_TRUE);
-
-    *_retval = NS_STATIC_CAST(nsIWebBrowserChrome *,
-                              (newEmbed->window()));
-
-    if (*_retval) {
-        NS_ADDREF(*_retval);
-        return NS_OK;
-    }
-
-    return NS_ERROR_FAILURE;
-}
deleted file mode 100644
--- a/embedding/browser/qt/src/EmbedWindowCreator.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef EMBEDWINDOWCREATOR_H
-#define EMBEDWINDOWCREATOR_H
-
-#include <nsIWindowCreator.h>
-
-class EmbedWindowCreator : public nsIWindowCreator
-{
-public:
-    EmbedWindowCreator();
-    ~EmbedWindowCreator();
-
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIWINDOWCREATOR
-};
-
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/Makefile.in
+++ /dev/null
@@ -1,95 +0,0 @@
-DEPTH		= ../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= qgeckoembed
-LIBRARY_NAME	= qgeckoembed
-REQUIRES	= xpcom \
-		  string \
-		  docshell \
-		  webshell \
-		  necko \
-		  widget \
-		  dom \
-		  js \
-		  gfx \
-		  layout \
-		  content \
-		  uriloader \
-		  webbrwsr \
-		  shistory \
-		  embed_base \
-		  windowwatcher \
-		  profdirserviceprovider \
-		  $(NULL)
-
-ifdef ACCESSIBILITY
-REQUIRES        += accessibility
-endif
-
-CPPSRCS		= \
-        $(MOCSRCS) \
-		qgeckoembed.cpp \
-		EmbedWindow.cpp \
-		EmbedProgress.cpp \
-		EmbedContentListener.cpp \
-		EmbedEventListener.cpp \
-		EmbedWindowCreator.cpp \
-		EmbedStream.cpp \
-		QtPromptService.cpp \
-                qgeckoglobals.cpp
-
-MOCSRCS		= \
-		moc_qgeckoembed.cpp \
-		$(NULL)
-
-UICSRCS         = \
-		alert.ui \
-		confirm.ui \
-		prompt.ui \
-		select.ui \
-		userpass.ui \
-		$(NULL)
-
-# Include config.mk 
-include $(topsrcdir)/config/config.mk
-include $(srcdir)/config/qtconfig.mk
-
-# Force applications to be built non-statically
-# when building the mozcomps meta component
-ifneq (,$(filter mozcomps,$(MOZ_META_COMPONENTS)))
-BUILD_STATIC_LIBS=
-endif
-
-SHARED_LIBRARY_LIBS= \
-		$(DIST)/lib/libembed_base_s.$(LIB_SUFFIX) \
-		$(DIST)/lib/libprofdirserviceprovider_s.$(LIB_SUFFIX) \
-		$(NULL)
-
-EXPORTS		= qgeckoembed.h
-
-EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
-		$(MOZ_QT_LDFLAGS) \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
-include $(srcdir)/config/qtrules.mk
-
-QtPromptService.cpp : $(UI_HSRCS)
-
-ifeq ($(OS_ARCH), SunOS)
-ifndef GNU_CC
-# When using Sun's WorkShop compiler, including
-# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h
-# causes most of these compiles to fail with:
-# line 29: Error: Multiple declaration for std::tm.
-# So, this gets around the problem.
-DEFINES         += -D_TIME_H=1
-endif
-endif
-
-CXXFLAGS        += $(MOZ_QT_CFLAGS) -g02
-CFLAGS          += $(MOZ_QT_CFLAGS) -g02
deleted file mode 100644
--- a/embedding/browser/qt/src/QtPromptService.cpp
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Lixto GmbH.
- * Portions created by Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Michal Ceresna <ceresna@amos.sturak.sk>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-#include "QtPromptService.h"
-#include <nsString.h>
-#include <nsIWindowWatcher.h>
-#include <nsIWebBrowserChrome.h>
-#include <nsIEmbeddingSiteWindow.h>
-#include <nsCOMPtr.h>
-#include <nsIServiceManager.h>
-#include <nsReadableUtils.h>
-
-#include <qmessagebox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qstyle.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include "ui_alert.h"
-#include "ui_confirm.h"
-#include "ui_prompt.h"
-#include "ui_select.h"
-#include "ui_userpass.h"
-
-#if (QT_VERSION < 0x030200)
-//constant not defined in older qt version
-#define SP_MessageBoxQuestion SP_MessageBoxInformation
-#endif
-
-QtPromptService::QtPromptService()
-{
-}
-
-QtPromptService::~QtPromptService()
-{
-}
-
-NS_IMPL_ISUPPORTS1(QtPromptService, nsIPromptService)
-
-/**
- * Puts up an alert dialog with an OK button.
- */
-NS_IMETHODIMP
-QtPromptService::Alert(nsIDOMWindow* aParent,
-                       const PRUnichar* aDialogTitle,
-                       const PRUnichar* aDialogText)
-{
-    return
-        AlertCheck(aParent,
-                   aDialogTitle, aDialogText,
-                   NULL, NULL);
-}
-
-/**
- * Puts up an alert dialog with an OK button and
- * a message with a checkbox.
- */
-NS_IMETHODIMP
-QtPromptService::AlertCheck(nsIDOMWindow* aParent,
-                            const PRUnichar* aDialogTitle,
-                            const PRUnichar* aDialogText,
-                            const PRUnichar* aCheckMsg,
-                            PRBool* aCheckValue)
-{
-    AlertDialog d(GetQWidgetForDOMWindow(aParent));
-    d.icon->setPixmap(QApplication::style().
-                      stylePixmap(QStyle::SP_MessageBoxWarning));
-    if (aDialogTitle) {
-        d.setCaption(QString::fromUcs2(aDialogTitle));
-    }
-    d.message->setText(QString::fromUcs2(aDialogText));
-    if (aCheckMsg) {
-        d.check->setText(QString::fromUcs2(aCheckMsg));
-        d.check->setChecked(*aCheckValue);
-    }
-    else {
-        d.check->hide();
-    }
-    d.adjustSize();
-    d.exec();
-
-    if (aCheckMsg) {
-        *aCheckValue = d.check->isChecked();
-    }
-
-    return NS_OK;
-}
-
-/**
- * Puts up a dialog with OK and Cancel buttons.
- * @return true for OK, false for Cancel
- */
-NS_IMETHODIMP
-QtPromptService::Confirm(nsIDOMWindow* aParent,
-                         const PRUnichar* aDialogTitle,
-                         const PRUnichar* aDialogText,
-                         PRBool* aConfirm)
-{
-    return
-        ConfirmCheck(aParent,
-                     aDialogTitle, aDialogText,
-                     NULL, NULL,
-                     aConfirm);
-}
-
-/**
- * Puts up a dialog with OK and Cancel buttons, and
- * a message with a single checkbox.
- * @return true for OK, false for Cancel
- */
-NS_IMETHODIMP
-QtPromptService::ConfirmCheck(nsIDOMWindow* aParent,
-                              const PRUnichar* aDialogTitle,
-                              const PRUnichar* aDialogText,
-                              const PRUnichar* aCheckMsg,
-                              PRBool* aCheckValue,
-                              PRBool* aConfirm)
-{
-    PRInt32 ret;
-    ConfirmEx(aParent,
-              aDialogTitle, aDialogText,
-              STD_OK_CANCEL_BUTTONS,
-              NULL, NULL, NULL,
-              aCheckMsg,
-              aCheckValue,
-              &ret);
-    *aConfirm = (ret==0);
-
-    return NS_OK;
-}
-
-/**
- * Puts up a dialog with up to 3 buttons and an optional checkbox.
- *
- * @param dialogTitle
- * @param text
- * @param buttonFlags       Title flags for each button.
- * @param button0Title      Used when button 0 uses TITLE_IS_STRING
- * @param button1Title      Used when button 1 uses TITLE_IS_STRING
- * @param button2Title      Used when button 2 uses TITLE_IS_STRING
- * @param checkMsg          null if no checkbox
- * @param checkValue
- * @return buttonPressed
- *
- * Buttons are numbered 0 - 2. The implementation can decide whether
- * the sequence goes from right to left or left to right.
- * Button 0 will be the default button.
- *
- * A button may use a predefined title, specified by one of the
- * constants below. Each title constant can be multiplied by a
- * position constant to assign the title to a particular button.
- * If BUTTON_TITLE_IS_STRING is used for a button, the string
- * parameter for that button will be used. If the value for a button
- * position is zero, the button will not be shown
- *
- */
-NS_IMETHODIMP
-QtPromptService::ConfirmEx(nsIDOMWindow* aParent,
-                           const PRUnichar* aDialogTitle,
-                           const PRUnichar* aDialogText,
-                           PRUint32 aButtonFlags,
-                           const PRUnichar* aButton0Title,
-                           const PRUnichar* aButton1Title,
-                           const PRUnichar* aButton2Title,
-                           const PRUnichar* aCheckMsg,
-                           PRBool* aCheckValue,
-                           PRInt32* aRetVal)
-{
-    ConfirmDialog d(GetQWidgetForDOMWindow(aParent));
-    d.icon->setPixmap(QApplication::style().
-                      stylePixmap(QStyle::SP_MessageBoxQuestion));
-    if (aDialogTitle) {
-        d.setCaption(QString::fromUcs2(aDialogTitle));
-    }
-    d.message->setText(QString::fromUcs2(aDialogText));
-
-    QString l = GetButtonLabel(aButtonFlags, BUTTON_POS_0, aButton0Title);
-    if (!l.isNull()) d.but1->setText(l); else d.but1->hide();
-    l = GetButtonLabel(aButtonFlags, BUTTON_POS_1, aButton1Title);
-    if (!l.isNull()) d.but2->setText(l); else d.but2->hide();
-    l = GetButtonLabel(aButtonFlags, BUTTON_POS_2, aButton2Title);
-    if (!l.isNull()) d.but3->setText(l); else d.but3->hide();
-
-    if (aCheckMsg) {
-        d.check->setText(QString::fromUcs2(aCheckMsg));
-        d.check->setChecked(*aCheckValue);
-    }
-    else {
-        d.check->hide();
-    }
-    d.adjustSize();
-    int ret = d.exec();
-
-    *aRetVal = ret;
-
-    return NS_OK;
-}
-
-/**
- * Puts up a dialog with an edit field and an optional checkbox.
- *
- * @param dialogTitle
- * @param text
- * @param value         in: Pre-fills the dialog field if non-null
- *                      out: If result is true, a newly allocated
- *                      string. If result is false, in string is not
- *                      touched.
- * @param checkMsg      if null, check box will not be shown
- * @param checkValue
- * @return true for OK, false for Cancel
- */
-NS_IMETHODIMP
-QtPromptService::Prompt(nsIDOMWindow* aParent,
-                        const PRUnichar* aDialogTitle,
-                        const PRUnichar* aDialogText,
-                        PRUnichar** aValue,
-                        const PRUnichar* aCheckMsg,
-                        PRBool* aCheckValue,
-                        PRBool* aConfirm)
-{
-    PromptDialog d(GetQWidgetForDOMWindow(aParent));
-    d.icon->setPixmap(QApplication::style().
-                      stylePixmap(QStyle::SP_MessageBoxQuestion));
-    if (aDialogTitle) {
-        d.setCaption(QString::fromUcs2(aDialogTitle));
-    }
-    d.message->setText(QString::fromUcs2(aDialogText));
-    if (aValue && *aValue) {
-        d.input->setText(QString::fromUcs2(*aValue));
-    }
-    if (aCheckMsg) {
-        d.check->setText(QString::fromUcs2(aCheckMsg));
-        d.check->setChecked(*aCheckValue);
-    }
-    else {
-        d.check->hide();
-    }
-    d.adjustSize();
-    int ret = d.exec();
-
-    if (aCheckMsg) {
-        *aCheckValue = d.check->isChecked();
-    }
-    *aConfirm = (ret & QMessageBox::Ok);
-    if (*aConfirm) {
-        if (*aValue) nsMemory::Free(*aValue);
-        *aValue =
-            ToNewUnicode(NS_ConvertUTF8toUTF16(d.input->text().utf8()));
-    }
-
-    return NS_OK;
-}
-
-/**
- * Puts up a dialog with an edit field, a password field, and an optional checkbox.
- *
- * @param dialogTitle
- * @param text
- * @param username      in: Pre-fills the dialog field if non-null
- *                      out: If result is true, a newly allocated
- *                      string. If result is false, in string is not
- *                      touched.
- * @param password      in: Pre-fills the dialog field if non-null
- *                      out: If result is true, a newly allocated
- *                      string. If result is false, in string is not
- *                      touched.
- * @param checkMsg      if null, check box will not be shown
- * @param checkValue
- * @return true for OK, false for Cancel
- */
-NS_IMETHODIMP
-QtPromptService::PromptUsernameAndPassword(nsIDOMWindow* aParent,
-                                           const PRUnichar* aDialogTitle,
-                                           const PRUnichar* aDialogText,
-                                           PRUnichar** aUsername,
-                                           PRUnichar** aPassword,
-                                           const PRUnichar* aCheckMsg,
-                                           PRBool* aCheckValue,
-                                           PRBool* aConfirm)
-{
-    UserpassDialog d(GetQWidgetForDOMWindow(aParent));
-    d.icon->setPixmap(QApplication::style().
-                      stylePixmap(QStyle::SP_MessageBoxQuestion));
-    if (aDialogTitle) {
-        d.setCaption(QString::fromUcs2(aDialogTitle));
-    }
-    d.message->setText(QString::fromUcs2(aDialogText));
-    if (aUsername && *aUsername) {
-        d.username->setText(QString::fromUcs2(*aUsername));
-    }
-    if (aPassword && *aPassword) {
-        d.password->setText(QString::fromUcs2(*aPassword));
-    }
-    if (aCheckMsg) {
-        d.check->setText(QString::fromUcs2(aCheckMsg));
-        d.check->setChecked(*aCheckValue);
-    }
-    else {
-        d.check->hide();
-    }
-    d.adjustSize();
-    int ret = d.exec();
-
-    if (aCheckMsg) {
-        *aCheckValue = d.check->isChecked();
-    }
-    *aConfirm = (ret & QMessageBox::Ok);
-    if (*aConfirm) {
-        if (*aUsername) nsMemory::Free(*aUsername);
-        *aUsername =
-            ToNewUnicode(NS_ConvertUTF8toUTF16(d.username->text().utf8()));
-        if (*aPassword) nsMemory::Free(*aPassword);
-        *aPassword =
-            ToNewUnicode(NS_ConvertUTF8toUTF16(d.password->text().utf8()));
-    }
-
-    return NS_OK;
-}
-
-/**
- * Puts up a dialog with a password field and an optional checkbox.
- *
- * @param dialogTitle
- * @param text
- * @param password      in: Pre-fills the dialog field if non-null
- *                      out: If result is true, a newly allocated
- *                      string. If result is false, in string is not
- *                      touched.
- * @param checkMsg      if null, check box will not be shown
- * @param checkValue
- * @return true for OK, false for Cancel
- */
-NS_IMETHODIMP
-QtPromptService::PromptPassword(nsIDOMWindow* aParent,
-                                const PRUnichar* aDialogTitle,
-                                const PRUnichar* aDialogText,
-                                PRUnichar** aPassword,
-                                const PRUnichar* aCheckMsg,
-                                PRBool* aCheckValue,
-                                PRBool* aConfirm)
-{
-    UserpassDialog d(GetQWidgetForDOMWindow(aParent));
-    d.icon->setPixmap(QApplication::style().
-                      stylePixmap(QStyle::SP_MessageBoxQuestion));
-    if (aDialogTitle) {
-        d.setCaption(QString::fromUcs2(aDialogTitle));
-    }
-    d.message->setText(QString::fromUcs2(aDialogText));
-    d.lb_username->hide();
-    d.username->hide();
-    if (aPassword && *aPassword) {
-        d.password->setText(QString::fromUcs2(*aPassword));
-    }
-    if (aCheckMsg) {
-        d.check->setText(QString::fromUcs2(aCheckMsg));
-        d.check->setChecked(*aCheckValue);
-    }
-    else {
-        d.check->hide();
-    }
-    d.adjustSize();
-    int ret = d.exec();
-
-    if (aCheckMsg) {
-        *aCheckValue = d.check->isChecked();
-    }
-    *aConfirm = (ret & QMessageBox::Ok);
-    if (*aConfirm) {
-        if (*aPassword) nsMemory::Free(*aPassword);
-        *aPassword =
-            ToNewUnicode(NS_ConvertUTF8toUTF16(d.password->text().utf8()));
-    }
-
-    return NS_OK;
-}
-
-/**
- * Puts up a dialog box which has a list box of strings
- */
-NS_IMETHODIMP
-QtPromptService::Select(nsIDOMWindow* aParent,
-                        const PRUnichar* aDialogTitle,
-                        const PRUnichar* aDialogText,
-                        PRUint32 aCount,
-                        const PRUnichar** aSelectList,
-                        PRInt32* outSelection,
-                        PRBool* aConfirm)
-{
-    SelectDialog d(GetQWidgetForDOMWindow(aParent));
-    d.icon->setPixmap(QApplication::style().
-                      stylePixmap(QStyle::SP_MessageBoxQuestion));
-    if (aDialogTitle) {
-        d.setCaption(QString::fromUcs2(aDialogTitle));
-    }
-    d.message->setText(QString::fromUcs2(aDialogText));
-    if (aSelectList) {
-        QStringList l;
-        for (PRUint32 i = 0; i < aCount; ++i) {
-            l.append(QString::fromUcs2(aSelectList[i]));
-        }
-        d.select->clear();
-        d.select->insertStringList(l);
-    }
-    d.adjustSize();
-    int ret = d.exec();
-
-    *aConfirm = (ret & QMessageBox::Ok);
-    if (*aConfirm) {
-        *outSelection = d.select->currentItem();
-    }
-
-    return NS_OK;
-}
-
-QWidget*
-QtPromptService::GetQWidgetForDOMWindow(nsIDOMWindow* aDOMWindow)
-{
-    nsCOMPtr<nsIWindowWatcher> wwatch = do_GetService("@mozilla.org/embedcomp/window-watcher;1");
-
-    nsCOMPtr<nsIWebBrowserChrome> chrome;
-    wwatch->GetChromeForWindow(aDOMWindow, getter_AddRefs(chrome));
-    nsCOMPtr<nsIEmbeddingSiteWindow> siteWindow = do_QueryInterface(chrome);
-    QWidget* parentWidget;
-    siteWindow->GetSiteWindow((void**)&parentWidget);
-
-    return parentWidget;
-}
-
-QString
-QtPromptService::GetButtonLabel(PRUint32 aFlags,
-                                PRUint32 aPos,
-                                const PRUnichar* aStringValue)
-{
-    PRUint32 posFlag = (aFlags & (255 * aPos)) / aPos;
-    switch (posFlag) {
-    case BUTTON_TITLE_OK:
-        return qApp->translate("QtPromptService", "&OK");
-    case BUTTON_TITLE_CANCEL:
-        return qApp->translate("QtPromptService", "&Cancel");
-    case BUTTON_TITLE_YES:
-        return qApp->translate("QtPromptService", "&Yes");
-    case BUTTON_TITLE_NO:
-        return qApp->translate("QtPromptService", "&No");
-    case BUTTON_TITLE_SAVE:
-        return qApp->translate("QtPromptService", "&Save");
-    case BUTTON_TITLE_DONT_SAVE:
-        return qApp->translate("QtPromptService", "&Don't Save");
-    case BUTTON_TITLE_REVERT:
-        return qApp->translate("QtPromptService", "&Revert");
-    case BUTTON_TITLE_IS_STRING:
-        return qApp->translate("QtPromptService",
-                               QString::fromUcs2(aStringValue));
-    case 0:
-        return QString::null;
-    default:
-        NS_WARNING("Unexpected button flags");
-        return QString::null;
-    }
-}
deleted file mode 100644
--- a/embedding/browser/qt/src/QtPromptService.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Lixto GmbH.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Michal Ceresna <ceresna@amos.sturak.sk>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-#ifndef qtpromptservice_h
-#define qtpromptservice_h
-
-#include <nsIPromptService.h>
-#include <nsString.h>
-#include <qwidget.h>
-
-class nsIDOMWindow;
-
-class QtPromptService : public nsIPromptService
-{
-public:
-    QtPromptService();
-    virtual ~QtPromptService();
-
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSIPROMPTSERVICE
-
-private:
-    QWidget* GetQWidgetForDOMWindow(nsIDOMWindow* aDOMWindow);
-    QString GetButtonLabel(PRUint32 aFlags, PRUint32 aPos,
-                           const PRUnichar* aStringValue);
-};
-
-#endif /* qtpromptservice_h */
deleted file mode 100644
--- a/embedding/browser/qt/src/alert.ui
+++ /dev/null
@@ -1,234 +0,0 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>AlertDialog</class>
-<widget class="QDialog">
-    <property name="name">
-        <cstring>AlertDialog</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>195</width>
-            <height>133</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>Alert</string>
-    </property>
-    <property name="sizeGripEnabled">
-        <bool>false</bool>
-    </property>
-    <vbox>
-        <property name="name">
-            <cstring>unnamed</cstring>
-        </property>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout18</cstring>
-            </property>
-            <grid>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <spacer row="1" column="1">
-                    <property name="name">
-                        <cstring>check_spacer1</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QLabel" row="0" column="1">
-                    <property name="name">
-                        <cstring>message</cstring>
-                    </property>
-                    <property name="enabled">
-                        <bool>true</bool>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>3</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>alert text</string>
-                    </property>
-                    <property name="alignment">
-                        <set>WordBreak|AlignVCenter</set>
-                    </property>
-                </widget>
-                <spacer row="2" column="0">
-                    <property name="name">
-                        <cstring>spacer1</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QCheckBox" row="2" column="1">
-                    <property name="name">
-                        <cstring>check</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>0</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>confirm</string>
-                    </property>
-                </widget>
-                <spacer row="1" column="0">
-                    <property name="name">
-                        <cstring>check_spacer2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QLabel" row="0" column="0">
-                    <property name="name">
-                        <cstring>icon</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>1</hsizetype>
-                            <vsizetype>1</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="scaledContents">
-                        <bool>false</bool>
-                    </property>
-                    <property name="alignment">
-                        <set>AlignTop|AlignLeft</set>
-                    </property>
-                </widget>
-            </grid>
-        </widget>
-        <spacer>
-            <property name="name">
-                <cstring>spacer2</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Fixed</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>10</height>
-                </size>
-            </property>
-        </spacer>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout6</cstring>
-            </property>
-            <hbox>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <spacer>
-                    <property name="name">
-                        <cstring>spacer3</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>ok</cstring>
-                    </property>
-                    <property name="text">
-                        <string>&amp;OK</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                    <property name="default">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <spacer>
-                    <property name="name">
-                        <cstring>spacer4</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-            </hbox>
-        </widget>
-    </vbox>
-</widget>
-<connections>
-    <connection>
-        <sender>ok</sender>
-        <signal>clicked()</signal>
-        <receiver>AlertDialog</receiver>
-        <slot>accept()</slot>
-    </connection>
-</connections>
-<tabstops>
-    <tabstop>ok</tabstop>
-    <tabstop>check</tabstop>
-</tabstops>
-<pixmapinproject/>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
deleted file mode 100644
--- a/embedding/browser/qt/src/config/qtconfig.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#need a fullpath here, otherwise uic complains about
-#already defined symbols
-FULLDIST = `(cd $(DIST); pwd)`
-DIST_QTDESIGNERPLUGINS = $(FULLDIST)/lib/designer
-
-ifneq (,$(filter Linux FreeBSD SunOS,$(OS_ARCH)))
-UIC = $(QTDIR)/bin/uic -L $(DIST_QTDESIGNERPLUGINS)
-endif
-ifeq ($(OS_ARCH), WINNT)
-UIC = $(CYGWIN_WRAPPER) $(QTDIR)/bin/uic$(BIN_SUFFIX) -L $(DIST_QTDESIGNERPLUGINS)
-endif
-
-
-UI_HSRCS = $(UICSRCS:%.ui=ui_%.h)
-UI_CPPSRCS = $(UICSRCS:%.ui=ui_%.cpp)
-MOCUI_CPPSRCS = $(UI_CPPSRCS:%=moc_%)
-ifdef IMAGES
-IMGUI_CPPSRCS = uiimg_collection.cpp
-endif
-CPPSRCS += $(UI_CPPSRCS) $(MOCUI_CPPSRCS) $(IMGUI_CPPSRCS)
-GARBAGE += $(UI_HSRCS) $(UI_CPPSRCS) $(MOCUI_CPPSRCS) $(IMGUI_CPPSRCS)
-
deleted file mode 100644
--- a/embedding/browser/qt/src/config/qtrules.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-ui_%.h: %.ui Makefile Makefile.in
-	$(UIC) $< -o $@
-
-ui_%.cpp: %.ui ui_%.h Makefile Makefile.in
-	$(UIC) $< -i $(<:%.ui=ui_%.h) -o $@
-
-uiimg_%.cpp: $(IMAGES) Makefile Makefile.in
-	$(UIC) -embed $(PROGRAM) $(IMAGES) -o $@
-
-libs::
-ifdef IS_QTDESIGNERPLUGIN
-	@if test ! -d $(DIST_QTDESIGNERPLUGINS); then echo Creating $(DIST_QTDESIGNERPLUGINS); rm -rf $(DIST_QTDESIGNERPLUGINS); $(NSINSTALL) -D $(DIST_QTDESIGNERPLUGINS); else true; fi 
-	$(INSTALL) $(SHARED_LIBRARY) $(DIST_QTDESIGNERPLUGINS)
-endif
-
deleted file mode 100644
--- a/embedding/browser/qt/src/confirm.ui
+++ /dev/null
@@ -1,277 +0,0 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>ConfirmDialog</class>
-<widget class="QDialog">
-    <property name="name">
-        <cstring>ConfirmDialog</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>296</width>
-            <height>152</height>
-        </rect>
-    </property>
-    <property name="sizePolicy">
-        <sizepolicy>
-            <hsizetype>1</hsizetype>
-            <vsizetype>1</vsizetype>
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-        </sizepolicy>
-    </property>
-    <property name="caption">
-        <string>Confirm</string>
-    </property>
-    <property name="sizeGripEnabled">
-        <bool>false</bool>
-    </property>
-    <vbox>
-        <property name="name">
-            <cstring>unnamed</cstring>
-        </property>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout14</cstring>
-            </property>
-            <grid>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <spacer row="1" column="0">
-                    <property name="name">
-                        <cstring>check_spacer2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <spacer row="2" column="0">
-                    <property name="name">
-                        <cstring>spacer1</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QCheckBox" row="2" column="1">
-                    <property name="name">
-                        <cstring>check</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>0</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>confirm</string>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="0" column="1">
-                    <property name="name">
-                        <cstring>message</cstring>
-                    </property>
-                    <property name="enabled">
-                        <bool>true</bool>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>3</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>confirm text</string>
-                    </property>
-                    <property name="alignment">
-                        <set>WordBreak|AlignVCenter</set>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="0" column="0">
-                    <property name="name">
-                        <cstring>icon</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>1</hsizetype>
-                            <vsizetype>1</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="scaledContents">
-                        <bool>false</bool>
-                    </property>
-                    <property name="alignment">
-                        <set>AlignTop|AlignLeft</set>
-                    </property>
-                </widget>
-                <spacer row="1" column="1">
-                    <property name="name">
-                        <cstring>check_spacer1</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-            </grid>
-        </widget>
-        <spacer>
-            <property name="name">
-                <cstring>spacer2</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Fixed</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>10</height>
-                </size>
-            </property>
-        </spacer>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout15</cstring>
-            </property>
-            <hbox>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <spacer>
-                    <property name="name">
-                        <cstring>spacer4</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>but1</cstring>
-                    </property>
-                    <property name="text">
-                        <string>1</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                    <property name="default">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>but2</cstring>
-                    </property>
-                    <property name="text">
-                        <string>2</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>but3</cstring>
-                    </property>
-                    <property name="text">
-                        <string>3</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <spacer>
-                    <property name="name">
-                        <cstring>spacer4_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-            </hbox>
-        </widget>
-    </vbox>
-</widget>
-<connections>
-    <connection>
-        <sender>but1</sender>
-        <signal>clicked()</signal>
-        <receiver>ConfirmDialog</receiver>
-        <slot>done1()</slot>
-    </connection>
-    <connection>
-        <sender>but2</sender>
-        <signal>clicked()</signal>
-        <receiver>ConfirmDialog</receiver>
-        <slot>done2()</slot>
-    </connection>
-    <connection>
-        <sender>but3</sender>
-        <signal>clicked()</signal>
-        <receiver>ConfirmDialog</receiver>
-        <slot>done3()</slot>
-    </connection>
-</connections>
-<slots>
-    <slot>done1()</slot>
-    <slot>done2()</slot>
-    <slot>done3()</slot>
-</slots>
-<pixmapinproject/>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
deleted file mode 100644
--- a/embedding/browser/qt/src/prompt.ui
+++ /dev/null
@@ -1,309 +0,0 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>PromptDialog</class>
-<widget class="QDialog">
-    <property name="name">
-        <cstring>PromptDialog</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>222</width>
-            <height>177</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>Prompt</string>
-    </property>
-    <property name="sizeGripEnabled">
-        <bool>false</bool>
-    </property>
-    <vbox>
-        <property name="name">
-            <cstring>unnamed</cstring>
-        </property>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout15</cstring>
-            </property>
-            <grid>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <widget class="QLabel" row="0" column="1">
-                    <property name="name">
-                        <cstring>message</cstring>
-                    </property>
-                    <property name="enabled">
-                        <bool>true</bool>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>3</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>prompt text</string>
-                    </property>
-                    <property name="alignment">
-                        <set>WordBreak|AlignVCenter</set>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="0" column="0">
-                    <property name="name">
-                        <cstring>icon</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>1</hsizetype>
-                            <vsizetype>1</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="scaledContents">
-                        <bool>false</bool>
-                    </property>
-                    <property name="alignment">
-                        <set>AlignTop|AlignLeft</set>
-                    </property>
-                </widget>
-                <widget class="QCheckBox" row="3" column="1">
-                    <property name="name">
-                        <cstring>check</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>0</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>confirm</string>
-                    </property>
-                </widget>
-                <widget class="QLayoutWidget" row="1" column="1">
-                    <property name="name">
-                        <cstring>layout13</cstring>
-                    </property>
-                    <hbox>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="QLineEdit">
-                            <property name="name">
-                                <cstring>input</cstring>
-                            </property>
-                            <property name="sizePolicy">
-                                <sizepolicy>
-                                    <hsizetype>3</hsizetype>
-                                    <vsizetype>0</vsizetype>
-                                    <horstretch>0</horstretch>
-                                    <verstretch>0</verstretch>
-                                </sizepolicy>
-                            </property>
-                        </widget>
-                        <spacer>
-                            <property name="name">
-                                <cstring>spacer23_2</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Minimum</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>10</width>
-                                    <height>5</height>
-                                </size>
-                            </property>
-                        </spacer>
-                    </hbox>
-                </widget>
-                <spacer row="3" column="0">
-                    <property name="name">
-                        <cstring>spacer1</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <spacer row="2" column="1">
-                    <property name="name">
-                        <cstring>check_spacer1</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <spacer row="2" column="0">
-                    <property name="name">
-                        <cstring>check_spacer2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <spacer row="1" column="0">
-                    <property name="name">
-                        <cstring>check_spacer2_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-            </grid>
-        </widget>
-        <spacer>
-            <property name="name">
-                <cstring>spacer2</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Fixed</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>10</height>
-                </size>
-            </property>
-        </spacer>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout10</cstring>
-            </property>
-            <hbox>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <spacer>
-                    <property name="name">
-                        <cstring>Horizontal Spacing2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>ok</cstring>
-                    </property>
-                    <property name="text">
-                        <string>&amp;OK</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                    <property name="default">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>cancel</cstring>
-                    </property>
-                    <property name="text">
-                        <string>&amp;Cancel</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <spacer>
-                    <property name="name">
-                        <cstring>Horizontal Spacing2_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-            </hbox>
-        </widget>
-    </vbox>
-</widget>
-<connections>
-    <connection>
-        <sender>ok</sender>
-        <signal>clicked()</signal>
-        <receiver>PromptDialog</receiver>
-        <slot>accept()</slot>
-    </connection>
-    <connection>
-        <sender>cancel</sender>
-        <signal>clicked()</signal>
-        <receiver>PromptDialog</receiver>
-        <slot>reject()</slot>
-    </connection>
-</connections>
-<tabstops>
-    <tabstop>input</tabstop>
-    <tabstop>check</tabstop>
-    <tabstop>ok</tabstop>
-    <tabstop>cancel</tabstop>
-</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
deleted file mode 100644
--- a/embedding/browser/qt/src/qgeckoembed.cpp
+++ /dev/null
@@ -1,724 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include "qgeckoembed.h"
-
-#include "EmbedWindow.h"
-#include "EmbedProgress.h"
-#include "EmbedStream.h"
-#include "EmbedEventListener.h"
-#include "EmbedContentListener.h"
-#include "EmbedWindowCreator.h"
-#include "qgeckoglobals.h"
-
-#include "nsIAppShell.h"
-#include <nsIDocShell.h>
-#include <nsIWebProgress.h>
-#include <nsIWebNavigation.h>
-#include <nsIWebBrowser.h>
-#include <nsISHistory.h>
-#include <nsIWebBrowserChrome.h>
-#include "nsIWidget.h"
-#include "nsCRT.h"
-#include <nsIWindowWatcher.h>
-#include <nsILocalFile.h>
-#include <nsEmbedAPI.h>
-#include <nsWidgetsCID.h>
-#include <nsIDOMUIEvent.h>
-#include <nsIInterfaceRequestor.h>
-#include <nsIComponentManager.h>
-#include <nsIFocusController.h>
-#include <nsProfileDirServiceProvider.h>
-#include <nsIGenericFactory.h>
-#include <nsIComponentRegistrar.h>
-#include <nsVoidArray.h>
-#include <nsIDOMDocument.h>
-#include <nsIDOMBarProp.h>
-#include <nsIDOMWindow.h>
-#include <nsPIDOMEventTarget.h>
-#include <nsCOMPtr.h>
-#include <nsPIDOMWindow.h>
-
-#include "prenv.h"
-
-#include <qlayout.h>
-
-class QGeckoEmbedPrivate
-{
-public:
-    QGeckoEmbedPrivate(QGeckoEmbed *qq);
-    ~QGeckoEmbedPrivate();
-
-    QGeckoEmbed *q;
-
-    QWidget *mMainWidget;
-
-    // all of the objects that we own
-    EmbedWindow                   *window;
-    nsCOMPtr<nsISupports>          windowGuard;
-    EmbedProgress                 *progress;
-    nsCOMPtr<nsISupports>          progressGuard;
-    EmbedContentListener          *contentListener;
-    nsCOMPtr<nsISupports>          contentListenerGuard;
-    EmbedEventListener            *eventListener;
-    nsCOMPtr<nsISupports>          eventListenerGuard;
-    EmbedStream                   *stream;
-    nsCOMPtr<nsISupports>          streamGuard;
-
-    nsCOMPtr<nsIWebNavigation>     navigation;
-    nsCOMPtr<nsISHistory>          sessionHistory;
-
-    // our event target
-    nsCOMPtr<nsPIDOMEventTarget>   eventTarget;
-
-    // chrome mask
-    PRUint32                       chromeMask;
-
-    bool isChrome;
-    bool chromeLoaded;
-    bool listenersAttached;
-
-    void initGUI();
-    void init();
-    void ApplyChromeMask();
-};
-
-
-QGeckoEmbedPrivate::QGeckoEmbedPrivate(QGeckoEmbed *qq)
-    : q(qq),
-      mMainWidget(0),
-      chromeMask(nsIWebBrowserChrome::CHROME_ALL),
-      isChrome(FALSE),
-      chromeLoaded(FALSE),
-      listenersAttached(FALSE)
-{
-    initGUI();
-    init();
-}
-
-QGeckoEmbedPrivate::~QGeckoEmbedPrivate()
-{
-    QGeckoGlobals::removeEngine(q);
-    QGeckoGlobals::popStartup();
-}
-
-void
-QGeckoEmbedPrivate::init()
-{
-    QGeckoGlobals::initializeGlobalObjects();
-    QGeckoGlobals::pushStartup();
-    QGeckoGlobals::addEngine(q);
-
-    // Create our embed window, and create an owning reference to it and
-    // initialize it.  It is assumed that this window will be destroyed
-    // when we go out of scope.
-    window = new EmbedWindow();
-    windowGuard = NS_STATIC_CAST(nsIWebBrowserChrome *, window);
-    window->Init(q);
-    // Create our progress listener object, make an owning reference,
-    // and initialize it.  It is assumed that this progress listener
-    // will be destroyed when we go out of scope.
-    progress = new EmbedProgress(q);
-    progressGuard = NS_STATIC_CAST(nsIWebProgressListener *,
-                                   progress);
-
-    // Create our content listener object, initialize it and attach it.
-    // It is assumed that this will be destroyed when we go out of
-    // scope.
-    contentListener = new EmbedContentListener(q);
-    contentListenerGuard = NS_STATIC_CAST(nsISupports*,
-                                          NS_STATIC_CAST(nsIURIContentListener*, contentListener));
-
-    // Create our key listener object and initialize it.  It is assumed
-    // that this will be destroyed before we go out of scope.
-    eventListener = new EmbedEventListener(q);
-    eventListenerGuard =
-        NS_STATIC_CAST(nsISupports *, NS_STATIC_CAST(nsIDOMKeyListener *,
-                                                     eventListener));
-
-    // has the window creator service been set up?
-    static int initialized = PR_FALSE;
-    // Set up our window creator ( only once )
-    if (!initialized) {
-        // create our local object
-        nsCOMPtr<nsIWindowCreator> windowCreator = new EmbedWindowCreator();
-
-        // Attach it via the watcher service
-        nsCOMPtr<nsIWindowWatcher> watcher = do_GetService(NS_WINDOWWATCHER_CONTRACTID);
-        if (watcher)
-            watcher->SetWindowCreator(windowCreator);
-        initialized = PR_TRUE;
-    }
-
-    // Get the nsIWebBrowser object for our embedded window.
-    nsCOMPtr<nsIWebBrowser> webBrowser;
-    window->GetWebBrowser(getter_AddRefs(webBrowser));
-
-    // get a handle on the navigation object
-    navigation = do_QueryInterface(webBrowser);
-
-    // Create our session history object and tell the navigation object
-    // to use it.  We need to do this before we create the web browser
-    // window.
-    sessionHistory = do_CreateInstance(NS_SHISTORY_CONTRACTID);
-    navigation->SetSessionHistory(sessionHistory);
-
-    // create the window
-    window->CreateWindow();
-
-    // bind the progress listener to the browser object
-    nsCOMPtr<nsISupportsWeakReference> supportsWeak;
-    supportsWeak = do_QueryInterface(progressGuard);
-    nsCOMPtr<nsIWeakReference> weakRef;
-    supportsWeak->GetWeakReference(getter_AddRefs(weakRef));
-    webBrowser->AddWebBrowserListener(weakRef,
-                                      NS_GET_IID(nsIWebProgressListener));
-
-    // set ourselves as the parent uri content listener
-    webBrowser->SetParentURIContentListener(contentListener);
-
-    // save the window id of the newly created window
-    nsCOMPtr<nsIWidget> qtWidget;
-    window->mBaseWindow->GetMainWidget(getter_AddRefs(qtWidget));
-    // get the native drawing area
-    mMainWidget = NS_STATIC_CAST(QWidget*, qtWidget->GetNativeData(NS_NATIVE_WINDOW));
-
-    // Apply the current chrome mask
-    ApplyChromeMask();
-}
-
-void
-QGeckoEmbedPrivate::initGUI()
-{
-    QBoxLayout *l = new QHBoxLayout(q);
-    l->setAutoAdd(TRUE);
-}
-
-void
-QGeckoEmbedPrivate::ApplyChromeMask()
-{
-   if (window) {
-      nsCOMPtr<nsIWebBrowser> webBrowser;
-      window->GetWebBrowser(getter_AddRefs(webBrowser));
-
-      nsCOMPtr<nsIDOMWindow> domWindow;
-      webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow));
-      if (domWindow) {
-          nsCOMPtr<nsIDOMBarProp> scrollbars;
-          domWindow->GetScrollbars(getter_AddRefs(scrollbars));
-          if (scrollbars) {
-
-              scrollbars->SetVisible(
-                  chromeMask & nsIWebBrowserChrome::CHROME_SCROLLBARS ?
-                  PR_TRUE : PR_FALSE);
-          }
-      }
-   }
-}
-
-
-
-
-QGeckoEmbed::QGeckoEmbed(QWidget *parent, const char *name)
-    : QWidget(parent, name)
-{
-    d = new QGeckoEmbedPrivate(this);
-}
-
-QGeckoEmbed::~QGeckoEmbed()
-{
-    delete d;
-}
-
-
-bool
-QGeckoEmbed::canGoBack() const
-{
-    PRBool retval = PR_FALSE;
-    if (d->navigation)
-        d->navigation->GetCanGoBack(&retval);
-    return retval;
-}
-
-bool
-QGeckoEmbed::canGoForward() const
-{
-    PRBool retval = PR_FALSE;
-    if (d->navigation)
-        d->navigation->GetCanGoForward(&retval);
-    return retval;
-}
-
-void
-QGeckoEmbed::loadURL(const QString &url)
-{
-    if (!url.isEmpty()) {
-        d->navigation->LoadURI((const PRUnichar*)url.ucs2(),
-                               nsIWebNavigation::LOAD_FLAGS_NONE, // Load flags
-                               nsnull,                            // Referring URI
-                               nsnull,                            // Post data
-                               nsnull);
-    }
-}
-
-void
-QGeckoEmbed::stopLoad()
-{
-    if (d->navigation)
-        d->navigation->Stop(nsIWebNavigation::STOP_NETWORK);
-}
-
-void
-QGeckoEmbed::goForward()
-{
-    if (d->navigation)
-        d->navigation->GoForward();
-}
-
-void
-QGeckoEmbed::goBack()
-{
-    if (d->navigation)
-        d->navigation->GoBack();
-}
-
-void
-QGeckoEmbed::renderData(const QCString &data, const QString &baseURI,
-                            const QString &mimeType)
-{
-    openStream(baseURI, mimeType);
-    appendData(data);
-    closeStream();
-}
-
-int
-QGeckoEmbed::openStream(const QString &baseURI, const QString &mimeType)
-{
-    nsresult rv;
-
-    if (!d->stream) {
-        d->stream = new EmbedStream();
-        d->streamGuard = do_QueryInterface(d->stream);
-        d->stream->InitOwner(this);
-        rv = d->stream->Init();
-        if (NS_FAILED(rv))
-            return rv;
-    }
-
-    rv = d->stream->OpenStream(baseURI, mimeType);
-    return rv;
-}
-
-int
-QGeckoEmbed::appendData(const QCString &data)
-{
-    if (!d->stream)
-        return NS_ERROR_FAILURE;
-
-    // Attach listeners to this document since in some cases we don't
-    // get updates for content added this way.
-    contentStateChanged();
-
-    return d->stream->AppendToStream(data, data.length());
-}
-
-int
-QGeckoEmbed::closeStream()
-{
-    nsresult rv;
-
-    if (!d->stream)
-        return NS_ERROR_FAILURE;
-    rv = d->stream->CloseStream();
-
-    // release
-    d->stream = 0;
-    d->streamGuard = 0;
-
-    return rv;
-}
-
-void
-QGeckoEmbed::reload(ReloadFlags flags)
-{
-    int qeckoFlags = 0;
-    switch(flags) {
-    case Normal:
-        qeckoFlags = 0;
-        break;
-    case BypassCache:
-        qeckoFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE;
-        break;
-    case BypassProxy:
-        qeckoFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY;
-        break;
-    case BypassProxyAndCache:
-        qeckoFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE |
-                     nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY;
-        break;
-    case CharsetChange:
-        qeckoFlags = nsIWebNavigation::LOAD_FLAGS_CHARSET_CHANGE;
-        break;
-    default:
-        qeckoFlags = 0;
-        break;
-    }
-
-
-    nsCOMPtr<nsIWebNavigation> wn;
-
-    if (d->sessionHistory) {
-        wn = do_QueryInterface(d->sessionHistory);
-    }
-    if (!wn)
-        wn = d->navigation;
-
-    if (wn)
-        wn->Reload(qeckoFlags);
-}
-
-bool
-QGeckoEmbed::domKeyDownEvent(nsIDOMKeyEvent *keyEvent)
-{
-    emit domKeyDown(keyEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domKeyPressEvent(nsIDOMKeyEvent *keyEvent)
-{
-    emit domKeyPress(keyEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domKeyUpEvent(nsIDOMKeyEvent *keyEvent)
-{
-    emit domKeyUp(keyEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domMouseDownEvent(nsIDOMMouseEvent *mouseEvent)
-{
-    emit domMouseDown(mouseEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domMouseUpEvent(nsIDOMMouseEvent *mouseEvent)
-{
-    emit domMouseUp(mouseEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domMouseClickEvent(nsIDOMMouseEvent *mouseEvent)
-{
-    emit domMouseClick(mouseEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domMouseDblClickEvent(nsIDOMMouseEvent *mouseEvent)
-{
-    emit domMouseDblClick(mouseEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domMouseOverEvent(nsIDOMMouseEvent *mouseEvent)
-{
-    emit domMouseOver(mouseEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domMouseOutEvent(nsIDOMMouseEvent *mouseEvent)
-{
-    emit domMouseOut(mouseEvent);
-    return false;
-}
-
-bool
-QGeckoEmbed::domActivateEvent(nsIDOMUIEvent *event)
-{
-    emit domActivate(event);
-    return false;
-}
-
-bool
-QGeckoEmbed::domFocusInEvent(nsIDOMUIEvent *event)
-{
-    emit domFocusIn(event);
-    return false;
-}
-
-bool
-QGeckoEmbed::domFocusOutEvent(nsIDOMUIEvent *event)
-{
-    emit domFocusOut(event);
-    return false;
-}
-
-void
-QGeckoEmbed::emitScriptStatus(const QString &str)
-{
-    emit jsStatusMessage(str);
-}
-
-void
-QGeckoEmbed::emitLinkStatus(const QString &str)
-{
-    emit linkMessage(str);
-}
-
-int
-QGeckoEmbed::chromeMask() const
-{
-    return d->chromeMask;
-}
-
-void
-QGeckoEmbed::setChromeMask(int mask)
-{
-    d->chromeMask = mask;
-
-    d->ApplyChromeMask();
-}
-
-void
-QGeckoEmbed::resizeEvent(QResizeEvent *e)
-{
-    d->window->SetDimensions(nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER,
-                              0, 0, e->size().width(), e->size().height());
-}
-
-nsIDOMDocument*
-QGeckoEmbed::document() const
-{
-    nsIDOMDocument *doc = 0;
-
-    nsCOMPtr<nsIDOMWindow> window;
-    nsCOMPtr<nsIWebBrowser> webBrowser;
-
-    d->window->GetWebBrowser(getter_AddRefs(webBrowser));
-
-    webBrowser->GetContentDOMWindow(getter_AddRefs(window));
-    if (window) {
-        window->GetDocument(&doc);
-    }
-
-    return doc;
-}
-
-void
-QGeckoEmbed::contentStateChanged()
-{
-    // we don't attach listeners to chrome
-    if (d->listenersAttached && !d->isChrome)
-        return;
-
-    setupListener();
-
-    if (!d->eventTarget)
-        return;
-
-    attachListeners();
-}
-
-void
-QGeckoEmbed::contentFinishedLoading()
-{
-    if (d->isChrome) {
-        // We're done loading.
-        d->chromeLoaded = PR_TRUE;
-
-        // get the web browser
-        nsCOMPtr<nsIWebBrowser> webBrowser;
-        d->window->GetWebBrowser(getter_AddRefs(webBrowser));
-
-        // get the content DOM window for that web browser
-        nsCOMPtr<nsIDOMWindow> domWindow;
-        webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow));
-        if (!domWindow) {
-            NS_WARNING("no dom window in content finished loading\n");
-            return;
-        }
-
-        // resize the content
-        domWindow->SizeToContent();
-
-        // and since we're done loading show the window, assuming that the
-        // visibility flag has been set.
-        PRBool visibility;
-        d->window->GetVisibility(&visibility);
-        if (visibility)
-            d->window->SetVisibility(PR_TRUE);
-    }
-}
-
-void
-QGeckoEmbed::setupListener()
-{
-    if (d->eventTarget)
-        return;
-
-    nsCOMPtr<nsPIDOMWindow> piWin;
-    GetPIDOMWindow(getter_AddRefs(piWin));
-
-    if (!piWin)
-        return;
-
-    d->eventTarget = do_QueryInterface(piWin->GetChromeEventHandler());
-}
-
-void
-QGeckoEmbed::attachListeners()
-{
-    if (!d->eventTarget || d->listenersAttached)
-        return;
-
-    nsIDOMEventListener *eventListener =
-        NS_STATIC_CAST(nsIDOMEventListener *,
-                       NS_STATIC_CAST(nsIDOMKeyListener *, d->eventListener));
-
-    // add the key listener
-    nsresult rv;
-    rv = d->eventTarget->AddEventListenerByIID(eventListener,
-                                               NS_GET_IID(nsIDOMKeyListener));
-    if (NS_FAILED(rv)) {
-        NS_WARNING("Failed to add key listener\n");
-        return;
-    }
-
-    rv = d->eventTarget->AddEventListenerByIID(eventListener,
-                                               NS_GET_IID(nsIDOMMouseListener));
-    if (NS_FAILED(rv)) {
-        NS_WARNING("Failed to add mouse listener\n");
-        return;
-    }
-
-    rv = d->eventTarget->AddEventListenerByIID(eventListener,
-                                               NS_GET_IID(nsIDOMUIListener));
-    if (NS_FAILED(rv)) {
-        NS_WARNING("Failed to add UI listener\n");
-        return;
-    }
-
-    // ok, all set.
-    d->listenersAttached = PR_TRUE;
-}
-
-EmbedWindow * QGeckoEmbed::window() const
-{
-    return d->window;
-}
-
-
-int QGeckoEmbed::GetPIDOMWindow(nsPIDOMWindow **aPIWin)
-{
-    *aPIWin = nsnull;
-
-    // get the web browser
-    nsCOMPtr<nsIWebBrowser> webBrowser;
-    d->window->GetWebBrowser(getter_AddRefs(webBrowser));
-
-    // get the content DOM window for that web browser
-    nsCOMPtr<nsIDOMWindow> domWindow;
-    webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow));
-    if (!domWindow)
-        return NS_ERROR_FAILURE;
-
-    // get the private DOM window
-    nsCOMPtr<nsPIDOMWindow> domWindowPrivate = do_QueryInterface(domWindow);
-    // and the root window for that DOM window
-    *aPIWin = domWindowPrivate->GetPrivateRoot();
-
-    if (*aPIWin) {
-        NS_ADDREF(*aPIWin);
-        return NS_OK;
-    }
-
-    return NS_ERROR_FAILURE;
-
-}
-
-void QGeckoEmbed::setIsChrome(bool isChrome)
-{
-    d->isChrome = isChrome;
-}
-
-bool QGeckoEmbed::isChrome() const
-{
-    return d->isChrome;
-}
-
-bool QGeckoEmbed::chromeLoaded() const
-{
-    return d->chromeLoaded;
-}
-
-QString QGeckoEmbed::url() const
-{
-    nsCOMPtr<nsIURI> uri;
-    d->navigation->GetCurrentURI(getter_AddRefs(uri));
-    nsCAutoString acstring;
-    uri->GetSpec(acstring);
-
-    return QString::fromUtf8(acstring.get());
-}
-
-QString QGeckoEmbed::resolvedUrl(const QString &relativepath) const
-{
-    nsCOMPtr<nsIURI> uri;
-    d->navigation->GetCurrentURI(getter_AddRefs(uri));
-    nsCAutoString rel;
-    rel.Assign(relativepath.utf8().data());
-    nsCAutoString resolved;
-    uri->Resolve(rel, resolved);
-
-    return QString::fromUtf8(resolved.get());
-}
-
-void QGeckoEmbed::initialize(const char *aDir, const char *aName)
-{
-    QGeckoGlobals::setProfilePath(aDir, aName);
-}
-
deleted file mode 100644
--- a/embedding/browser/qt/src/qgeckoembed.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef QECKOEMBED_H
-#define QECKOEMBED_H
-
-#include <qwidget.h>
-
-class nsIDOMKeyEvent;
-class nsIDOMMouseEvent;
-class nsIDOMUIEvent;
-class nsModuleComponentInfo;
-class nsIDirectoryServiceProvider;
-class nsIAppShell;
-class nsVoidArray;
-class nsProfileDirServiceProvider;
-class nsISupports;
-class EmbedWindow;
-class EmbedEventListener;
-class EmbedProgress;
-class nsIWebNavigation;
-class nsISHistory;
-class EmbedContentListener;
-class EmbedStream;
-class QHBox;
-class nsIDOMDocument;
-class nsPIDOMWindow;
-class QPaintEvent;
-
-class QGeckoEmbedPrivate;
-
-class QGeckoEmbed : public QWidget
-{
-    Q_OBJECT
-public:
-    static void initialize(const char *aDir, const char *aName);
-public:
-    enum ReloadFlags
-    {
-        Normal,
-        BypassCache,
-        BypassProxy,
-        BypassProxyAndCache,
-        CharsetChange
-    };
-public:
-    QGeckoEmbed(QWidget *parent, const char *name);
-    ~QGeckoEmbed();
-
-    bool canGoBack() const;
-    bool canGoForward() const;
-
-    void setIsChrome(bool);
-    int chromeMask() const;
-
-    nsIDOMDocument *document() const;
-    QString url() const;
-    QString resolvedUrl(const QString &relativepath) const;
-
-public slots:
-    void loadURL(const QString &url);
-    void stopLoad();
-    void goForward();
-    void goBack();
-
-    void renderData(const QCString &data, const QString &baseURI,
-                    const QString &mimeType);
-
-    int  openStream(const QString &baseURI, const QString &mimeType);
-    int  appendData(const QCString &data);
-    int  closeStream();
-
-    void reload(ReloadFlags flags = Normal);
-
-    void setChromeMask(int);
-
-signals:
-    void linkMessage(const QString &message);
-    void jsStatusMessage(const QString &message);
-    void locationChanged(const QString &location);
-    void windowTitleChanged(const QString &title);
-
-    void progress(int current, int max);
-    void progressAll(const QString &url, int current, int max);
-
-    void netState(int state, int status);
-    void netStateAll(const QString &url, int state, int status);
-
-    void netStart();
-    void netStop();
-
-    void newWindow(QGeckoEmbed *newWindow, int chromeMask);
-    void visibilityChanged(bool visible);
-    void destroyBrowser();
-    void openURI(const QString &url);
-    void sizeTo(int width, int height);
-
-    void securityChange(void *request, int status, void *message);
-    void statusChange(void *request, int status, void *message);
-
-    void showContextMenu(const QPoint &p, const QString &url);
-
-    /**
-     * The dom signals are called only if the dom* methods
-     * are not reimplemented.
-     */
-    void domKeyDown(nsIDOMKeyEvent *keyEvent);
-    void domKeyPress(nsIDOMKeyEvent *keyEvent);
-    void domKeyUp(nsIDOMKeyEvent *keyEvent);
-    void domMouseDown(nsIDOMMouseEvent *mouseEvent);
-    void domMouseUp(nsIDOMMouseEvent *mouseEvent);
-    void domMouseClick(nsIDOMMouseEvent *mouseEvent);
-    void domMouseDblClick(nsIDOMMouseEvent *mouseEvent);
-    void domMouseOver(nsIDOMMouseEvent *mouseEvent);
-    void domMouseOut(nsIDOMMouseEvent *mouseEvent);
-    void domActivate(nsIDOMUIEvent *event);
-    void domFocusIn(nsIDOMUIEvent *event);
-    void domFocusOut(nsIDOMUIEvent *event);
-
-
-    void startURIOpen(const QString &url, bool &abort);
-
-protected:
-    friend class EmbedEventListener;
-    friend class EmbedContentListener;
-    /**
-     * return true if you want to stop the propagation
-     * of the event. By default the events are being
-     * propagated
-     */
-
-    virtual bool domKeyDownEvent(nsIDOMKeyEvent *keyEvent);
-    virtual bool domKeyPressEvent(nsIDOMKeyEvent *keyEvent);
-    virtual bool domKeyUpEvent(nsIDOMKeyEvent *keyEvent);
-
-    virtual bool domMouseDownEvent(nsIDOMMouseEvent *mouseEvent);
-    virtual bool domMouseUpEvent(nsIDOMMouseEvent *mouseEvent);
-    virtual bool domMouseClickEvent(nsIDOMMouseEvent *mouseEvent);
-    virtual bool domMouseDblClickEvent(nsIDOMMouseEvent *mouseEvent);
-    virtual bool domMouseOverEvent(nsIDOMMouseEvent *mouseEvent);
-    virtual bool domMouseOutEvent(nsIDOMMouseEvent *mouseEvent);
-
-    virtual bool domActivateEvent(nsIDOMUIEvent *event);
-    virtual bool domFocusInEvent(nsIDOMUIEvent *event);
-    virtual bool domFocusOutEvent(nsIDOMUIEvent *event);
-
-
-protected:
-    friend class EmbedWindow;
-    friend class EmbedWindowCreator;
-    friend class EmbedProgress;
-    friend class EmbedContextMenuListener;
-    friend class EmbedStream;
-    friend class QGeckoGlobals;
-    void emitScriptStatus(const QString &str);
-    void emitLinkStatus(const QString &str);
-    void contentStateChanged();
-    void contentFinishedLoading();
-
-    bool isChrome() const;
-    bool chromeLoaded() const;
-
-protected:
-    void resizeEvent(QResizeEvent *e);
-
-    void setupListener();
-    void attachListeners();
-
-    EmbedWindow *window() const;
-    int GetPIDOMWindow(nsPIDOMWindow **aPIWin);
-
-protected:
-    QGeckoEmbedPrivate *d;
-};
-
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/qgeckoglobals.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#include "qgeckoglobals.h"
-
-#include "qgeckoembed.h"
-#include "EmbedWindow.h"
-#include "QtPromptService.h"
-
-#include "nsIAppShell.h"
-#include <nsIDocShell.h>
-#include <nsIWebProgress.h>
-#include <nsIWebNavigation.h>
-#include <nsIWebBrowser.h>
-#include <nsISHistory.h>
-#include <nsIWebBrowserChrome.h>
-#include "nsIWidget.h"
-#include "nsCRT.h"
-#include <nsIWindowWatcher.h>
-#include <nsILocalFile.h>
-#include <nsEmbedAPI.h>
-#include <nsWidgetsCID.h>
-#include <nsIDOMUIEvent.h>
-
-#include <nsIInterfaceRequestor.h>
-#include <nsIComponentManager.h>
-#include <nsIFocusController.h>
-#include <nsProfileDirServiceProvider.h>
-#include <nsIGenericFactory.h>
-#include <nsIComponentRegistrar.h>
-#include <nsVoidArray.h>
-#include <nsIDOMBarProp.h>
-#include <nsIDOMWindow.h>
-
-static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
-
-PRUint32     QGeckoGlobals::sWidgetCount = 0;
-char        *QGeckoGlobals::sCompPath    = nsnull;
-nsIAppShell *QGeckoGlobals::sAppShell    = nsnull;
-char        *QGeckoGlobals::sProfileDir  = nsnull;
-char        *QGeckoGlobals::sProfileName = nsnull;
-nsVoidArray *QGeckoGlobals::sWindowList  = nsnull;
-nsIDirectoryServiceProvider *QGeckoGlobals::sAppFileLocProvider = nsnull;
-nsProfileDirServiceProvider *QGeckoGlobals::sProfileDirServiceProvider = nsnull;
-
-#define NS_PROMPTSERVICE_CID \
- {0x95611356, 0xf583, 0x46f5, {0x81, 0xff, 0x4b, 0x3e, 0x01, 0x62, 0xc6, 0x19}}
-
-NS_GENERIC_FACTORY_CONSTRUCTOR(QtPromptService)
-
-static const nsModuleComponentInfo defaultAppComps[] = {
-  {
-    "Prompt Service",
-    NS_PROMPTSERVICE_CID,
-    "@mozilla.org/embedcomp/prompt-service;1",
-    QtPromptServiceConstructor
-  }
-};
-
-void
-QGeckoGlobals::pushStartup()
-{
-    // increment the number of widgets
-    sWidgetCount++;
-
-    // if this is the first widget, fire up xpcom
-    if (sWidgetCount == 1) {
-        nsresult rv;
-        nsCOMPtr<nsILocalFile> binDir;
-
-        if (sCompPath) {
-            rv = NS_NewNativeLocalFile(nsDependentCString(sCompPath), 1, getter_AddRefs(binDir));
-            if (NS_FAILED(rv))
-                return;
-        }
-
-        rv = NS_InitEmbedding(binDir, sAppFileLocProvider);
-        if (NS_FAILED(rv))
-            return;
-
-        // we no longer need a reference to the DirectoryServiceProvider
-        if (sAppFileLocProvider) {
-            NS_RELEASE(sAppFileLocProvider);
-            sAppFileLocProvider = nsnull;
-        }
-
-        rv = startupProfile();
-        NS_ASSERTION(NS_SUCCEEDED(rv), "Warning: Failed to start up profiles.\n");
-
-        rv = registerAppComponents();
-        NS_ASSERTION(NS_SUCCEEDED(rv), "Warning: Failed to register app components.\n");
-
-        // XXX startup appshell service?
-
-        nsCOMPtr<nsIAppShell> appShell;
-        appShell = do_CreateInstance(kAppShellCID);
-        if (!appShell) {
-            NS_WARNING("Failed to create appshell in QGeckoGlobals::pushStartup!\n");
-            return;
-        }
-        sAppShell = appShell.get();
-        NS_ADDREF(sAppShell);
-        sAppShell->Create(0, nsnull);
-        sAppShell->Spinup();
-    }
-}
-
-void
-QGeckoGlobals::popStartup()
-{
-    sWidgetCount--;
-    if (sWidgetCount == 0) {
-        // shut down the profiles
-        shutdownProfile();
-
-        if (sAppShell) {
-            // Shutdown the appshell service.
-            sAppShell->Spindown();
-            NS_RELEASE(sAppShell);
-            sAppShell = 0;
-        }
-
-        // shut down XPCOM/Embedding
-        NS_TermEmbedding();
-    }
-}
-
-void
-QGeckoGlobals::setCompPath(const char *aPath)
-{
-    if (sCompPath)
-        free(sCompPath);
-    if (aPath)
-        sCompPath = strdup(aPath);
-    else
-        sCompPath = nsnull;
-}
-
-void
-QGeckoGlobals::setAppComponents(const nsModuleComponentInfo *,
-                             int)
-{
-}
-
-void
-QGeckoGlobals::setProfilePath(const char *aDir, const char *aName)
-{
-    if (sProfileDir) {
-        nsMemory::Free(sProfileDir);
-        sProfileDir = nsnull;
-    }
-
-    if (sProfileName) {
-        nsMemory::Free(sProfileName);
-        sProfileName = nsnull;
-    }
-
-    if (aDir)
-        sProfileDir = (char *)nsMemory::Clone(aDir, strlen(aDir) + 1);
-
-    if (aName)
-        sProfileName = (char *)nsMemory::Clone(aName, strlen(aName) + 1);
-}
-
-void
-QGeckoGlobals::setDirectoryServiceProvider(nsIDirectoryServiceProvider
-                                        *appFileLocProvider)
-{
-    if (sAppFileLocProvider)
-        NS_RELEASE(sAppFileLocProvider);
-
-    if (appFileLocProvider) {
-        sAppFileLocProvider = appFileLocProvider;
-        NS_ADDREF(sAppFileLocProvider);
-    }
-}
-
-
-/* static */
-int
-QGeckoGlobals::startupProfile(void)
-{
-    // initialize profiles
-    if (sProfileDir && sProfileName) {
-        nsresult rv;
-        nsCOMPtr<nsILocalFile> profileDir;
-        NS_NewNativeLocalFile(nsDependentCString(sProfileDir), PR_TRUE,
-                              getter_AddRefs(profileDir));
-        if (!profileDir)
-            return NS_ERROR_FAILURE;
-        rv = profileDir->AppendNative(nsDependentCString(sProfileName));
-        if (NS_FAILED(rv))
-            return NS_ERROR_FAILURE;
-
-        nsCOMPtr<nsProfileDirServiceProvider> locProvider;
-        NS_NewProfileDirServiceProvider(PR_TRUE, getter_AddRefs(locProvider));
-        if (!locProvider)
-            return NS_ERROR_FAILURE;
-        rv = locProvider->Register();
-        if (NS_FAILED(rv))
-            return rv;
-        rv = locProvider->SetProfileDir(profileDir);
-        if (NS_FAILED(rv))
-            return rv;
-        // Keep a ref so we can shut it down.
-        NS_ADDREF(sProfileDirServiceProvider = locProvider);
-    }
-    return NS_OK;
-}
-
-/* static */
-void
-QGeckoGlobals::shutdownProfile(void)
-{
-    if (sProfileDirServiceProvider) {
-        sProfileDirServiceProvider->Shutdown();
-        NS_RELEASE(sProfileDirServiceProvider);
-        sProfileDirServiceProvider = 0;
-    }
-}
-
-/* static */
-int
-QGeckoGlobals::registerAppComponents()
-{
-  nsCOMPtr<nsIComponentRegistrar> cr;
-  nsresult rv = NS_GetComponentRegistrar(getter_AddRefs(cr));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  int numAppComps = sizeof(defaultAppComps) / sizeof(nsModuleComponentInfo);
-  for (int i = 0; i < numAppComps; ++i) {
-    nsCOMPtr<nsIGenericFactory> componentFactory;
-    rv = NS_NewGenericFactory(getter_AddRefs(componentFactory),
-                              &(defaultAppComps[i]));
-    if (NS_FAILED(rv)) {
-      NS_WARNING("Unable to create factory for component");
-      continue;  // don't abort registering other components
-    }
-
-    rv = cr->RegisterFactory(defaultAppComps[i].mCID, defaultAppComps[i].mDescription,
-                             defaultAppComps[i].mContractID, componentFactory);
-    NS_ASSERTION(NS_SUCCEEDED(rv), "Unable to register factory for component");
-  }
-
-  return rv;
-}
-
-void QGeckoGlobals::initializeGlobalObjects()
-{
-    if (!sWindowList) {
-        sWindowList = new nsVoidArray();
-    }
-}
-
-void QGeckoGlobals::addEngine(QGeckoEmbed *embed)
-{
-    sWindowList->AppendElement(embed);
-}
-
-void QGeckoGlobals::removeEngine(QGeckoEmbed *embed)
-{
-    sWindowList->RemoveElement(embed);
-}
-
-QGeckoEmbed *QGeckoGlobals::findPrivateForBrowser(nsIWebBrowserChrome *aBrowser)
-{
-    if (!sWindowList)
-        return nsnull;
-
-    // Get the number of browser windows.
-    PRInt32 count = sWindowList->Count();
-    // This function doesn't get called very often at all ( only when
-    // creating a new window ) so it's OK to walk the list of open
-    // windows.
-    for (int i = 0; i < count; i++) {
-        QGeckoEmbed *tmpPrivate = NS_STATIC_CAST(QGeckoEmbed *,
-                                                sWindowList->ElementAt(i));
-        // get the browser object for that window
-        nsIWebBrowserChrome *chrome = NS_STATIC_CAST(nsIWebBrowserChrome *,
-                                                     tmpPrivate->window());
-        if (chrome == aBrowser)
-            return tmpPrivate;
-    }
-
-    return nsnull;
-}
deleted file mode 100644
--- a/embedding/browser/qt/src/qgeckoglobals.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- *  Zack Rusin <zack@kde.org>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Zack Rusin <zack@kde.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef QECKOGLOBALS_H
-#define QECKOGLOBALS_H
-
-#include "prenv.h"
-
-class nsModuleComponentInfo;
-class nsIDirectoryServiceProvider;
-class nsModuleComponentInfo;
-class nsIAppShell;
-class nsVoidArray;
-class nsProfileDirServiceProvider;
-class nsIDirectoryServiceProvider;
-class nsIWebBrowserChrome;
-
-class QGeckoGlobals
-{
-    friend class QGeckoEmbed;
-public:
-    static void initializeGlobalObjects();
-    static void pushStartup();
-    static void popStartup();
-    static void setCompPath(const char *aPath);
-    static void setAppComponents(const nsModuleComponentInfo *aComps,
-                                 int aNumComponents);
-    static void setProfilePath(const char *aDir, const char *aName);
-    static void setDirectoryServiceProvider(nsIDirectoryServiceProvider
-                                            *appFileLocProvider);
-    static int  startupProfile(void);
-    static void shutdownProfile(void);
-
-    static int registerAppComponents();
-
-    static void addEngine(QGeckoEmbed *embed);
-    static void removeEngine(QGeckoEmbed *embed);
-    static QGeckoEmbed *findPrivateForBrowser(nsIWebBrowserChrome *aBrowser);
-private:
-    static PRUint32                sWidgetCount;
-    // the path to components
-    static char                   *sCompPath;
-    // the list of application-specific components to register
-    static const nsModuleComponentInfo  *sAppComps;
-    static int                     sNumAppComps;
-    // the appshell we have created
-    static nsIAppShell            *sAppShell;
-    // what is our profile path?
-    static char                   *sProfileDir;
-    static char                   *sProfileName;
-    // for profiles
-    static nsProfileDirServiceProvider *sProfileDirServiceProvider;
-    static nsIDirectoryServiceProvider *sAppFileLocProvider;
-
-    // the list of all open windows
-    static nsVoidArray            *sWindowList;
-};
-
-#endif
deleted file mode 100644
--- a/embedding/browser/qt/src/select.ui
+++ /dev/null
@@ -1,241 +0,0 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>SelectDialog</class>
-<widget class="QDialog">
-    <property name="name">
-        <cstring>SelectDialog</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>222</width>
-            <height>141</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>Select</string>
-    </property>
-    <property name="sizeGripEnabled">
-        <bool>false</bool>
-    </property>
-    <vbox>
-        <property name="name">
-            <cstring>unnamed</cstring>
-        </property>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout15</cstring>
-            </property>
-            <grid>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <widget class="QLabel" row="0" column="1">
-                    <property name="name">
-                        <cstring>message</cstring>
-                    </property>
-                    <property name="enabled">
-                        <bool>true</bool>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>3</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>select text</string>
-                    </property>
-                    <property name="alignment">
-                        <set>WordBreak|AlignVCenter</set>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="0" column="0">
-                    <property name="name">
-                        <cstring>icon</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>1</hsizetype>
-                            <vsizetype>1</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="scaledContents">
-                        <bool>false</bool>
-                    </property>
-                    <property name="alignment">
-                        <set>AlignTop|AlignLeft</set>
-                    </property>
-                </widget>
-                <widget class="QLayoutWidget" row="1" column="1">
-                    <property name="name">
-                        <cstring>layout13</cstring>
-                    </property>
-                    <hbox>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="QComboBox">
-                            <property name="name">
-                                <cstring>select</cstring>
-                            </property>
-                            <property name="sizePolicy">
-                                <sizepolicy>
-                                    <hsizetype>3</hsizetype>
-                                    <vsizetype>0</vsizetype>
-                                    <horstretch>0</horstretch>
-                                    <verstretch>0</verstretch>
-                                </sizepolicy>
-                            </property>
-                        </widget>
-                        <spacer>
-                            <property name="name">
-                                <cstring>spacer23_2</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Minimum</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>10</width>
-                                    <height>5</height>
-                                </size>
-                            </property>
-                        </spacer>
-                    </hbox>
-                </widget>
-                <spacer row="1" column="0">
-                    <property name="name">
-                        <cstring>check_spacer2_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-            </grid>
-        </widget>
-        <spacer>
-            <property name="name">
-                <cstring>spacer2</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Fixed</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>10</height>
-                </size>
-            </property>
-        </spacer>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout10</cstring>
-            </property>
-            <hbox>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <spacer>
-                    <property name="name">
-                        <cstring>Horizontal Spacing2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>ok</cstring>
-                    </property>
-                    <property name="text">
-                        <string>&amp;OK</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                    <property name="default">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>cancel</cstring>
-                    </property>
-                    <property name="text">
-                        <string>&amp;Cancel</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <spacer>
-                    <property name="name">
-                        <cstring>Horizontal Spacing2_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-            </hbox>
-        </widget>
-    </vbox>
-</widget>
-<connections>
-    <connection>
-        <sender>ok</sender>
-        <signal>clicked()</signal>
-        <receiver>SelectDialog</receiver>
-        <slot>accept()</slot>
-    </connection>
-    <connection>
-        <sender>cancel</sender>
-        <signal>clicked()</signal>
-        <receiver>SelectDialog</receiver>
-        <slot>reject()</slot>
-    </connection>
-</connections>
-<tabstops>
-    <tabstop>select</tabstop>
-    <tabstop>ok</tabstop>
-    <tabstop>cancel</tabstop>
-</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
deleted file mode 100644
--- a/embedding/browser/qt/src/userpass.ui
+++ /dev/null
@@ -1,341 +0,0 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
-<class>UserpassDialog</class>
-<widget class="QDialog">
-    <property name="name">
-        <cstring>UserpassDialog</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>264</width>
-            <height>204</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>Prompt</string>
-    </property>
-    <vbox>
-        <property name="name">
-            <cstring>unnamed</cstring>
-        </property>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout12</cstring>
-            </property>
-            <grid>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <widget class="QLabel" row="0" column="1">
-                    <property name="name">
-                        <cstring>message</cstring>
-                    </property>
-                    <property name="enabled">
-                        <bool>true</bool>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>3</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>prompt text</string>
-                    </property>
-                    <property name="alignment">
-                        <set>WordBreak|AlignVCenter</set>
-                    </property>
-                </widget>
-                <spacer row="3" column="0">
-                    <property name="name">
-                        <cstring>spacer7</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <spacer row="2" column="1">
-                    <property name="name">
-                        <cstring>spacer7_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QLabel" row="0" column="0">
-                    <property name="name">
-                        <cstring>icon</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>1</hsizetype>
-                            <vsizetype>1</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="scaledContents">
-                        <bool>false</bool>
-                    </property>
-                </widget>
-                <widget class="QLayoutWidget" row="1" column="1">
-                    <property name="name">
-                        <cstring>layout9</cstring>
-                    </property>
-                    <grid>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="QLineEdit" row="0" column="1">
-                            <property name="name">
-                                <cstring>username</cstring>
-                            </property>
-                        </widget>
-                        <spacer row="1" column="2">
-                            <property name="name">
-                                <cstring>spacer23_2</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Minimum</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>10</width>
-                                    <height>5</height>
-                                </size>
-                            </property>
-                        </spacer>
-                        <widget class="QLineEdit" row="1" column="1">
-                            <property name="name">
-                                <cstring>password</cstring>
-                            </property>
-                            <property name="echoMode">
-                                <enum>Password</enum>
-                            </property>
-                        </widget>
-                        <widget class="QLabel" row="1" column="0">
-                            <property name="name">
-                                <cstring>lb_password</cstring>
-                            </property>
-                            <property name="text">
-                                <string>Password:</string>
-                            </property>
-                        </widget>
-                        <spacer row="0" column="2">
-                            <property name="name">
-                                <cstring>spacer23</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Horizontal</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Minimum</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>10</width>
-                                    <height>5</height>
-                                </size>
-                            </property>
-                        </spacer>
-                        <widget class="QLabel" row="0" column="0">
-                            <property name="name">
-                                <cstring>lb_username</cstring>
-                            </property>
-                            <property name="text">
-                                <string>Username:</string>
-                            </property>
-                        </widget>
-                    </grid>
-                </widget>
-                <spacer row="1" column="0">
-                    <property name="name">
-                        <cstring>spacer7_3_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QCheckBox" row="3" column="1">
-                    <property name="name">
-                        <cstring>check</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>3</hsizetype>
-                            <vsizetype>0</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="text">
-                        <string>confirm</string>
-                    </property>
-                </widget>
-                <spacer row="2" column="0">
-                    <property name="name">
-                        <cstring>spacer7_3</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Vertical</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Minimum</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>5</width>
-                            <height>5</height>
-                        </size>
-                    </property>
-                </spacer>
-            </grid>
-        </widget>
-        <spacer>
-            <property name="name">
-                <cstring>spacer2</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Fixed</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>16</height>
-                </size>
-            </property>
-        </spacer>
-        <widget class="QLayoutWidget">
-            <property name="name">
-                <cstring>layout6</cstring>
-            </property>
-            <hbox>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <spacer>
-                    <property name="name">
-                        <cstring>spacer4</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>ok</cstring>
-                    </property>
-                    <property name="text">
-                        <string>&amp;OK</string>
-                    </property>
-                    <property name="autoDefault">
-                        <bool>true</bool>
-                    </property>
-                    <property name="default">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <widget class="QPushButton">
-                    <property name="name">
-                        <cstring>cancel</cstring>
-                    </property>
-                    <property name="text">
-                        <string>&amp;Cancel</string>
-                    </property>
-                </widget>
-                <spacer>
-                    <property name="name">
-                        <cstring>spacer4_2</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
-                    </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-            </hbox>
-        </widget>
-    </vbox>
-</widget>
-<connections>
-    <connection>
-        <sender>ok</sender>
-        <signal>clicked()</signal>
-        <receiver>UserpassDialog</receiver>
-        <slot>accept()</slot>
-    </connection>
-    <connection>
-        <sender>cancel</sender>
-        <signal>clicked()</signal>
-        <receiver>UserpassDialog</receiver>
-        <slot>reject()</slot>
-    </connection>
-    <connection>
-        <sender>password</sender>
-        <signal>returnPressed()</signal>
-        <receiver>UserpassDialog</receiver>
-        <slot>accept()</slot>
-    </connection>
-</connections>
-<tabstops>
-    <tabstop>username</tabstop>
-    <tabstop>password</tabstop>
-    <tabstop>check</tabstop>
-    <tabstop>ok</tabstop>
-    <tabstop>cancel</tabstop>
-</tabstops>
-<pixmapinproject/>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
deleted file mode 100644
--- a/embedding/browser/qt/tests/Makefile.in
+++ /dev/null
@@ -1,90 +0,0 @@
-DEPTH		= ../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= qgeckoembed
-REQUIRES	= xpcom \
-		  string \
-		  dom \
-		  $(NULL)
-
-ifdef NS_TRACE_MALLOC
-REQUIRES	+= tracemalloc
-endif
-
-ifdef MOZ_JPROF
-REQUIRES	+= jprof
-endif
-
-CPPSRCS		= \
-		$(MOCSRCS) \
-		mainwindow.cpp \
-		TestQGeckoEmbed.cpp
-
-MOCSRCS		= \
-		moc_mainwindow.cpp \
-		$(NULL)
-
-IMAGES = fileopen.png reload.png back.png forward.png stop.png
-
-CXXFLAGS	+= $(MOZ_QT_CFLAGS)
-PROGRAM = TestQGeckoEmbed$(BIN_SUFFIX)
-
-ifdef MOZ_ENABLE_QT
-LIBS		+= \
-		-lqgeckoembed \
-		$(XLDFLAGS) \
-		$(XLIBS) \
-		$(NULL)
-endif
-
-include $(topsrcdir)/config/config.mk
-include $(srcdir)/../src/config/qtconfig.mk
-
-# Force applications to be built non-statically
-# when building the mozcomps meta component
-ifneq (,$(filter mozcomps,$(MOZ_META_COMPONENTS)))
-BUILD_STATIC_LIBS=
-endif
-
-ifdef NS_TRACE_MALLOC
-EXTRA_LIBS	+= -ltracemalloc
-endif
-
-ifdef MOZ_PERF_METRICS
-EXTRA_LIBS	+= -lmozutil_s
-endif
-
-ifdef MOZ_JPROF
-EXTRA_LIBS	+= -ljprof
-endif
-
-EXTRA_LIBS	+= $(MOZ_JS_LIBS)
-EXTRA_LIBS	+= $(MOZ_COMPONENT_LIBS)
-
-include $(topsrcdir)/config/rules.mk
-include $(srcdir)/../src/config/qtrules.mk
-
-CXXFLAGS	+= $(MOZ_QT_CFLAGS)
-
-EXTRA_LIBS	+= \
-		$(TK_LIBS) \
-		$(NULL)
-
-ifeq ($(OS_ARCH), SunOS)
-ifndef GNU_CC
-# When using Sun's WorkShop compiler, including
-# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h
-# causes most of these compiles to fail with:
-# line 29: Error: Multiple declaration for std::tm.
-# So, this gets around the problem.
-DEFINES           += -D_TIME_H=1
-endif
-endif
-
-ifeq ($(OS_ARCH), OpenVMS)
-DEFINES		+= -DGENERIC_MOTIF_REDEFINES
-endif
deleted file mode 100644
--- a/embedding/browser/qt/tests/TestQGeckoEmbed.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <qapplication.h>
-#include "mainwindow.h"
-#include "qgeckoembed.h"
-
-#include <qdir.h>
-
-int main(int argc, char **argv)
-{
-    QApplication app(argc, argv);
-
-    QGeckoEmbed::initialize(QDir::homeDirPath().latin1(),
-                            ".TestQGeckoEmbed");
-
-    MyMainWindow *mainWindow = new MyMainWindow();
-    app.setMainWidget(mainWindow);
-
-    mainWindow->resize(700, 500);
-    mainWindow->show();
-
-    QString url;
-    if (argc > 1)
-        url = argv[1];
-    else
-        url = "http://www.kde.org";
-
-    mainWindow->qecko->loadURL(url);
-
-    return app.exec();
-}
deleted file mode 100755
index e8d11504c94363368a5351111fe986ada43ffea3..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index 667d2fe2aaf41b359361c8be48f75460fa6a3d57..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index 418e5d74b774b813be40e3085c226e3706e67cc1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/embedding/browser/qt/tests/mainwindow.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-#include "mainwindow.h"
-
-#include <qlineedit.h>
-#include <qaction.h>
-#include <qmenubar.h>
-#include <qtoolbar.h>
-#include <qfiledialog.h>
-#include <qstatusbar.h>
-#include <qvbox.h>
-#include <qlayout.h>
-
-#include "qgeckoembed.h"
-
-
-MyMainWindow::MyMainWindow()
-{
-    QVBox *box = new QVBox(this);
-    qecko = new QGeckoEmbed(box, "qgecko");
-    box->setFrameStyle(QFrame::Panel | QFrame::Sunken);
-    setCentralWidget( box );
-
-    QToolBar *toolbar = new QToolBar(this);
-    toolbar->setLabel("Location:");
-
-    QAction *action = new QAction(QPixmap::fromMimeSource( "back.png" ), tr( "Go Back"), CTRL + Key_B,
-                         toolbar, "goback");
-    connect(action, SIGNAL(activated()), this, SLOT(goBack()));
-    action->addTo(toolbar);
-
-    action = new QAction(QPixmap::fromMimeSource( "forward.png" ), tr( "Go Forward"), CTRL + Key_F,
-                         toolbar, "goforward");
-    connect(action, SIGNAL(activated()), this, SLOT(goForward()));
-    action->addTo(toolbar);
-
-    action = new QAction(QPixmap::fromMimeSource( "stop.png" ), tr("Stop"), CTRL + Key_S,
-                         toolbar, "stop");
-    connect(action, SIGNAL(activated()), this, SLOT(stop()));
-    action->addTo(toolbar);
-
-    location = new QLineEdit(toolbar);
-    toolbar->setStretchableWidget(location);
-
-    QPopupMenu *menu = new QPopupMenu(this);
-    menuBar()->insertItem( tr( "&File" ), menu );
-
-    QAction *a = new QAction( QPixmap::fromMimeSource( "fileopen.png" ), tr( "&Open..." ), CTRL + Key_O,
-                              toolbar, "fileOpen" );
-    connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
-    //a->addTo( toolbar );
-    a->addTo( menu );
-
-
-    connect( qecko, SIGNAL(linkMessage(const QString &)),
-             statusBar(), SLOT(message(const QString &)) );
-    connect( qecko, SIGNAL(jsStatusMessage(const QString &)),
-             statusBar(), SLOT(message(const QString &)) );
-    connect( qecko, SIGNAL(windowTitleChanged(const QString &)),
-             SLOT(setCaption(const QString &)) );
-    connect( qecko, SIGNAL(startURIOpen(const QString &, bool &)),
-             SLOT(startURIOpen(const QString &, bool &)) );
-    connect(qecko, SIGNAL(locationChanged(const QString&)),
-            location, SLOT(setText(const QString&)));
-    connect(qecko, SIGNAL(progress(int, int)),
-            SLOT(slotProgress(int, int)));
-    connect(qecko, SIGNAL(progressAll(const QString&, int, int)),
-            SLOT(slotProgress(const QString&, int, int)));
-
-
-    connect( location, SIGNAL(returnPressed()), SLOT(changeLocation()));
-
-}
-
-void MyMainWindow::fileOpen()
-{
-    QString fn = QFileDialog::getOpenFileName( QString::null, tr( "HTML-Files (*.htm *.html);;All Files (*)" ), this );
-    if ( !fn.isEmpty() )
-	qecko->loadURL( fn );
-}
-
-void MyMainWindow::startURIOpen(const QString &, bool &)
-{
-    qDebug("XX in the signal");
-}
-
-void MyMainWindow::changeLocation()
-{
-    qecko->loadURL( location->text() );
-}
-
-void MyMainWindow::goBack()
-{
-    qecko->goBack();
-}
-
-void MyMainWindow::goForward()
-{
-    qecko->goForward();
-}
-
-void MyMainWindow::stop()
-{
-    qecko->stopLoad();
-}
-
-void MyMainWindow::slotProgress(const QString &url, int current, int max)
-{
-    qDebug("progress %d / %d (%s)",  current, max, url.latin1());
-}
-
-void MyMainWindow::slotProgress(int current, int max)
-{
-    qDebug("progress %d / %d ", current, max);
-}
deleted file mode 100644
--- a/embedding/browser/qt/tests/mainwindow.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <qmainwindow.h>
-
-class QGeckoEmbed;
-class QLineEdit;
-
-class MyMainWindow : public QMainWindow
-{
-    Q_OBJECT
-public:
-    MyMainWindow();
-
-public slots:
-    void fileOpen();
-    void startURIOpen(const QString &, bool &);
-    void changeLocation();
-    void goBack();
-    void goForward();
-    void stop();
-
-public:
-    QGeckoEmbed *qecko;
-
-private slots:
-    void slotProgress(int, int);
-    void slotProgress(const QString &, int, int);
-
-private:
-    QLineEdit *location;
-};
-
-#endif
deleted file mode 100755
index a1243d01743ec7ed63fd65d7b45c56f14356b9ac..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
index b3f5c9a8029157e033d4f268f990c686859deea9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/embedding/components/build/Makefile.in
+++ b/embedding/components/build/Makefile.in
@@ -117,17 +117,17 @@ ifdef MOZ_PROFILESHARING
 SHARED_LIBRARY_LIBS += $(DIST)/lib/$(LIB_PREFIX)profilesharingsetup_s.$(LIB_SUFFIX)
 LOCAL_INCLUDES += -I$(srcdir)/../profilesharingsetup/src
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 LOCAL_INCLUDES += -I$(srcdir)/../printingui/src/os2 
 endif
 
-ifneq (,$(filter gtk2 beos photon qt, $(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter gtk2 beos photon, $(MOZ_WIDGET_TOOLKIT)))
 LOCAL_INCLUDES += -I$(srcdir)/../printingui/src/unixshared 
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 LOCAL_INCLUDES += -I$(srcdir)/../printingui/src/win 
 ifneq ($(OS_ARCH), WINCE)
 OS_LIBS	+= $(call EXPAND_LIBNAME,winspool comdlg32)
 endif
--- a/embedding/components/printingui/src/Makefile.in
+++ b/embedding/components/printingui/src/Makefile.in
@@ -37,17 +37,17 @@
 
 DEPTH		= ../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-ifneq (,$(filter gtk2 photon qt beos,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter gtk2 photon beos,$(MOZ_WIDGET_TOOLKIT)))
 PLATFORM_DIR += unixshared
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
 PLATFORM_DIR = os2
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
--- a/gfx/src/Makefile.in
+++ b/gfx/src/Makefile.in
@@ -84,19 +84,16 @@ DIRS        += xprintutil xprint
 endif
 
 ifdef MOZ_ENABLE_CAIRO_GFX
 DIRS        += thebes
 else
  ifdef MOZ_ENABLE_GTK2
  DIRS        += gtk
  endif
- ifdef MOZ_ENABLE_QT
- DIRS        += qt
- endif
  ifdef MOZ_ENABLE_PHOTON
  DIRS        += photon
  endif
  ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
  DIRS	     += mac
  endif
  ifneq (,$(filter windows beos os2 mac,$(MOZ_WIDGET_TOOLKIT)))
  DIRS        += $(MOZ_WIDGET_TOOLKIT)
deleted file mode 100644
--- a/gfx/src/qt/Makefile.in
+++ /dev/null
@@ -1,126 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#   John C. Griggs <johng@corel.com>
-#   Zack Rusin <zack@kde.org>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# 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 *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= gfx
-LIBRARY_NAME	= gfx_qt
-EXPORT_LIBRARY = 1
-GRE_MODULE	= 1
-IS_COMPONENT    = 1
-MODULE_NAME	= nsGfxQtModule
-LIBXUL_LIBRARY = 1
-
-REQUIRES	= xpcom \
-		  string \
-		  widget \
-		  view \
-		  uconv \
-		  pref \
-		  util \
-		  js \
-		  mozcomps \
-		  unicharutil \
-		  intl \
-		  locale \
-		  content \
-		  $(NULL)
-
-
-CPPSRCS		= \
-		nsDeviceContextQt.cpp \
-		nsDeviceContextSpecQt.cpp \
-		nsDrawingSurfaceQt.cpp \
-		nsFontMetricsQt.cpp \
-		nsGfxFactoryQt.cpp \
-		nsImageQt.cpp \
-		nsRegionQt.cpp \
-		nsRenderingContextQt.cpp \
-		nsScreenManagerQt.cpp \
-		nsScreenQt.cpp \
-		$(NULL)
-
-EXTRA_DSO_LIBS	= gkgfx gfxshared_s
-
-include $(topsrcdir)/config/rules.mk
-
-CXXFLAGS	+= $(MOZ_QT_CFLAGS)
-CFLAGS		+= $(MOZ_QT_CFLAGS)
-
-EXTRA_DSO_LDOPTS += \
-		$(LIBS_DIR) \
-		$(EXTRA_DSO_LIBS) \
-		$(MOZ_COMPONENT_LIBS) \
-		$(MOZ_JS_LIBS) \
-		$(MOZ_QT_LDFLAGS) \
-		$(NULL)
-
-ifeq ($(OS_ARCH), Linux)
-DEFINES         += -D_BSD_SOURCE
-endif
-ifeq ($(OS_ARCH), SunOS)
-ifndef GNU_CC
-# When using Sun's WorkShop compiler, including
-# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h
-# causes most of these compiles to fail with:
-# line 29: Error: Multiple declaration for std::tm.
-# So, this gets around the problem.
-DEFINES         += -D_TIME_H=1
-endif
-endif
-
-ifdef MOZ_ENABLE_POSTSCRIPT
-DEFINES         += -DUSE_POSTSCRIPT
-endif
-
-ifdef MOZ_ENABLE_XPRINT
-REQUIRES	+= xprintutil
-endif
-
-LOCAL_INCLUDES	= \
-		-I$(srcdir)/. \
-		-I$(srcdir)/.. \
-		-I$(srcdir)/../shared \
-		$(NULL)
-
deleted file mode 100644
--- a/gfx/src/qt/nsDeviceContextQt.cpp
+++ /dev/null
@@ -1,487 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *   John C. Griggs <johng@corel.com>
- *   Esben Mose Hansen <esben@despammed.com>
- *   Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-#include <math.h>
-
-#include "nspr.h"
-#include "nsIPrefBranch.h"
-#include "nsIPrefService.h"
-#include "nsIPrefBranch2.h"
-#include "nsIServiceManager.h"
-#include "nsCRT.h"
-#include "nsDeviceContextQt.h"
-#include "nsFontMetricsQt.h"
-#include "nsFont.h"
-#include "nsGfxCIID.h"
-#include "nsRenderingContextQt.h"
-#include "nsDeviceContextSpecQt.h"
-
-#ifdef USE_POSTSCRIPT
-#include "nsGfxPSCID.h"
-#include "nsIDeviceContextPS.h"
-#endif /* USE_POSTSCRIPT */
-#ifdef USE_XPRINT
-#include "nsGfxXPrintCID.h"
-#include "nsIDeviceContextXPrint.h"
-#endif /* USE_XPRINT */
-
-#include <qpaintdevicemetrics.h>
-#include <qscrollbar.h>
-#include <qpalette.h>
-#include <qapplication.h>
-#include <qstyle.h>
-#include <qfontdatabase.h>
-#include <qfontmetrics.h>
-#include <qwidgetlist.h>
-
-#include "nsIScreenManager.h"
-
-#include "qtlog.h"
-
-#define QCOLOR_TO_NS_RGB(c) \
-    ((nscolor)NS_RGB(c.red(),c.green(),c.blue()))
-
-nscoord nsDeviceContextQt::mDpi = 0;
-
-nsDeviceContextQt::nsDeviceContextQt()
-  : DeviceContextImpl()
-{
-  mTwipsToPixels = 1.0;
-  mPixelsToTwips = 1.0;
-  mDepth = 0 ;
-  mWidthFloat = 0.0f;
-  mHeightFloat = 0.0f;
-  mWidth = -1;
-  mHeight = -1;
-}
-
-nsDeviceContextQt::~nsDeviceContextQt()
-{
-  nsCOMPtr<nsIPrefBranch2> pbi = do_GetService(NS_PREFSERVICE_CONTRACTID);
-  if (pbi) {
-    pbi->RemoveObserver("layout.css.dpi", this);
-  }
-}
-
-NS_IMETHODIMP nsDeviceContextQt::Init(nsNativeWidget aNativeWidget)
-{
-  PRBool  bCleanUp = PR_FALSE;
-
-  mWidget = (QWidget*)aNativeWidget;
-
-  nsresult ignore;
-  nsCOMPtr<nsIScreenManager> sm(do_GetService("@mozilla.org/gfx/screenmanager;1",
-                                              &ignore));
-  if (sm) {
-    nsCOMPtr<nsIScreen> screen;
-    sm->GetPrimaryScreen(getter_AddRefs(screen));
-    if (screen) {
-      PRInt32 x,y,width,height,depth;
-
-      screen->GetAvailRect(&x,&y,&width,&height);
-      screen->GetPixelDepth(&depth);
-      mWidthFloat = float(width);
-      mHeightFloat = float(height);
-      mDepth = NS_STATIC_CAST(PRUint32,depth);
-    }
-  }
-
-  if (!mDpi) {
-    // Set prefVal the value of the preference "layout.css.dpi"
-    // or -1 if we can't get it.
-    // If it's negative, we pretend it's not set.
-    // If it's 0, it means force use of the operating system's logical resolution.
-    // If it's positive, we use it as the logical resolution
-    PRInt32 prefVal = -1;
-    nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
-    if (prefBranch) {
-      nsresult res = prefBranch->GetIntPref("layout.css.dpi",
-                                            &prefVal);
-      if (NS_FAILED(res)) {
-        prefVal = -1;
-      }
-      nsCOMPtr<nsIPrefBranch2> pbi(do_QueryInterface(prefBranch));
-      pbi->AddObserver("layout.css.dpi", this, PR_FALSE);
-    }
-
-    SetDPI(prefVal);
-  } else {
-    SetDPI(mDpi);
-  }
-
-#ifdef MOZ_LOGGING
-  static PRBool once = PR_TRUE;
-  if (once) {
-    PR_LOG(gQtLogModule, QT_BASIC, ("GFX: dpi=%d t2p=%g p2t=%g depth=%d\n",
-           mDpi,mTwipsToPixels,mPixelsToTwips,mDepth));
-    once = PR_FALSE;
-  }
-#endif
-
-  DeviceContextImpl::CommonInit();
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsDeviceContextQt::CreateRenderingContext(nsIRenderingContext *&aContext)
-{
-  nsresult rv;
-  nsDrawingSurfaceQt *surf;
-  QPaintDevice *pDev = nsnull;
-
-  if (mWidget)
-    pDev = (QPaintDevice*)mWidget;
-
-  // to call init for this, we need to have a valid nsDrawingSurfaceQt created
-  nsCOMPtr<nsRenderingContextQt> pContext( new nsRenderingContextQt() );
-
-  // create the nsDrawingSurfaceQt
-  surf = new nsDrawingSurfaceQt();
-
-  if (surf) {
-    //Handled by the nsDrawingSurfaceQt
-    //FIXME: instead of passing it around
-    //       create it in the nsDrawingSurface init method
-    QPainter *gc = new QPainter();
-
-    // init the nsDrawingSurfaceQt
-    if (pDev)
-      rv = surf->Init(pDev,gc);
-    else
-      rv = surf->Init(gc,10,10,0);
-
-    if (NS_SUCCEEDED(rv))
-      // Init the nsRenderingContextQt
-      rv = pContext->Init(this,surf);
-  }
-  else
-    rv = NS_ERROR_OUT_OF_MEMORY;
-
-  if (NS_SUCCEEDED(rv)) {
-    aContext = pContext;
-    NS_ADDREF(aContext);
-  }
-  return rv;
-}
-
-
-NS_IMETHODIMP nsDeviceContextQt::CreateRenderingContextInstance(nsIRenderingContext *&aContext)
-{
-  return CreateRenderingContext(aContext);
-}
-
-NS_IMETHODIMP
-nsDeviceContextQt::SupportsNativeWidgets(PRBool &aSupportsWidgets)
-{
-  //XXX it is very critical that this not lie!! MMP
-  // read the comments in the mac code for this
-  // ##############
-  aSupportsWidgets = PR_TRUE;
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsDeviceContextQt::GetSystemFont(nsSystemFontID anID, nsFont *aFont) const
-{
-  nsresult    status      = NS_OK;
-
-  switch (anID) {
-    case eSystemFont_Caption:
-    case eSystemFont_Icon:
-    case eSystemFont_Menu:
-    case eSystemFont_MessageBox:
-    case eSystemFont_SmallCaption:
-    case eSystemFont_StatusBar:
-    case eSystemFont_Window:                   // css3
-    case eSystemFont_Document:
-    case eSystemFont_Workspace:
-    case eSystemFont_Desktop:
-    case eSystemFont_Info:
-    case eSystemFont_Dialog:
-    case eSystemFont_Button:
-    case eSystemFont_PullDownMenu:
-    case eSystemFont_List:
-    case eSystemFont_Field:
-    case eSystemFont_Tooltips:
-    case eSystemFont_Widget:
-      status = GetSystemFontInfo(aFont);
-      break;
-  }
-  return status;
-}
-
-NS_IMETHODIMP nsDeviceContextQt::CheckFontExistence(const nsString& aFontName)
-{
-  QString family = QString::fromUcs2(aFontName.get());
-  QStringList families = QFontDatabase().families();
-  return families.find(family) != families.end();
-}
-
-NS_IMETHODIMP nsDeviceContextQt::GetDeviceSurfaceDimensions(PRInt32 &aWidth,
-                                                            PRInt32 &aHeight)
-{
-  if (-1 == mWidth)
-    mWidth =  NSToIntRound(mWidthFloat * mDevUnitsToAppUnits);
-
-  if (-1 == mHeight)
-    mHeight =  NSToIntRound(mHeightFloat * mDevUnitsToAppUnits);
-
-  aWidth = mWidth;
-  aHeight = mHeight;
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextQt::GetRect(nsRect &aRect)
-{
-  PRInt32 width,height;
-  nsresult rv;
-
-  rv = GetDeviceSurfaceDimensions(width,height);
-  aRect.x = 0;
-  aRect.y = 0;
-  aRect.width = width;
-  aRect.height = height;
-
-  return rv;
-}
-
-NS_IMETHODIMP nsDeviceContextQt::GetClientRect(nsRect &aRect)
-{
-  return GetRect(aRect);
-}
-
-NS_IMETHODIMP nsDeviceContextQt::GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
-                                                     nsIDeviceContext *&aContext)
-{
-  nsresult                 rv;
-  PrintMethod              method;
-  nsDeviceContextSpecQt   *spec = NS_STATIC_CAST(nsDeviceContextSpecQt *, aDevice);
-
-  rv = spec->GetPrintMethod(method);
-  if (NS_FAILED(rv))
-    return rv;
-
-#ifdef USE_XPRINT
-  if (method == pmXprint) { // XPRINT
-    static NS_DEFINE_CID(kCDeviceContextXp, NS_DEVICECONTEXTXP_CID);
-    nsCOMPtr<nsIDeviceContextXp> dcxp(do_CreateInstance(kCDeviceContextXp, &rv));
-    NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create Xp Device context.");
-    if (NS_FAILED(rv))
-      return rv;
-
-    rv = dcxp->SetSpec(aDevice);
-    if (NS_FAILED(rv))
-      return rv;
-
-    rv = dcxp->InitDeviceContextXP((nsIDeviceContext*)aContext,
-                                   (nsIDeviceContext*)this);
-    if (NS_FAILED(rv))
-      return rv;
-
-    rv = dcxp->QueryInterface(NS_GET_IID(nsIDeviceContext),
-                              (void **)&aContext);
-    return rv;
-  }
-  else
-#endif /* USE_XPRINT */
-#ifdef USE_POSTSCRIPT
-  if (method == pmPostScript) { // PostScript
-    // default/PS
-    static NS_DEFINE_CID(kCDeviceContextPS, NS_DEVICECONTEXTPS_CID);
-
-    // Create a Postscript device context
-    nsCOMPtr<nsIDeviceContextPS> dcps(do_CreateInstance(kCDeviceContextPS, &rv));
-    NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create PS Device context.");
-    if (NS_FAILED(rv))
-      return rv;
-
-    rv = dcps->SetSpec(aDevice);
-    if (NS_FAILED(rv))
-      return rv;
-
-    rv = dcps->InitDeviceContextPS((nsIDeviceContext*)aContext,
-                                   (nsIDeviceContext*)this);
-    if (NS_FAILED(rv))
-      return rv;
-
-    rv = dcps->QueryInterface(NS_GET_IID(nsIDeviceContext),
-                              (void **)&aContext);
-    return rv;
-  }
-#endif /* USE_POSTSCRIPT */
-
-  NS_WARNING("no print module created.");
-  return NS_ERROR_UNEXPECTED;
-}
-
-NS_IMETHODIMP nsDeviceContextQt::BeginDocument(PRUnichar * /*aTitle*/,
-                                               PRUnichar* /*aPrintToFileName*/,
-                                               PRInt32 /*aStartPage*/,
-                                               PRInt32 /*aEndPage*/)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextQt::EndDocument(void)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextQt::BeginPage(void)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextQt::EndPage(void)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextQt::GetDepth(PRUint32& aDepth)
-{
-  aDepth = mDepth;
-  return NS_OK;
-}
-
-nsresult nsDeviceContextQt::SetDPI(PRInt32 aDpi)
-{
-  // Set OSVal to what the operating system thinks the logical resolution is.
-  PRInt32 OSVal = 0;
-
-  QWidget *pDev = mWidget;
-  if (!pDev) {
-    QWidgetList *wlist = QApplication::allWidgets();
-    pDev = wlist->first();
-    qDebug("number of widgets is %d", wlist->count() );
-    delete wlist;
-  }
-
-  QPaintDeviceMetrics qPaintMetrics(pDev);
-  OSVal = qPaintMetrics.logicalDpiX();
-
-
-#ifdef DEBUG
-  if (!pDev)
-    qDebug("nsDeviceContextQt::SetDPI called without widget (find cleaner solution)");
-#endif
-
-  if (aDpi > 0) {
-    // If there's a valid pref value for the logical resolution,
-    // use it.
-    mDpi = aDpi;
-  }
-  else if (aDpi == 0 || OSVal > 96) {
-    // Either if the pref is 0 (force use of OS value) or the OS
-    // value is bigger than 96, use the OS value.
-    mDpi = OSVal;
-  }
-  else {
-    // if we couldn't get the pref or it's negative, and the OS
-    // value is under 96ppi, then use 96.
-    mDpi = 96;
-  }
-
-  int pt2t = 72;
-
-  // make p2t a nice round number - this prevents rounding problems
-  mPixelsToTwips = float(NSToIntRound(float(NSIntPointsToTwips(pt2t)) / float(aDpi)));
-  mTwipsToPixels = 1.0f / mPixelsToTwips;
-
-  // XXX need to reflow all documents
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsDeviceContextQt::Observe(nsISupports* aSubject, const char* aTopic,
-                           const PRUnichar* aData)
-{
-  if (nsCRT::strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) != 0) {
-    // Our local observer only handles pref changes.
-    // Forward everything else to our super class.
-    return DeviceContextImpl::Observe(aSubject, aTopic, aData);
-  }
-
-  nsCOMPtr<nsIPrefBranch> prefBranch(do_QueryInterface(aSubject));
-  NS_ASSERTION(prefBranch,
-               "All pref change observer subjects implement nsIPrefBranch");
-  nsCAutoString prefName(NS_LossyConvertUTF16toASCII(aData).get());
-
-  if (prefName.Equals(NS_LITERAL_CSTRING("layout.css.dpi"))) {
-    PRInt32 dpi;
-    nsresult rv = prefBranch->GetIntPref(prefName.get(), &dpi);
-    if (NS_SUCCEEDED(rv))
-      SetDPI(dpi);
-    return NS_OK;
-  } else
-    return DeviceContextImpl::Observe(aSubject, aTopic, aData);
-}
-
-nsresult
-nsDeviceContextQt::GetSystemFontInfo(nsFont* aFont) const
-{
-  nsresult status = NS_OK;
-  int rawWeight;
-  QFont theFont = QApplication::font();
-  QFontInfo theFontInfo(theFont);
-
-  aFont->style       = NS_FONT_STYLE_NORMAL;
-  aFont->weight      = NS_FONT_WEIGHT_NORMAL;
-  aFont->decorations = NS_FONT_DECORATION_NONE;
-  aFont->name.Assign(theFontInfo.family().ucs2());
-  if (theFontInfo.bold()) {
-    aFont->weight = NS_FONT_WEIGHT_BOLD;
-  }
-  rawWeight = theFontInfo.pixelSize();
-  aFont->size = NSIntPixelsToTwips(rawWeight,mPixelsToTwips);
-  if (theFontInfo.italic()) {
-    aFont->style = NS_FONT_STYLE_ITALIC;
-  }
-  if (theFontInfo.underline()) {
-    aFont->decorations = NS_FONT_DECORATION_UNDERLINE;
-  }
-
-  return (status);
-}
deleted file mode 100644
--- a/gfx/src/qt/nsDeviceContextQt.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *   John C. Griggs <johng@corel.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-#ifndef nsDeviceContextQt_h___
-#define nsDeviceContextQt_h___
-
-#include "nsDeviceContext.h"
-#include "nsUnitConversion.h"
-#include "nsIWidget.h"
-#include "nsIView.h"
-#include "nsIRenderingContext.h"
-
-class QWidget;
-
-class nsDeviceContextQt : public DeviceContextImpl
-{
-public:
-    nsDeviceContextQt();
-    virtual ~nsDeviceContextQt();
-
-    NS_IMETHOD  Init(nsNativeWidget aNativeWidget);
-
-    NS_IMETHOD  CreateRenderingContext(nsIRenderingContext *&aContext);
-    NS_IMETHOD  CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext)
-    {return (DeviceContextImpl::CreateRenderingContext(aView,aContext));}
-    NS_IMETHOD  CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext)
-    {return (DeviceContextImpl::CreateRenderingContext(aWidget,aContext));}
-    NS_IMETHOD  CreateRenderingContext(nsIDrawingSurface* aSurface, nsIRenderingContext *&aContext)
-    {return (DeviceContextImpl::CreateRenderingContext(aSurface, aContext));}
-    NS_IMETHOD  CreateRenderingContextInstance(nsIRenderingContext *&aContext);
-
-    NS_IMETHOD  SupportsNativeWidgets(PRBool &aSupportsWidgets);
-
-    NS_IMETHOD  GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
-
-    NS_IMETHOD CheckFontExistence(const nsString &aFontName);
-
-    NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth,PRInt32 &aHeight);
-    NS_IMETHOD GetClientRect(nsRect &aRect);
-    NS_IMETHOD GetRect(nsRect &aRect);
-
-    NS_IMETHOD GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
-                                   nsIDeviceContext *&aContext);
-
-    NS_IMETHOD BeginDocument(PRUnichar * aTitle, PRUnichar* aPrintToFileName,
-                             PRInt32 aStartPage, PRInt32 aEndPage);
-    NS_IMETHOD EndDocument(void);
-
-    NS_IMETHOD BeginPage(void);
-    NS_IMETHOD EndPage(void);
-
-    // Overridden DeviceContextImpl functions.
-    NS_IMETHOD GetDepth(PRUint32 &aDepth);
-
-    NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
-                       const PRUnichar* aData);
-
-    nsresult   SetDPI(PRInt32 dpi);
-
-private:
-    PRUint32      mDepth;
-    QWidget 	  *mWidget;
-    PRInt32       mWidth;
-    PRInt32       mHeight;
-    float         mWidthFloat;
-    float         mHeightFloat;
-
-    static nscoord mDpi;
-
-    nsresult GetSystemFontInfo(nsFont *aFont) const;
-};
-
-#endif /* nsDeviceContextQt_h___ */
-
deleted file mode 100644
--- a/gfx/src/qt/nsDeviceContextSpecQt.cpp
+++ /dev/null
@@ -1,1031 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *   Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-/* Store per-printer features in temp. prefs vars that the
- * print dialog can pick them up... */
-#define SET_PRINTER_FEATURES_VIA_PREFS 1
-#define PRINTERFEATURES_PREF "print.tmp.printerfeatures"
-
-#define FORCE_PR_LOG /* Allow logging in the release build */
-#define PR_LOGGING 1
-#include "prlog.h"
-
-#include "nsDeviceContextSpecQt.h"
-
-#include "nsIPrefBranch.h"
-#include "nsIPrefService.h"
-#include "prenv.h" /* for PR_GetEnv */
-
-#include "nsPrintfCString.h"
-#include "nsReadableUtils.h"
-#include "nsStringEnumerator.h"
-#include "nsIServiceManager.h"
-#include "nsCRT.h"
-
-#ifdef USE_XPRINT
-#include "xprintutil.h"
-#endif /* USE_XPRINT */
-
-#ifdef USE_POSTSCRIPT
-/* Fetch |postscript_module_paper_sizes| */
-#undef USE_POSTSCRIPT
-#warning "fixme: postscript disabled"
-//#include "nsPaperPS.h"
-#endif /* USE_POSTSCRIPT */
-
-/* Ensure that the result is always equal to either PR_TRUE or PR_FALSE */
-#define MAKE_PR_BOOL(val) ((val)?(PR_TRUE):(PR_FALSE))
-
-#ifdef PR_LOGGING
-static PRLogModuleInfo *DeviceContextSpecQtLM = PR_NewLogModule("DeviceContextSpecQt");
-#endif /* PR_LOGGING */
-/* Macro to make lines shorter */
-#define DO_PR_DEBUG_LOG(x) PR_LOG(DeviceContextSpecQtLM, PR_LOG_DEBUG, x)
-
-//----------------------------------------------------------------------------------
-// The printer data is shared between the PrinterEnumerator and the nsDeviceContextSpecQt
-// The PrinterEnumerator creates the printer info
-// but the nsDeviceContextSpecQt cleans it up
-// If it gets created (via the Page Setup Dialog) but the user never prints anything
-// then it will never be delete, so this class takes care of that.
-class GlobalPrinters {
-public:
-  static GlobalPrinters* GetInstance()   { return &mGlobalPrinters; }
-  ~GlobalPrinters()                      { FreeGlobalPrinters(); }
-
-  void      FreeGlobalPrinters();
-  nsresult  InitializeGlobalPrinters();
-
-  PRBool    PrintersAreAllocated()       { return mGlobalPrinterList != nsnull; }
-  PRInt32   GetNumPrinters()             { return mGlobalNumPrinters; }
-  nsString* GetStringAt(PRInt32 aInx)    { return mGlobalPrinterList->StringAt(aInx); }
-  void      GetDefaultPrinterName(PRUnichar **aDefaultPrinterName);
-
-protected:
-  GlobalPrinters() {}
-
-  static GlobalPrinters mGlobalPrinters;
-  static nsStringArray* mGlobalPrinterList;
-  static int            mGlobalNumPrinters;
-};
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-/* "Prototype" for the new nsPrinterFeatures service */
-class nsPrinterFeatures {
-public:
-  nsPrinterFeatures( const char *printername );
-  ~nsPrinterFeatures() {};
-
-  /* Does this device allow to set/change the paper size ? */
-  void SetCanChangePaperSize( PRBool aCanSetPaperSize );
-  /* Set number of paper size records and the records itself */
-  void SetNumPaperSizeRecords( PRInt32 aCount );
-  void SetPaperRecord( PRInt32 aIndex, const char *aName, PRInt32 aWidthMM, PRInt32 aHeightMM, PRBool aIsInch );
-
-  /* Does this device allow to set/change the content orientation ? */
-  void SetCanChangeOrientation( PRBool aCanSetOrientation );
-  /* Set number of orientation records and the records itself */
-  void SetNumOrientationRecords( PRInt32 aCount );
-  void SetOrientationRecord( PRInt32 aIndex, const char *aName );
-
-  /* Does this device allow to set/change the spooler command ? */
-  void SetCanChangeSpoolerCommand( PRBool aCanSetSpoolerCommand );
-
-  /* Does this device allow to set/change number of copies for an document ? */
-  void SetCanChangeNumCopies( PRBool aCanSetNumCopies );
-
-  /* Does this device allow multiple devicecontext instances to be used in
-   * parallel (e.g. print while the device is already in use by print-preview
-   * or printing while another print job is in progress) ? */
-  void SetMultipleConcurrentDeviceContextsSupported( PRBool aCanUseMultipleInstances );
-
-private:
-  /* private helper methods */
-  void SetBoolValue( const char *tagname, PRBool value );
-  void SetIntValue(  const char *tagname, PRInt32 value );
-  void SetCharValue(  const char *tagname, const char *value );
-
-  nsCString    mPrinterName;
-  nsCOMPtr<nsIPrefBranch> mPrefs;
-};
-
-void nsPrinterFeatures::SetBoolValue( const char *tagname, PRBool value )
-{
-  mPrefs->SetBoolPref(nsPrintfCString(256, PRINTERFEATURES_PREF ".%s.%s", mPrinterName.get(), tagname).get(), value);
-}
-
-void nsPrinterFeatures::SetIntValue(  const char *tagname, PRInt32 value )
-{
-  mPrefs->SetIntPref(nsPrintfCString(256, PRINTERFEATURES_PREF ".%s.%s", mPrinterName.get(), tagname).get(), value);
-}
-
-void nsPrinterFeatures::SetCharValue(  const char *tagname, const char *value )
-{
-  mPrefs->SetCharPref(nsPrintfCString(256, PRINTERFEATURES_PREF ".%s.%s", mPrinterName.get(), tagname).get(), value);
-}
-
-nsPrinterFeatures::nsPrinterFeatures( const char *printername )
-{
-  DO_PR_DEBUG_LOG(("nsPrinterFeatures::nsPrinterFeatures('%s')\n", printername));
-  mPrinterName.Assign(printername);
-  mPrefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
-
-  SetBoolValue("has_special_printerfeatures", PR_TRUE);
-}
-
-void nsPrinterFeatures::SetCanChangePaperSize( PRBool aCanSetPaperSize )
-{
-  SetBoolValue("can_change_paper_size", aCanSetPaperSize);
-}
-
-/* Set number of paper size records and the records itself */
-void nsPrinterFeatures::SetNumPaperSizeRecords( PRInt32 aCount )
-{
-  SetIntValue("paper.count", aCount);
-}
-
-void nsPrinterFeatures::SetPaperRecord(PRInt32 aIndex, const char *aPaperName, PRInt32 aWidthMM, PRInt32 aHeightMM, PRBool aIsInch)
-{
-  SetCharValue(nsPrintfCString(256, "paper.%d.name",      aIndex).get(), aPaperName);
-  SetIntValue( nsPrintfCString(256, "paper.%d.width_mm",  aIndex).get(), aWidthMM);
-  SetIntValue( nsPrintfCString(256, "paper.%d.height_mm", aIndex).get(), aHeightMM);
-  SetBoolValue(nsPrintfCString(256, "paper.%d.is_inch",   aIndex).get(), aIsInch);
-}
-
-void nsPrinterFeatures::SetCanChangeOrientation( PRBool aCanSetOrientation )
-{
-  SetBoolValue("can_change_orientation", aCanSetOrientation);
-}
-
-void nsPrinterFeatures::SetNumOrientationRecords( PRInt32 aCount )
-{
-  SetIntValue("orientation.count", aCount);
-}
-
-void nsPrinterFeatures::SetOrientationRecord( PRInt32 aIndex, const char *aOrientationName )
-{
-  SetCharValue(nsPrintfCString(256, "orientation.%d.name", aIndex).get(), aOrientationName);
-}
-
-void nsPrinterFeatures::SetCanChangeSpoolerCommand( PRBool aCanSetSpoolerCommand )
-{
-  SetBoolValue("can_change_spoolercommand", aCanSetSpoolerCommand);
-}
-
-void nsPrinterFeatures::SetCanChangeNumCopies( PRBool aCanSetNumCopies )
-{
-  SetBoolValue("can_change_num_copies", aCanSetNumCopies);
-}
-
-void nsPrinterFeatures::SetMultipleConcurrentDeviceContextsSupported( PRBool aCanUseMultipleInstances )
-{
-  SetBoolValue("can_use_multiple_devicecontexts_concurrently", aCanUseMultipleInstances);
-}
-
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-//---------------
-// static members
-GlobalPrinters GlobalPrinters::mGlobalPrinters;
-nsStringArray* GlobalPrinters::mGlobalPrinterList = nsnull;
-int            GlobalPrinters::mGlobalNumPrinters = 0;
-//---------------
-
-nsDeviceContextSpecQt::nsDeviceContextSpecQt()
-{
-  DO_PR_DEBUG_LOG(("nsDeviceContextSpecQt::nsDeviceContextSpecQt()\n"));
-}
-
-nsDeviceContextSpecQt::~nsDeviceContextSpecQt()
-{
-  DO_PR_DEBUG_LOG(("nsDeviceContextSpecQt::~nsDeviceContextSpecQt()\n"));
-}
-
-/* Use both PostScript and Xprint module */
-#if defined(USE_XPRINT) && defined(USE_POSTSCRIPT)
-NS_IMPL_ISUPPORTS3(nsDeviceContextSpecQt,
-                   nsIDeviceContextSpec,
-                   nsIDeviceContextSpecPS,
-                   nsIDeviceContextSpecXp)
-/* Use only PostScript module */
-#elif !defined(USE_XPRINT) && defined(USE_POSTSCRIPT)
-NS_IMPL_ISUPPORTS2(nsDeviceContextSpecQt,
-                   nsIDeviceContextSpec,
-                   nsIDeviceContextSpecPS)
-/* Use only Xprint module module */
-#elif defined(USE_XPRINT) && !defined(USE_POSTSCRIPT)
-NS_IMPL_ISUPPORTS2(nsDeviceContextSpecQt,
-                   nsIDeviceContextSpec,
-                   nsIDeviceContextSpecXp)
-/* Both Xprint and PostScript module are missing */
-#elif !defined(USE_XPRINT) && !defined(USE_POSTSCRIPT)
-NS_IMPL_ISUPPORTS1(nsDeviceContextSpecQt,
-                   nsIDeviceContextSpec)
-#else
-#error "This should not happen"
-#endif
-
-/** -------------------------------------------------------
- *  Initialize the nsDeviceContextSpecQt
- *  @update   dc 2/15/98
- *  @update   syd 3/2/99
- *
- * gisburn: Please note that this function exists as 1:1 copy in other
- * toolkits including:
- * - GTK+-toolkit:
- *   file:     mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp
- *   function: NS_IMETHODIMP nsDeviceContextSpecGTK::Init()
- * - Xlib-toolkit:
- *   file:     mozilla/gfx/src/xlib/nsDeviceContextSpecQt.cpp
- *   function: NS_IMETHODIMP nsDeviceContextSpecQt::Init()
- * - Qt-toolkit:
- *   file:     mozilla/gfx/src/qt/nsDeviceContextSpecQt.cpp
- *   function: NS_IMETHODIMP nsDeviceContextSpecQt::Init()
- *
- * ** Please update the other toolkits when changing this function.
- */
-NS_IMETHODIMP nsDeviceContextSpecQt::Init(nsIWidget *aWidget,
-                                          nsIPrintSettings* aPS,
-                                          PRBool aIsPrintPreview)
-{
-  DO_PR_DEBUG_LOG(("nsDeviceContextSpecQt::Init(aPS=%p\n", aPS));
-  nsresult rv = NS_ERROR_FAILURE;
-
-  mPrintSettings = aPS;
-
-  // if there is a current selection then enable the "Selection" radio button
-  if (mPrintSettings) {
-    PRBool isOn;
-    mPrintSettings->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &isOn);
-    nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
-    if (NS_SUCCEEDED(rv)) {
-      (void) pPrefs->SetBoolPref("print.selection_radio_enabled", isOn);
-    }
-  }
-
-  rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-
-  GlobalPrinters::GetInstance()->FreeGlobalPrinters();
-
-  if (aPS) {
-    PRBool     reversed       = PR_FALSE;
-    PRBool     color          = PR_FALSE;
-    PRBool     tofile         = PR_FALSE;
-    PRInt16    printRange     = nsIPrintSettings::kRangeAllPages;
-    PRInt32    orientation    = NS_PORTRAIT;
-    PRInt32    fromPage       = 1;
-    PRInt32    toPage         = 1;
-    PRUnichar *command        = nsnull;
-    PRInt32    copies         = 1;
-    PRUnichar *printer        = nsnull;
-    PRUnichar *papername      = nsnull;
-    PRUnichar *printfile      = nsnull;
-    double     dleft          = 0.5;
-    double     dright         = 0.5;
-    double     dtop           = 0.5;
-    double     dbottom        = 0.5;
-
-    aPS->GetPrinterName(&printer);
-    aPS->GetPrintReversed(&reversed);
-    aPS->GetPrintInColor(&color);
-    aPS->GetPaperName(&papername);
-    aPS->GetOrientation(&orientation);
-    aPS->GetPrintCommand(&command);
-    aPS->GetPrintRange(&printRange);
-    aPS->GetToFileName(&printfile);
-    aPS->GetPrintToFile(&tofile);
-    aPS->GetStartPageRange(&fromPage);
-    aPS->GetEndPageRange(&toPage);
-    aPS->GetNumCopies(&copies);
-    aPS->GetMarginTop(&dtop);
-    aPS->GetMarginLeft(&dleft);
-    aPS->GetMarginBottom(&dbottom);
-    aPS->GetMarginRight(&dright);
-
-    if (printfile)
-      strcpy(mPath,    NS_ConvertUTF16toUTF8(printfile).get());
-    if (command)
-      strcpy(mCommand, NS_ConvertUTF16toUTF8(command).get());
-    if (printer)
-      strcpy(mPrinter, NS_ConvertUTF16toUTF8(printer).get());
-    if (papername)
-      strcpy(mPaperName, NS_ConvertUTF16toUTF8(papername).get());
-
-    DO_PR_DEBUG_LOG(("margins:   %5.2f,%5.2f,%5.2f,%5.2f\n", dtop, dleft, dbottom, dright));
-    DO_PR_DEBUG_LOG(("printRange %d\n",   printRange));
-    DO_PR_DEBUG_LOG(("fromPage   %d\n",   fromPage));
-    DO_PR_DEBUG_LOG(("toPage     %d\n",   toPage));
-    DO_PR_DEBUG_LOG(("tofile     %d\n",   tofile));
-    DO_PR_DEBUG_LOG(("printfile  '%s'\n", printfile? NS_ConvertUTF16toUTF8(printfile).get():"<NULL>"));
-    DO_PR_DEBUG_LOG(("command    '%s'\n", command? NS_ConvertUTF16toUTF8(command).get():"<NULL>"));
-    DO_PR_DEBUG_LOG(("printer    '%s'\n", printer? NS_ConvertUTF16toUTF8(printer).get():"<NULL>"));
-    DO_PR_DEBUG_LOG(("papername  '%s'\n", papername? NS_ConvertUTF16toUTF8(papername).get():"<NULL>"));
-
-    mTop         = dtop;
-    mBottom      = dbottom;
-    mLeft        = dleft;
-    mRight       = dright;
-    mFpf         = !reversed;
-    mGrayscale   = !color;
-    mOrientation = orientation;
-    mToPrinter   = !tofile;
-    mCopies      = copies;
-  }
-
-  return rv;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetToPrinter(PRBool &aToPrinter)
-{
-  aToPrinter = mToPrinter;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetPrinterName ( const char **aPrinter )
-{
-   *aPrinter = mPrinter;
-   return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetCopies ( int &aCopies )
-{
-   aCopies = mCopies;
-   return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetFirstPageFirst(PRBool &aFpf)
-{
-  aFpf = mFpf;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetGrayscale(PRBool &aGrayscale)
-{
-  aGrayscale = mGrayscale;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetLandscape(PRBool &aLandscape)
-{
-  aLandscape = (mOrientation == NS_LANDSCAPE);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetTopMargin(float &aValue)
-{
-  aValue = mTop;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetBottomMargin(float &aValue)
-{
-  aValue = mBottom;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetRightMargin(float &aValue)
-{
-  aValue = mRight;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetLeftMargin(float &aValue)
-{
-  aValue = mLeft;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetCommand(const char **aCommand)
-{
-  *aCommand = mCommand;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetPath(const char **aPath)
-{
-  *aPath = mPath;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetUserCancelled(PRBool &aCancel)
-{
-  aCancel = mCancel;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetPaperName( const char **aPaperName )
-{
-  *aPaperName = mPaperName;
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetPageSizeInTwips(PRInt32 *aWidth, PRInt32 *aHeight)
-{
-  return mPrintSettings->GetPageSizeInTwips(aWidth, aHeight);
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::GetPrintMethod(PrintMethod &aMethod)
-{
-  return GetPrintMethod(mPrinter, aMethod);
-}
-
-/* static !! */
-nsresult nsDeviceContextSpecQt::GetPrintMethod(const char *aPrinter, PrintMethod &aMethod)
-{
-#if defined(USE_POSTSCRIPT) && defined(USE_XPRINT)
-  /* printer names for the PostScript module alwas start with
-   * the NS_POSTSCRIPT_DRIVER_NAME string */
-  if (strncmp(aPrinter, NS_POSTSCRIPT_DRIVER_NAME,
-              NS_POSTSCRIPT_DRIVER_NAME_LEN) != 0)
-    aMethod = pmXprint;
-  else
-    aMethod = pmPostScript;
-  return NS_OK;
-#elif defined(USE_XPRINT)
-  aMethod = pmXprint;
-  return NS_OK;
-#elif defined(USE_POSTSCRIPT)
-  aMethod = pmPostScript;
-  return NS_OK;
-#else
-  return NS_ERROR_UNEXPECTED;
-#endif
-}
-
-NS_IMETHODIMP nsDeviceContextSpecQt::ClosePrintManager()
-{
-  return NS_OK;
-}
-
-/* Get prefs for printer
- * Search order:
- * - Get prefs per printer name and module name
- * - Get prefs per printer name
- * - Get prefs per module name
- * - Get prefs
- */
-static
-nsresult CopyPrinterCharPref(nsIPrefBranch *pref, const char *modulename, const char *printername,
-                             const char *prefname, nsXPIDLCString &return_buf)
-{
-  DO_PR_DEBUG_LOG(("CopyPrinterCharPref('%s', '%s', '%s')\n", modulename, printername, prefname));
-
-  nsresult rv = NS_ERROR_FAILURE;
-
-  if (printername && modulename) {
-    /* Get prefs per printer name and module name */
-    nsPrintfCString name(512, "print.%s.printer_%s.%s", modulename, printername, prefname);
-    DO_PR_DEBUG_LOG(("trying to get '%s'\n", name.get()));
-    rv = pref->GetCharPref(name.get(), getter_Copies(return_buf));
-  }
-
-  if (NS_FAILED(rv)) {
-    if (printername) {
-      /* Get prefs per printer name */
-      nsPrintfCString name(512, "print.printer_%s.%s", printername, prefname);
-      DO_PR_DEBUG_LOG(("trying to get '%s'\n", name.get()));
-      rv = pref->GetCharPref(name.get(), getter_Copies(return_buf));
-    }
-
-    if (NS_FAILED(rv)) {
-      if (modulename) {
-        /* Get prefs per module name */
-        nsPrintfCString name(512, "print.printer_%s.%s", printername, prefname);
-        DO_PR_DEBUG_LOG(("trying to get '%s'\n", name.get()));
-        rv = pref->GetCharPref(name.get(), getter_Copies(return_buf));
-      }
-
-      if (NS_FAILED(rv)) {
-        /* Get prefs */
-        nsPrintfCString name(512, "print.%s.%s", modulename, prefname);
-        DO_PR_DEBUG_LOG(("trying to get '%s'\n", name.get()));
-        rv = pref->GetCharPref(name.get(), getter_Copies(return_buf));
-      }
-    }
-  }
-
-#ifdef PR_LOG
-  if (NS_SUCCEEDED(rv)) {
-    DO_PR_DEBUG_LOG(("CopyPrinterCharPref returning '%s'.\n", return_buf.get()));
-  }
-  else
-  {
-    DO_PR_DEBUG_LOG(("CopyPrinterCharPref failure.\n"));
-  }
-#endif /* PR_LOG */
-
-  return rv;
-}
-
-//  Printer Enumerator
-nsPrinterEnumeratorQt::nsPrinterEnumeratorQt()
-{
-}
-
-NS_IMPL_ISUPPORTS1(nsPrinterEnumeratorQt, nsIPrinterEnumerator)
-
-NS_IMETHODIMP nsPrinterEnumeratorQt::GetPrinterNameList(nsIStringEnumerator **aPrinterNameList)
-{
-  NS_ENSURE_ARG_POINTER(aPrinterNameList);
-  *aPrinterNameList = nsnull;
-
-  nsresult rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-
-  PRInt32 numPrinters = GlobalPrinters::GetInstance()->GetNumPrinters();
-  nsStringArray *printers = new nsStringArray(numPrinters);
-  if (!printers) {
-    GlobalPrinters::GetInstance()->FreeGlobalPrinters();
-    return NS_ERROR_OUT_OF_MEMORY;
-  }
-
-  int count = 0;
-  while( count < numPrinters )
-  {
-    printers->AppendString(*GlobalPrinters::GetInstance()->GetStringAt(count++));
-  }
-  GlobalPrinters::GetInstance()->FreeGlobalPrinters();
-
-  return NS_NewAdoptingStringEnumerator(aPrinterNameList, printers);
-}
-
-/* readonly attribute wstring defaultPrinterName; */
-NS_IMETHODIMP nsPrinterEnumeratorQt::GetDefaultPrinterName(PRUnichar **aDefaultPrinterName)
-{
-  DO_PR_DEBUG_LOG(("nsPrinterEnumeratorQt::GetDefaultPrinterName()\n"));
-  NS_ENSURE_ARG_POINTER(aDefaultPrinterName);
-
-  GlobalPrinters::GetInstance()->GetDefaultPrinterName(aDefaultPrinterName);
-
-  DO_PR_DEBUG_LOG(("GetDefaultPrinterName(): default printer='%s'.\n", NS_ConvertUTF16toUTF8(*aDefaultPrinterName).get()));
-  return NS_OK;
-}
-
-/* void initPrintSettingsFromPrinter (in wstring aPrinterName, in nsIPrintSettings aPrintSettings); */
-NS_IMETHODIMP nsPrinterEnumeratorQt::InitPrintSettingsFromPrinter(const PRUnichar *aPrinterName, nsIPrintSettings *aPrintSettings)
-{
-  DO_PR_DEBUG_LOG(("nsPrinterEnumeratorQt::InitPrintSettingsFromPrinter()"));
-  nsresult rv;
-
-  NS_ENSURE_ARG_POINTER(aPrinterName);
-  NS_ENSURE_ARG_POINTER(aPrintSettings);
-
-  NS_ENSURE_TRUE(*aPrinterName, NS_ERROR_FAILURE);
-  NS_ENSURE_TRUE(aPrintSettings, NS_ERROR_FAILURE);
-
-  nsCOMPtr<nsIPrefBranch> pPrefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
-  if (NS_FAILED(rv))
-    return rv;
-
-  nsXPIDLCString fullPrinterName, /* Full name of printer incl. driver-specific prefix */
-                 printerName;     /* "Stripped" name of printer */
-  fullPrinterName.Assign(NS_ConvertUTF16toUTF8(aPrinterName));
-  printerName.Assign(NS_ConvertUTF16toUTF8(aPrinterName));
-  DO_PR_DEBUG_LOG(("printerName='%s'\n", printerName.get()));
-
-  PrintMethod type = pmInvalid;
-  rv = nsDeviceContextSpecQt::GetPrintMethod(printerName, type);
-  if (NS_FAILED(rv))
-    return rv;
-
-#ifdef USE_POSTSCRIPT
-  /* "Demangle" postscript printer name */
-  if (type == pmPostScript) {
-    /* Strip the leading NS_POSTSCRIPT_DRIVER_NAME from |printerName|,
-     * e.g. turn "PostScript/foobar" to "foobar" */
-    printerName.Cut(0, NS_POSTSCRIPT_DRIVER_NAME_LEN);
-  }
-#endif /* USE_POSTSCRIPT */
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-  /* Defaults to FALSE */
-  pPrefs->SetBoolPref(nsPrintfCString(256, PRINTERFEATURES_PREF ".%s.has_special_printerfeatures", fullPrinterName.get()).get(), PR_FALSE);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-
-  /* Set filename */
-  nsXPIDLCString filename;
-  if (NS_FAILED(CopyPrinterCharPref(pPrefs, nsnull, printerName, "filename", filename))) {
-    const char *path;
-
-    if (!(path = PR_GetEnv("PWD")))
-      path = PR_GetEnv("HOME");
-
-    if (path)
-      filename = nsPrintfCString(PATH_MAX, "%s/mozilla.ps", path);
-    else
-      filename.AssignLiteral("mozilla.ps");
-  }
-  DO_PR_DEBUG_LOG(("Setting default filename to '%s'\n", filename.get()));
-  aPrintSettings->SetToFileName(NS_ConvertUTF8toUTF16(filename).get());
-
-  aPrintSettings->SetIsInitializedFromPrinter(PR_TRUE);
-#ifdef USE_XPRINT
-  if (type == pmXprint) {
-    DO_PR_DEBUG_LOG(("InitPrintSettingsFromPrinter() for Xprint printer\n"));
-
-    Display   *pdpy;
-    XPContext  pcontext;
-    if (XpuGetPrinter(printerName, &pdpy, &pcontext) != 1)
-      return NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND;
-
-    XpuSupportedFlags supported_doc_attrs = XpuGetSupportedDocAttributes(pdpy, pcontext);
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    nsPrinterFeatures printerFeatures(fullPrinterName);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-    /* Setup orientation stuff */
-    XpuOrientationList  olist;
-    int                 ocount;
-    XpuOrientationRec  *default_orientation;
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    PRBool canSetOrientation = MAKE_PR_BOOL(supported_doc_attrs & XPUATTRIBUTESUPPORTED_CONTENT_ORIENTATION);
-    printerFeatures.SetCanChangeOrientation(canSetOrientation);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-    /* Get list of supported orientations */
-    olist = XpuGetOrientationList(pdpy, pcontext, &ocount);
-    if (olist) {
-      default_orientation = &olist[0]; /* First entry is the default one */
-
-      if (!PL_strcasecmp(default_orientation->orientation, "portrait")) {
-        DO_PR_DEBUG_LOG(("setting default orientation to 'portrait'\n"));
-        aPrintSettings->SetOrientation(nsIPrintSettings::kPortraitOrientation);
-      }
-      else if (!PL_strcasecmp(default_orientation->orientation, "landscape")) {
-        DO_PR_DEBUG_LOG(("setting default orientation to 'landscape'\n"));
-        aPrintSettings->SetOrientation(nsIPrintSettings::kLandscapeOrientation);
-      }
-      else {
-        DO_PR_DEBUG_LOG(("Unknown default orientation '%s'\n", default_orientation->orientation));
-      }
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-      int i;
-      for( i = 0 ; i < ocount ; i++ )
-      {
-        XpuOrientationRec *curr = &olist[i];
-        printerFeatures.SetOrientationRecord(i, curr->orientation);
-      }
-      printerFeatures.SetNumOrientationRecords(ocount);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-      XpuFreeOrientationList(olist);
-    }
-
-    /* Setup Number of Copies */
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    PRBool canSetNumCopies = MAKE_PR_BOOL(supported_doc_attrs & XPUATTRIBUTESUPPORTED_COPY_COUNT);
-    printerFeatures.SetCanChangeNumCopies(canSetNumCopies);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-    long numCopies;
-    if( XpuGetOneLongAttribute(pdpy, pcontext, XPDocAttr, "copy-count", &numCopies) != 1 )
-    {
-      /* Fallback on failure */
-      numCopies = 1;
-    }
-    aPrintSettings->SetNumCopies(numCopies);
-
-    /* Setup paper size stuff */
-    XpuMediumSourceSizeList mlist;
-    int                     mcount;
-    XpuMediumSourceSizeRec *default_medium;
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    PRBool canSetPaperSize = MAKE_PR_BOOL(supported_doc_attrs & XPUATTRIBUTESUPPORTED_DEFAULT_MEDIUM);
-    printerFeatures.SetCanChangePaperSize(canSetPaperSize);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-    mlist = XpuGetMediumSourceSizeList(pdpy, pcontext, &mcount);
-    if (mlist) {
-      nsCAutoString papername;
-
-      default_medium = &mlist[0]; /* First entry is the default one */
-      double total_width  = default_medium->ma1 + default_medium->ma2,
-             total_height = default_medium->ma3 + default_medium->ma4;
-
-      /* Either "paper" or "tray/paper" */
-      if (default_medium->tray_name) {
-        papername = nsPrintfCString(256, "%s/%s", default_medium->tray_name, default_medium->medium_name);
-      }
-      else {
-        papername.Assign(default_medium->medium_name);
-      }
-
-      DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g/%g mm)\n", papername.get(), total_width, total_height));
-      aPrintSettings->SetPaperSizeType(nsIPrintSettings::kPaperSizeDefined);
-      aPrintSettings->SetPaperSizeUnit(nsIPrintSettings::kPaperSizeMillimeters);
-      aPrintSettings->SetPaperWidth(total_width);
-      aPrintSettings->SetPaperHeight(total_height);
-      aPrintSettings->SetPaperName(NS_ConvertUTF8toUTF16(papername).get());
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-      int i;
-      for( i = 0 ; i < mcount ; i++ )
-      {
-        XpuMediumSourceSizeRec *curr = &mlist[i];
-        double total_width  = curr->ma1 + curr->ma2,
-               total_height = curr->ma3 + curr->ma4;
-        if (curr->tray_name) {
-          papername = nsPrintfCString(256, "%s/%s", curr->tray_name, curr->medium_name);
-        }
-        else {
-          papername.Assign(curr->medium_name);
-        }
-
-        printerFeatures.SetPaperRecord(i, papername.get(), PRInt32(total_width), PRInt32(total_height), PR_FALSE);
-      }
-      printerFeatures.SetNumPaperSizeRecords(mcount);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-      XpuFreeMediumSourceSizeList(mlist);
-    }
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    /* Xprint does not allow the client to set a spooler command.
-     * Job spooling is the job of the server side (=Xprt) */
-    printerFeatures.SetCanChangeSpoolerCommand(PR_FALSE);
-
-    /* Mozilla's Xprint support allows multiple nsIDeviceContext instances
-     * be used in parallel */
-    printerFeatures.SetMultipleConcurrentDeviceContextsSupported(PR_TRUE);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-    XpuClosePrinterDisplay(pdpy, pcontext);
-
-    return NS_OK;
-  }
-  else
-#endif /* USE_XPRINT */
-
-#ifdef USE_POSTSCRIPT
-  if (type == pmPostScript) {
-    DO_PR_DEBUG_LOG(("InitPrintSettingsFromPrinter() for PostScript printer\n"));
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    nsPrinterFeatures printerFeatures(fullPrinterName);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    printerFeatures.SetCanChangeOrientation(PR_TRUE);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-    nsXPIDLCString orientation;
-    if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", printerName, "orientation", orientation))) {
-      if (orientation.LowerCaseEqualsLiteral("portrait")) {
-        DO_PR_DEBUG_LOG(("setting default orientation to 'portrait'\n"));
-        aPrintSettings->SetOrientation(nsIPrintSettings::kPortraitOrientation);
-      }
-      else if (orientation.LowerCaseEqualsLiteral("landscape")) {
-        DO_PR_DEBUG_LOG(("setting default orientation to 'landscape'\n"));
-        aPrintSettings->SetOrientation(nsIPrintSettings::kLandscapeOrientation);
-      }
-      else {
-        DO_PR_DEBUG_LOG(("Unknown default orientation '%s'\n", orientation.get()));
-      }
-    }
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    int i;
-    for( i = 0 ; postscript_module_orientations[i].orientation != nsnull ; i++ )
-    {
-      const PSOrientationRec *curr = &postscript_module_orientations[i];
-      printerFeatures.SetOrientationRecord(i, curr->orientation);
-    }
-    printerFeatures.SetNumOrientationRecords(i);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    printerFeatures.SetCanChangePaperSize(PR_TRUE);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-    nsXPIDLCString papername;
-    if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", printerName, "paper_size", papername))) {
-      int                   i;
-      const PSPaperSizeRec *default_paper = nsnull;
-
-      for( i = 0 ; postscript_module_paper_sizes[i].name != nsnull ; i++ )
-      {
-        const PSPaperSizeRec *curr = &postscript_module_paper_sizes[i];
-
-        if (!PL_strcasecmp(papername, curr->name)) {
-          default_paper = curr;
-          break;
-        }
-      }
-
-      if (default_paper) {
-        DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g inch/%g inch)\n",
-                        default_paper->name,
-                        PSPaperSizeRec_FullPaperWidth(default_paper),
-                        PSPaperSizeRec_FullPaperHeight(default_paper)));
-        aPrintSettings->SetPaperSizeType(nsIPrintSettings::kPaperSizeDefined);
-        aPrintSettings->SetPaperSizeUnit(nsIPrintSettings::kPaperSizeInches);
-        aPrintSettings->SetPaperWidth(PSPaperSizeRec_FullPaperWidth(default_paper));
-        aPrintSettings->SetPaperHeight(PSPaperSizeRec_FullPaperHeight(default_paper));
-        aPrintSettings->SetPaperName(NS_ConvertUTF8toUTF16(default_paper->name).get());
-      }
-      else {
-        DO_PR_DEBUG_LOG(("Unknown paper size '%s' given.\n", papername.get()));
-      }
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-      for( i = 0 ; postscript_module_paper_sizes[i].name != nsnull ; i++ )
-      {
-        const PSPaperSizeRec *curr = &postscript_module_paper_sizes[i];
-#define CONVERT_INCH_TO_MILLIMETERS(inch) ((inch) * 25.4)
-        double total_width  = CONVERT_INCH_TO_MILLIMETERS(PSPaperSizeRec_FullPaperWidth(curr)),
-               total_height = CONVERT_INCH_TO_MILLIMETERS(PSPaperSizeRec_FullPaperHeight(curr));
-
-        printerFeatures.SetPaperRecord(i, curr->name, PRInt32(total_width), PRInt32(total_height), PR_TRUE);
-      }
-      printerFeatures.SetNumPaperSizeRecords(i);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-    }
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    printerFeatures.SetCanChangeSpoolerCommand(PR_TRUE);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-    nsXPIDLCString command;
-    if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", printerName, "print_command", command))) {
-      DO_PR_DEBUG_LOG(("setting default print command to '%s'\n", command.get()));
-      aPrintSettings->SetPrintCommand(NS_ConvertUTF8toUTF16(command).get());
-    }
-
-#ifdef SET_PRINTER_FEATURES_VIA_PREFS
-    printerFeatures.SetCanChangeNumCopies(PR_TRUE);
-#endif /* SET_PRINTER_FEATURES_VIA_PREFS */
-
-    return NS_OK;
-  }
-#endif /* USE_POSTSCRIPT */
-
-  return NS_ERROR_UNEXPECTED;
-}
-
-NS_IMETHODIMP nsPrinterEnumeratorQt::DisplayPropertiesDlg(const PRUnichar *aPrinter, nsIPrintSettings *aPrintSettings)
-{
-  return NS_OK;
-}
-
-//----------------------------------------------------------------------
-nsresult GlobalPrinters::InitializeGlobalPrinters ()
-{
-  if (PrintersAreAllocated()) {
-    return NS_OK;
-  }
-
-  mGlobalNumPrinters = 0;
-  mGlobalPrinterList = new nsStringArray();
-  if (!mGlobalPrinterList)
-    return NS_ERROR_OUT_OF_MEMORY;
-
-#ifdef USE_XPRINT
-  XPPrinterList plist = XpuGetPrinterList(nsnull, &mGlobalNumPrinters);
-
-  if (plist && (mGlobalNumPrinters > 0))
-  {
-    int i;
-    for(  i = 0 ; i < mGlobalNumPrinters ; i++ )
-    {
-      mGlobalPrinterList->AppendString(nsString(NS_ConvertASCIItoUTF16(plist[i].name)));
-    }
-
-    XpuFreePrinterList(plist);
-  }
-#endif /* USE_XPRINT */
-
-#ifdef USE_POSTSCRIPT
-  /* Get the list of PostScript-module printers */
-  char   *printerList           = nsnull;
-  PRBool  added_default_printer = PR_FALSE; /* Did we already add the default printer ? */
-
-  /* The env var MOZILLA_POSTSCRIPT_PRINTER_LIST can "override" the prefs */
-  printerList = PR_GetEnv("MOZILLA_POSTSCRIPT_PRINTER_LIST");
-
-  if (!printerList) {
-    nsresult rv;
-    nsCOMPtr<nsIPrefBranch> pPrefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
-    if (NS_SUCCEEDED(rv)) {
-      (void) pPrefs->CopyCharPref("print.printer_list", &printerList);
-    }
-  }
-
-  if (printerList) {
-    char       *tok_lasts;
-    const char *name;
-
-    /* PL_strtok_r() will modify the string - copy it! */
-    printerList = strdup(printerList);
-    if (!printerList)
-      return NS_ERROR_OUT_OF_MEMORY;
-
-    for( name = PL_strtok_r(printerList, " ", &tok_lasts) ;
-         name != nsnull ;
-         name = PL_strtok_r(nsnull, " ", &tok_lasts) )
-    {
-      /* Is this the "default" printer ? */
-      if (!strcmp(name, "default"))
-        added_default_printer = PR_TRUE;
-
-      mGlobalPrinterList->AppendString(
-        nsString(NS_ConvertASCIItoUTF16(NS_POSTSCRIPT_DRIVER_NAME)) +
-        nsString(NS_ConvertASCIItoUTF16(name)));
-      mGlobalNumPrinters++;
-    }
-
-    free(printerList);
-  }
-
-  /* Add an entry for the default printer (see nsPostScriptObj.cpp) if we
-   * did not add it already... */
-  if (!added_default_printer)
-  {
-    mGlobalPrinterList->AppendString(
-      nsString(NS_ConvertASCIItoUTF16(NS_POSTSCRIPT_DRIVER_NAME "default")));
-    mGlobalNumPrinters++;
-  }
-#endif /* USE_POSTSCRIPT */
-
-  if (mGlobalNumPrinters == 0)
-    return NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE;
-
-  return NS_OK;
-}
-
-//----------------------------------------------------------------------
-void GlobalPrinters::FreeGlobalPrinters()
-{
-  delete mGlobalPrinterList;
-  mGlobalPrinterList = nsnull;
-  mGlobalNumPrinters = 0;
-}
-
-void
-GlobalPrinters::GetDefaultPrinterName(PRUnichar **aDefaultPrinterName)
-{
-  *aDefaultPrinterName = nsnull;
-
-  PRBool allocate = (GlobalPrinters::GetInstance()->PrintersAreAllocated() == PR_FALSE);
-
-  if (allocate) {
-    nsresult rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
-    if (NS_FAILED(rv)) {
-      return;
-    }
-  }
-  NS_ASSERTION(GlobalPrinters::GetInstance()->PrintersAreAllocated(), "no GlobalPrinters");
-
-  if (GlobalPrinters::GetInstance()->GetNumPrinters() == 0)
-    return;
-
-  *aDefaultPrinterName = ToNewUnicode(*GlobalPrinters::GetInstance()->GetStringAt(0));
-
-  if (allocate) {
-    GlobalPrinters::GetInstance()->FreeGlobalPrinters();
-  }
-}
-
deleted file mode 100644
--- a/gfx/src/qt/nsDeviceContextSpecQt.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *   Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-#ifndef nsDeviceContextSpecQt_h___
-#define nsDeviceContextSpecQt_h___
-
-#include "nsCOMPtr.h"
-#include "nsIDeviceContextSpec.h"
-#include "nsIPrintSettings.h"
-#include "nsIPrintOptions.h"
-#include "nsVoidArray.h"
-#include <limits.h>
-#ifdef USE_POSTSCRIPT
-#include "nsIDeviceContextSpecPS.h"
-#endif /* USE_POSTSCRIPT */
-#ifdef USE_XPRINT
-#include "nsIDeviceContextSpecXPrint.h"
-#endif /* USE_XPRINT */
-
-#define NS_PORTRAIT  0
-#define NS_LANDSCAPE 1
-
-typedef enum
-{
-  pmInvalid = 0,
-  pmXprint,
-  pmPostScript
-} PrintMethod;
-
-class nsDeviceContextSpecQt : public nsIDeviceContextSpec
-#ifdef USE_POSTSCRIPT
-#warning "postscript hardcore disabled"
-#if 0
-
-                            , public nsIDeviceContextSpecPS
-#endif
-#endif /* USE_POSTSCRIPT */
-#ifdef USE_XPRINT
-                              , public nsIDeviceContextSpecXp
-#endif /* USE_XPRINT */
-{
-public:
-  nsDeviceContextSpecQt();
-
-  NS_DECL_ISUPPORTS
-
-  NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, PRBool aIsPrintPreview);
-  NS_IMETHOD ClosePrintManager();
-
-  NS_IMETHOD GetToPrinter(PRBool &aToPrinter);
-  NS_IMETHOD GetPrinterName ( const char **aPrinter );
-  NS_IMETHOD GetCopies ( int &aCopies );
-  NS_IMETHOD GetFirstPageFirst(PRBool &aFpf);
-  NS_IMETHOD GetGrayscale(PRBool &aGrayscale);
-  NS_IMETHOD GetTopMargin(float &value);
-  NS_IMETHOD GetBottomMargin(float &value);
-  NS_IMETHOD GetLeftMargin(float &value);
-  NS_IMETHOD GetRightMargin(float &value);
-  NS_IMETHOD GetCommand(const char **aCommand);
-  NS_IMETHOD GetPath (const char **aPath);
-  NS_IMETHOD GetLandscape (PRBool &aLandscape);
-  NS_IMETHOD GetUserCancelled(PRBool &aCancel);
-  NS_IMETHOD GetPrintMethod(PrintMethod &aMethod);
-  static nsresult GetPrintMethod(const char *aPrinter, PrintMethod &aMethod);
-  NS_IMETHOD GetPageSizeInTwips(PRInt32 *aWidth, PRInt32 *aHeight);
-  NS_IMETHOD GetPaperName(const char **aPaperName);
-  virtual ~nsDeviceContextSpecQt();
-
-protected:
-  nsCOMPtr<nsIPrintSettings> mPrintSettings;
-  PRBool mToPrinter;          /* If PR_TRUE, print to printer */
-  PRBool mFpf;                /* If PR_TRUE, first page first */
-  PRBool mGrayscale;          /* If PR_TRUE, print grayscale */
-  int    mOrientation;        /* Orientation e.g. Portrait */
-  char   mCommand[PATH_MAX];  /* Print command e.g., lpr */
-  char   mPath[PATH_MAX];     /* If toPrinter = PR_FALSE, dest file */
-  char   mPrinter[256];       /* Printer name */
-  char   mPaperName[256];     /* Printer name */
-  int    mCopies;             /* number of copies */
-  PRBool mCancel;             /* If PR_TRUE, user cancelled */
-  float  mLeft;               /* left margin */
-  float  mRight;              /* right margin */
-  float  mTop;                /* top margin */
-  float  mBottom;             /* bottom margin */
-};
-
-//-------------------------------------------------------------------------
-// Printer Enumerator
-//-------------------------------------------------------------------------
-class nsPrinterEnumeratorQt : public nsIPrinterEnumerator
-{
-public:
-  nsPrinterEnumeratorQt();
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIPRINTERENUMERATOR
-};
-
-#endif /* !nsDeviceContextSpecQt_h___ */
deleted file mode 100644
--- a/gfx/src/qt/nsDrawingSurfaceQt.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Lars Knoll <knoll@kde.org>
- *   Zack Rusin <zack@kde.org>
- *   John C. Griggs <johng@corel.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * 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 ***** */
-
-#include "nsDrawingSurfaceQt.h"
-#include "nsRenderingContextQt.h"
-#include <qpaintdevicemetrics.h>
-
-#include "qtlog.h"
-
-NS_IMPL_ISUPPORTS1(nsDrawingSurfaceQt, nsIDrawingSurface)
-
-nsDrawingSurfaceQt::nsDrawingSurfaceQt()
-{
-    mPaintDevice = nsnull;
-    mGC          = nsnull;
-    mDepth       = -1;
-    mWidth       = 0;
-    mHeight      = 0;
-    mFlags       = 0;
-    mLockWidth   = 0;
-    mLockHeight  = 0;
-    mLockFlags   = 0;
-    mLocked      = PR_FALSE;
-
-    // I have no idea how to compute these values.
-    // FIXME
-    mPixFormat.mRedMask = 0;
-    mPixFormat.mGreenMask = 0;
-    mPixFormat.mBlueMask = 0;
-    mPixFormat.mAlphaMask = 0;
-
-    mPixFormat.mRedShift = 0;
-    mPixFormat.mGreenShift = 0;
-    mPixFormat.mBlueShift = 0;
-    mPixFormat.mAlphaShift = 0;
-}
-
-nsDrawingSurfaceQt::~nsDrawingSurfaceQt()
-{
-    if (mGC && mGC->isActive()) {
-        mGC->end();
-    }
-
-    delete mGC;
-    mGC = nsnull;
-
-    if (mPaintDevice) {
-        if (mIsOffscreen && !mPaintDevice->paintingActive() && mPaintDevice != &mPixmap)
-            delete mPaintDevice;
-        mPaintDevice = nsnull;
-    }
-}
-
-NS_IMETHODIMP nsDrawingSurfaceQt::Lock(PRInt32 aX,PRInt32 aY,
-                                       PRUint32 aWidth,PRUint32 aHeight,
-                                       void **aBits,PRInt32 *aStride,
-                                       PRInt32 *aWidthBytes,PRUint32 aFlags)
-{
-    if (mLocked) {
-        NS_ASSERTION(0, "nested lock attempt");
-        return NS_ERROR_FAILURE;
-    }
-    if (mPixmap.isNull()) {
-        NS_ASSERTION(0, "NULL pixmap in lock attempt");
-        return NS_ERROR_FAILURE;
-    }
-    mLocked     = PR_TRUE;
-    mLockX      = aX;
-    mLockY      = aY;
-    mLockWidth  = aWidth;
-    mLockHeight = aHeight;
-    mLockFlags  = aFlags;
-
-    if (mImage.isNull())
-        mImage = mPixmap.convertToImage();
-
-    *aBits = mImage.bits();
-    *aStride = mImage.bytesPerLine();
-    *aWidthBytes = mImage.bytesPerLine();
-
-    return NS_OK;
-}
-
-NS_IMETHODIMP nsDrawingSurfaceQt::Unlock(void)
-{
-    if (!mLocked) {
-        NS_ASSERTION(0,"attempting to unlock an DrawingSurface that isn't locked");
-        return NS_ERROR_FAILURE;
-    }