Merge for backout of bug 471685 with a CLOSED TREE
authorShawn Wilsher <me@shawnwilsher.com>
Fri, 09 Jan 2009 13:17:06 -0800
changeset 23518 19171d3c7bcf69bd8cebab68fcc54c71d3c8a46a
parent 23516 3e2115077e95b62b3cc84fcdae58b82b0f2152af (diff)
parent 23517 f8a05a8b28eb977cf4a1a2e032e06489fead4d26 (current diff)
child 23520 6acaaa957e0a134611c89c2687cb5d7b699a3ca5
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs471685
milestone1.9.2a1pre
Merge for backout of bug 471685 with a CLOSED TREE
configure.in
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1473,21 +1473,26 @@ function nonBrowserWindowStartup()
 
 function nonBrowserWindowDelayedStartup()
 {
   // initialise the offline listener
   BrowserOffline.init();
   
   // Set up Sanitize Item
   initializeSanitizer();
+
+  // initialize the private browsing UI
+  gPrivateBrowsingUI.init();
 }
 
 function nonBrowserWindowShutdown()
 {
   BrowserOffline.uninit();
+
+  gPrivateBrowsingUI.uninit();
 }
 #endif
 
 function AutoHideTabbarPrefListener()
 {
   this.toggleAutoHideTabbar();
 }
 
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
@@ -204,17 +204,16 @@ ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_
 MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
 MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 
 PACKAGER_NO_LIBS = 1
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
-include $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
 
 repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
 repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
 	@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
 ifdef MOZ_BRANDING_DIRECTORY
 	$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
 else
 	$(MAKE) -C ../installer/windows export
@@ -337,20 +336,21 @@ langpack-%: libs-%
 
 installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-%
 	@echo "repackaging done"
 
 ifdef MOZ_UPDATER
 libs:: $(addprefix $(LOCALE_SRCDIR)/,updater/updater.ini)
 ifeq ($(OS_ARCH),WINNT)
 	cat $< $(srcdir)/updater_append.ini $(srcdir)/../installer/windows/nsis/updater_append.ini | \
-	  sed -e "s/%AB_CD%/$(AB_CD)/" | \
-	  iconv -f UTF-8 -t $(WIN_INSTALLER_CHARSET) > $(FINAL_TARGET)/updater.ini
+	  sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" | \
+	  sed -e "s/%AB_CD%/$(AB_CD)/" > $(FINAL_TARGET)/updater.ini
 else
 	cat $< $(srcdir)/updater_append.ini | \
+	  sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" | \
 	  sed -e "s/%AB_CD%/$(AB_CD)/" > $(FINAL_TARGET)/updater.ini
 endif
 endif
 
 ifdef MOZ_CRASHREPORTER
 libs:: crashreporter-override.ini
 	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
 endif
--- a/browser/locales/en-US/updater/updater.ini
+++ b/browser/locales/en-US/updater/updater.ini
@@ -1,4 +1,4 @@
 ; This file is in the UTF-8 encoding
 [Strings]
 Title=Software Update
-Info=Firefox is installing your updates and will start in a few moments…
+InfoText=%MOZ_APP_DISPLAYNAME% is installing your updates and will start in a few moments…
--- a/browser/themes/pinstripe/browser/browser.css
+++ b/browser/themes/pinstripe/browser/browser.css
@@ -1017,17 +1017,17 @@ richlistitem[selected="true"][current="t
 #editBookmarkPanelStarIcon[unstarred] {
   list-style-image: url("chrome://browser/skin/places/unstarred48.png");
 }
 
 #editBookmarkPanel {
   -moz-appearance: none;
   -moz-window-shadow: none;
   -moz-border-image: url(chrome://browser/skin/hud-panel.png) 26 50 22 18 / 26px 50px 22px 18px repeat;
-  margin-right: 27px;
+  margin-right: -27px;
   margin-top: 1px;
   padding-top: 8px;
   color: #ffffff;
 }
 
 #editBookmarkPanelTitle {
   font-size: 130%;
   font-weight: bold;
--- a/build/win32/pgomerge.py
+++ b/build/win32/pgomerge.py
@@ -18,17 +18,17 @@ def MergePGOFiles(basename, pgddir, pgcd
      Calls pgomgr to merge each pgc file into the pgd, then deletes
      the pgc files."""
   if not os.path.isdir(pgddir) or not os.path.isdir(pgcdir):
     return
   pgdfile = os.path.abspath(os.path.join(pgddir, basename + ".pgd"))
   if not os.path.isfile(pgdfile):
     return
   for file in os.listdir(pgcdir):
-    if file.startswith(basename) and file.endswith(".pgc"):
+    if file.startswith(basename+"!") and file.endswith(".pgc"):
       try:
         pgcfile = os.path.normpath(os.path.join(pgcdir, file))
         subprocess.call(['pgomgr', '-merge',
                          pgcfile,
                          pgdfile])
         os.remove(pgcfile)
       except OSError:
         pass
deleted file mode 100644
--- a/config/js/Makefile.in
+++ /dev/null
@@ -1,67 +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. This file was copied from parts of
-# mozilla/config/Makefile.in
-#
-# 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):
-#   Robert Ginda <rginda@netscape.com>
-#   John Taylor <jtaylor@netscape.com>
-#   Benjamin Smedberg <benjamin@smedbergs.us>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of 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
-
-JS_OBJDIR	= $(DEPTH)/js/src
-JS_CONFIG	= $(DIST)/bin/js-config
-
-include $(topsrcdir)/config/rules.mk
-
-# These rules assume that we configured js with an appropriate bindir,
-# libdir, and includedir, so that the 'make install' will put things
-# mostly in the right places.  The install-runtime-libs target takes
-# care of getting the needed libraries into the 'bin' directory as
-# well as the 'lib' directory.  Setting JS_MOZ_INSTALL= ensures that
-# we get symlinks (the proper in-tree build behavior), not copies (the
-# default GNU behavior).
-export::
-	$(MAKE) -C $(JS_OBJDIR) JS_MOZ_INSTALL=t install
-	$(MAKE) -C $(JS_OBJDIR) JS_MOZ_INSTALL=t install-runtime-libs libdir=$(DIST)/bin
-	$(INSTALL) $(IFLAGS2) $(JS_CONFIG) $(SDK_BIN_DIR)
-
-check::
-	$(MAKE) -C $(JS_OBJDIR) $@
--- a/config/js/build.mk
+++ b/config/js/build.mk
@@ -31,10 +31,9 @@
 # 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 *****
 
 TIERS += js
-tier_js_staticdirs = js/src
-tier_js_dirs = config/js
+tier_js_dirs = js/src
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -935,31 +935,35 @@ endif # !NO_DIST_INSTALL
 ifndef NO_PROFILE_GUIDED_OPTIMIZE
 ifneq (,$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
 ifeq ($(OS_ARCH)_$(GNU_CC)$(INTERNAL_TOOLS), WINNT_)
 # Force re-linking when building with PGO, since
 # the MSVC linker does all the work.  We force re-link
 # in both stages so you can do depend builds with PGO.
 ifdef SHARED_LIBRARY
 $(SHARED_LIBRARY): FORCE
-BINARY_BASENAME = $(SHARED_LIBRARY:$(DLL_SUFFIX)=)
 endif
 ifdef PROGRAM
 $(PROGRAM): FORCE
-BINARY_BASENAME = $(PROGRAM:$(BIN_SUFFIX)=)
 endif
 
 ifdef MOZ_PROFILE_USE
 # In the second pass, we need to merge the pgc files into the pgd file.
 # The compiler would do this for us automatically if they were in the right
 # place, but they're in dist/bin.
-ifdef BINARY_BASENAME
+ifneq (,$(SHARED_LIBRARY)$(PROGRAM))
 export::
+ifdef PROGRAM
 	$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
-	  $(BINARY_BASENAME) $(DIST)/bin
+	  $(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin
+endif
+ifdef SHARED_LIBRARY
+	$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
+	  $(LIBRARY_NAME) $(DIST)/bin
+endif
 endif
 endif # MOZ_PROFILE_USE
 endif # WINNT_
 endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
 endif # NO_PROFILE_GUIDED_OPTIMIZE
 
 ##############################################
 
@@ -1582,17 +1586,17 @@ endif
 ###############################################################################
 # Bunch of things that extend the 'export' rule (in order):
 ###############################################################################
 
 ################################################################################
 # Copy each element of EXPORTS to $(PUBLIC)
 
 ifneq ($(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),)
-$(SDK_PUBLIC) $(PUBLIC)::
+$(SDK_PUBLIC) $(PUBLIC):
 	$(NSINSTALL) -D $@
 endif
 
 ifdef MOZ_JAVAXPCOM
 ifneq ($(XPIDLSRCS)$(SDK_XPIDLSRCS),)
 $(JAVA_DIST_DIR)::
 	$(NSINSTALL) -D $@
 endif
--- a/configure.in
+++ b/configure.in
@@ -5812,29 +5812,16 @@ AC_SUBST(WGET)
 dnl ========================================================
 dnl Updater
 dnl ========================================================
 
 MOZ_ARG_DISABLE_BOOL(updater,
 [  --disable-updater       Disable building of updater],
     MOZ_UPDATER=,
     MOZ_UPDATER=1 )
-# The Windows build requires the iconv command line utility
-# in order to build the updater.
-case "$target_os" in
-    msvc*|mks*|cygwin*|mingw*|wince*)
-        if test -n "$MOZ_UPDATER"; then
-            AC_MSG_CHECKING([for iconv])
-            AC_CHECK_PROGS(HOST_ICONV, $HOST_ICONV "iconv", "")
-            if test -z "$HOST_ICONV"; then
-                AC_MSG_ERROR([iconv not found in \$PATH])
-            fi
-        fi
-        ;;
-esac
 AC_SUBST(MOZ_UPDATER)
 
 # app update channel is 'default' when not supplied.
 MOZ_ARG_ENABLE_STRING([update-channel],
 [  --enable-update-channel=CHANNEL
                            Select application update channel (default=default)],
     MOZ_UPDATE_CHANNEL=`echo $enableval | tr A-Z a-z`)
 
--- a/content/base/src/nsFrameLoader.cpp
+++ b/content/base/src/nsFrameLoader.cpp
@@ -878,21 +878,20 @@ nsFrameLoader::EnsureDocShell()
   nsCOMPtr<nsPIDOMWindow> win_private(do_GetInterface(mDocShell));
   nsCOMPtr<nsIBaseWindow> base_win(do_QueryInterface(mDocShell));
   if (win_private) {
     win_private->SetFrameElementInternal(frame_element);
   }
 
   // This is kinda whacky, this call doesn't really create anything,
   // but it must be called to make sure things are properly
-  // initialized...
+  // initialized.
   if (NS_FAILED(base_win->Create()) || !win_private) {
-    // ...but if we couldn't create the shell properly, better
-    // to make sure it gets removed.
-    Destroy();
+    // Do not call Destroy() here. See bug 472312.
+    NS_WARNING("Something wrong when creating the docshell for a frameloader!");
     return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 void
 nsFrameLoader::GetURL(nsString& aURI)
--- a/content/html/document/src/nsPluginDocument.cpp
+++ b/content/html/document/src/nsPluginDocument.cpp
@@ -70,48 +70,63 @@ public:
 
   const nsCString& GetType() const { return mMimeType; }
   nsIContent*      GetPluginContent() { return mPluginContent; }
 
   void AllowNormalInstantiation() {
     mWillHandleInstantiation = PR_FALSE;
   }
 
+  void StartLayout() { nsMediaDocument::StartLayout(); }
+
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsPluginDocument, nsMediaDocument)
 protected:
   nsresult CreateSyntheticPluginDocument();
 
   nsCOMPtr<nsIContent>                     mPluginContent;
   nsRefPtr<nsMediaDocumentStreamListener>  mStreamListener;
   nsCString                                mMimeType;
 
   // Hack to handle the fact that plug-in loading lives in frames and that the
   // frames may not be around when we need to instantiate.  Once plug-in
   // loading moves to content, this can all go away.
   PRBool                                   mWillHandleInstantiation;
 };
 
 class nsPluginStreamListener : public nsMediaDocumentStreamListener
 {
-  public:
-    nsPluginStreamListener(nsPluginDocument* doc) :
-       nsMediaDocumentStreamListener(doc),  mPluginDoc(doc) {}
-    NS_IMETHOD OnStartRequest(nsIRequest* request, nsISupports *ctxt);
-  private:
-    nsRefPtr<nsPluginDocument> mPluginDoc;
+public:
+  nsPluginStreamListener(nsPluginDocument* doc) :
+    nsMediaDocumentStreamListener(doc),  mPluginDoc(doc) {}
+  NS_IMETHOD OnStartRequest(nsIRequest* request, nsISupports *ctxt);
+private:
+  nsresult SetupPlugin();
+
+  nsRefPtr<nsPluginDocument> mPluginDoc;
 };
 
 
 NS_IMETHODIMP
 nsPluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
 {
-  nsresult rv = nsMediaDocumentStreamListener::OnStartRequest(request, ctxt);
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
+  // Have to set up our plugin stuff before we call OnStartRequest, so
+  // that the plugin listener can get that call.
+  nsresult rv = SetupPlugin();
+
+  NS_ASSERTION(NS_FAILED(rv) || mNextStream,
+               "We should have a listener by now");
+  nsresult rv2 = nsMediaDocumentStreamListener::OnStartRequest(request, ctxt);
+  return NS_SUCCEEDED(rv) ? rv2 : rv;
+}
+
+nsresult
+nsPluginStreamListener::SetupPlugin()
+{
+  NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);
+  mPluginDoc->StartLayout();
 
   nsCOMPtr<nsIContent> embed = mPluginDoc->GetPluginContent();
 
   // Now we have a frame for our <embed>, start the load
   nsIPresShell* shell = mDocument->GetPrimaryShell();
   if (!shell) {
     // Can't instantiate w/o a shell
     mPluginDoc->AllowNormalInstantiation();
@@ -121,38 +136,37 @@ nsPluginStreamListener::OnStartRequest(n
   // Flush out layout before we go to instantiate, because some
   // plug-ins depend on NPP_SetWindow() being called early enough and
   // nsObjectFrame does that at the end of reflow.
   shell->FlushPendingNotifications(Flush_Layout);
 
   nsIFrame* frame = shell->GetPrimaryFrameFor(embed);
   if (!frame) {
     mPluginDoc->AllowNormalInstantiation();
-    return rv;
+    return NS_OK;
   }
 
   nsIObjectFrame* objFrame;
   CallQueryInterface(frame, &objFrame);
   if (!objFrame) {
     mPluginDoc->AllowNormalInstantiation();
     return NS_ERROR_UNEXPECTED;
   }
 
-  rv = objFrame->Instantiate(mPluginDoc->GetType().get(),
-                             mDocument->nsIDocument::GetDocumentURI());
+  nsresult rv = objFrame->Instantiate(mPluginDoc->GetType().get(),
+                                      mDocument->nsIDocument::GetDocumentURI());
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   // Now that we're done, allow normal instantiation in the future
   // (say if there's a reframe of this entire presentation).
   mPluginDoc->AllowNormalInstantiation();
 
-  NS_ASSERTION(mNextStream, "We should have a listener by now");
-  return mNextStream->OnStartRequest(request, ctxt);
+  return NS_OK;
 }
 
 
   // NOTE! nsDocument::operator new() zeroes out all members, so don't
   // bother initializing members to 0.
 
 nsPluginDocument::nsPluginDocument()
   : mWillHandleInstantiation(PR_TRUE)
--- a/content/svg/content/src/nsSVGPathSegList.cpp
+++ b/content/svg/content/src/nsSVGPathSegList.cpp
@@ -238,22 +238,27 @@ NS_IMETHODIMP nsSVGPathSegList::InsertIt
 
 /* nsIDOMSVGPathSeg replaceItem (in nsIDOMSVGPathSeg newItem, in unsigned long index); */
 NS_IMETHODIMP nsSVGPathSegList::ReplaceItem(nsIDOMSVGPathSeg *newItem,
                                             PRUint32 index,
                                             nsIDOMSVGPathSeg **_retval)
 {
   NS_ENSURE_NATIVE_PATH_SEG(newItem, _retval);
 
+  // immediately remove the new item from its current list
+  nsSVGPathSeg* newItemSeg = static_cast<nsSVGPathSeg*>(newItem);
+  RemoveFromCurrentList(newItemSeg);
+
   if (index >= static_cast<PRUint32>(mSegments.Count())) {
     return NS_ERROR_DOM_INDEX_SIZE_ERR;
   }
 
-  InsertElementAt(static_cast<nsSVGPathSeg*>(newItem), index);
-  RemoveElementAt(index+1);
+  // NOTE: the new item can never be the item we will be replacing now that we removed it from its current list beforehand
+  InsertElementAt(newItemSeg, index);
+  RemoveFromCurrentList(static_cast<nsSVGPathSeg*>(mSegments.ObjectAt(index+1)));
   NS_ADDREF(*_retval = newItem);
 
   return NS_OK;
 }
 
 /* nsIDOMSVGPathSeg removeItem (in unsigned long index); */
 NS_IMETHODIMP nsSVGPathSegList::RemoveItem(PRUint32 index, nsIDOMSVGPathSeg **_retval)
 {
@@ -367,17 +372,16 @@ nsSVGPathSegList::RemoveFromCurrentList(
   nsCOMPtr<nsISVGValue> currentList = aSeg->GetCurrentList();
   if (currentList) {
     // aSeg's current list must be cast back to a nsSVGPathSegList*
     nsSVGPathSegList* otherSegList = static_cast<nsSVGPathSegList*>(currentList.get());
     PRInt32 ix = otherSegList->mSegments.IndexOfObject(aSeg);
     if (ix != -1) { 
       otherSegList->RemoveElementAt(ix); 
     }
-    aSeg->SetCurrentList(nsnull);
   }
 }
 
 ////////////////////////////////////////////////////////////////////////
 // Exported creation functions:
 
 nsresult
 NS_NewSVGPathSegList(nsIDOMSVGPathSegList** result)
--- a/extensions/metrics/src/nsPtrHashKey.h
+++ b/extensions/metrics/src/nsPtrHashKey.h
@@ -40,38 +40,11 @@
 // Use it like this:
 //   nsDataHashtable< nsPtrHashKey<SomeClass>, SomeValueType > mTable;
 //
 // This is identical to nsVoidPtrHashKey with void* replaced by T*.
 
 #ifndef nsPtrHashKey_h_
 #define nsPtrHashKey_h_
 
-#include "pldhash.h"
-#include "nscore.h"
-
-template<class T>
-class nsPtrHashKey : public PLDHashEntryHdr
-{
- public:
-  typedef const T *KeyType;
-  typedef const T *KeyTypePointer;
-
-  nsPtrHashKey(const T *key) : mKey(key) {}
-  nsPtrHashKey(const nsPtrHashKey<T> &toCopy) : mKey(toCopy.mKey) {}
-  ~nsPtrHashKey() {}
-
-  KeyType GetKey() const { return mKey; }
-
-  PRBool KeyEquals(KeyTypePointer key) const { return key == mKey; }
-
-  static KeyTypePointer KeyToPointer(KeyType key) { return key; }
-  static PLDHashNumber HashKey(KeyTypePointer key)
-  {
-    return NS_PTR_TO_INT32(key) >> 2;
-  }
-  enum { ALLOW_MEMMOVE = PR_TRUE };
-
- private:
-  const T *mKey;
-};
+#include "nsHashKeys.h"
 
 #endif  // nsPtrHashKey_h_
--- a/gfx/thebes/public/gfxTextRunWordCache.h
+++ b/gfx/thebes/public/gfxTextRunWordCache.h
@@ -56,17 +56,19 @@ public:
        * nsTextFrameUtils.h because the cache also needs to check the _INCOMING flag
        */
       TEXT_TRAILING_ARABICCHAR = 0x20000000,
       /**
        * When set, the previous character for this textrun was an Arabic
        * character.  This is used for the context detection necessary for
        * bidi.numeral implementation.
        */
-      TEXT_INCOMING_ARABICCHAR = 0x40000000
+      TEXT_INCOMING_ARABICCHAR = 0x40000000,
+
+      TEXT_UNUSED_FLAGS = 0x80000000
     };
 
     /**
      * Create a textrun using cached words.
      * Invalid characters (see gfxFontGroup::IsInvalidChar) will be automatically
      * treated as invisible missing.
      * @param aFlags the flags TEXT_IS_ASCII and TEXT_HAS_SURROGATES must be set
      * by the caller, if applicable; TEXT_IN_CACHE is added if we
--- a/gfx/thebes/src/gfxFont.cpp
+++ b/gfx/thebes/src/gfxFont.cpp
@@ -1390,16 +1390,20 @@ gfxTextRun::gfxTextRun(const gfxTextRunF
     mUserFontSetGeneration = mFontGroup->GetGeneration();
 }
 
 gfxTextRun::~gfxTextRun()
 {
 #ifdef DEBUG_TEXT_RUN_STORAGE_METRICS
     AccountStorageForTextRun(this, -1);
 #endif
+#ifdef DEBUG
+    // Make it easy to detect a dead text run
+    mFlags = 0xFFFFFFFF;
+#endif
     NS_RELEASE(mFontGroup);
     MOZ_COUNT_DTOR(gfxTextRun);
 }
 
 gfxTextRun *
 gfxTextRun::Clone(const gfxTextRunFactory::Parameters *aParams, const void *aText,
                   PRUint32 aLength, gfxFontGroup *aFontGroup, PRUint32 aFlags)
 {
new file mode 100644
--- /dev/null
+++ b/intl/uconv/tests/unit/test_decode_geostd8.js
@@ -0,0 +1,19 @@
+// Tests conversion from geostd8 to Unicode
+	
+const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
+    
+const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u201e\u2026\u2020\u2021\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u203a\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u10d0\u10d1\u10d2\u10d3\u10d4\u10d5\u10d6\u10f1\u10d7\u10d8\u10d9\u10da\u10db\u10dc\u10f2\u10dd\u10de\u10df\u10e0\u10e1\u10e2\u10f3\u10e3\u10e4\u10e5\u10e6\u10e7\u10e8\u10e9\u10ea\u10eb\u10ec\u10ed\u10ee\u10f4\u10ef\u10f0\u10f5\u2116";
+
+const charset = "geostd8";
+
+function run_test() {
+    var ScriptableUnicodeConverter =
+	Components.Constructor("@mozilla.org/intl/scriptableunicodeconverter",
+			       "nsIScriptableUnicodeConverter");
+
+    var converter = new ScriptableUnicodeConverter();
+    converter.charset = charset;
+
+    var outString = converter.ConvertToUnicode(inString) + converter.Finish();
+    do_check_eq(outString, expectedString);
+}
new file mode 100644
--- /dev/null
+++ b/intl/uconv/tests/unit/test_encode_geostd8.js
@@ -0,0 +1,19 @@
+// Tests conversion from Unicode to geostd8
+	
+const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u201e\u2026\u2020\u2021\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u203a\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u10d0\u10d1\u10d2\u10d3\u10d4\u10d5\u10d6\u10f1\u10d7\u10d8\u10d9\u10da\u10db\u10dc\u10f2\u10dd\u10de\u10df\u10e0\u10e1\u10e2\u10f3\u10e3\u10e4\u10e5\u10e6\u10e7\u10e8\u10e9\u10ea\u10eb\u10ec\u10ed\u10ee\u10f4\u10ef\u10f0\u10f5\u2116";
+    
+const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
+
+const charset = "geostd8";
+
+function run_test() {
+    var ScriptableUnicodeConverter =
+	Components.Constructor("@mozilla.org/intl/scriptableunicodeconverter",
+			       "nsIScriptableUnicodeConverter");
+
+    var converter = new ScriptableUnicodeConverter();
+    converter.charset = charset;
+
+    var outString = converter.ConvertFromUnicode(inString) + converter.Finish();
+    do_check_eq(outString, expectedString);
+}
--- a/intl/uconv/ucvlatin/geostd8.ut
+++ b/intl/uconv/ucvlatin/geostd8.ut
@@ -1,50 +1,50 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
+/* -*- Mode: C; tab-width: 4; 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
+ * Portions created by the Initial Developer are Copyright (C) 2001
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Gia Shervashidze
  *
  * Alternatively, the contents of this file may be used under the terms of
- * either of 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"),
+ * 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 ***** */
 /*========================================================
   This is a Generated file. Please don't edit it.
 
-  The tool which used to generate this file is called fromu.
+  The tool which used to generate this file is called umaptable.
+  You can find this tool under mozilla/intl/uconv/tools/umaptable.c.
   If you have any problem of this file. Please contact 
   Netscape Client International Team or 
   ftang@netscape <Frank Tang> 
 
               Table in Debug form 
 Begin of Item 0000
  Format 0
   srcBegin = 0000
@@ -55,78 +55,114 @@ End of Item 0000
 Begin of Item 0001
  Format 0
   srcBegin = 00A0
   srcEnd = 00BF
   destBegin = 00A0
 End of Item 0001 
 
 Begin of Item 0002
- Format 1
+ Format 0
   srcBegin = 00C0
-  srcEnd = 00E5
-  mappingOffset = 0000
- Mapping  = 
-  10D0 10D1 10D2 10D3 10D4 10D5 10D6 10F1
-  10D7 10D8 10D9 10DA 10DB 10DC 10F2 10DD
-  10DE 10DF 10E0 10E1 10E2 10F3 10E3 10E4
-  10E5 10E6 10E7 10E8 10E9 10EA 10EB 10EC
-  10ED 10EE 10F4 10EF 10F0 10F5
+  srcEnd = 00C6
+  destBegin = 10D0
 End of Item 0002 
 
 Begin of Item 0003
+ Format 0
+  srcBegin = 00C8
+  srcEnd = 00CD
+  destBegin = 10D7
+End of Item 0003 
+
+Begin of Item 0004
+ Format 0
+  srcBegin = 00CF
+  srcEnd = 00D4
+  destBegin = 10DD
+End of Item 0004 
+
+Begin of Item 0005
+ Format 0
+  srcBegin = 00D6
+  srcEnd = 00E1
+  destBegin = 10E3
+End of Item 0005 
+
+Begin of Item 0006
  Format 1
   srcBegin = 0080
   srcEnd = 009B
-  mappingOffset = 0026
+  mappingOffset = 0000
  Mapping  = 
   20AC FFFD 201A FFFD 201E 2026 2020 2021 
   FFFD 2030 FFFD 2039 FFFD FFFD FFFD FFFD 
   FFFD 2018 2019 201C 201D 2022 2013 2014 
   FFFD FFFD FFFD 203A 
-End of Item 0003 
+End of Item 0006 
 
-Begin of Item 0004
+Begin of Item 0007
+ Format 1
+  srcBegin = 00C7
+  srcEnd = 00D5
+  mappingOffset = 001C
+ Mapping  = 
+  10F1 FFFD FFFD FFFD FFFD FFFD FFFD 10F2 
+  FFFD FFFD FFFD FFFD FFFD FFFD 10F3 
+End of Item 0007 
+
+Begin of Item 0008
+ Format 1
+  srcBegin = 00E2
+  srcEnd = 00E5
+  mappingOffset = 002B
+ Mapping  = 
+  10F4 10EF 10F0 10F5 
+End of Item 0008 
+
+Begin of Item 0009
  Format 2
   srcBegin = 00FD
   destBegin = 2116
-End of Item 0004 
+End of Item 0009 
 
 ========================================================*/
 /* Offset=0x0000  ItemOfList */
-  0x0005,
+  0x000A,
 /*-------------------------------------------------------*/
 /* Offset=0x0001  offsetToFormatArray */
   0x0004,
 /*-------------------------------------------------------*/
 /* Offset=0x0002  offsetToMapCellArray */ 
-  0x0006,
+  0x0007,
 /*-------------------------------------------------------*/
 /* Offset=0x0003  offsetToMappingTable */ 
-  0x0015,
+  0x0025,
 /*-------------------------------------------------------*/
 /*       Offset=0x0004   Start of Format Array */ 
-/*      Total of Format 0 : 0x0002                       */
-/*      Total of Format 1 : 0x0002                       */
-/*      Total of Format 2 : 0x0001                       */
-/*      Total of Format 3 : 0x0000                       */
+/*	Total of Format 0 : 0x0006			 */
+/*	Total of Format 1 : 0x0003			 */
+/*	Total of Format 2 : 0x0001			 */
+/*	Total of Format 3 : 0x0000			 */
 
-0x1100, 0x0002, 
+0x0000, 0x1100, 0x0021, 
 /*-------------------------------------------------------*/
-/*       Offset=0x0006   Start of MapCell Array */ 
+/*       Offset=0x0007   Start of MapCell Array */ 
 /* 0000 */    0x0000, 0x007F, 0x0000, 
-/* 0001 */    0x00A0, 0x00FF, 0x00A0, 
-/* 0002 */    0x00C0, 0x00E5, 0x0000, 
-/* 0003 */    0x0080, 0x009F, 0x0026, 
-/* 0004 */    0x00FD, 0x2116, 0x0000, 
+/* 0001 */    0x00A0, 0x00BF, 0x00A0, 
+/* 0002 */    0x00C0, 0x00C6, 0x10D0, 
+/* 0003 */    0x00C8, 0x00CD, 0x10D7, 
+/* 0004 */    0x00CF, 0x00D4, 0x10DD, 
+/* 0005 */    0x00D6, 0x00E1, 0x10E3, 
+/* 0006 */    0x0080, 0x009B, 0x0000, 
+/* 0007 */    0x00C7, 0x00D5, 0x001C, 
+/* 0008 */    0x00E2, 0x00E5, 0x002B, 
+/* 0009 */    0x00FD, 0x0000, 0x2116, 
 /*-------------------------------------------------------*/
-/*       Offset=0x0015   Start of MappingTable */ 
+/*       Offset=0x0025   Start of MappingTable */ 
 
-/* 0000 */    0x10D0, 0x10D1, 0x10D2, 0x10D3, 0x10D4, 0x10D5, 0x10D6, 0x10F1, 
-/* 0008 */    0x10D7, 0x10D8, 0x10D9, 0x10DA, 0x10DB, 0x10DC, 0x10F2, 0x10DD, 
-/* 0010 */    0x10DE, 0x10DF, 0x10E0, 0x10E1, 0x10E2, 0x10F3, 0x10E3, 0x10E4, 
-/* 0018 */    0x10E5, 0x10E6, 0x10E7, 0x10E8, 0x10E9, 0x10EA, 0x10EB, 0x10EC, 
-/* 0020 */    0x10ED, 0x10EE, 0x10F4, 0x10EF, 0x10F0, 0x10F5, 0x20AC, 0xFFFD, 
-/* 0028 */    0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021, 0xFFFD, 0x2030, 
-/* 0030 */    0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2018, 
-/* 0038 */    0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0xFFFD, 0xFFFD, 
-/* 0040 */    0xFFFD, 0x203A, 
-/*      End of table Total Length = 0x0057 * 2 */
+/* 0000 */    0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021, 
+/* 0008 */    0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 
+/* 0010 */    0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 
+/* 0018 */    0xFFFD, 0xFFFD, 0xFFFD, 0x203A, 0x10F1, 0xFFFD, 0xFFFD, 0xFFFD, 
+/* 0020 */    0xFFFD, 0xFFFD, 0xFFFD, 0x10F2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 
+/* 0028 */    0xFFFD, 0xFFFD, 0x10F3, 0x10F4, 0x10EF, 0x10F0, 0x10F5, 
+/*	End of table Total Length = 0x0054 * 2 */
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -44,23 +44,16 @@ srcdir		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= config
 
 ifdef DEHYDRA_PATH
 DIRS += analysis-tests
 endif
 
-ifndef JS_MOZ_INSTALL
-# This is the appropriate behavior for GNU-style 'make install'.  For
-# Mozilla in-tree behavior, leaving NSDISTMODE unset is the right
-# thing; config/js/Makefile.in sets JS_MOZ_INSTALL in that case.
-NSDISTMODE	= copy
-endif
-
 MODULE		= js
 LIBRARY_NAME	= mozjs
 GRE_MODULE	= 1
 
 PROGRAM         = js$(BIN_SUFFIX)
 # The shell uses some 'HIDDEN' symbols to produce statistics, so we
 # link directly against the .o files, not against the JS shared
 # library.
@@ -181,17 +174,17 @@ CPPSRCS		= \
 ifdef HAVE_DTRACE
 CSRCS 		+= \
 		jsdtracef.c
 endif
 
 INSTALLED_HEADERS = \
 		js-config.h \
 		jsautocfg.h \
-		jsautokw.h \
+		$(CURDIR)/jsautokw.h \
 		js.msg \
 		jsapi.h \
 		jsarray.h \
 		jsarena.h \
 		jsatom.h \
 		jsbit.h \
 		jsbool.h \
 		jsclist.h \
@@ -277,16 +270,18 @@ INSTALLED_HEADERS += \
 		$(CURDIR)/javascript-trace.h \
 		$(NULL)
 endif
 
 ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
 INSTALLED_HEADERS += jscpucfg.h
 endif
 
+EXPORTS = $(INSTALLED_HEADERS)
+
 JS_SAFE_ARENA	= 1
 
 DASH_R		= -r
 
 ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
 SDK_LIBRARY = $(IMPORT_LIBRARY)
 else
 SDK_LIBRARY = $(SHARED_LIBRARY)
@@ -343,16 +338,28 @@ ifdef HAVE_DTRACE
 ifneq ($(OS_ARCH),Darwin)
 DTRACE_PROBE_OBJ = $(LIBRARY_NAME)-dtrace.$(OBJ_SUFFIX)
 endif
 MOZILLA_DTRACE_SRC = $(srcdir)/javascript-trace.d
 endif
 
 include $(topsrcdir)/config/rules.mk
 
+# nsinstall doesn't get built until we enter config/ in the exports phase,
+# so we'll have to manually ensure it gets built here if we want to use
+# $(EXPORTS)
+ifneq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
+ifneq ($(OS_ARCH), WINCE)
+$(EXPORTS) $(PUBLIC): config/nsinstall$(HOST_BIN_SUFFIX)
+
+config/nsinstall$(HOST_BIN_SUFFIX): $(srcdir)/config/nsinstall.c $(srcdir)/config/pathsub.c
+	$(MAKE) -C config/ nsinstall$(HOST_BIN_SUFFIX)
+endif
+endif
+
 ifdef MOZ_SYNC_BUILD_FILES
 # Because the SpiderMonkey can be distributed and built independently
 # of the Mozilla source tree, it contains its own copies of many of
 # the files used by the top-level Mozilla build process, from the
 # 'config' and 'build' subtrees.
 #
 # To make it simpler to keep the copies in sync, we follow the policy
 # that the SpiderMonkey copies must always be exact copies of those in
@@ -607,36 +614,33 @@ js-config: js-config.in Makefile $(DEPTH
 	-e 's|$(at)MOZILLA_VERSION$(at)|$(MOZILLA_VERSION)|' \
 	-e 's|$(at)LIBRARY_NAME$(at)|$(LIBRARY_NAME)|' \
 	-e 's|$(at)NSPR_CFLAGS$(at)|$(NSPR_CFLAGS)|' \
 	-e 's|$(at)JS_CONFIG_LIBS$(at)|$(JS_CONFIG_LIBS)|' \
 	-e 's|$(at)MOZ_JS_LIBS$(at)|$(MOZ_JS_LIBS)|' \
 	&& mv js-config.tmp $@ && chmod +x $@
 
 SCRIPTS = js-config
+SDK_BINARY = js-config
 
 install:: $(INSTALLED_HEADERS)
-	$(INSTALL) $(IFLAGS1) $^ $(includedir)/$(MODULE)
+	$(SYSINSTALL) $^ $(includedir)/$(MODULE)
 
 install:: $(SCRIPTS) $(PROGRAM)
-	$(INSTALL) $(IFLAGS2) $^ $(bindir)
+	$(SYSINSTALL) $^ $(bindir)
 
-# The Mozilla top-level makefiles use install-runtime-libs directly to
-# place an additional copy of the libraries in the 'dist/bin'
-# directory.
-install:: install-runtime-libs
-install-runtime-libs:: $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
+install:: $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
 ifneq (,$(LIBRARY))
-	$(INSTALL) $(IFLAGS1) $(LIBRARY) $(libdir)
+	$(SYSINSTALL) $(LIBRARY) $(libdir)
 endif
 ifneq (,$(SHARED_LIBRARY))
-	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(libdir)
+	$(SYSINSTALL) $(SHARED_LIBRARY) $(libdir)
 endif
 ifneq (,$(IMPORT_LIBRARY))
-	$(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(libdir)
+	$(SYSINSTALL) $(IMPORT_LIBRARY) $(libdir)
 endif
 
 # Extra dependancies and rules for auto-generated headers
 host_jskwgen.$(OBJ_SUFFIX): jsversion.h jskeyword.tbl
 
 # Use CURDIR to avoid finding a jsautokw.h in the source tree (from a
 # previous build?) via VPATH when we're building in a separate tree.
 $(CURDIR)/jsautokw.h: host_jskwgen$(HOST_BIN_SUFFIX)
--- a/js/src/build/win32/pgomerge.py
+++ b/js/src/build/win32/pgomerge.py
@@ -18,17 +18,17 @@ def MergePGOFiles(basename, pgddir, pgcd
      Calls pgomgr to merge each pgc file into the pgd, then deletes
      the pgc files."""
   if not os.path.isdir(pgddir) or not os.path.isdir(pgcdir):
     return
   pgdfile = os.path.abspath(os.path.join(pgddir, basename + ".pgd"))
   if not os.path.isfile(pgdfile):
     return
   for file in os.listdir(pgcdir):
-    if file.startswith(basename) and file.endswith(".pgc"):
+    if file.startswith(basename+"!") and file.endswith(".pgc"):
       try:
         pgcfile = os.path.normpath(os.path.join(pgcdir, file))
         subprocess.call(['pgomgr', '-merge',
                          pgcfile,
                          pgdfile])
         os.remove(pgcfile)
       except OSError:
         pass
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -935,31 +935,35 @@ endif # !NO_DIST_INSTALL
 ifndef NO_PROFILE_GUIDED_OPTIMIZE
 ifneq (,$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
 ifeq ($(OS_ARCH)_$(GNU_CC)$(INTERNAL_TOOLS), WINNT_)
 # Force re-linking when building with PGO, since
 # the MSVC linker does all the work.  We force re-link
 # in both stages so you can do depend builds with PGO.
 ifdef SHARED_LIBRARY
 $(SHARED_LIBRARY): FORCE
-BINARY_BASENAME = $(SHARED_LIBRARY:$(DLL_SUFFIX)=)
 endif
 ifdef PROGRAM
 $(PROGRAM): FORCE
-BINARY_BASENAME = $(PROGRAM:$(BIN_SUFFIX)=)
 endif
 
 ifdef MOZ_PROFILE_USE
 # In the second pass, we need to merge the pgc files into the pgd file.
 # The compiler would do this for us automatically if they were in the right
 # place, but they're in dist/bin.
-ifdef BINARY_BASENAME
+ifneq (,$(SHARED_LIBRARY)$(PROGRAM))
 export::
+ifdef PROGRAM
 	$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
-	  $(BINARY_BASENAME) $(DIST)/bin
+	  $(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/bin
+endif
+ifdef SHARED_LIBRARY
+	$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
+	  $(LIBRARY_NAME) $(DIST)/bin
+endif
 endif
 endif # MOZ_PROFILE_USE
 endif # WINNT_
 endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
 endif # NO_PROFILE_GUIDED_OPTIMIZE
 
 ##############################################
 
@@ -1582,17 +1586,17 @@ endif
 ###############################################################################
 # Bunch of things that extend the 'export' rule (in order):
 ###############################################################################
 
 ################################################################################
 # Copy each element of EXPORTS to $(PUBLIC)
 
 ifneq ($(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),)
-$(SDK_PUBLIC) $(PUBLIC)::
+$(SDK_PUBLIC) $(PUBLIC):
 	$(NSINSTALL) -D $@
 endif
 
 ifdef MOZ_JAVAXPCOM
 ifneq ($(XPIDLSRCS)$(SDK_XPIDLSRCS),)
 $(JAVA_DIST_DIR)::
 	$(NSINSTALL) -D $@
 endif
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -273,24 +273,16 @@ static void DrawBorderImageSide(gfxConte
                                 nsIDeviceContext* aDeviceContext,
                                 imgIContainer* aImage,
                                 gfxRect& aDestRect,
                                 gfxSize aInterSize,
                                 gfxRect& aSourceRect,
                                 PRUint8 aHFillType,
                                 PRUint8 aVFillType);
 
-static void PaintBackgroundColor(nsPresContext* aPresContext,
-                                 nsIRenderingContext& aRenderingContext,
-                                 nsIFrame* aForFrame,
-                                 const nsRect& aBgClipArea,
-                                 const nsStyleBackground& aColor,
-                                 const nsStyleBorder& aBorder,
-                                 PRBool aCanPaintNonWhite);
-
 static nscolor MakeBevelColor(PRIntn whichSide, PRUint8 style,
                               nscolor aBackgroundColor,
                               nscolor aBorderColor);
 
 static gfxRect GetTextDecorationRectInternal(const gfxPoint& aPt,
                                              const gfxSize& aLineSize,
                                              const gfxFloat aAscent,
                                              const gfxFloat aOffset,
@@ -491,18 +483,19 @@ nsCSSRendering::PaintBorder(nsPresContex
     return;
   }
   
   // Get our style context's color struct.
   const nsStyleColor* ourColor = aStyleContext->GetStyleColor();
 
   // in NavQuirks mode we want to use the parent's context as a starting point
   // for determining the background color
-  const nsStyleBackground* bgColor = nsCSSRendering::FindNonTransparentBackground
+  nsStyleContext* bgContext = nsCSSRendering::FindNonTransparentBackground
     (aStyleContext, compatMode == eCompatibility_NavQuirks ? PR_TRUE : PR_FALSE);
+  const nsStyleBackground* bgColor = bgContext->GetStyleBackground();
 
   border = aBorderStyle.GetComputedBorder();
   if ((0 == border.left) && (0 == border.right) &&
       (0 == border.top) && (0 == border.bottom)) {
     // Empty border area
     return;
   }
 
@@ -617,18 +610,19 @@ nsCSSRendering::PaintOutline(nsPresConte
   nscoord width;
   aOutlineStyle.GetOutlineWidth(width);
 
   if (width == 0) {
     // Empty outline
     return;
   }
 
-  const nsStyleBackground* bgColor = nsCSSRendering::FindNonTransparentBackground
+  nsStyleContext* bgContext = nsCSSRendering::FindNonTransparentBackground
     (aStyleContext, PR_FALSE);
+  const nsStyleBackground* bgColor = bgContext->GetStyleBackground();
 
   // get the radius for our outline
   GetBorderRadiusTwips(aOutlineStyle.mOutlineRadius, aBorderArea.width,
                        twipsRadii);
 
   // When the outline property is set on :-moz-anonymous-block or
   // :-moz-anonyomus-positioned-block pseudo-elements, it inherited that
   // outline from the inline that was broken because it contained a
@@ -832,39 +826,46 @@ ComputeBackgroundAnchorPoint(const nsSty
     aAnchorPoint->y = NSToCoordRound(percent*aOriginBounds.height);
     aTopLeft->y = NSToCoordRound(percent*(aOriginBounds.height - aImageSize.height));
   }
   else {
     aTopLeft->y = aAnchorPoint->y = 0;
   }
 }
 
-const nsStyleBackground*
+nsStyleContext*
 nsCSSRendering::FindNonTransparentBackground(nsStyleContext* aContext,
                                              PRBool aStartAtParent /*= PR_FALSE*/)
 {
   NS_ASSERTION(aContext, "Cannot find NonTransparentBackground in a null context" );
   
-  const nsStyleBackground* result = nsnull;
   nsStyleContext* context = nsnull;
   if (aStartAtParent) {
     context = aContext->GetParent();
   }
   if (!context) {
     context = aContext;
   }
   
   while (context) {
-    result = context->GetStyleBackground();
-    if (NS_GET_A(result->mBackgroundColor) > 0)
+    const nsStyleBackground* bg = context->GetStyleBackground();
+    if (NS_GET_A(bg->mBackgroundColor) > 0)
+      break;
+
+    const nsStyleDisplay* display = context->GetStyleDisplay();
+    if (display->mAppearance)
       break;
 
-    context = context->GetParent();
+    nsStyleContext* parent = context->GetParent();
+    if (!parent)
+      break;
+
+    context = parent;
   }
-  return result;
+  return context;
 }
 
 
 /**
  * |FindBackground| finds the correct style data to use to paint the
  * background.  It is responsible for handling the following two
  * statements in section 14.2 of CSS2:
  *
@@ -1242,18 +1243,17 @@ IsSolidBorderEdge(const nsStyleBorder& a
 }
 
 /**
  * Returns true if all border edges are either missing or opaque.
  */
 static PRBool
 IsSolidBorder(const nsStyleBorder& aBorder)
 {
-  if (aBorder.mBorderColors ||
-      nsLayoutUtils::HasNonZeroCorner(aBorder.mBorderRadius))
+  if (aBorder.mBorderColors)
     return PR_FALSE;
   for (PRUint32 i = 0; i < 4; ++i) {
     if (!IsSolidBorderEdge(aBorder, i))
       return PR_FALSE;
   }
   return PR_TRUE;
 }
 
@@ -1266,86 +1266,197 @@ nsCSSRendering::PaintBackgroundWithSC(ns
                                       const nsStyleBackground& aColor,
                                       const nsStyleBorder& aBorder,
                                       PRBool aUsePrintSettings,
                                       nsRect* aBGClipRect)
 {
   NS_PRECONDITION(aForFrame,
                   "Frame is expected to be provided to PaintBackground");
 
-  PRBool canDrawBackgroundImage = PR_TRUE;
-  PRBool canDrawBackgroundColor = PR_TRUE;
-
-  if (aUsePrintSettings) {
-    canDrawBackgroundImage = aPresContext->GetBackgroundImageDraw();
-    canDrawBackgroundColor = aPresContext->GetBackgroundColorDraw();
-  }
-
   // Check to see if we have an appearance defined.  If so, we let the theme
   // renderer draw the background and bail out.
+  // XXXzw this ignores aBGClipRect.
   const nsStyleDisplay* displayData = aForFrame->GetStyleDisplay();
   if (displayData->mAppearance) {
     nsITheme *theme = aPresContext->GetTheme();
-    if (theme && theme->ThemeSupportsWidget(aPresContext, aForFrame, displayData->mAppearance)) {
+    if (theme && theme->ThemeSupportsWidget(aPresContext, aForFrame,
+                                            displayData->mAppearance)) {
       nsRect dirty;
       dirty.IntersectRect(aDirtyRect, aBorderArea);
       theme->DrawWidgetBackground(&aRenderingContext, aForFrame, 
                                   displayData->mAppearance, aBorderArea, dirty);
       return;
     }
   }
 
-  // Same coordinate space as aBorderArea
-  nsRect bgClipArea;
-  if (aBGClipRect) {
-    bgClipArea = *aBGClipRect;
+  // Determine whether we are drawing background images and/or
+  // background colors.
+  PRBool drawBackgroundImage = PR_TRUE;
+  PRBool drawBackgroundColor = PR_TRUE;
+
+  if (aUsePrintSettings) {
+    drawBackgroundImage = aPresContext->GetBackgroundImageDraw();
+    drawBackgroundColor = aPresContext->GetBackgroundColorDraw();
+  }
+
+  if ((aColor.mBackgroundFlags & NS_STYLE_BG_IMAGE_NONE) ||
+      !aColor.mBackgroundImage) {
+    NS_ASSERTION((aColor.mBackgroundFlags & NS_STYLE_BG_IMAGE_NONE) &&
+                 !aColor.mBackgroundImage, "background flags/image mismatch");
+    drawBackgroundImage = PR_FALSE;
+  }
+
+  // If GetBackgroundColorDraw() is false, we are still expected to
+  // draw color in the background of any frame that's not completely
+  // transparent, but we are expected to use white instead of whatever
+  // color was specified.
+  nscolor bgColor;
+  if (drawBackgroundColor) {
+    bgColor = aColor.mBackgroundColor;
+    if (NS_GET_A(bgColor) == 0)
+      drawBackgroundColor = PR_FALSE;
+  } else {
+    bgColor = NS_RGB(255, 255, 255);
+    if (drawBackgroundImage || NS_GET_A(aColor.mBackgroundColor) > 0)
+      drawBackgroundColor = PR_TRUE;
   }
-  else {
-    // The background is rendered over the 'background-clip' area.
-    bgClipArea = aBorderArea;
-    // If the border is solid, then clip the background to the padding-box
-    // so that we don't draw unnecessary tiles.
-    if (aColor.mBackgroundClip != NS_STYLE_BG_CLIP_BORDER ||
-        IsSolidBorder(aBorder)) {
-      nsMargin border = aForFrame->GetUsedBorder();
-      aForFrame->ApplySkipSides(border);
-      bgClipArea.Deflate(border);
+
+  // At this point, drawBackgroundImage and drawBackgroundColor are
+  // true if and only if we are actually supposed to paint an image or
+  // color into aDirtyRect, respectively.
+  if (!drawBackgroundImage && !drawBackgroundColor)
+    return;
+
+  // Compute the outermost boundary of the area that might be painted.
+  gfxContext *ctx = aRenderingContext.ThebesContext();
+  nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
+
+  // Same coordinate space as aBorderArea & aBGClipRect
+  nsRect bgArea;
+  gfxCornerSizes bgRadii;
+  PRBool haveRoundedCorners;
+  PRBool radiiAreOuter = PR_TRUE;
+  {
+    nscoord radii[8];
+    haveRoundedCorners =
+      GetBorderRadiusTwips(aBorder.mBorderRadius, aForFrame->GetSize().width,
+                           radii);
+    if (haveRoundedCorners)
+      ComputePixelRadii(radii, aBorderArea, aForFrame->GetSkipSides(),
+                        appUnitsPerPixel, &bgRadii);
+  }
+  
+  // The background is rendered over the 'background-clip' area,
+  // which is normally equal to the border area but may be reduced
+  // to the padding area by CSS.  Also, if the border is solid, we
+  // don't need to draw outside the padding area.  In either case,
+  // if the borders are rounded, make sure we use the same inner
+  // radii as the border code will.
+  bgArea = aBorderArea;
+  if (aColor.mBackgroundClip != NS_STYLE_BG_CLIP_BORDER ||
+      IsSolidBorder(aBorder)) {
+    nsMargin border = aForFrame->GetUsedBorder();
+    aForFrame->ApplySkipSides(border);
+    bgArea.Deflate(border);
+    if (haveRoundedCorners) {
+      gfxCornerSizes outerRadii = bgRadii;
+      gfxFloat borderSizes[4] = {
+        border.top / appUnitsPerPixel, border.right / appUnitsPerPixel,
+        border.bottom / appUnitsPerPixel, border.left / appUnitsPerPixel
+      };
+      nsCSSBorderRenderer::ComputeInnerRadii(outerRadii, borderSizes,
+                                             &bgRadii);
+      radiiAreOuter = PR_FALSE;
     }
   }
 
-  gfxContext *ctx = aRenderingContext.ThebesContext();
+  // The 'bgClipArea' (used only by the image tiling logic, far below)
+  // is the caller-provided aBGClipRect if any, or else the bgArea
+  // computed above.  (Arguably it should be the intersection, but
+  // that breaks the table painter -- in particular, honoring the
+  // bgArea when we have aBGClipRect breaks reftests/bugs/403429-1[ab].)
+  // The dirtyRect is the intersection of that rectangle with the
+  // caller-provided aDirtyRect.  If the dirtyRect is empty there is
+  // nothing to draw.
 
-  // The actual dirty rect is the intersection of the 'background-clip'
-  // area and the dirty rect we were given
+  nsRect bgClipArea;
+  if (aBGClipRect)
+    bgClipArea = *aBGClipRect;
+  else
+    bgClipArea = bgArea;
+
   nsRect dirtyRect;
-  if (!dirtyRect.IntersectRect(bgClipArea, aDirtyRect)) {
-    // Nothing to paint
+  dirtyRect.IntersectRect(bgClipArea, aDirtyRect);
+
+  if (dirtyRect.IsEmpty())
+    return;
+
+  // Compute the Thebes equivalent of the dirtyRect.
+  gfxRect dirtyRectGfx(RectToGfxRect(dirtyRect, appUnitsPerPixel));
+  dirtyRectGfx.Round();
+  dirtyRectGfx.Condition();
+  if (dirtyRectGfx.IsEmpty()) {
+    NS_WARNING("converted dirty rect should not be empty");
     return;
   }
 
-  // if there is no background image or background images are turned off, try a color.
-  if (!aColor.mBackgroundImage || !canDrawBackgroundImage) {
-    PaintBackgroundColor(aPresContext, aRenderingContext, aForFrame, bgClipArea,
-                         aColor, aBorder, canDrawBackgroundColor);
+  // If we have rounded corners, clip all subsequent drawing to the
+  // rounded rectangle defined by bgArea and bgRadii (we don't know
+  // whether the rounded corners intrude on the dirtyRect or not).
+  // Do not do this if we have a caller-provided clip rect --
+  // as above with bgArea, arguably a bug, but table painting seems
+  // to depend on it.
+
+  gfxContextAutoSaveRestore autoSR;
+  if (haveRoundedCorners && !aBGClipRect) {
+    gfxRect bgAreaGfx(RectToGfxRect(bgArea, appUnitsPerPixel));
+    bgAreaGfx.Round();
+    bgAreaGfx.Condition();
+    if (bgAreaGfx.IsEmpty()) {
+      NS_WARNING("converted background area should not be empty");
+      return;
+    }
+
+    autoSR.SetContext(ctx);
+    ctx->NewPath();
+    ctx->RoundedRectangle(bgAreaGfx, bgRadii, radiiAreOuter);
+    ctx->Clip();
+  }
+
+  // If we might be using a background color, go ahead and set it now.
+  if (drawBackgroundColor)
+    ctx->SetColor(gfxRGBA(bgColor));
+
+  // If there is no background image, draw a color.  (If there is
+  // neither a background image nor a color, we wouldn't have gotten
+  // this far.)
+  if (!drawBackgroundImage) {
+    ctx->NewPath();
+    ctx->Rectangle(dirtyRectGfx);
+    ctx->Fill();
     return;
   }
 
-  // We have a background image
-
   // Lookup the image
   imgIRequest *req = aPresContext->LoadImage(aColor.mBackgroundImage,
                                              aForFrame);
 
   PRUint32 status = imgIRequest::STATUS_ERROR;
   if (req)
     req->GetImageStatus(&status);
 
-  if (!req || !(status & imgIRequest::STATUS_FRAME_COMPLETE) || !(status & imgIRequest::STATUS_SIZE_AVAILABLE)) {
-    PaintBackgroundColor(aPresContext, aRenderingContext, aForFrame, bgClipArea,
-                         aColor, aBorder, canDrawBackgroundColor);
+  // While waiting for the image, draw a color, if any.
+  if (!req ||
+      !(status & imgIRequest::STATUS_FRAME_COMPLETE) ||
+      !(status & imgIRequest::STATUS_SIZE_AVAILABLE)) {
+    if (drawBackgroundColor) {
+      ctx->NewPath();
+      ctx->Rectangle(dirtyRectGfx);
+      ctx->Fill();
+    }
     return;
   }
 
   nsCOMPtr<imgIContainer> image;
   req->GetImage(getter_AddRefs(image));
 
   nsSize imageSize;
   image->GetWidth(&imageSize.width);
@@ -1398,56 +1509,60 @@ nsCSSRendering::PaintBackgroundWithSC(ns
       nsMargin padding = geometryFrame->GetUsedPadding();
       geometryFrame->ApplySkipSides(padding);
       bgOriginRect.Deflate(padding);
       NS_ASSERTION(aColor.mBackgroundOrigin == NS_STYLE_BG_ORIGIN_CONTENT,
                    "unknown background-origin value");
     }
   }
 
-  PRBool  needBackgroundColor = NS_GET_A(aColor.mBackgroundColor) > 0;
   PRIntn  repeat = aColor.mBackgroundRepeat;
-
   switch (repeat) {
     case NS_STYLE_BG_REPEAT_X:
       break;
     case NS_STYLE_BG_REPEAT_Y:
       break;
     case NS_STYLE_BG_REPEAT_XY:
-      if (needBackgroundColor) {
-        // If the image is completely opaque, we do not need to paint the
-        // background color
+      if (drawBackgroundColor) {
+        // If the image is completely opaque, we may not need to paint
+        // the background color.
         nsCOMPtr<gfxIImageFrame> gfxImgFrame;
         image->GetCurrentFrame(getter_AddRefs(gfxImgFrame));
         if (gfxImgFrame) {
-          gfxImgFrame->GetNeedsBackground(&needBackgroundColor);
-
-          /* check for tiling of a image where frame smaller than container */
-          nsSize iSize;
-          image->GetWidth(&iSize.width);
-          image->GetHeight(&iSize.height);
-          nsRect iframeRect;
-          gfxImgFrame->GetRect(iframeRect);
-          if (iSize.width != iframeRect.width ||
-              iSize.height != iframeRect.height) {
-            needBackgroundColor = PR_TRUE;
+          gfxImgFrame->GetNeedsBackground(&drawBackgroundColor);
+          if (!drawBackgroundColor) {
+            // If the current frame is smaller than its container, we
+            // need to paint the background color even if the frame
+            // itself is opaque.
+            nsSize iSize;
+            image->GetWidth(&iSize.width);
+            image->GetHeight(&iSize.height);
+            nsRect iframeRect;
+            gfxImgFrame->GetRect(iframeRect);
+            if (iSize.width != iframeRect.width ||
+                iSize.height != iframeRect.height) {
+              drawBackgroundColor = PR_TRUE;
+            }
           }
         }
       }
       break;
     case NS_STYLE_BG_REPEAT_OFF:
     default:
-      NS_ASSERTION(repeat == NS_STYLE_BG_REPEAT_OFF, "unknown background-repeat value");
+      NS_ASSERTION(repeat == NS_STYLE_BG_REPEAT_OFF,
+                   "unknown background-repeat value");
       break;
   }
 
-  // The background color is rendered over the 'background-clip' area
-  if (needBackgroundColor) {
-    PaintBackgroundColor(aPresContext, aRenderingContext, aForFrame, bgClipArea,
-                         aColor, aBorder, canDrawBackgroundColor);
+  // The background color is rendered over the entire dirty area,
+  // even if the image isn't.
+  if (drawBackgroundColor) {
+    ctx->NewPath();
+    ctx->Rectangle(dirtyRectGfx);
+    ctx->Fill();
   }
 
   // Compute the anchor point.
   //
   // relative to aBorderArea.TopLeft() (which is where the top-left
   // of aForFrame's border-box will be rendered)
   nsPoint imageTopLeft, anchor;
   if (NS_STYLE_BG_ATTACHMENT_FIXED == aColor.mBackgroundAttachment) {
@@ -1494,54 +1609,30 @@ nsCSSRendering::PaintBackgroundWithSC(ns
     anchor += offset;
   } else {
     ComputeBackgroundAnchorPoint(aColor, bgOriginRect.Size(), imageSize,
                                  &imageTopLeft, &anchor);
     imageTopLeft += bgOriginRect.TopLeft();
     anchor += bgOriginRect.TopLeft();
   }
 
-  ctx->Save();
-
-  nscoord borderRadii[8];
-  PRBool haveRadius = GetBorderRadiusTwips(aBorder.mBorderRadius,
-                                           aForFrame->GetSize().width,
-                                           borderRadii);
-  if (haveRadius) {
-    nscoord appUnitsPerPixel = aPresContext->DevPixelsToAppUnits(1);
-    gfxCornerSizes radii;
-    ComputePixelRadii(borderRadii, bgClipArea,
-                      aForFrame ? aForFrame->GetSkipSides() : 0,
-                      appUnitsPerPixel, &radii);
-
-    gfxRect oRect(RectToGfxRect(bgClipArea, appUnitsPerPixel));
-    oRect.Round();
-    oRect.Condition();
-
-    ctx->NewPath();
-    ctx->RoundedRectangle(oRect, radii);
-    ctx->Clip();
-  }
-
   nsRect destArea(imageTopLeft + aBorderArea.TopLeft(), imageSize);
   nsRect fillArea = destArea;
   if (repeat & NS_STYLE_BG_REPEAT_X) {
     fillArea.x = bgClipArea.x;
     fillArea.width = bgClipArea.width;
   }
   if (repeat & NS_STYLE_BG_REPEAT_Y) {
     fillArea.y = bgClipArea.y;
     fillArea.height = bgClipArea.height;
   }
   fillArea.IntersectRect(fillArea, bgClipArea);
 
   nsLayoutUtils::DrawImage(&aRenderingContext, image,
       destArea, fillArea, anchor + aBorderArea.TopLeft(), dirtyRect);
-
-  ctx->Restore();
 }
 
 static void
 DrawBorderImage(nsPresContext* aPresContext,
                 nsIRenderingContext& aRenderingContext,
                 nsIFrame* aForFrame, const nsRect& aBorderArea,
                 const nsStyleBorder& aBorderStyle)
 {
@@ -1925,88 +2016,16 @@ DrawBorderImageSide(gfxContext *aThebesC
   aThebesContext->SetPattern(pattern);
   aThebesContext->NewPath();
   aThebesContext->Rectangle(gfxRect(renderOffset, rectSize));
   aThebesContext->SetOperator(gfxContext::OPERATOR_ADD);
   aThebesContext->Fill();
   aThebesContext->Restore();
 }
 
-static void
-PaintBackgroundColor(nsPresContext* aPresContext,
-                     nsIRenderingContext& aRenderingContext,
-                     nsIFrame* aForFrame,
-                     const nsRect& aBgClipArea,
-                     const nsStyleBackground& aColor,
-                     const nsStyleBorder& aBorder,
-                     PRBool aCanPaintNonWhite)
-{
-  // If we're only allowed to paint white, then don't bail out on transparent
-  // color if we're not completely transparent.  See the corresponding check
-  // for whether we're allowed to paint background images in
-  // PaintBackgroundWithSC before the first call to PaintBackgroundColor.
-  if (NS_GET_A(aColor.mBackgroundColor) == 0 &&
-      (aCanPaintNonWhite || aColor.IsTransparent())) {
-    // nothing to paint
-    return;
-  }
-
-  nscolor color = aColor.mBackgroundColor;
-  if (!aCanPaintNonWhite) {
-    color = NS_RGB(255, 255, 255);
-  }
-  aRenderingContext.SetColor(color);
-
-  if (!nsLayoutUtils::HasNonZeroCorner(aBorder.mBorderRadius)) {
-    aRenderingContext.FillRect(aBgClipArea);
-    return;
-  }
-
-  gfxContext *ctx = aRenderingContext.ThebesContext();
-
-  // needed for our border thickness
-  nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
-
-  nscoord borderRadii[8];
-  GetBorderRadiusTwips(aBorder.mBorderRadius, aForFrame->GetSize().width,
-                       borderRadii);
-
-  // the bgClipArea is the outside
-  gfxRect oRect(RectToGfxRect(aBgClipArea, appUnitsPerPixel));
-  oRect.Round();
-  oRect.Condition();
-  if (oRect.IsEmpty())
-    return;
-
-  // convert the radii
-  gfxCornerSizes radii;
-  ComputePixelRadii(borderRadii, aBgClipArea,
-                    aForFrame ? aForFrame->GetSkipSides() : 0,
-                    appUnitsPerPixel, &radii);
-
-  // Add 1.0 to any border radii; if we don't, the border and background
-  // curves will combine to have fringing at the rounded corners.  Since
-  // alpha is used for coverage, we have problems because the border and
-  // background should have identical coverage, and the border should
-  // overlay the background exactly.  The way to avoid this is by using
-  // a supersampling scheme, but we don't have the mechanism in place to do
-  // this.  So, this will do for now.
-  for (int i = 0; i < 4; i++) {
-    if (radii[i].width > 0.0)
-      radii[i].width += 1.0;
-    if (radii[i].height > 0.0)
-      radii[i].height += 1.0;
-  }
-
-  ctx->NewPath();
-  ctx->RoundedRectangle(oRect, radii);
-  ctx->Fill();
-}
-
-
 // Begin table border-collapsing section
 // These functions were written to not disrupt the normal ones and yet satisfy some additional requirements
 // At some point, all functions should be unified to include the additional functionality that these provide
 
 static nscoord
 RoundIntToPixel(nscoord aValue, 
                 nscoord aTwipsPerPixel,
                 PRBool  aRoundDown = PR_FALSE)
--- a/layout/base/nsCSSRendering.h
+++ b/layout/base/nsCSSRendering.h
@@ -120,22 +120,25 @@ struct nsCSSRendering {
    * @return PR_TRUE if there is some meaningful background.
    */
   static PRBool FindBackground(nsPresContext* aPresContext,
                                nsIFrame* aForFrame,
                                const nsStyleBackground** aBackground,
                                PRBool* aIsCanvas);
                                
   /**
-   * Find a non-transparent background, for various table-related and
-   * HR-related backwards-compatibility hacks.  Be very hesitant if
-   * you're considering calling this function -- it's usually not what
-   * you want.
+   * Find a style context containing a non-transparent background,
+   * for various table-related and HR-related backwards-compatibility hacks.
+   * This function will also stop if it finds a -moz-appearance value, as
+   * the theme may draw a widget as a background.
+   *
+   * Be very hesitant if you're considering calling this function -- it's
+   * usually not what you want.
    */
-  static const nsStyleBackground*
+  static nsStyleContext*
   FindNonTransparentBackground(nsStyleContext* aContext,
                                PRBool aStartAtParent = PR_FALSE);
 
   /**
    * Render the background for an element using css rendering rules
    * for backgrounds.
    *
    * Both aDirtyRect and aBorderArea are in the local coordinate space
--- a/layout/base/nsCSSRenderingBorders.cpp
+++ b/layout/base/nsCSSRenderingBorders.cpp
@@ -95,20 +95,16 @@
  *         |- DrawDashedSide || DrawBorderSides with one side
  */
 
 static void ComputeBorderCornerDimensions(const gfxRect& aOuterRect,
                                           const gfxRect& aInnerRect,
                                           const gfxCornerSizes& aRadii,
                                           gfxCornerSizes *aDimsResult);
 
-static void ComputeInnerRadii(const gfxCornerSizes& radii,
-                              const gfxFloat *borderSizes,
-                              gfxCornerSizes *innerRadii);
-
 // given a side index, get the previous and next side index
 #define NEXT_SIDE(_s) (((_s) + 1) & 3)
 #define PREV_SIDE(_s) (((_s) + 3) & 3)
 
 // from the given base color and the background color, turn
 // color into a color for the given border pattern style
 static gfxRGBA MakeBorderColor(const gfxRGBA& aColor,
                                const gfxRGBA& aBackgroundColor,
@@ -196,20 +192,20 @@ nsCSSBorderRenderer::nsCSSBorderRenderer
   mInnerRect.Inset(mBorderWidths[0], mBorderWidths[1], mBorderWidths[2], mBorderWidths[3]);
 
   ComputeBorderCornerDimensions(mOuterRect, mInnerRect, mBorderRadii, &mBorderCornerDimensions);
 
   mOneUnitBorder = CheckFourFloatsEqual(mBorderWidths, 1.0);
   mNoBorderRadius = AllCornersZeroSize(mBorderRadii);
 }
 
-void
-ComputeInnerRadii(const gfxCornerSizes& aRadii,
-                  const gfxFloat *aBorderSizes,
-                  gfxCornerSizes *aInnerRadiiRet)
+/* static */ void
+nsCSSBorderRenderer::ComputeInnerRadii(const gfxCornerSizes& aRadii,
+                                       const gfxFloat *aBorderSizes,
+                                       gfxCornerSizes *aInnerRadiiRet)
 {
   gfxCornerSizes& iRadii = *aInnerRadiiRet;
 
   iRadii[C_TL].width = PR_MAX(0.0, aRadii[C_TL].width - aBorderSizes[NS_SIDE_LEFT]);
   iRadii[C_TL].height = PR_MAX(0.0, aRadii[C_TL].height - aBorderSizes[NS_SIDE_TOP]);
 
   iRadii[C_TR].width = PR_MAX(0.0, aRadii[C_TR].width - aBorderSizes[NS_SIDE_RIGHT]);
   iRadii[C_TR].height = PR_MAX(0.0, aRadii[C_TR].height - aBorderSizes[NS_SIDE_TOP]);
--- a/layout/base/nsCSSRenderingBorders.h
+++ b/layout/base/nsCSSRenderingBorders.h
@@ -195,16 +195,21 @@ struct nsCSSBorderRenderer {
   // function used by the above to handle -moz-border-colors
   void DrawBorderSidesCompositeColors(PRIntn aSides, const nsBorderColors *compositeColors);
 
   // draw the given dashed side
   void DrawDashedSide (PRUint8 aSide);
 
   // draw the entire border
   void DrawBorders ();
+
+  // utility function used for background painting as well as borders
+  static void ComputeInnerRadii(const gfxCornerSizes& aRadii,
+                                const gfxFloat *aBorderSizes,
+                                gfxCornerSizes *aInnerRadiiRet);
 };
 
 #ifdef DEBUG_NEW_BORDERS
 #include <stdarg.h>
 
 static inline void S(const gfxPoint& p) {
   fprintf (stderr, "[%f,%f]", p.x, p.y);
 }
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/430332-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<body style="font-family:monospace; width:6ch;">
+<b>ab</b> cd
+<b>ab</b> cd
+<b>ab</b> cd
+<b>ab</b> cd
+<b>ab</b> cd
+<b>ab</b> cd
+<b>ab</b> cd
+<b>ab</b> cd<span id="s">ef</span>
+<script>
+document.body.clientWidth;
+document.getElementById("s").style.fontSize = "200%";
+</script>
+</body>
+</html>
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -415,17 +415,18 @@ nsBlockFrame::List(FILE* out, PRInt32 aI
     }
   }
 
   // Output the overflow lines.
   const nsLineList* overflowLines = GetOverflowLines();
   if (overflowLines && !overflowLines->empty()) {
     IndentBy(out, aIndent);
     fputs("Overflow-lines<\n", out);
-    const_line_iterator line = begin_lines(), line_end = end_lines();
+    const_line_iterator line = overflowLines->begin(),
+                        line_end = overflowLines->end();
     for ( ; line != line_end; ++line) {
       line->List(out, aIndent + 1);
     }
     IndentBy(out, aIndent);
     fputs(">\n", out);
   }
 
   nsIAtom* listName = nsnull;
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -1622,32 +1622,35 @@ nsFrameSelection::GetFrameFromLevel(nsIF
 
 
 nsresult
 nsFrameSelection::MaintainSelection(nsSelectionAmount aAmount)
 {
   PRInt8 index = GetIndexFromSelectionType(nsISelectionController::SELECTION_NORMAL);
 
   mMaintainedAmount = aAmount;
+  mMaintainRange = nsnull;
   
   nsCOMPtr<nsIDOMNode> startNode;
   nsCOMPtr<nsIDOMNode> endNode;
   PRInt32 startOffset;
   PRInt32 endOffset;
   nsresult rv;
   rv = mDomSelections[index]->GetAnchorNode(getter_AddRefs(startNode));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = mDomSelections[index]->GetFocusNode(getter_AddRefs(endNode));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = mDomSelections[index]->GetAnchorOffset(&startOffset);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = mDomSelections[index]->GetFocusOffset(&endOffset);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  mMaintainRange = nsnull;
+  if (!startNode || !endNode)
+    return NS_OK;
+  
   NS_NewRange(getter_AddRefs(mMaintainRange));
   if (!mMaintainRange)
     return NS_ERROR_OUT_OF_MEMORY;
 
   mMaintainRange->SetStart(startNode, startOffset);
   return mMaintainRange->SetEnd(endNode, endOffset);
 }
 
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -610,16 +610,22 @@ public:
     mContext(aContext),
     mLineContainer(aLineContainer),
     mBidiEnabled(aPresContext->BidiEnabled()),
     mSkipIncompleteTextRuns(PR_FALSE),
     mNextRunContextInfo(nsTextFrameUtils::INCOMING_NONE),
     mCurrentRunContextInfo(nsTextFrameUtils::INCOMING_NONE) {
     ResetRunInfo();
   }
+  ~BuildTextRunsScanner() {
+    NS_ASSERTION(mBreakSinks.IsEmpty(), "Should have been cleared");
+    NS_ASSERTION(mTextRunsToDelete.IsEmpty(), "Should have been cleared");
+    NS_ASSERTION(mLineBreakBeforeFrames.IsEmpty(), "Should have been cleared");
+    NS_ASSERTION(mMappedFlows.IsEmpty(), "Should have been cleared");
+  }
 
   void SetAtStartOfLine() {
     mStartOfLine = PR_TRUE;
     mCanStopOnThisLine = PR_FALSE;
   }
   void SetSkipIncompleteTextRuns(PRBool aSkip) {
     mSkipIncompleteTextRuns = aSkip;
   }
@@ -636,27 +642,24 @@ public:
     if (mCommonAncestorWithLastFrame &&
         mCommonAncestorWithLastFrame->GetParent() == aFrame) {
       mCommonAncestorWithLastFrame = aFrame;
     }
   }
   void ScanFrame(nsIFrame* aFrame);
   PRBool IsTextRunValidForMappedFlows(gfxTextRun* aTextRun);
   void FlushFrames(PRBool aFlushLineBreaks, PRBool aSuppressTrailingBreak);
+  void FlushLineBreaks(gfxTextRun* aTrailingTextRun);
   void ResetRunInfo() {
     mLastFrame = nsnull;
     mMappedFlows.Clear();
     mLineBreakBeforeFrames.Clear();
     mMaxTextLength = 0;
     mDoubleByteText = PR_FALSE;
   }
-  void ResetLineBreaker() {
-    PRBool trailingBreak;
-    mLineBreaker.Reset(&trailingBreak);
-  }
   void AccumulateRunInfo(nsTextFrame* aFrame);
   /**
    * @return null to indicate either textrun construction failed or
    * we constructed just a partial textrun to set up linebreaker and other
    * state for following textruns.
    */
   gfxTextRun* BuildTextRunForFrames(void* aTextBuffer);
   void AssignTextRun(gfxTextRun* aTextRun);
@@ -722,27 +725,40 @@ public:
       NS_ASSERTION(mTextRun->GetFlags() & nsTextFrameUtils::TEXT_IS_TRANSFORMED,
                    "Text run should be transformed!");
       nsTransformedTextRun* transformedTextRun =
         static_cast<nsTransformedTextRun*>(mTextRun);
       transformedTextRun->SetCapitalization(aOffset + mOffsetIntoTextRun, aLength,
                                             aCapitalize, mContext);
     }
 
+    void Finish() {
+      NS_ASSERTION(!(mTextRun->GetFlags() &
+                     (gfxTextRunWordCache::TEXT_UNUSED_FLAGS |
+                      nsTextFrameUtils::TEXT_UNUSED_FLAG)),
+                   "Flag set that should never be set! (memory safety error?)");
+      if (mTextRun->GetFlags() & nsTextFrameUtils::TEXT_IS_TRANSFORMED) {
+        nsTransformedTextRun* transformedTextRun =
+          static_cast<nsTransformedTextRun*>(mTextRun);
+        transformedTextRun->FinishSettingProperties(mContext);
+      }
+    }
+
     gfxTextRun*  mTextRun;
     gfxContext*  mContext;
     PRUint32     mOffsetIntoTextRun;
     PRPackedBool mChangedBreaks;
     PRPackedBool mExistingTextRun;
   };
 
 private:
   nsAutoTArray<MappedFlow,10>   mMappedFlows;
   nsAutoTArray<nsTextFrame*,50> mLineBreakBeforeFrames;
   nsAutoTArray<nsAutoPtr<BreakSink>,10> mBreakSinks;
+  nsAutoTArray<gfxTextRun*,5>   mTextRunsToDelete;
   nsLineBreaker                 mLineBreaker;
   gfxTextRun*                   mCurrentFramesAllSameTextRun;
   gfxContext*                   mContext;
   nsIFrame*                     mLineContainer;
   nsTextFrame*                  mLastFrame;
   // The common ancestor of the current frame and the previous leaf frame
   // on the line, or null if there was no previous leaf frame.
   nsIFrame*                     mCommonAncestorWithLastFrame;
@@ -1070,22 +1086,25 @@ BuildTextRuns(gfxContext* aContext, nsTe
       child = child->GetNextSibling();
     }
     if (line.get() == startLine.get()) {
       seenStartLine = PR_TRUE;
     }
     if (seenStartLine) {
       ++linesAfterStartLine;
       if (linesAfterStartLine >= NUM_LINES_TO_BUILD_TEXT_RUNS && scanner.CanStopOnThisLine()) {
-        // Don't flush; we may be in the middle of a textrun that we can't
-        // end here. That's OK, we just won't build it.
+        // Don't flush frames; we may be in the middle of a textrun
+        // that we can't end here. That's OK, we just won't build it.
         // Note that we must already have finished the textrun for aForFrame,
         // because we've seen the end of a textrun in a line after the line
         // containing aForFrame.
-        scanner.ResetLineBreaker();
+        scanner.FlushLineBreaks(nsnull);
+        // This flushes out mMappedFlows and mLineBreakBeforeFrames, which
+        // silences assertions in the scanner destructor.
+        scanner.ResetRunInfo();
         return;
       }
     }
   } while (forwardIterator.Next());
 
   // Set mStartOfLine so FlushFrames knows its textrun ends a line
   scanner.SetAtStartOfLine();
   scanner.FlushFrames(PR_TRUE, PR_FALSE);
@@ -1127,66 +1146,82 @@ PRBool BuildTextRunsScanner::IsTextRunVa
  * This gets called when we need to make a text run for the current list of
  * frames.
  */
 void BuildTextRunsScanner::FlushFrames(PRBool aFlushLineBreaks, PRBool aSuppressTrailingBreak)
 {
   if (mMappedFlows.Length() == 0)
     return;
 
-  gfxTextRun* textRun;
-  if (!mSkipIncompleteTextRuns && mCurrentFramesAllSameTextRun &&
-      ((mCurrentFramesAllSameTextRun->GetFlags() & nsTextFrameUtils::TEXT_INCOMING_WHITESPACE) != 0) ==
-      ((mCurrentRunContextInfo & nsTextFrameUtils::INCOMING_WHITESPACE) != 0) &&
-      ((mCurrentFramesAllSameTextRun->GetFlags() & gfxTextRunWordCache::TEXT_INCOMING_ARABICCHAR) != 0) ==
-      ((mCurrentRunContextInfo & nsTextFrameUtils::INCOMING_ARABICCHAR) != 0) &&
-      IsTextRunValidForMappedFlows(mCurrentFramesAllSameTextRun)) {
-    // Optimization: We do not need to (re)build the textrun.
-    textRun = mCurrentFramesAllSameTextRun;
-
-    // Feed this run's text into the linebreaker to provide context. This also
-    // updates mNextRunContextInfo appropriately.
-    SetupBreakSinksForTextRun(textRun, PR_TRUE, PR_FALSE);
-    mNextRunContextInfo = nsTextFrameUtils::INCOMING_NONE;
-    if (textRun->GetFlags() & nsTextFrameUtils::TEXT_TRAILING_WHITESPACE) {
-      mNextRunContextInfo |= nsTextFrameUtils::INCOMING_WHITESPACE;
+  gfxTextRun* textRun = nsnull;
+  if (!mMappedFlows.IsEmpty()) {
+    if (!mSkipIncompleteTextRuns && mCurrentFramesAllSameTextRun &&
+        ((mCurrentFramesAllSameTextRun->GetFlags() & nsTextFrameUtils::TEXT_INCOMING_WHITESPACE) != 0) ==
+        ((mCurrentRunContextInfo & nsTextFrameUtils::INCOMING_WHITESPACE) != 0) &&
+        ((mCurrentFramesAllSameTextRun->GetFlags() & gfxTextRunWordCache::TEXT_INCOMING_ARABICCHAR) != 0) ==
+        ((mCurrentRunContextInfo & nsTextFrameUtils::INCOMING_ARABICCHAR) != 0) &&
+        IsTextRunValidForMappedFlows(mCurrentFramesAllSameTextRun)) {
+      // Optimization: We do not need to (re)build the textrun.
+      textRun = mCurrentFramesAllSameTextRun;
+
+      // Feed this run's text into the linebreaker to provide context. This also
+      // updates mNextRunContextInfo appropriately.
+      SetupBreakSinksForTextRun(textRun, PR_TRUE, PR_FALSE);
+      mNextRunContextInfo = nsTextFrameUtils::INCOMING_NONE;
+      if (textRun->GetFlags() & nsTextFrameUtils::TEXT_TRAILING_WHITESPACE) {
+        mNextRunContextInfo |= nsTextFrameUtils::INCOMING_WHITESPACE;
+      }
+      if (textRun->GetFlags() & gfxTextRunWordCache::TEXT_TRAILING_ARABICCHAR) {
+        mNextRunContextInfo |= nsTextFrameUtils::INCOMING_ARABICCHAR;
+      }
+    } else {
+      nsAutoTArray<PRUint8,BIG_TEXT_NODE_SIZE> buffer;
+      if (!buffer.AppendElements(mMaxTextLength*(mDoubleByteText ? 2 : 1)))
+        return;
+      textRun = BuildTextRunForFrames(buffer.Elements());
     }
-    if (textRun->GetFlags() & gfxTextRunWordCache::TEXT_TRAILING_ARABICCHAR) {
-      mNextRunContextInfo |= nsTextFrameUtils::INCOMING_ARABICCHAR;
-    }
-  } else {
-    nsAutoTArray<PRUint8,BIG_TEXT_NODE_SIZE> buffer;
-    if (!buffer.AppendElements(mMaxTextLength*(mDoubleByteText ? 2 : 1)))
-      return;
-    textRun = BuildTextRunForFrames(buffer.Elements());
   }
 
   if (aFlushLineBreaks) {
-    PRBool trailingLineBreak;
-    nsresult rv = mLineBreaker.Reset(&trailingLineBreak);
-    // textRun may be null for various reasons, including because we constructed
-    // a partial textrun just to get the linebreaker and other state set up
-    // to build the next textrun.
-    if (NS_SUCCEEDED(rv) && trailingLineBreak && textRun && !aSuppressTrailingBreak) {
-      textRun->SetFlagBits(nsTextFrameUtils::TEXT_HAS_TRAILING_BREAK);
-    }
-    PRUint32 i;
-    for (i = 0; i < mBreakSinks.Length(); ++i) {
-      if (!mBreakSinks[i]->mExistingTextRun || mBreakSinks[i]->mChangedBreaks) {
-        // TODO cause frames associated with the textrun to be reflowed, if they
-        // aren't being reflowed already!
-      }
-    }
-    mBreakSinks.Clear();
+    FlushLineBreaks(aSuppressTrailingBreak ? nsnull : textRun);
   }
 
   mCanStopOnThisLine = PR_TRUE;
   ResetRunInfo();
 }
 
+void BuildTextRunsScanner::FlushLineBreaks(gfxTextRun* aTrailingTextRun)
+{
+  PRBool trailingLineBreak;
+  nsresult rv = mLineBreaker.Reset(&trailingLineBreak);
+  // textRun may be null for various reasons, including because we constructed
+  // a partial textrun just to get the linebreaker and other state set up
+  // to build the next textrun.
+  if (NS_SUCCEEDED(rv) && trailingLineBreak && aTrailingTextRun) {
+    aTrailingTextRun->SetFlagBits(nsTextFrameUtils::TEXT_HAS_TRAILING_BREAK);
+  }
+
+  PRUint32 i;
+  for (i = 0; i < mBreakSinks.Length(); ++i) {
+    if (!mBreakSinks[i]->mExistingTextRun || mBreakSinks[i]->mChangedBreaks) {
+      // TODO cause frames associated with the textrun to be reflowed, if they
+      // aren't being reflowed already!
+    }
+    mBreakSinks[i]->Finish();
+  }
+  mBreakSinks.Clear();
+
+  for (i = 0; i < mTextRunsToDelete.Length(); ++i) {
+    gfxTextRun* deleteTextRun = mTextRunsToDelete[i];
+    gTextRuns->RemoveFromCache(deleteTextRun);
+    delete deleteTextRun;
+  }
+  mTextRunsToDelete.Clear();
+}
+
 void BuildTextRunsScanner::AccumulateRunInfo(nsTextFrame* aFrame)
 {
   NS_ASSERTION(mMaxTextLength <= mMaxTextLength + aFrame->GetContentLength(), "integer overflow");
   mMaxTextLength += aFrame->GetContentLength();
   mDoubleByteText |= aFrame->GetContent()->GetText()->Is2b();
   mLastFrame = aFrame;
   mCommonAncestorWithLastFrame = aFrame->GetParent();
 
@@ -1488,25 +1523,28 @@ BuildTextRunsScanner::BuildTextRunForFra
     textFlags |= gfxTextRunWordCache::TEXT_INCOMING_ARABICCHAR;
   }
 
   nsAutoTArray<PRInt32,50> textBreakPoints;
   TextRunUserData dummyData;
   TextRunMappedFlow dummyMappedFlow;
 
   TextRunUserData* userData;
+  TextRunUserData* userDataToDestroy;
   // If the situation is particularly simple (and common) we don't need to
   // allocate userData.
   if (mMappedFlows.Length() == 1 && !mMappedFlows[0].mEndFrame &&
       mMappedFlows[0].mStartFrame->GetContentOffset() == 0) {
     userData = &dummyData;
+    userDataToDestroy = nsnull;
     dummyData.mMappedFlows = &dummyMappedFlow;
   } else {
     userData = static_cast<TextRunUserData*>
       (nsMemory::Alloc(sizeof(TextRunUserData) + mMappedFlows.Length()*sizeof(TextRunMappedFlow)));
+    userDataToDestroy = userData;
     userData->mMappedFlows = reinterpret_cast<TextRunMappedFlow*>(userData + 1);
   }
   userData->mMappedFlowCount = mMappedFlows.Length();
   userData->mLastFlowIndex = 0;
 
   PRUint32 currentTransformedTextOffset = 0;
 
   PRUint32 nextBreakIndex = 0;
@@ -1573,17 +1611,17 @@ BuildTextRunsScanner::BuildTextRunForFra
           compression, &mNextRunContextInfo, &builder, &analysisFlags);
       aTextBuffer = bufEnd;
     } else {
       if (mDoubleByteText) {
         // Need to expand the text. First transform it into a temporary buffer,
         // then expand.
         nsAutoTArray<PRUint8,BIG_TEXT_NODE_SIZE> tempBuf;
         if (!tempBuf.AppendElements(contentLength)) {
-          DestroyUserData(userData);
+          DestroyUserData(userDataToDestroy);
           return nsnull;
         }
         PRUint8* bufStart = tempBuf.Elements();
         PRUint8* end = nsTextFrameUtils::TransformText(
             reinterpret_cast<const PRUint8*>(frag->Get1b()) + contentStart, contentLength,
             bufStart, compression, &mNextRunContextInfo, &builder, &analysisFlags);
         aTextBuffer = ExpandBuffer(static_cast<PRUnichar*>(aTextBuffer),
                                    tempBuf.Elements(), end - tempBuf.Elements());
@@ -1601,17 +1639,17 @@ BuildTextRunsScanner::BuildTextRunForFra
       (static_cast<const PRUint8*>(aTextBuffer) - static_cast<const PRUint8*>(textPtr)) >> mDoubleByteText;
 
     lastContent = content;
     endOfLastContent = contentEnd;
   }
 
   // Check for out-of-memory in gfxSkipCharsBuilder
   if (!builder.IsOK()) {
-    DestroyUserData(userData);
+    DestroyUserData(userDataToDestroy);
     return nsnull;
   }
 
   void* finalUserData;
   if (userData == &dummyData) {
     textFlags |= nsTextFrameUtils::TEXT_IS_SIMPLE_FLOW;
     userData = nsnull;
     finalUserData = mMappedFlows[0].mStartFrame;
@@ -1636,17 +1674,17 @@ BuildTextRunsScanner::BuildTextRunForFra
 //    }
 //    textFlags |= gfxTextRunFactory::TEXT_IS_PERSISTENT;
 //  }
 //
   // Now build the textrun
   nsTextFrame* firstFrame = mMappedFlows[0].mStartFrame;
   gfxFontGroup* fontGroup = GetFontGroupForFrame(firstFrame);
   if (!fontGroup) {
-    DestroyUserData(userData);
+    DestroyUserData(userDataToDestroy);
     return nsnull;
   }
 
   if (textFlags & nsTextFrameUtils::TEXT_HAS_TAB) {
     textFlags |= gfxTextRunFactory::TEXT_ENABLE_SPACING;
   }
   if (textFlags & nsTextFrameUtils::TEXT_HAS_SHY) {
     textFlags |= gfxTextRunFactory::TEXT_ENABLE_HYPHEN_BREAKS;
@@ -1746,34 +1784,39 @@ BuildTextRunsScanner::BuildTextRunForFra
         // ownership of the factory has passed to the textrun
         transformingFactory.forget();
       }
     } else {
       textRun = MakeTextRun(text, transformedLength, fontGroup, &params, textFlags);
     }
   }
   if (!textRun) {
-    DestroyUserData(userData);
+    DestroyUserData(userDataToDestroy);
     return nsnull;
   }
 
   // We have to set these up after we've created the textrun, because
   // the breaks may be stored in the textrun during this very call.
   // This is a bit annoying because it requires another loop over the frames
   // making up the textrun, but I don't see a way to avoid this.
   SetupBreakSinksForTextRun(textRun, PR_FALSE, mSkipIncompleteTextRuns);
 
   if (mSkipIncompleteTextRuns) {
     mSkipIncompleteTextRuns = !TextContainsLineBreakerWhiteSpace(textPtr,
         transformedLength, mDoubleByteText);
-    
-    // Nuke the textrun
-    gTextRuns->RemoveFromCache(textRun);
-    delete textRun;
-    DestroyUserData(userData);
+    // Arrange for this textrun to be deleted the next time the linebreaker
+    // is flushed out
+    mTextRunsToDelete.AppendElement(textRun);
+    // Since we're doing to destroy the user data now, avoid a dangling
+    // pointer. Strictly speaking we don't need to do this since it should
+    // not be used (since this textrun will not be used and will be
+    // itself deleted soon), but it's always better to not have dangling
+    // pointers around.
+    textRun->SetUserData(nsnull);
+    DestroyUserData(userDataToDestroy);
     return nsnull;
   }
 
   // Actually wipe out the textruns associated with the mapped frames and associate
   // those frames with this text run.
   AssignTextRun(textRun);
   return textRun;
 }
@@ -3012,27 +3055,35 @@ nsTextPaintStyle::GetIMEUnderline(PRInt3
 void
 nsTextPaintStyle::InitCommonColors()
 {
   if (mInitCommonColors)
     return;
 
   nsStyleContext* sc = mFrame->GetStyleContext();
 
-  const nsStyleBackground* bg =
+  nsStyleContext* bgContext =
     nsCSSRendering::FindNonTransparentBackground(sc);
-  NS_ASSERTION(bg, "Cannot find NonTransparentBackground.");
+  NS_ASSERTION(bgContext, "Cannot find NonTransparentBackground.");
+  const nsStyleBackground* bg = bgContext->GetStyleBackground();
 
   nscolor defaultBgColor = mPresContext->DefaultBackgroundColor();
+  mFrameBackgroundColor = NS_ComposeColors(defaultBgColor,
+                                           bg->mBackgroundColor);
+
+  if (bgContext->GetStyleDisplay()->mAppearance) {
+    // Assume a native widget has sufficient contrast always
+    mSufficientContrast = 0;
+    mInitCommonColors = PR_TRUE;
+    return;
+  }
+
   NS_ASSERTION(NS_GET_A(defaultBgColor) == 255,
                "default background color is not opaque");
 
-  mFrameBackgroundColor = NS_ComposeColors(defaultBgColor,
-                                           bg->mBackgroundColor);
-
   nsILookAndFeel* look = mPresContext->LookAndFeel();
   nscolor defaultWindowBackgroundColor, selectionTextColor, selectionBGColor;
   look->GetColor(nsILookAndFeel::eColor_TextSelectBackground,
                  selectionBGColor);
   look->GetColor(nsILookAndFeel::eColor_TextSelectForeground,
                  selectionTextColor);
   look->GetColor(nsILookAndFeel::eColor_WindowBackground,
                  defaultWindowBackgroundColor);
@@ -6036,17 +6087,19 @@ nsTextFrame::Reflow(nsPresContext*      
   if (charsFit > 0 && charsFit == length &&
       HasSoftHyphenBefore(frag, mTextRun, offset, end)) {
     // Record a potential break after final soft hyphen
     lineLayout.NotifyOptionalBreakPosition(mContent, offset + length,
         textMetrics.mAdvanceWidth + provider.GetHyphenWidth() <= availWidth,
                                            eNormalBreak);
   }
   PRBool breakAfter = forceBreakAfter;
-  if (!breakAfter && charsFit == length &&
+  // length == 0 means either the text is empty or it's all collapsed away
+  PRBool emptyTextAtStartOfLine = atStartOfLine && length == 0;
+  if (!breakAfter && charsFit == length && !emptyTextAtStartOfLine &&
       transformedOffset + transformedLength == mTextRun->GetLength() &&
       (mTextRun->GetFlags() & nsTextFrameUtils::TEXT_HAS_TRAILING_BREAK)) {
     // We placed all the text in the textrun and we have a break opportunity at
     // the end of the textrun. We need to record it because the following
     // content may not care about nsLineBreaker.
 
     // Note that because we didn't break, we can be sure that (thanks to the
     // code up above) textMetrics.mAdvanceWidth includes the width of any
--- a/layout/generic/nsTextFrameUtils.h
+++ b/layout/generic/nsTextFrameUtils.h
@@ -61,16 +61,17 @@ public:
   enum {
     // The following flags are set by TransformText
 
     // the text has at least one untransformed tab character
     TEXT_HAS_TAB             = 0x010000,
     // the original text has at least one soft hyphen character
     TEXT_HAS_SHY             = 0x020000,
     TEXT_WAS_TRANSFORMED     = 0x040000,
+    TEXT_UNUSED_FLAG         = 0x080000,
 
     // The following flags are set by nsTextFrame
 
     TEXT_IS_SIMPLE_FLOW      = 0x100000,
     TEXT_INCOMING_WHITESPACE = 0x200000,
     TEXT_TRAILING_WHITESPACE = 0x400000,
     TEXT_COMPRESSED_LEADING_WHITESPACE = 0x800000,
     TEXT_NO_BREAKS           = 0x1000000,
--- a/layout/generic/nsTextRunTransformations.cpp
+++ b/layout/generic/nsTextRunTransformations.cpp
@@ -67,96 +67,40 @@ nsTransformedTextRun::SetCapitalization(
                                         gfxContext* aRefContext)
 {
   if (mCapitalize.IsEmpty()) {
     if (!mCapitalize.AppendElements(GetLength()))
       return;
     memset(mCapitalize.Elements(), 0, GetLength()*sizeof(PRPackedBool));
   }
   memcpy(mCapitalize.Elements() + aStart, aCapitalization, aLength*sizeof(PRPackedBool));
-  mFactory->RebuildTextRun(this, aRefContext);
+  mNeedsRebuild = PR_TRUE;
 }
 
 PRBool
 nsTransformedTextRun::SetPotentialLineBreaks(PRUint32 aStart, PRUint32 aLength,
                                              PRPackedBool* aBreakBefore,
                                              gfxContext* aRefContext)
 {
   PRBool changed = gfxTextRun::SetPotentialLineBreaks(aStart, aLength,
       aBreakBefore, aRefContext);
-  mFactory->RebuildTextRun(this, aRefContext);
-  return changed;
-}
-
-PRBool
-nsTransformedTextRun::SetLineBreaks(PRUint32 aStart, PRUint32 aLength,
-                                    PRBool aLineBreakBefore, PRBool aLineBreakAfter,
-                                    gfxFloat* aAdvanceWidthDelta,
-                                    gfxContext* aRefContext)
-{
-  nsTArray<PRUint32> newBreaks;
-  PRUint32 i;
-  PRBool changed = PR_FALSE;
-  for (i = 0; i < mLineBreaks.Length(); ++i) {
-    PRUint32 pos = mLineBreaks[i];
-    if (pos >= aStart)
-      break;
-    newBreaks.AppendElement(pos);
-  }
-  if (aLineBreakBefore != (i < mLineBreaks.Length() &&
-                           mLineBreaks[i] == aStart)) {
-    changed = PR_TRUE;
-  }
-  if (aLineBreakBefore) {
-    nsTextFrameUtils::AppendLineBreakOffset(&newBreaks, aStart);
+  if (changed) {
+    mNeedsRebuild = PR_TRUE;
   }
-  if (aLineBreakAfter != (i + 1 < mLineBreaks.Length() &&
-                          mLineBreaks[i + 1] == aStart + aLength)) {
-    changed = PR_TRUE;
-  }
-  if (aLineBreakAfter) {
-    nsTextFrameUtils::AppendLineBreakOffset(&newBreaks, aStart + aLength);
-  }
-  for (; i < mLineBreaks.Length(); ++i) {
-    if (mLineBreaks[i] > aStart + aLength)
-      break;
-    changed = PR_TRUE;
-  }
-  if (!changed) {
-    if (aAdvanceWidthDelta) {
-      *aAdvanceWidthDelta = 0;
-    }
-    return PR_FALSE;
-  }
-
-  newBreaks.AppendElements(mLineBreaks.Elements() + i, mLineBreaks.Length() - i);
-  mLineBreaks.SwapElements(newBreaks);
-
-  gfxFloat currentAdvance = GetAdvanceWidth(aStart, aLength, nsnull);
-  mFactory->RebuildTextRun(this, aRefContext);
-  if (aAdvanceWidthDelta) {
-    *aAdvanceWidthDelta = GetAdvanceWidth(aStart, aLength, nsnull) - currentAdvance;
-  }
-  return PR_TRUE;
+  return changed;
 }
 
 gfxTextRun*
 nsTransformingTextRunFactory::MakeTextRun(const PRUnichar* aString, PRUint32 aLength,
                                           const gfxTextRunFactory::Parameters* aParams,
                                           gfxFontGroup* aFontGroup, PRUint32 aFlags,
                                           nsStyleContext** aStyles, PRBool aOwnsFactory)
 {
-  nsTransformedTextRun* textRun =
-    nsTransformedTextRun::Create(aParams, this, aFontGroup,
-                                 aString, aLength, aFlags, aStyles, aOwnsFactory);
-  if (!textRun)
-    return nsnull;
-
-  RebuildTextRun(textRun, aParams->mContext);
-  return textRun;
+  return nsTransformedTextRun::Create(aParams, this, aFontGroup,
+                                      aString, aLength, aFlags, aStyles, aOwnsFactory);
 }
 
 gfxTextRun*
 nsTransformingTextRunFactory::MakeTextRun(const PRUint8* aString, PRUint32 aLength,
                                           const gfxTextRunFactory::Parameters* aParams,
                                           gfxFontGroup* aFontGroup, PRUint32 aFlags,
                                           nsStyleContext** aStyles, PRBool aOwnsFactory)
 {
@@ -266,17 +210,17 @@ MergeCharactersInTextRun(gfxTextRun* aDe
 }
 
 static gfxTextRunFactory::Parameters
 GetParametersForInner(nsTransformedTextRun* aTextRun, PRUint32* aFlags,
     gfxContext* aRefContext)
 {
   gfxTextRunFactory::Parameters params =
     { aRefContext, nsnull, nsnull,
-      nsnull, nsnull, aTextRun->GetAppUnitsPerDevUnit()
+      nsnull, 0, aTextRun->GetAppUnitsPerDevUnit()
     };
   *aFlags = aTextRun->GetFlags() & ~gfxFontGroup::TEXT_IS_PERSISTENT;
   return params;
 }
 
 void
 nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
     gfxContext* aRefContext)
@@ -308,27 +252,19 @@ nsFontVariantTextRunFactory::RebuildText
   nsCaseTransformTextRunFactory uppercaseFactory(nsnull, PR_TRUE);
 
   aTextRun->ResetGlyphRuns();
 
   PRUint32 runStart = 0;
   PRBool runIsLowercase = PR_FALSE;
   nsAutoTArray<nsStyleContext*,50> styleArray;
   nsAutoTArray<PRPackedBool,50> canBreakBeforeArray;
-  nsAutoTArray<PRUint32,10> lineBreakBeforeArray;
 
-  PRUint32 nextLineBreak = 0;
   PRUint32 i;
   for (i = 0; i <= length; ++i) {
-    if (nextLineBreak < aTextRun->mLineBreaks.Length() &&
-        aTextRun->mLineBreaks[nextLineBreak] == i) {
-      lineBreakBeforeArray.AppendElement(i - runStart);
-      ++nextLineBreak;
-    }
-
     PRBool isLowercase = PR_FALSE;
     if (i < length) {
       // Characters that aren't the start of a cluster are ignored here. They
       // get added to whatever lowercase/non-lowercase run we're in.
       if (!inner->IsClusterStart(i)) {
         isLowercase = runIsLowercase;
       } else {
         if (styles[i]->GetStyleFont()->mFont.variant == NS_STYLE_FONT_VARIANT_SMALL_CAPS) {
@@ -341,19 +277,17 @@ nsFontVariantTextRunFactory::RebuildText
         }
       }
     }
 
     if ((i == length || runIsLowercase != isLowercase) && runStart < i) {
       nsAutoPtr<gfxTextRun> transformedChild;
       gfxTextRunCache::AutoTextRun cachedChild;
       gfxTextRun* child;
-      // Setup actual line break data for child (which may affect shaping)
-      innerParams.mInitialBreaks = lineBreakBeforeArray.Elements();
-      innerParams.mInitialBreakCount = lineBreakBeforeArray.Length();
+
       if (runIsLowercase) {
         transformedChild = uppercaseFactory.MakeTextRun(str + runStart, i - runStart,
             &innerParams, smallFont, flags, styleArray.Elements(), PR_FALSE);
         child = transformedChild;
       } else {
         cachedChild =
           gfxTextRunCache::MakeTextRun(str + runStart, i - runStart, fontGroup,
               &innerParams, flags);
@@ -367,30 +301,24 @@ nsFontVariantTextRunFactory::RebuildText
                    "lost some break-before values?");
       child->SetPotentialLineBreaks(0, canBreakBeforeArray.Length(),
           canBreakBeforeArray.Elements(), aRefContext);
       aTextRun->CopyGlyphDataFrom(child, 0, child->GetLength(), runStart, PR_FALSE);
 
       runStart = i;
       styleArray.Clear();
       canBreakBeforeArray.Clear();
-      lineBreakBeforeArray.Clear();
-      if (nextLineBreak > 0 && aTextRun->mLineBreaks[nextLineBreak - 1] == i) {
-        lineBreakBeforeArray.AppendElement(0);
-      }
     }
 
     if (i < length) {
       runIsLowercase = isLowercase;
       styleArray.AppendElement(styles[i]);
       canBreakBeforeArray.AppendElement(aTextRun->CanBreakLineBefore(i));
     }
   }
-  NS_ASSERTION(nextLineBreak == aTextRun->mLineBreaks.Length(),
-               "lost track of line breaks somehow");
 }
 
 void
 nsCaseTransformTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
     gfxContext* aRefContext)
 {
   nsICaseConversion* converter = nsContentUtils::GetCaseConv();
   if (!converter)
@@ -399,32 +327,25 @@ nsCaseTransformTextRunFactory::RebuildTe
   PRUint32 length = aTextRun->GetLength();
   const PRUnichar* str = aTextRun->GetTextUnicode();
   nsRefPtr<nsStyleContext>* styles = aTextRun->mStyles.Elements();
 
   nsAutoString convertedString;
   nsAutoTArray<PRPackedBool,50> charsToMergeArray;
   nsAutoTArray<nsStyleContext*,50> styleArray;
   nsAutoTArray<PRPackedBool,50> canBreakBeforeArray;
-  nsAutoTArray<PRUint32,10> lineBreakBeforeArray;
-  PRUint32 nextLineBreak = 0;
   PRUint32 extraCharsCount = 0;
 
   PRUint32 i;
   for (i = 0; i < length; ++i) {
     PRUnichar ch = str[i];
 
     charsToMergeArray.AppendElement(PR_FALSE);
     styleArray.AppendElement(styles[i]);
     canBreakBeforeArray.AppendElement(aTextRun->CanBreakLineBefore(i));
-    if (nextLineBreak < aTextRun->mLineBreaks.Length() &&
-        aTextRun->mLineBreaks[nextLineBreak] == i) {
-      lineBreakBeforeArray.AppendElement(i + extraCharsCount);
-      ++nextLineBreak;
-    }
 
     PRUint8 style = mAllUppercase ? NS_STYLE_TEXT_TRANSFORM_UPPERCASE
       : styles[i]->GetStyleText()->mTextTransform;
     PRBool extraChar = PR_FALSE;
 
     switch (style) {
     case NS_STYLE_TEXT_TRANSFORM_LOWERCASE:
       converter->ToLower(ch, &ch);
@@ -456,35 +377,26 @@ nsCaseTransformTextRunFactory::RebuildTe
     convertedString.Append(ch);
     if (extraChar) {
       ++extraCharsCount;
       charsToMergeArray.AppendElement(PR_TRUE);
       styleArray.AppendElement(styles[i]);
       canBreakBeforeArray.AppendElement(PR_FALSE);
     }
   }
-  if (nextLineBreak < aTextRun->mLineBreaks.Length() &&
-      aTextRun->mLineBreaks[nextLineBreak] == length) {
-    lineBreakBeforeArray.AppendElement(length + extraCharsCount);
-    ++nextLineBreak;
-  }
-  NS_ASSERTION(nextLineBreak == aTextRun->mLineBreaks.Length(),
-               "lost track of line breaks somehow");
 
   PRUint32 flags;
   gfxTextRunFactory::Parameters innerParams =
       GetParametersForInner(aTextRun, &flags, aRefContext);
   gfxFontGroup* fontGroup = aTextRun->GetFontGroup();
 
   nsAutoPtr<gfxTextRun> transformedChild;
   gfxTextRunCache::AutoTextRun cachedChild;
   gfxTextRun* child;
-  // Setup actual line break data for child (which may affect shaping)
-  innerParams.mInitialBreaks = lineBreakBeforeArray.Elements();
-  innerParams.mInitialBreakCount = lineBreakBeforeArray.Length();
+
   if (mInnerTransformingTextRunFactory) {
     transformedChild = mInnerTransformingTextRunFactory->MakeTextRun(
         convertedString.BeginReading(), convertedString.Length(),
         &innerParams, fontGroup, flags, styleArray.Elements(), PR_FALSE);
     child = transformedChild.get();
   } else {
     cachedChild = gfxTextRunCache::MakeTextRun(
         convertedString.BeginReading(), convertedString.Length(), fontGroup,
--- a/layout/generic/nsTextRunTransformations.h
+++ b/layout/generic/nsTextRunTransformations.h
@@ -108,46 +108,51 @@ public:
                                       PRBool aOwnsFactory);
 
   ~nsTransformedTextRun() {
     if (mOwnsFactory) {
       delete mFactory;
     }
   }
   
-  virtual void SetCapitalization(PRUint32 aStart, PRUint32 aLength,
-                                 PRPackedBool* aCapitalization,
-                                 gfxContext* aRefContext);
+  void SetCapitalization(PRUint32 aStart, PRUint32 aLength,
+                         PRPackedBool* aCapitalization,
+                         gfxContext* aRefContext);
   virtual PRBool SetPotentialLineBreaks(PRUint32 aStart, PRUint32 aLength,
                                         PRPackedBool* aBreakBefore,
                                         gfxContext* aRefContext);
-  virtual PRBool SetLineBreaks(PRUint32 aStart, PRUint32 aLength,
-                               PRBool aLineBreakBefore, PRBool aLineBreakAfter,
-                               gfxFloat* aAdvanceWidthDelta,
-                               gfxContext* aRefContext);
+  /**
+   * Called after SetCapitalization and SetPotentialLineBreaks
+   * are done and before we request any data from the textrun. Also always
+   * called after a Create.
+   */
+  void FinishSettingProperties(gfxContext* aRefContext)
+  {
+    if (mNeedsRebuild) {
+      mNeedsRebuild = PR_FALSE;
+      mFactory->RebuildTextRun(this, aRefContext);
+    }
+  }
 
   nsTransformingTextRunFactory       *mFactory;
-  nsTArray<PRUint32>                  mLineBreaks;
   nsTArray<nsRefPtr<nsStyleContext> > mStyles;
   nsTArray<PRPackedBool>              mCapitalize;
   PRPackedBool                        mOwnsFactory;
+  PRPackedBool                        mNeedsRebuild;
 
 private:
   nsTransformedTextRun(const gfxTextRunFactory::Parameters* aParams,
                        nsTransformingTextRunFactory* aFactory,
                        gfxFontGroup* aFontGroup,
                        const PRUnichar* aString, PRUint32 aLength,
                        const PRUint32 aFlags, nsStyleContext** aStyles,
                        PRBool aOwnsFactory)
     : gfxTextRun(aParams, aString, aLength, aFontGroup, aFlags, sizeof(nsTransformedTextRun)),
-      mFactory(aFactory), mOwnsFactory(aOwnsFactory)
+      mFactory(aFactory), mOwnsFactory(aOwnsFactory), mNeedsRebuild(PR_TRUE)
   {
     PRUint32 i;
     for (i = 0; i < aLength; ++i) {
       mStyles.AppendElement(aStyles[i]);
     }
-    for (i = 0; i < aParams->mInitialBreakCount; ++i) {
-      mLineBreaks.AppendElement(aParams->mInitialBreaks[i]);
-    }
   }  
 };
 
 #endif /*NSTEXTRUNTRANSFORMATIONS_H_*/
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/440149-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head><style>
+div {
+  width: 0px;
+}
+span {
+  border: 5px solid orange;
+  margin-left: 50px;
+}
+</style></head>
+<body><div><span><input></span></div></body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/440149-1.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<html>
+<head><style>
+div {
+  width: 0px;
+}
+span {
+  border: 5px solid orange;
+  margin-left: 50px;
+}
+</style></head>
+<body><div><span><!--whitespace--> <input></span></div></body>
+</html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f067dd69e673989e910540402b5091ee7ee1cfc5
GIT binary patch
literal 195
zc%17D@N?(olHy`uVBq!ia0vp^Q6S933?yBTt(*v?cmjMvT>t<7&(OfY*uV%B$lTa`
z6i6|b1o;I6>0f0>?g6P}PZ!4!kK=EzEfj5V;9<F#+2C%P5oNJiL6gyIkJ=07X14kq
znFT^WUEk>REWfo|>qE-RhI<>tUd%afU=hCc{nF;UzrM}#ZvD1o(mW9Ox4QoB?iHK2
moet);&fC3T=v_-f_??rsTDtlFgnt69WAJqKb6Mw<&;$TRMoe1(
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..96770b9666a65fc6e9b33b83e29d7b6fd4dfe5da
GIT binary patch
literal 282
zc%17D@N?(olHy`uVBq!ia0vp^Q6S933?yBTt(*v?I0Jk_T>t<7&(HwmFr42mc^*hH
zl?3?(Gcc4*K5GHw?elbT4DslEJI#>qumX?k+MK6yl9Mi%6p9*t)re`@>%FukSWJ2=
z)1&=cgV_H~c&NG2m(9MT<JytX8m=WX=iN!uuX$_m`;+5;tIy6GtP{T-nr^(Gb+eDA
z2yfl_V5u4Ao7bA{dt%nPYKOA0?D1gX<;-X27w=d8uR6i*))}J=o#iVwpIER_e?4zY
zzU};dCugp=4LAGopqc+){-5i=1>PrC=P$PH-_u~zw5Qpobx)fO$KFnx?may=e0%%f
daX#Doh;^r+g4&an3jHAedAj<!taD0e0s!cHbKC#`
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e1e6d7926f670d4b6eee2c0d761242721fd3c763
GIT binary patch
literal 376
zc$@)v0f+vHP)<h;3K|Lk000e1NJLTq003G5003G70{{R3MaHR-0000CP)t-s|Ns90
zfB*r20RR91X|aRF00003bW%=J0002`cEsKQ009_DL_t(Y$L*Fu4uUWcMVqiToQ5TO
z1veuLNw|QC9>By?c%NQ^d$3_Asht5zTl?9n3A3Sjp)<cE{9mQGa?{gT#;B#Tfm~Iu
zg&)YPM!VNrpVNKjWq|2CZ|Fl#-H7uDQ<H3CCFx|FsZpfHDdP5(nPw?7%ma3I@mS87
z+wB!E3j6H5kHQ=DIJWVy^yT+jcaY_nH!H{K^*+l*c+f@~)gq@3c_xB((k-Z#c^Qx8
z!FFOXs`X1y5zCPlnm0w5M|O5d6Z4#<w6RPP`aMo`jJdFlZ~Pzmul--h2as<dpFzHa
zd<^*>@=4^Y*)#3K$hV=-CvxGWS8@d94$3K%YcK~ta`U>LvuY1=8Ra<2eRxku+$-J;
WTRdi*>a`vK0000<MNUMnLSTY1VW&<2
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..18aef7d91066b327aff0ef200507fc8dfdf9d940
GIT binary patch
literal 444
zc$@*e0Ym<YP)<h;3K|Lk000e1NJLTq003G5003G90{{R3%7$Dq0000FP)t-s|Ns90
zfB*r20sj8}0001b$TEWf000DZQchC<00029lV+L#00CG@L_t(o!|j(#jsqbKM7{6@
zJmLb8<_I|eoz(r$lm(xL2?i>fMHcN%N9u>WWQcKz^q~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3lxA;-Ut`y{r~^~07*qoM6N<$g1_|4q5uE@
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6c88fdfa841db4e29a1ed6e67d1c9fad65a6fc51
GIT binary patch
literal 203
zc%17D@N?(olHy`uVBq!ia0vp^c_7Th3?z4(p34AIJOMr-t_%$f|NsAIY+wWm)Y`Zm
z15(T-L4LtN`d8VJdq67N)5S5w<M`X_hP({{0?iNESQJ>7+$oag6f0;jRoTNTzkQEn
znG?U5lhd#D^BcwXvFP14Zx&`=m6+6a&LAj<*Vt8r<@kY9g%#Xa7yp^V+3K_~K;w`2
vswMhiSyr=uKFIU3yZZCQ`}}u~WjcI&7VKNM<KRg<ptTI1u6{1-oD!M<x7bF$
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6b25085d400d218b9b694949de027698398d0fb6
GIT binary patch
literal 257
zc%17D@N?(olHy`uVBq!ia0vp^c_7Th3?z4(p34AIoB=)|t_%$f|Ns97@)Z8Etp-v|
zB|(0{3=CzH&sqR^OFdm2Lp+YZy{^c2*nr3F;qpySMU;2<pN#i)Z4ULns63^mU1ZI2
z8Ht&zZd6Ro`E~T*d5<W*bHRODl9z70IP<&P`@BYI+m+as*tTW+0#h=|3Rbjz*M8F$
z#xH;Dg`|0M(MAb>arWeIg^!;qNuND_?A7DH{{<N49<RHnq6P+W((A9PC8o7DiY<$k
yXifBMQ<PH6k=dVU)_zcSS(VJshm{ZH#pD&H-Y9z2R<{A@U<OZDKbLh*2~7YcqGb^P
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a5f0e3c0957a763e31936227a0d4a56e7b829ad6
GIT binary patch
literal 378
zc$@)x0fqjFP)<h;3K|Lk000e1NJLTq003?P003?R0{{R3yEV>e0000CP)t-s0Du7h
z|NjAi0RR91eLP0S00003bW%=J0002`cEsKQ00A0FL_t(Y$L-fK3WG2d2H-~>i}WO=
zT{=py;36)9SMUJR_Gli#CHKhU)?yQ*Rb$?7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index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d1224fd9a7b33e97b5a9eca491bd7dd5dbe6169c
GIT binary patch
literal 492
zc$@+30Tcd-P)<h;3K|Lk000e1NJLTq003?P003?R0{{R3yEV>e0000CP)t-s|Ns90
zfB*r20RR91X|aRF00003bW%=J0002`cEsKQ00E3iL_t(Y$L&`!Zo@DPG+=ZL{2C1%
zf_$M1t0jP+&^#bOUeW*f6Z(f2Zw*v97A1<3&P6-5C`X;eqeO~4cU?5^7b5THu40}x
z8!PCE*v3g?gNq>DG<Z)K*}1*3*eW;bt$ntU=qkZuj**oCFA5~#cX-#}Tia{qx9}?b
z>R7XQhZ3W)O({q#l##SX8A)rDk@Qdn?FK&cw`=)$u9nwH#$!LW2<}-#F3&LM{qp!!
z-)1=WSp<92B{Pa(XPsS}yvSlbB_2~$O}MftI?3uSExDqi0@H<kjCqMOQ=bl%NO`R<
zt2lT&^D))aS;9dNF>GN*f>wdY02-0mXzb3E!E%&e0k0Z#8|Y%zrG?dfu;@#R0E@O{
zek1s}#iIK@t*bBp;0pesWbYUCx84eTf<JuOt%d<x&3=<=wKv!paZ5$b7`Aad0O06=
zLkEs4IOyPrgu@k&WjN5G6o4WE$`2@9u;hVa3Cb)e(6F?Fq7ceSEJUG%h2j^>W+=F^
iREHuT{~pwSEIt9I!)_gQ*$sXG0000<MNUMnLSTaL3D+h7
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ae00e2fa1a06edcdf65e32a8eb55d812de702aeb
GIT binary patch
literal 199
zc%17D@N?(olHy`uVBq!ia0vp^c|aV%#0(@`T~}-cQak}ZA+G=b|7U1mU~FIn3S@3<
zJ_@9mOM?7@f%LDkBlmz*x~Gd{h{y4_*B0_N1n{_C%%0Gad0|b1riWXD;BJ=cnr60-
zvJbBcI$gS@taZQj;fCYZvI1#g3xd<Qw+N-bP@Q#s`knPF{mXlAM`uVKKLQ5!55#{<
p^6m0#Jo&ie!q1ID?cP&t#CPBK^S52ydH`r8gQu&X%Q~loCICsCOfUcd
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c1218af8db0a0e6edf3ef127efc056c887fe45ce
GIT binary patch
literal 254
zc%17D@N?(olHy`uVBq!ia0vp^c|aV%#0(@`T~}-cQk(%kA+G=b|7U0bav08Umpl)o
zm`Z~Df*BafCZDwc@)mizIEHu}e|yc4>#%`<%f)_0*P?!rkC~TxI9Jt(#2(r!?fgMA
z_{7wkbB$CM<jM<mbDd@A*?lhf8yCajWeN9qkDmy+b@9W3ElhWkf*C739@&Uzt~$O}
zFpG5>PrAgEhp%s_A7Q#KvV2=k)70v&Rc~vPVj_#?)bme$ygB)JpX~m||6j9jF>JV)
z=zRRxR9-9TiDogiI=3CRhaQ;55pSPUcvAa3`-x_Y2Op%l^g({`boFyt=akR{0F``X
AaR2}S
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..914dc604b99ee252a05025cbdfa98ad200131e9d
GIT binary patch
literal 358
zc$@)d0h#`ZP)<h;3K|Lk000e1NJLTq003?P002+|0{{R3g+-{f0000CP)t-s|Ns90
zfB*r20RR91X|aRF00003bW%=J0002`cEsKQ009O`L_t(Y$L*Fo4udcZh9jYlh|@5p
zy+Ri^Lo0ECO634tqxZ=rxCaYcD~dxxUX4L)t?+{6kJ!c{{>>O#G4$ZrFfeP`8+;Ql
z3r`SQCFg@}1femI#|*CK=va*CoDvw8pdAI~aGC4jZi=}GAx%{9qB<^BtMp-Mf?)y?
zKyH%e2z_RKWmN1GO{K!*w*Y3KD{51)*3Tw{c;aqf@=b@!lTa)`4srLUPZ&E>Lfk!O
zyd><?uv4iMu>LWq{_l{n1A5Op+~FGdN7sS8_S>fkIi$AFK60dHPhuF8W1JR%lyqF=
zlIW0fMG74$k+isem*vL_L1#y56(E-ga{Ztem(<Gh0rK8$#$fe^*8l(j07*qoM6N<$
Eg7uS@hX4Qo
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..706a11febbbb094208fff797a178063c8241aaea
GIT binary patch
literal 350
zc%17D@N?(olHy`uVBq!ia0vp^c|aV%$P6S8J-w6)q}T#{LR=ZZU}^f!^FWHRB*-tA
z!Qt7BG$5PJ)5S5wqW9^QgSjmZJgpD=Ww$(R2$Qi))oe`eo8rW&*?37K)!T#BlW(4H
zgu53P2m6}%3bz||=P%SO*t7b)aYml#eWg7v8qr6Vb4;Ig<xN6~>(0o7uT1;;68hJ4
z%XK{xIDfA2^0k~7%AI%n0>yVk7)mp#8;2D?$T^b7CG+KmPUGBZZ9l^I3b#fDt}d`j
z2##MN|4aGZt|-RVqc2L{v#oyEF?r`T_suhXZgrVCAN$&|_-V)7r}ucK&EFxrvHr-n
z`HBDC*9RpB->#p3@q@($lXog@DpOUKsBBg_q;gT^fy#TGe<{5wb5d5P>`FPAawFw=
u&bKXGmlk<stMt|BN?!Nab(g<Ze}z9sy`$dBKjnI$VDfbJb6Mw<&;$Syzm+!t
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..706a11febbbb094208fff797a178063c8241aaea
GIT binary patch
literal 350
zc%17D@N?(olHy`uVBq!ia0vp^c|aV%$P6S8J-w6)q}T#{LR=ZZU}^f!^FWHRB*-tA
z!Qt7BG$5PJ)5S5wqW9^QgSjmZJgpD=Ww$(R2$Qi))oe`eo8rW&*?37K)!T#BlW(4H
zgu53P2m6}%3bz||=P%SO*t7b)aYml#eWg7v8qr6Vb4;Ig<xN6~>(0o7uT1;;68hJ4
z%XK{xIDfA2^0k~7%AI%n0>yVk7)mp#8;2D?$T^b7CG+KmPUGBZZ9l^I3b#fDt}d`j
z2##MN|4aGZt|-RVqc2L{v#oyEF?r`T_suhXZgrVCAN$&|_-V)7r}ucK&EFxrvHr-n
z`HBDC*9RpB->#p3@q@($lXog@DpOUKsBBg_q;gT^fy#TGe<{5wb5d5P>`FPAawFw=
u&bKXGmlk<stMt|BN?!Nab(g<Ze}z9sy`$dBKjnI$VDfbJb6Mw<&;$Syzm+!t
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0055025143279009fa647fdc03658bb8be264fb6
GIT binary patch
literal 210
zc%17D@N?(olHy`uVBq!ia0vp^@gU5^3?x4*eNF>XJOMr-uK)l4XJ}wxY+wWmWNvIe
z3Z$4zg8YJk^sllb_kdK9r;B5VhxglS3k4et1Y9mIWoXN~5Wr$BxP*i21dnc@(<~2p
z!;cj=j3s5ti{@MWZe04YG@VtU%!qOFElDFc&NDMiWqz^F3@|yO@A&>s9fP)<xdj+}
yakf-BBG<vTB|ubVwUOR#?~;>mZsy6ao|Y$QpT|^lz2Z91b_P#ZKbLh*2~7Z>ZADE0
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cc67a180ae175897b72f11207669b37e049dfacd
GIT binary patch
literal 281
zc%17D@N?(olHy`uVBq!ia0vp^@gU5^3?x4*eNF>XoB=)|uK)l4XJ`O&7|w5(JP)Lp
zN`m}?85qhYpS1w;_IkQFhIn|ty|$b8kb^+W!~5q7<XM(+btU+zE48by+MzZlK8bUu
z7ZW$<8$(VZmF*AfZn;}9ERS3-`izO;?UK;DVis$EbDchs=HSI}ciZ|2jrSV5?r(V`
zCF_zA8-MWrG^b|?jyLU9Mf>E~{;!?#XM4~e{TF9eNqO!HSrM?%sdasVjLwn!4!0UL
zqda8Ri?RKhAS=SRX~N48o)(|qJ$&yOdR{B{F5&Rmm9NOScim?;F8QEid3rbfjdtHW
bzI-XWd~CeE<$Y6-?-)E?{an^LB{Ts5Mg(j8
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..65d4e4a0c21121445c659eeb8df9139763779587
GIT binary patch
literal 421
zc$@*H0b2fvP)<h;3K|Lk000e1NJLTq003VA003VC0{{R3^CI(R0000CP)t-s|Ns90
zfB*r20RR91X|aRF00003bW%=J0002`cEsKQ00BiwL_t(Y$L*HQZNwlDg<r(kay1;i
zn<DbUVUcLT1z1WI=_4i31bz6zEs=A;u!bEDD@Dr19Ov^eKgjb20Dy6e+|S46QI7iI
z;cRzsJ=$s3;t(o8m%&uq`JP>31Gpsn*xG5lcoWH0zG=U!&8g(|7-A1H2!I}dmcT5>
zPSJw|ETAMiZ#`f-Ns+z}CK;^IB+a&!SG&f&5KWrHE9Yj<h}G+trY;C{z5=OYi@@*N
zo|<P7OyiJ(SOnMDQ)L!m>4EuKz}FVMkmTD5PH=)h1<(JS{|cfN!2&IV8QOKgWFSqr
z6~n{m(|Lq<fZ{3u1E|lokeKuXq0KiW#X)oeSODlIEfq+90T`O-D(m3LdL)loIaM>=
zhq432S`Vh8^i!=MvFQ28ql*gU&F62-LA>re11`NSqq~=MH<|wKBW+8+(0F^Vu=J`W
P00000NkvXXu0mjfX1u(v
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..796afda68e6b522cf31dfc02ebfaf8664226148d
GIT binary patch
literal 421
zc$@*H0b2fvP)<h;3K|Lk000e1NJLTq003VA003VB0{{R3w1SDY00006P)t-s00000
z005<Dxz7Lq00DGTPE!Ct=GbNc00B)&L_t(IPu<ipj@2*_0MO_BC_hC6DO0Q<dxIPy
zf{U0NP*QpUaV~Qcj_^wgq)%Zx+3gT?xQOOi(O6@72EtvqtLqKiDsJ#l;!8TeUX{Hc
zU@6!@ESNwp7~oQ3A+??M$J7uV$x6DdVR2+G|L2AQsi7mZSUArlB;5f?e_}Ury$in(
zjr_zFtHm`TWHxiXipXp`i=V9_fr-&tiyIilT3p9u-wFb~Jys;WJr_uNPpKjsJk{8)
z^Q9r`d~R5EzCFj+zrcU6{;<-2#<RN~ygSjq#QTO_@5717<B8E@dWN|no6Wf*nJxQ)
z&A660B&%twAnKO`yKXG#NG``q3`scNXrMi-UWe}qj0VIE78ACQV76c>2dy?tC3h4t
zl&;G%E+HeN(jfU0uC@E)YdqBMU&39u)rNmDU0%!`A2}wHw+Oe2V~YI-Cd5IqJtafn
P00000NkvXXu0mjf!*a2r
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e557851e5bc396713c1d8f574594d17a895d493e
GIT binary patch
literal 476
zc$@*;0VDp2P)<h;3K|Lk000e1NJLTq003VA003VB0{{R3w1SDY00006P)t-s00000
z005<Dxz7Lq00DGTPE!Ct=GbNc00D$aL_t(I%cYb(Zrm^sMju6j%Yv|3s&K*FKxGOe
zAnc3i2wSG4f8cX*bCNwq3d5U%GosW5unIzNis5|Ua0Y<W*R7)8BmCBX)8M3V2XGbm
zxg8q3>;JZn6W?PEfVso6J0-SuhyX|>9>8cFyJS6`Qz$@C$Uss^64)+U72;Ntq^)p&
z`vN8~VE$qoSg>#poWWG4?o0$K9@FUVG+cMdR47DI)nFxXR*9KeZe3s@iAOUelHV#z
z<hWH9$YR?Bfh@LJ2$Xd*$5B*I#Zl@GE(#6D%dl<YZ4a*sD-$2X(24i&f*Zj1v;8L=
zB>WlRcp6G~P;fl&;m3e*gghJ#q~UcUwH?ew`cqj5qgk1lH&}6_rv*Q{-I&7m4k}h2
zg~L>gSFoUc3{1cUc~u@*dvS>fEWMtE8Aw?yNI;lHTLxSdZ3XaN6g0rt3Rs!S)&MV4
zxt@V26TCbCvrNIm2{_9Xc&?ZxQ()^aPP!?$+S{k@kmGha?483#I_xT}Y_Wghl1~l8
S1JOkQ0000<MNUMnLSTY@TE(yc
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b871ced5a6a981574f5fff60f4fa810a4418c7a7
GIT binary patch
literal 201
zc%17D@N?(olHy`uVBq!ia0vp^DL@>>#0(^j|42&#DV_kI5ZC|z|1&f&Fg7p(1u{1_
z9|cm(B|(0{K>AnNk$WIfPZ!4!5AV0v6oncL1e`BQs2t9`Fh}W%!DexXf}8giFXL-G
zaB$fw=CtJb9e)o5{hT+K!A601MvMZtn<9If;_cez=WJ4&CR~ZsXi)@%|DD^<t8jbF
qUCLz`$ydGD%w^%4rGciKTJ-n>0&c!IpM4!@DTAl0pUXO@geCyQT12G)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1db05a62f93147174b10800623888d7c79d7a36c
GIT binary patch
literal 286
zc$@(q0pb3MP)<h;3K|Lk000e1NJLTq003kF003G70{{R3GyEGG00009P)t-s|Ns90
zfB*mh0MEA>&j0`b0(4SNQvd*Vlg&5)006>CL_t(Y$L-cJ3WGotgyA0{MZAZF-e(rs
z%F<(aiS2C`!k#k4hJgBBsuY3jv>(dD!Wn?6=$P^VfG+EtxB)Qfn)*;SBm(rZvIC<e
zjw#amdf7?3qzI&|kQJblA)~a_1J2S*J9kSuX<;-aX=Sj4q`7_puE#}^DTBffh)lUj
zO`0@m@`v)hKWz4-mm?*=#YixFws!5{$XwgZ$XXlF$l}ztwAZFJvf-Q^z&ShCjy6yG
kv>g1k@nNC(tHxPEPf$5X)dNlE?f?J)07*qoM6N<$f(Vs-IsgCw
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2094c425eab96e38edbd706024a6e72e0083b0ca
GIT binary patch
literal 417
zc$@*D0bc%zP)<h;3K|Lk000e1NJLTq003kF003G70{{R3GyEGG0000CP)t-s|Ns90
zfB*r20RR91X|aRF00003bW%=J0002`cEsKQ00BWsL_t(Y$L*G}ZNo4WL=O;B3Yx~H
z<0+om2;c%KG=PCjk!@0F3GJbVT>_{0BrTJa+XRTOlJO++NWgbrlBD4pNb=WJS=~2V
zz0aAPxYt+yWGRSC9~~+68A$+l+jY2tkB{U>TRgy;7rShTPU&|by>oNqv$J_i6wKYQ
zwQ1^Yksfe&Kpjky4uv(_V2lRFd!m4sv^2;OCv}v^k<@dZjZ6g@U{>EE9ZV0%k@9lP
z_C*J(%aOD&J|Lk<0$xj#9B_Y{08j$Gz>_@5KO?{UZw$L+Nu-ft&JwASmfliqsuDKk
zTb<X8mX>wKbFqXi8e<@5Z_z&im@LVw&VpIp2Y}x;-~yayYm8bhwoEM_o2k}YY_nQZ
zG+%3N_4)1SVaGtL>eI;^8=cpD=gq~W*WJlsf7;leP##P*%}MA7Y2I_YU$W|I00000
LNkvXXu0mjfgQK+v
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cc9e57d6ebfaf7e092eaee7c51dd21dcba2a3d5b
GIT binary patch
literal 421
zc$@*H0b2fvP)<h;3K|Lk000e1NJLTq003kF003G60{{R3bX;M|00006P)t-s00000
z005<Dxz7Lq00DGTPE!Ct=GbNc00B)&L_t(Ijm^}tjodI0h2f8)u&03VDpYXrsRV}3
ztWs3MmcY_f%9Y^InH`Wz=?+e9m<jb0#LPVL%|Q6Y{in9R!b@rN1H4y=_4KvUm%6>w
zZSltaJ=80^2VU*q2nS-x5XE|!;N}J%H%L+q7Hh}}q)?E}wFn1x83a2HYptSW6kDZj
zCU8{RCn8N*P7Iyqkx^)(r-9TdMW$9XV_-2fx`kryG$?WtL{zNCM#1)p_LItP>!hr<
zCjC!TPCD|Hw)r2>|Fr(H+GAFlAyH=K@?!b&V!>*=y!&dqcw)7mez9A-my*reeYV)l
zr#}^Q_wK4#w03fYV$wVxN+9Xo5gE0zlYv1i?VFL<+Bm#R1hu*EOelP>vtZV9BkQ@_
zSMGFRc|s_hzbsbCUHkJ$zw}Izd*E|lE+Icpn~#&o1AR()gL`?F)Ti5TNb*9ORg#kB
P00000NkvXXu0mjfUVp@e
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..497ae2dd3af8cb42f7d6666bb3264f1198b5b944
GIT binary patch
literal 532
zc$@(g0_**WP)<h;3K|Lk000e1NJLTq003kF003G70{{R3GyEGG0000CP)t-s|Ns90
zfB*r20RR91X|aRF00003bW%=J0002`cEsKQ00Fc~L_t(Y$L*H8jl(buh7Gt5JdH~u
zQwS<zz$3&12*_$)LL;PiqvC)wd=m8{MLO4BacmO%lgOVkC93O^_2+4oKF_UdtUpyW
zhVClcHwA+&MDK(gs@kiaqJ4z^Jeo;U89F$n3=(GR$h+5G<qdwyf<jhzUs$Xk_9V`#
z2Uj16Gmx_*Wpjt4nlfFf6)APuLkOd2b}3K@qwxyg^1u*AlP{73jZ~U9n*_b7G?4Tt
z0#-tjgkCY?C2a90{vo-pNm@gE0F$KYreLBt*QNvS7T}zW;SGqM8v?RHbW1?CNQOWl
z9n)5MNa)6wAdyKVA=ObLkm@gFlZX>ZSRN~qusr|d?-HBIE)jQ8A&Xo)y~?#?E{Ra_
zbF5yzf4m#0_=TmD_X6Lip1{u1Y}e;K$4`ntta!QvFP0}X#>h?y=Nr5jnYbZkI57!R
zat{eLr*eFbvKQ(Md_>tO*P}eXY2$;I_b8`wb=Mzt@h99ZQ(rYTqMrmEFg4u0b_{A+
zk7Hy(Ia4z@HDWvZgkqT3HL*SEN(s)GJ6tc5sI0j-v{#4Ao5P3O#`O*5!>xwjgnj^D
WT8-MxM<JO20000<MNUMnLSTX*2jVsW
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/456219-1-ref.html
@@ -0,0 +1,80 @@
+<!doctype html>
+<html><head>
+<title>background-clip interaction with border-radius</title>
+<style>
+/* If you fix bug #466572, you can substantially simplify this test
+   case. */
+
+table { table-layout: fixed; width: 550px }
+td { width: 110px; height: 110px; text-align: center }
+div.i {
+   z-index: 0;
+   width: 70px;
+   height: 70px;
+   border-style: solid;
+   border-color: transparent;
+   background-color: green;
+}
+.rA div.i { -moz-border-radius: 10px; }
+.rB div.i { -moz-border-radius: 20px; }
+.rC div.i { -moz-border-radius: 30px; }
+.rD div.i { -moz-border-radius: 40px; }
+.rE div.i { -moz-border-radius: 50px; }
+
+.wA div.i { border-width: 10px 10px 10px 10px; }
+.wB div.i { border-width: 20px 20px 20px 20px; }
+.wC div.i { border-width: 5px 20px 5px 20px; }
+.wD div.i { border-width: 20px 20px 5px 5px; }
+.wE div.i { border-width: 5px 10px 15px 20px; }
+
+div.o {
+  display: inline-block;
+  position: relative;
+}
+img {
+  position: absolute; top: 0; left: 0;
+  z-index: 1;
+}
+</style>
+</head><body>
+<table>
+<tr class="wA">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wArA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wArB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wArC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wArD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wArE.png"></div></td>
+</tr>
+<tr class="wB">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrE.png"></div></td>
+</tr>
+<tr class="wC">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrE.png"></div></td>
+</tr>
+<tr class="wD">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrE.png"></div></td>
+</tr>
+<tr class="wE">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wErA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wErB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wErC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wErD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wErE.png"></div></td>
+</tr>
+</table>
+
+<p>Inside each green shape, there should be no white.</p>
+
+</body></html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/456219-1a.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<html><head>
+<title>background-clip interaction with border-radius</title>
+<style>
+/* If you fix bug #466572, you can substantially simplify this test
+   case. */
+
+table { table-layout: fixed; width: 550px }
+td { width: 110px; height: 110px; text-align: center }
+div.i {
+   z-index: 0;
+   width: 70px;
+   height: 70px;
+   border-style: solid;
+   border-color: green;
+   -moz-background-clip: padding;
+   background-color: green;
+}
+.rA div.i { -moz-border-radius: 10px; }
+.rB div.i { -moz-border-radius: 20px; }
+.rC div.i { -moz-border-radius: 30px; }
+.rD div.i { -moz-border-radius: 40px; }
+.rE div.i { -moz-border-radius: 50px; }
+
+.wA div.i { border-width: 10px 10px 10px 10px; }
+.wB div.i { border-width: 20px 20px 20px 20px; }
+.wC div.i { border-width: 5px 20px 5px 20px; }
+.wD div.i { border-width: 20px 20px 5px 5px; }
+.wE div.i { border-width: 5px 10px 15px 20px; }
+
+div.o {
+  display: inline-block;
+  position: relative;
+}
+img {
+  position: absolute; top: 0; left: 0;
+  z-index: 1;
+}
+</style>
+</head><body>
+<table>
+<tr class="wA">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wArA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wArB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wArC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wArD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wArE.png"></div></td>
+</tr>
+<tr class="wB">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrE.png"></div></td>
+</tr>
+<tr class="wC">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrE.png"></div></td>
+</tr>
+<tr class="wD">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrE.png"></div></td>
+</tr>
+<tr class="wE">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wErA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wErB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wErC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wErD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wErE.png"></div></td>
+</tr>
+</table>
+
+<p>Inside each green shape, there should be no white.</p>
+
+</body></html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/456219-1b.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<html><head>
+<title>background-clip interaction with border-radius</title>
+<style>
+/* If you fix bug #466572, you can substantially simplify this test
+   case. */
+
+table { table-layout: fixed; width: 550px }
+td { width: 110px; height: 110px; text-align: center }
+div.i {
+   z-index: 0;
+   width: 70px;
+   height: 70px;
+   border-style: solid;
+   border-color: green;
+   -moz-background-clip: padding;
+   background-image: url("data:image/gif;base64,R0lGODdhAQABAPAAAACAAAAAACwAAAAAAQABAAACAkQBADs=");
+}
+.rA div.i { -moz-border-radius: 10px; }
+.rB div.i { -moz-border-radius: 20px; }
+.rC div.i { -moz-border-radius: 30px; }
+.rD div.i { -moz-border-radius: 40px; }
+.rE div.i { -moz-border-radius: 50px; }
+
+.wA div.i { border-width: 10px 10px 10px 10px; }
+.wB div.i { border-width: 20px 20px 20px 20px; }
+.wC div.i { border-width: 5px 20px 5px 20px; }
+.wD div.i { border-width: 20px 20px 5px 5px; }
+.wE div.i { border-width: 5px 10px 15px 20px; }
+
+div.o {
+  display: inline-block;
+  position: relative;
+}
+img {
+  position: absolute; top: 0; left: 0;
+  z-index: 1;
+}
+</style>
+</head><body>
+<table>
+<tr class="wA">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wArA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wArB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wArC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wArD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wArE.png"></div></td>
+</tr>
+<tr class="wB">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrE.png"></div></td>
+</tr>
+<tr class="wC">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrE.png"></div></td>
+</tr>
+<tr class="wD">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrE.png"></div></td>
+</tr>
+<tr class="wE">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wErA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wErB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wErC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wErD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wErE.png"></div></td>
+</tr>
+</table>
+
+<p>Inside each green shape, there should be no white.</p>
+
+</body></html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/456219-1c.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<html><head>
+<title>background-clip interaction with border-radius</title>
+<style>
+/* If you fix bug #466572, you can substantially simplify this test
+   case. */
+
+table { table-layout: fixed; width: 550px }
+td { width: 110px; height: 110px; text-align: center }
+div.i {
+   z-index: 0;
+   width: 70px;
+   height: 70px;
+   border-style: solid;
+   border-color: green;
+   -moz-background-clip: padding;
+   background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaAQMAAAACZtNBAAAAA1BMVEUAgACc+aWRAAAAEklEQVQYGWNgGAWjYBSMgsECAASSAAFZGYSDAAAAAElFTkSuQmCC");
+}
+.rA div.i { -moz-border-radius: 10px; }
+.rB div.i { -moz-border-radius: 20px; }
+.rC div.i { -moz-border-radius: 30px; }
+.rD div.i { -moz-border-radius: 40px; }
+.rE div.i { -moz-border-radius: 50px; }
+
+.wA div.i { border-width: 10px 10px 10px 10px; }
+.wB div.i { border-width: 20px 20px 20px 20px; }
+.wC div.i { border-width: 5px 20px 5px 20px; }
+.wD div.i { border-width: 20px 20px 5px 5px; }
+.wE div.i { border-width: 5px 10px 15px 20px; }
+
+div.o {
+  display: inline-block;
+  position: relative;
+}
+img {
+  position: absolute; top: 0; left: 0;
+  z-index: 1;
+}
+
+</style>
+</head><body>
+<table>
+<tr class="wA">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wArA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wArB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wArC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wArD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wArE.png"></div></td>
+</tr>
+<tr class="wB">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wBrE.png"></div></td>
+</tr>
+<tr class="wC">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wCrE.png"></div></td>
+</tr>
+<tr class="wD">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wDrE.png"></div></td>
+</tr>
+<tr class="wE">
+  <td class="rA"><div class="o"><div class="i"></div><img src="456219-1-mask-wErA.png"></div></td>
+  <td class="rB"><div class="o"><div class="i"></div><img src="456219-1-mask-wErB.png"></div></td>
+  <td class="rC"><div class="o"><div class="i"></div><img src="456219-1-mask-wErC.png"></div></td>
+  <td class="rD"><div class="o"><div class="i"></div><img src="456219-1-mask-wErD.png"></div></td>
+  <td class="rE"><div class="o"><div class="i"></div><img src="456219-1-mask-wErE.png"></div></td>
+</tr>
+</table>
+
+<p>Inside each green shape, there should be no white.</p>
+</body></html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cf513235ab5238db97d80f302cdcd010b49f4a71
GIT binary patch
literal 151
zc%17D@N?(olHy`uVBq!ia0vp^nIO!>3?yCNJY5N-I0Jk_Tp9j@0FZZl_xa^Oim4>X
zFPMR$Z1PzPAkW&<#WBR=cydQp!U4W8D+84W6Os~&5)LfwWz=w9cSl2lb#a17Pg9@)
qm)k)g=L*}FjO~xI)gNcZGc&L}<2t>uE^{8x7zR&QKbLh*2~7YUjWE#w
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/456219-2-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style type="text/css">
+/* If you fix bug #466572, you can remove the IMG
+   and related styling from this test case.  */
+body { background: white; color: black; margin: 0 }
+div {
+  background: aqua;
+  color: black;
+  height: 75px;
+  width: 75px;
+  padding: 15px;
+  border: 20px solid;
+  -moz-border-radius: 25px;
+  border-color: transparent;
+  -moz-background-clip: padding;
+}
+img {
+  position: absolute;
+  top: 20px;
+  left: 20px;
+}
+</style>
+</head>
+<body>
+<div></div>
+<img src="456219-2-mask.png">
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/456219-2.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title></title>
+<style type="text/css">
+/* If you fix bug #466572, you can remove the IMG
+   and related styling from this test case.  */
+body { background: white; color: black; margin: 0 }
+div {
+  background: aqua;
+  color: black;
+  height: 75px;
+  width: 75px;
+  padding: 15px;
+  border: 20px solid;
+  -moz-border-radius: 25px;
+  border-color: white;
+}
+img {
+  position: absolute;
+  top: 20px;
+  left: 20px;
+}
+</style>
+</head>
+<body>
+<div></div>
+<img src="456219-2-mask.png">
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -924,16 +924,17 @@ random == 429849-1.html 429849-1-ref.htm
 == 438987-1.html 438987-1-ref.html
 == 438987-2a.html 438987-2-ref.html
 == 438987-2b.html 438987-2-ref.html
 == 438987-2c.html 438987-2-ref.html
 != about:blank 438987-2-ref.html # check that backgrounds work at all 
 == 439004-1.html 439004-1-ref.html
 == 439639-1.html 439639-1-ref.html
 == 439910.html 439910-ref.html
+== 440149-1.html 440149-1-ref.html
 == 441259-1.html 441259-1-ref.html
 fails == 441259-2.html 441259-2-ref.html # bug 441400
 == 442542-1.html 442542-1-ref.html
 == 444015-1.html 444015-1-ref.html
 == 444375-1.html 444375-1-ref.html
 == 444928-1.html 444928-1-ref.html
 == 444928-2.html 444928-2-ref.html
 != 444928-3.html 444928-3-notref.html
@@ -963,17 +964,21 @@ random == 445004-1.html 445004-1-ref.htm
 == 451168-1.html 451168-1-ref.html
 == 452964-1.html 452964-1-ref.html
 == 454361.html about:blank
 == 455105-1.html 455105-ref.html
 == 455105-2.html 455105-ref.html
 == 455171-5.html 455171-5-ref.html
 == 455280-1.xhtml 455280-1-ref.xhtml
 == 455826-1.html 455826-1-ref.html
-fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 456147.xul 456147-ref.html # bug 456147, but not caused by it
+fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 456147.xul 456147-ref.html # bug 458047
+== 456219-1a.html 456219-1-ref.html
+== 456219-1b.html 456219-1-ref.html
+== 456219-1c.html 456219-1-ref.html
+== 456219-2.html 456219-2-ref.html
 == 456330-1.gif 456330-1-ref.png
 == 456484-1.html 456484-1-ref.html
 == 457398-1.html 457398-1-ref.html
 == 457398-2.html 457398-2-ref.html
 == 458296-1a.html 458296-1-ref.html
 == 458296-1b.html 458296-1-ref.html
 == 458296-1c.html 458296-1-ref.html
 == 458296-1d.html 458296-1-ref.html
--- a/layout/reftests/reftest-sanity/reftest.list
+++ b/layout/reftests/reftest-sanity/reftest.list
@@ -34,8 +34,16 @@ HTTP == data:text/html,<div>Text</div> d
 HTTP != blank.html default.html
 
 HTTP(..) == filter-1.xhtml filter-1-ref.xhtml
 HTTP(..) == filter-2.xhtml filter-2-ref.xhtml
 
 # test that the MozReftestInvalidate event fires
 == invalidation.html about:blank
 == zoom-invalidation.html zoom-invalidation-ref.html
+
+# test parsing of asserts() expressions
+asserts(0) load about:blank
+asserts(0-5) load about:blank
+asserts-if(true,0) load about:blank
+asserts-if(false,7) load about:blank
+asserts-if(true,0-4) load about:blank
+asserts-if(false,6-8) load about:blank
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -6380,17 +6380,18 @@ void
 nsTableFrame::PaintBCBorders(nsIRenderingContext& aRenderingContext,
                              const nsRect&        aDirtyRect)
 {
   nsMargin childAreaOffset = GetChildAreaOffset(nsnull);
   nsTableFrame* firstInFlow = (nsTableFrame*)GetFirstInFlow(); if (!firstInFlow) ABORT0();
 
   PRInt32 startRowY = (GetPrevInFlow()) ? 0 : childAreaOffset.top; // y position of first row in damage area
 
-  const nsStyleBackground* bgColor = nsCSSRendering::FindNonTransparentBackground(mStyleContext);
+  nsStyleContext* bgContext = nsCSSRendering::FindNonTransparentBackground(mStyleContext);
+  const nsStyleBackground* bgColor = bgContext->GetStyleBackground();
   // determine the damage area in terms of rows and columns and finalize startColX and startRowY
   PRUint32 startRowIndex, endRowIndex, startColIndex, endColIndex;
   startRowIndex = endRowIndex = startColIndex = endColIndex = 0;
 
   RowGroupArray rowGroups;
   OrderRowGroups(rowGroups);
   PRBool done = PR_FALSE;
   PRBool haveIntersect = PR_FALSE;
--- a/layout/tools/reftest/README.txt
+++ b/layout/tools/reftest/README.txt
@@ -69,16 +69,40 @@ 2. A test item
             'skip' is preferred to simply commenting out the test because we
             want to report the test failure at the end of the test run.
 
       skip-if(condition) If the condition is met, the test is not run. This is
                          useful if, for example, the test crashes only on a
                          particular platform (i.e. it allows us to get test
                          coverage on the other platforms).
 
+      asserts(count)
+          Loading the test and reference is known to assert exactly
+          count times.
+          NOTE: An asserts() notation with a non-zero count or maxCount
+          suppresses use of a cached canvas for the test with the
+          annotation.  However, if later occurrences of the same test
+          are not annotated, they will use the cached canvas
+          (potentially from the load that asserted).  This allows
+          repeated use of the same test or reference to be annotated
+          correctly (which may be particularly useful when the uses are
+          in different subdirectories that can be tested independently),
+          but does not force them to be, nor does it force suppression
+          of caching for a common reference when it is the test that
+          asserts.
+
+      asserts(minCount-maxCount)
+          Loading the test and reference is known to assert between
+          minCount and maxCount times, inclusive.
+          NOTE: See above regarding canvas caching.
+
+      asserts-if(condition,count)
+      asserts-if(condition,minCount-maxCount)
+          Same as above, but only if condition is true.
+
       Examples of using conditions:
           fails-if(MOZ_WIDGET_TOOLKIT=="windows") ...
           fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") ...
           fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") ...
 
    b. <http>, if present, is one of the strings (sans quotes) "HTTP" or
       "HTTP(..)" or "HTTP(../..)" or "HTTP(../../..)", etc. , indicating that
       the test should be run over an HTTP server because it requires certain
--- a/layout/tools/reftest/reftest.js
+++ b/layout/tools/reftest/reftest.js
@@ -39,16 +39,17 @@
 const CC = Components.classes;
 const CI = Components.interfaces;
 const CR = Components.results;
 
 const XHTML_NS = "http://www.w3.org/1999/xhtml";
 
 const NS_LOCAL_FILE_CONTRACTID = "@mozilla.org/file/local;1";
 const IO_SERVICE_CONTRACTID = "@mozilla.org/network/io-service;1";
+const DEBUG_CONTRACTID = "@mozilla.org/xpcom/debug;1";
 const NS_LOCALFILEINPUTSTREAM_CONTRACTID =
           "@mozilla.org/network/file-input-stream;1";
 const NS_SCRIPTSECURITYMANAGER_CONTRACTID =
           "@mozilla.org/scriptsecuritymanager;1";
 const NS_REFTESTHELPER_CONTRACTID =
           "@mozilla.org/reftest-helper;1";
 const NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX =
           "@mozilla.org/network/protocol;1?name=";
@@ -69,35 +70,41 @@ var gTestResults = {
   // Successful...
   Pass: 0,
   LoadOnly: 0,
   // Unexpected...
   Exception: 0,
   FailedLoad: 0,
   UnexpectedFail: 0,
   UnexpectedPass: 0,
+  AssertionUnexpected: 0,
+  AssertionUnexpectedFixed: 0,
   // Known problems...
   KnownFail : 0,
+  AssertionKnown: 0,
   Random : 0,
   Skip: 0,
 };
 var gTotalTests = 0;
 var gState;
 var gCurrentURL;
 var gFailureTimeout;
 var gFailureReason;
 var gServer;
 var gCount = 0;
+var gAssertionCount = 0;
 
 var gIOService;
+var gDebug;
 var gWindowUtils;
 
 var gCurrentTestStartTime;
 var gSlowestTestTime = 0;
 var gSlowestTestURL;
+var gClearingForAssertionCheck = false;
 
 const EXPECTED_PASS = 0;
 const EXPECTED_FAIL = 1;
 const EXPECTED_RANDOM = 2;
 const EXPECTED_DEATH = 3;  // test must be skipped to avoid e.g. crash/hang
 const EXPECTED_LOAD = 4; // test without a reference (just test that it does
                          // not assert, crash, hang, or leak)
 
@@ -135,16 +142,17 @@ function OnRefTestLoad()
             gWindowUtils = null;
     } catch (e) {
         gWindowUtils = null;
     }
 
     var windowElem = document.documentElement;
 
     gIOService = CC[IO_SERVICE_CONTRACTID].getService(CI.nsIIOService);
+    gDebug = CC[DEBUG_CONTRACTID].getService(CI.nsIDebug2);
 
     try {
         ReadTopManifest(window.arguments[0]);
         BuildUseCounts();
         if (gServer) {
             gServer.registerContentType("sjs", "sjs");
             gServer.start(HTTP_SERVER_PORT);
         }
@@ -216,43 +224,62 @@ function ReadManifest(aURL)
             str = str.substring(0, i);
         // strip leading and trailing whitespace
         str = str.replace(/^\s*/, '').replace(/\s*$/, '');
         if (!str || str == "")
             continue;
         var items = str.split(/\s+/); // split on whitespace
 
         var expected_status = EXPECTED_PASS;
-        while (items[0].match(/^(fails|random|skip)/)) {
+        var minAsserts = 0;
+        var maxAsserts = 0;
+        while (items[0].match(/^(fails|random|skip|asserts)/)) {
             var item = items.shift();
             var stat;
             var cond;
             var m = item.match(/^(fails|random|skip)-if(\(.*\))$/);
             if (m) {
                 stat = m[1];
                 // Note: m[2] contains the parentheses, and we want them.
                 cond = Components.utils.evalInSandbox(m[2], sandbox);
             } else if (item.match(/^(fails|random|skip)$/)) {
                 stat = item;
                 cond = true;
+            } else if ((m = item.match(/^asserts\((\d+)(-\d+)?\)$/))) {
+                cond = false;
+                minAsserts = Number(m[1]);
+                maxAsserts = (m[2] == undefined) ? minAsserts
+                                                 : Number(m[2].substring(1));
+            } else if ((m = item.match(/^asserts-if\((.*?),(\d+)(-\d+)?\)$/))) {
+                cond = false;
+                if (Components.utils.evalInSandbox("(" + m[1] + ")", sandbox)) {
+                    minAsserts = Number(m[2]);
+                    maxAsserts =
+                      (m[3] == undefined) ? minAsserts
+                                          : Number(m[3].substring(1));
+                }
             } else {
                 throw "Error in manifest file " + aURL.spec + " line " + lineNo;
             }
 
             if (cond) {
                 if (stat == "fails") {
                     expected_status = EXPECTED_FAIL;
                 } else if (stat == "random") {
                     expected_status = EXPECTED_RANDOM;
                 } else if (stat == "skip") {
                     expected_status = EXPECTED_DEATH;
                 }
             }
         }
 
+        if (minAsserts > maxAsserts) {
+            throw "Bad range in manifest file " + aURL.spec + " line " + lineNo;
+        }
+
         var runHttp = false;
         var httpDepth;
         if (items[0] == "HTTP") {
             runHttp = true;
             httpDepth = 0;
             items.shift();
         } else if (items[0].match(/HTTP\(\.\.(\/\.\.)*\)/)) {
             // Accept HTTP(..), HTTP(../..), HTTP(../../..), etc.
@@ -282,16 +309,18 @@ function ReadManifest(aURL)
             var prettyPath = runHttp
                            ? gIOService.newURI(items[1], null, listURL).spec
                            : testURI.spec;
             secMan.checkLoadURI(aURL, testURI,
                                 CI.nsIScriptSecurityManager.DISALLOW_SCRIPT);
             gURLs.push( { equal: true /* meaningless */,
                           expected: expected_status,
                           prettyPath: prettyPath,
+                          minAsserts: minAsserts,
+                          maxAsserts: maxAsserts,
                           url1: testURI,
                           url2: null } );
         } else if (items[0] == "==" || items[0] == "!=") {
             if (items.length != 3)
                 throw "Error in manifest file " + aURL.spec + " line " + lineNo;
             var [testURI, refURI] = runHttp
                                   ? ServeFiles(aURL, httpDepth,
                                                listURL.file.parent, [items[1], items[2]])
@@ -302,16 +331,18 @@ function ReadManifest(aURL)
                            : testURI.spec;
             secMan.checkLoadURI(aURL, testURI,
                                 CI.nsIScriptSecurityManager.DISALLOW_SCRIPT);
             secMan.checkLoadURI(aURL, refURI,
                                 CI.nsIScriptSecurityManager.DISALLOW_SCRIPT);
             gURLs.push( { equal: (items[0] == "=="),
                           expected: expected_status,
                           prettyPath: prettyPath,
+                          minAsserts: minAsserts,
+                          maxAsserts: maxAsserts,
                           url1: testURI,
                           url2: refURI } );
         } else {
             throw "Error in manifest file " + aURL.spec + " line " + lineNo;
         }
     } while (more);
 }
 
@@ -406,17 +437,18 @@ function StartCurrentURI(aState)
 {
     gCurrentTestStartTime = Date.now();
     gFailureTimeout = setTimeout(LoadFailed, LOAD_FAILURE_TIMEOUT);
     gFailureReason = "timed out waiting for onload to fire";
 
     gState = aState;
     gCurrentURL = gURLs[0]["url" + aState].spec;
 
-    if (gURICanvases[gCurrentURL] && gURLs[0].expected != EXPECTED_LOAD) {
+    if (gURICanvases[gCurrentURL] && gURLs[0].expected != EXPECTED_LOAD &&
+        gURLs[0].maxAsserts == 0) {
         // Pretend the document loaded --- DocumentLoaded will notice
         // there's already a canvas for this URL
         setTimeout(DocumentLoaded, 0);
     } else {
         gBrowser.loadURI(gCurrentURL);
     }
 }
 
@@ -426,25 +458,31 @@ function DoneTests()
          "ms (" + gSlowestTestURL + ")\n");
 
     dump("REFTEST INFO | Result summary:\n");
     var count = gTestResults.Pass + gTestResults.LoadOnly;
     dump("REFTEST INFO | Successful: " + count + " (" +
          gTestResults.Pass + " pass, " +
          gTestResults.LoadOnly + " load only)\n");
     count = gTestResults.Exception + gTestResults.FailedLoad +
-            gTestResults.UnexpectedFail + gTestResults.UnexpectedPass;
+            gTestResults.UnexpectedFail + gTestResults.UnexpectedPass +
+            gTestResults.AssertionUnexpected +
+            gTestResults.AssertionUnexpectedFixed;
     dump("REFTEST INFO | Unexpected: " + count + " (" +
          gTestResults.UnexpectedFail + " unexpected fail, " +
          gTestResults.UnexpectedPass + " unexpected pass, " +
+         gTestResults.AssertionUnexpected + " unexpected asserts, " +
+         gTestResults.AssertionUnexpectedFixed + " unexpected fixed asserts, " +
          gTestResults.FailedLoad + " failed load, " +
          gTestResults.Exception + " exception)\n");
-    count = gTestResults.KnownFail + gTestResults.Random + gTestResults.Skip;
+    count = gTestResults.KnownFail + gTestResults.AssertionKnown +
+            gTestResults.Random + gTestResults.Skip;
     dump("REFTEST INFO | Known problems: " + count + " (" +
          gTestResults.KnownFail + " known fail, " +
+         gTestResults.AssertionKnown + " known asserts, " +
          gTestResults.Random + " random, " +
          gTestResults.Skip + " skipped)\n");
 
     dump("REFTEST INFO | Total canvas count = " + gRecycledCanvases.length + "\n");
 
     if (gServer)
         gServer.stop();
     goQuitApplication();
@@ -462,16 +500,21 @@ function resetZoom() {
 }
     
 function OnDocumentLoad(event)
 {
     if (event.target != gBrowser.contentDocument)
         // Ignore load events for subframes.
         return;
         
+    if (gClearingForAssertionCheck) {
+        DoAssertionCheck();
+        return;
+    }
+
     if (gBrowser.contentDocument.location.href != gCurrentURL)
         // Ignore load events for previous documents.
         return;
 
     var contentRootElement = gBrowser.contentDocument.documentElement;
 
     function shouldWait() {
         // use getAttribute because className works differently in HTML and SVG
@@ -703,18 +746,17 @@ function DocumentLoaded()
     }
 
     clearTimeout(gFailureTimeout);
     gFailureReason = null;
 
     if (gURLs[0].expected == EXPECTED_LOAD) {
         ++gTestResults.LoadOnly;
         dump("REFTEST TEST-PASS | " + gURLs[0].prettyPath + " | (LOAD ONLY)\n");
-        gURLs.shift();
-        StartCurrentTest();
+        FinishTestItem();
         return;
     }
 
     if (gURICanvases[gCurrentURL]) {
         gCurrentCanvas = gURICanvases[gCurrentURL];
     } else if (gCurrentCanvas == null) {
         InitCurrentCanvasWithSnapshot();
     }
@@ -792,24 +834,72 @@ function DocumentLoaded()
                 } else {
                     dump("REFTEST   IMAGE: " + gCanvas1.toDataURL() + "\n");
                 }
             }
 
             UpdateCanvasCache(gURLs[0].url1, gCanvas1);
             UpdateCanvasCache(gURLs[0].url2, gCanvas2);
 
-            gURLs.shift();
-            StartCurrentTest();
+            FinishTestItem();
             break;
         default:
             throw "Unexpected state.";
     }
 }
 
 function LoadFailed()
 {
     ++gTestResults.FailedLoad;
     dump("REFTEST TEST-UNEXPECTED-FAIL | " +
          gURLs[0]["url" + gState].spec + " | " + gFailureReason + "\n");
+    FinishTestItem();
+}
+
+function FinishTestItem()
+{
+    // Replace document with about:blank in case there are
+    // assertions when unloading.
+    gClearingForAssertionCheck = true;
+    gBrowser.loadURI("about:blank");
+}
+
+function DoAssertionCheck()
+{
+    gClearingForAssertionCheck = false;
+
+    // TEMPORARILY DISABLING ASSERTION CHECKS FOR NOW.  TO RE-ENABLE,
+    // USE COMMENTED LINE TO REPLACE FOLLOWING ONE.
+    // var newAssertionCount = gDebug.assertionCount;
+    var newAssertionCount = 0;
+    var numAsserts = newAssertionCount - gAssertionCount;
+    gAssertionCount = newAssertionCount;
+
+    var minAsserts = gURLs[0].minAsserts;
+    var maxAsserts = gURLs[0].maxAsserts;
+
+    var expectedAssertions = "expected " + minAsserts;
+    if (minAsserts != maxAsserts) {
+        expectedAssertions += " to " + maxAsserts;
+    }
+    expectedAssertions += " assertions";
+
+    if (numAsserts < minAsserts) {
+        ++gTestResults.AssertionUnexpectedFixed;
+        dump("REFTEST TEST-UNEXPECTED-PASS | " + gURLs[0].prettyPath +
+             " | assertion count " + numAsserts + " is less than " +
+             expectedAssertions + "\n");
+    } else if (numAsserts > maxAsserts) {
+        ++gTestResults.AssertionUnexpected;
+        dump("REFTEST TEST-UNEXPECTED-FAIL | " + gURLs[0].prettyPath +
+             " | assertion count " + numAsserts + " is more than " +
+             expectedAssertions + "\n");
+    } else if (numAsserts != 0) {
+        ++gTestResults.AssertionKnown;
+        dump("REFTEST TEST-KNOWN-FAIL | " + gURLs[0].prettyPath +
+             " | assertion count " + numAsserts + " matches " +
+             expectedAssertions + "\n");
+    }
+
+    // And start the next test.
     gURLs.shift();
     StartCurrentTest();
 }
new file mode 100644
--- /dev/null
+++ b/layout/xul/base/src/crashtests/433296-1.xul
@@ -0,0 +1,5 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<hbox><listboxbody><listheader/><hbox><iframe/></hbox></listboxbody><tabpanels><tabpanels/></tabpanels></hbox>
+
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/xul/base/src/crashtests/467481-1.xul
@@ -0,0 +1,6 @@
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="document.getElementById('a').setAttribute('ordinal', 30);">
+  <listbox>
+    <listitem id="a"/>
+    <listitem><iframe/></listitem>
+  </listbox>
+</window>
--- a/layout/xul/base/src/crashtests/crashtests.list
+++ b/layout/xul/base/src/crashtests/crashtests.list
@@ -21,10 +21,12 @@ load 384491-1.xhtml
 load 394120-1.xhtml
 load 397304-1.html
 load 398326-1.xhtml
 load 402912-1.xhtml
 load 408904-1.xul
 load 412479-1.xhtml
 load 430356-1.xhtml
 load 431738.xhtml
+load 433296-1.xul
 load 434458-1.xul
+load 467481-1.xul
 load 470063-1.html
--- a/layout/xul/base/src/nsBoxFrame.cpp
+++ b/layout/xul/base/src/nsBoxFrame.cpp
@@ -1925,16 +1925,22 @@ nsBoxFrame::FireDOMEventSynch(const nsAS
       privateEvent->SetTrusted(PR_TRUE);
 
       nsEventDispatcher::DispatchDOMEvent(content, nsnull, event,
                                           presContext, nsnull);
     }
   }
 }
 
+PRBool
+nsBoxFrame::SupportsOrdinalsInChildren()
+{
+  return PR_TRUE;
+}
+
 static nsIFrame*
 SortedMerge(nsBoxLayoutState& aState, nsIFrame *aLeft, nsIFrame *aRight)
 {
   NS_PRECONDITION(aLeft && aRight, "SortedMerge must have non-empty lists");
 
   nsIFrame *result;
   // Unroll first iteration to avoid null-check 'result' inside the loop.
   if (aLeft->GetOrdinal(aState) <= aRight->GetOrdinal(aState)) {
@@ -2020,16 +2026,19 @@ MergeSort(nsBoxLayoutState& aState, nsIF
 
 void 
 nsBoxFrame::CheckBoxOrder(nsBoxLayoutState& aState)
 {
   nsIFrame *child = mFrames.FirstChild();
   if (!child)
     return;
 
+  if (!SupportsOrdinalsInChildren())
+    return;
+
   // Run through our list of children and check whether we
   // need to sort them.
   PRUint32 maxOrdinal = child->GetOrdinal(aState);
   child = child->GetNextSibling();
   for ( ; child; child = child->GetNextSibling()) {
     PRUint32 ordinal = child->GetOrdinal(aState);
     if (ordinal < maxOrdinal)
       break;
@@ -2071,16 +2080,19 @@ nsBoxFrame::LayoutChildAt(nsBoxLayoutSta
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsBoxFrame::RelayoutChildAtOrdinal(nsBoxLayoutState& aState, nsIBox* aChild)
 {
+  if (!SupportsOrdinalsInChildren())
+    return NS_OK;
+
   PRUint32 ord = aChild->GetOrdinal(aState);
   
   nsIFrame *child = mFrames.FirstChild();
   nsIFrame *curPrevSib = nsnull, *newPrevSib = nsnull;
   PRBool foundPrevSib = PR_FALSE, foundNewPrevSib = PR_FALSE;
 
   while (child) {
     if (child == aChild)
--- a/layout/xul/base/src/nsBoxFrame.h
+++ b/layout/xul/base/src/nsBoxFrame.h
@@ -209,16 +209,22 @@ public:
    * Utility method to redirect events on descendants to this frame.
    * Supports 'allowevents' attribute on descendant elements to allow those
    * elements and their descendants to receive events.
    */
   nsresult WrapListsInRedirector(nsDisplayListBuilder*   aBuilder,
                                  const nsDisplayListSet& aIn,
                                  const nsDisplayListSet& aOut);
 
+  /**
+   * This defaults to true, but some box frames (nsListBoxBodyFrame for
+   * example) don't support ordinals in their children.
+   */
+  virtual PRBool SupportsOrdinalsInChildren();
+
 protected:
 #ifdef DEBUG_LAYOUT
     virtual void GetBoxName(nsAutoString& aName);
     void PaintXULDebugBackground(nsIRenderingContext& aRenderingContext,
                                  nsPoint aPt);
     void PaintXULDebugOverlay(nsIRenderingContext& aRenderingContext,
                               nsPoint aPt);
 #endif
--- a/layout/xul/base/src/nsListBoxBodyFrame.cpp
+++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp
@@ -1025,16 +1025,22 @@ nsListBoxBodyFrame::GetFirstFrame()
 }
 
 nsIFrame*
 nsListBoxBodyFrame::GetLastFrame()
 {
   return mFrames.LastChild();
 }
 
+PRBool
+nsListBoxBodyFrame::SupportsOrdinalsInChildren()
+{
+  return PR_FALSE;
+}
+
 ////////// lazy row creation and destruction
 
 void
 nsListBoxBodyFrame::CreateRows()
 {
   // Get our client rect.
   nsRect clientRect;
   GetClientRect(clientRect);
--- a/layout/xul/base/src/nsListBoxBodyFrame.h
+++ b/layout/xul/base/src/nsListBoxBodyFrame.h
@@ -154,16 +154,19 @@ public:
   void PostReflowCallback();
 
   PRBool SetBoxObject(nsPIBoxObject* aBoxObject)
   {
     NS_ENSURE_TRUE(!mBoxObject, PR_FALSE);
     mBoxObject = aBoxObject;
     return PR_TRUE;
   }
+
+  virtual PRBool SupportsOrdinalsInChildren();
+
 protected:
   class nsPositionChangedEvent;
   friend class nsPositionChangedEvent;
 
   class nsPositionChangedEvent : public nsRunnable
   {
   public:
     nsPositionChangedEvent(nsListBoxBodyFrame* aFrame,
new file mode 100644
--- /dev/null
+++ b/parser/htmlparser/tests/crashtests/460706-1.xhtml
@@ -0,0 +1,463 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<script xmlns="http://www.w3.org/1999/xhtml" src="javascript://"></script>
+
+<script xmlns="http://www.w3.org/1999/xhtml">
+var p = new XMLHttpRequest();
+p.open("GET", window.location.href, false);
+p.send(null);
+</script>
+
+<!-- 
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+-->
+
+
+
+</html>
--- a/parser/htmlparser/tests/crashtests/crashtests.list
+++ b/parser/htmlparser/tests/crashtests/crashtests.list
@@ -1,2 +1,3 @@
 load 423373-1.html
+load 460706-1.xhtml
 load 468538-1.xhtml
deleted file mode 100644
--- a/profile/pref-migrator/public/nsPrefMigrationCIDs.h
+++ /dev/null
@@ -1,56 +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):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 nsPrefMigrationCIDs_h___
-#define nsPrefMigrationCIDs_h___
-
-#define NS_PREFCONVERTER_CID {0xdb97abfa, 0x1dd1, 0x11b2, \
-    {0xaf, 0x32, 0xad, 0x4c, 0x3b, 0x35, 0x4d, 0xfb}}
-
-#define NS_PREFMIGRATION_CID {0xa2a7f03c, 0x6a6c, 0x11d3, \
-    {0x9e, 0x9f, 0x00, 0x40, 0x05, 0x26, 0x30, 0x78}}
-
-#define NS_PrefMigrationFactory_CID {0xad1b40a0, 0x6a6c, 0x11d3, \
-    {0x8d, 0x83, 0x00, 0x40, 0x05, 0x26, 0x30, 0x78}}
-
-#define NS_PMProgressDialog_CID {0x9e180fc9, 0x6d11, 0x11d3, \
-    {0xb9, 0xf5, 0x0, 0x10, 0x83, 0x2, 0x2c, 0xf8}}
-
-#endif /* nsPrefMigrationCIDs_h___ */
-// {9E180FC9-6D11-11d3-B9F5-001083022CF8}
-// {9E180FC9-6D11-11d3-B9F5-001083022CF8}
deleted file mode 100644
--- a/profile/pref-migrator/src/Makefile.in
+++ /dev/null
@@ -1,89 +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):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of 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		= prefmigr
-LIBRARY_NAME	= nsprefm
-EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsPrefMigrationModule
-MOZILLA_INTERNAL_API = 1
-
-REQUIRES	= xpcom \
-                  xpcom_obsolete \
-		  string \
-		  pref \
-		  intl \
-		  docshell \
-		  dom \
-		  layout \
-		  js \
-		  necko \
-		  widget \
-		  webbrwsr \
-		  uconv \
-		  windowwatcher \
-		  embed_base \
-		  content \
-		  $(NULL)
-
-CPPSRCS		= \
-		nsPrefMigration.cpp \
-		nsPrefMigrationFactory.cpp \
-		$(NULL)
-
-EXPORTS		= \
-		nsPrefMigration.h \
-		nsPrefMigrationFactory.h \
-		$(NULL)
-
-EXTRA_DSO_LDOPTS = \
-		$(LIBS_DIR) \
-		$(MOZ_COMPONENT_LIBS) \
-		$(MOZ_XPCOM_OBSOLETE_LIBS) \
-		$(MOZ_JS_LIBS) \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
-
deleted file mode 100644
--- a/profile/pref-migrator/src/nsPrefMigration.cpp
+++ /dev/null
@@ -1,2533 +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 Communicator client 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):
- *   Don Bragg <dbragg@netscape.com>
- *   Seth Spitzer <sspitzer@netscape.com>
- *   Pierre Phaneuf <pp@ludusdesign.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 "pratom.h"
-#include "nsIComponentManager.h"
-#include "nsIComponentManager.h"
-#include "nsIPromptService.h"
-#include "nsIServiceManager.h"
-#include "nsPIDOMWindow.h"
-#include "nsIScriptContext.h"
-#include "nsILocalFile.h"
-#include "nsDirectoryServiceUtils.h"
-#include "nsDirectoryServiceDefs.h"
-#include "nsDependentString.h"
-#include "nsFileStream.h"
-#include "nsIFileSpec.h"
-#include "nsCOMPtr.h"
-#include "prio.h"
-#include "prerror.h"
-#include "prmem.h"
-#include "nsIPrefService.h"
-#include "plstr.h"
-#include "prprf.h"
-#include "nsXPIDLString.h"
-#include "nsReadableUtils.h"
-#include "nsIStringBundle.h"
-#include "nsProxiedService.h"
-
-#include "nsNetUtil.h"
-#include "nsCRT.h"
-
-#include "nsVoidArray.h"
-
-#include "nsIBaseWindow.h"
-#include "nsIDocShell.h"
-#include "nsIDocShellTreeItem.h"
-#include "nsIDocShellTreeOwner.h"
-#include "nsIWebBrowserChrome.h"
-#include "nsIWindowWatcher.h"
-#include "nsEmbedCID.h"
-
-#ifdef DEBUG_seth
-#define DEBUG_UTF8_CONVERSION 1
-#endif 
-
-#include "nsICharsetConverterManager.h"
-#include "nsIPlatformCharset.h"
-
-#define CHROME_STYLE nsIWebBrowserChrome::CHROME_ALL | nsIWebBrowserChrome::CHROME_CENTER_SCREEN
-#define MIGRATION_PROPERTIES_URL "chrome://communicator/locale/profile/migration.properties"
-
-/* Network */
-
-#include "nsPrefMigration.h"
-#include "nsPrefMigrationFactory.h"
-
-#define PREF_FILE_HEADER_STRING "# Mozilla User Preferences    " 
-
-#define MAX_PREF_LEN 1024
-
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
-#define IMAP_MAIL_FILTER_FILE_NAME_IN_4x "mailrule"
-#define POP_MAIL_FILTER_FILE_NAME_IN_4x "mailrule"
-#define MAIL_SUMMARY_SUFFIX_IN_4x ".summary"
-#define NEWS_SUMMARY_SUFFIX_IN_4x ".snm"
-#define COOKIES_FILE_NAME_IN_4x "cookies"
-#define BOOKMARKS_FILE_NAME_IN_4x "bookmarks.html"
-#define NEWSRC_PREFIX_IN_4x ".newsrc-"
-#define SNEWSRC_PREFIX_IN_4x ".snewsrc-"
-#define POPSTATE_FILE_IN_4x "popstate"
-#define PSM_CERT7_DB "cert7.db"
-#define PSM_KEY3_DB "key3.db"
-#define PSM_SECMODULE_DB "secmodule.db"
-#elif defined(XP_MACOSX)
-#define MAC_RULES_FILE_ENDING_STRING_IN_4X " Rules"
-#define IMAP_MAIL_FILTER_FILE_NAME_IN_4x "<hostname> Rules"
-#define POP_MAIL_FILTER_FILE_NAME_IN_4x "Filter Rules"
-#define MAIL_SUMMARY_SUFFIX_IN_4x ".snm"
-#define NEWS_SUMMARY_SUFFIX_IN_4x ".snm"
-#define COOKIES_FILE_NAME_IN_4x "MagicCookie"
-#define BOOKMARKS_FILE_NAME_IN_4x "Bookmarks.html"
-#define POPSTATE_FILE_IN_4x "Pop State"
-#define SECURITY_PATH "Security"
-#define PSM_CERT7_DB "Certificates7"
-#define PSM_KEY3_DB "Key Database3"
-#define PSM_SECMODULE_DB "Security Modules"
-#else /* XP_WIN || XP_OS2 */
-#define IMAP_MAIL_FILTER_FILE_NAME_IN_4x "rules.dat"
-#define POP_MAIL_FILTER_FILE_NAME_IN_4x "rules.dat"
-#define MAIL_SUMMARY_SUFFIX_IN_4x ".snm"
-#define NEWS_SUMMARY_SUFFIX_IN_4x ".snm"
-#define COOKIES_FILE_NAME_IN_4x "cookies.txt"
-#define BOOKMARKS_FILE_NAME_IN_4x "bookmark.htm"
-// purposely not defined, since it was in the right place
-// and with the right name in 4.x
-//#define POPSTATE_FILE_IN_4x "popstate.dat"
-#define PSM_CERT7_DB "cert7.db"
-#define PSM_KEY3_DB "key3.db"
-#define PSM_SECMODULE_DB "secmod.db"
-#endif /* XP_UNIX */
-
-#define SUMMARY_SUFFIX_IN_5x ".msf"
-#define COOKIES_FILE_NAME_IN_5x "cookies.txt"
-#define IMAP_MAIL_FILTER_FILE_NAME_IN_5x "rules.dat"
-#define POP_MAIL_FILTER_FILE_NAME_IN_5x "rules.dat"
-#define POPSTATE_FILE_IN_5x	"popstate.dat"
-#define BOOKMARKS_FILE_NAME_IN_5x "bookmarks.html"
-#define HISTORY_FILE_NAME_IN_5x "history.dat"
-
-// only UNIX had movemail in 4.x
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
-#define HAVE_MOVEMAIL 1
-#endif /* XP_UNIX */
-
-#define PREMIGRATION_PREFIX "premigration."
-
-// this is for the hidden preference setting in mozilla/modules/libpref/src/init/mailnews.js
-// pref("mail.migration.copyMailFiles", true);
-//
-// see bugzilla bug 80035 (http://bugzilla.mozilla.org/show_bug.cgi?id=80035)
-//
-// the default value for this setting is true which means when migrating from
-// Netscape 4.x, mozilla will copy all the contents of Local Folders and Imap
-// Folder to the newly created subfolders of migrated mozilla profile
-// when this value is set to false, mozilla will not copy these contents and
-// still share them with Netscape 4.x
-//
-// Advantages of forbidding copy operation:
-//     reduce the disk usage
-//     quick migration
-// Disadvantage of forbidding copy operation:
-//     without perfect lock mechamism, there is possibility of data corruption
-//     when Netscape 4.x and mozilla run at the same time and access the same
-//     mail file at the same time
-#define PREF_MIGRATION_MODE_FOR_MAIL "mail.migration.copyMailFiles"
-
-#define PREF_MAIL_DIRECTORY "mail.directory"
-#define PREF_NEWS_DIRECTORY "news.directory"
-#define PREF_MAIL_IMAP_ROOT_DIR "mail.imap.root_dir"
-#define PREF_NETWORK_HOSTS_POP_SERVER "network.hosts.pop_server"
-#define PREF_4X_NETWORK_HOSTS_IMAP_SERVER "network.hosts.imap_servers"  
-#define PREF_MAIL_SERVER_TYPE	"mail.server_type"
-#define PREF_BROWSER_CACHE_DIRECTORY "browser.cache.directory"
-#define POP_4X_MAIL_TYPE 0
-#define IMAP_4X_MAIL_TYPE 1
-#ifdef HAVE_MOVEMAIL
-#define MOVEMAIL_4X_MAIL_TYPE 2
-#define NEW_MOVEMAIL_DIR_NAME "movemail"
-#endif /* HAVE_MOVEMAIL */
-
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
-/* a 4.x profile on UNIX is rooted at something like
- * "/u/sspitzer/.netscape"
- * profile + OLD_MAIL_DIR_NAME = "/u/sspitzer/.netscape/../nsmail" = "/u/sspitzer/nsmail"
- * profile + OLD_NEWS_DIR_NAME = "/u/sspitzer/.netscape/xover-cache"
- * profile + OLD_IMAPMAIL_DIR_NAME = "/u/sspitzer/.netscape/../ns_imap" = "/u/sspitzer/ns_imap"
- * which is as good as we're going to get for defaults on UNIX.
- */
-#define OLD_MAIL_DIR_NAME "/../nsmail"
-#define OLD_NEWS_DIR_NAME "/xover-cache"
-#define OLD_IMAPMAIL_DIR_NAME "/../ns_imap"
-#else
-#define OLD_MAIL_DIR_NAME "Mail"
-#define OLD_NEWS_DIR_NAME "News"
-#define OLD_IMAPMAIL_DIR_NAME "ImapMail"
-#endif /* XP_UNIX */
-
-#define NEW_DIR_SUFFIX "5"
-
-#define PREF_FILE_NAME_IN_5x "prefs.js"
-
-#define PREF_MIGRATION_PROGRESS_URL "chrome://communicator/content/profile/profileMigrationProgress.xul"
-
-typedef struct
-{
-  const char* oldFile;
-  const char* newFile;
-
-} MigrateProfileItem;
-
-/* 
- * In 4.x the mac cookie file used expiration times starting from
- * 1900 whereas all the other platforms started from
- * 1970.  In 5.0 it was made cross platform so that all platforms use
- * expiration times starting from 1970.  That means that mac cookies 
- * generated in 4.x cannot be migrated to 5.0 as is -- instead the 
- * expiration time must first be decreased by
- * the number of seconds between 1-1-1900 and 1-1-1970
- * 
- *  70 years * 365 days/year * 86,400 secs/day      = 2,207,520,000 seconds
- * + 17 leap years * 86,400 additional sec/leapyear =     1,468,800 seconds
- *                                                  = 2,208,988,800 seconds
- */
-#if defined(XP_MACOSX)
-#define NEED_TO_FIX_4X_COOKIES 1
-#define SECONDS_BETWEEN_1900_AND_1970 2208988800UL
-#endif /* XP_MACOSX */
-
-/*-----------------------------------------------------------------
- * Globals
- *-----------------------------------------------------------------*/
-nsPrefMigration* nsPrefMigration::mInstance = nsnull;
-
-nsPrefMigration *
-nsPrefMigration::GetInstance()
-{
-    if (mInstance == nsnull) 
-    {
-        mInstance = new nsPrefMigration();
-    }
-    return mInstance;
-}
-
-
-
-nsPrefMigration::nsPrefMigration()
-{
-  mErrorCode = NS_OK;
-}
-
-
-
-PRBool ProfilesToMigrateCleanup(void* aElement, void *aData)
-{
-  if (aElement)
-    delete (MigrateProfileItem*)aElement;
-
-  return PR_TRUE;
-}
-
-nsPrefMigration::~nsPrefMigration()
-{
-  mProfilesToMigrate.EnumerateForwards((nsVoidArrayEnumFunc)ProfilesToMigrateCleanup, nsnull);
-  mInstance = nsnull; 
-}
-
-
-
-nsresult
-nsPrefMigration::getPrefService()
-{
-  // get the prefs service
-  nsresult rv = NS_OK;
-
-  nsCOMPtr<nsIPrefBranch> pIMyService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
-  if(NS_FAILED(rv)) return rv;
-
-  return NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD, NS_GET_IID(nsIPrefBranch),
-                              pIMyService, NS_PROXY_SYNC,
-                              getter_AddRefs(m_prefBranch));
-
-}
-
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsPrefMigration, nsIPrefMigration)
-
-NS_IMETHODIMP
-nsPrefMigration::AddProfilePaths(const char * oldProfilePathStr, const char * newProfilePathStr)
-{
-  MigrateProfileItem* item = new MigrateProfileItem();
-  if (!item)
-    return NS_ERROR_OUT_OF_MEMORY;
-
-  item->oldFile = oldProfilePathStr;
-  item->newFile = newProfilePathStr;
-  
-  if (mProfilesToMigrate.AppendElement((void*)item))
-    return NS_OK;
-
-  return NS_ERROR_FAILURE;
-}
-
-
-NS_IMETHODIMP
-nsPrefMigration::ProcessPrefs(PRBool showProgressAsModalWindow)
-{
-  nsresult rv;
-  
-  nsCOMPtr<nsIWindowWatcher> windowWatcher(do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv));
-  if (NS_FAILED(rv)) return rv;
-
-  // WindowWatcher can work with or without parent window
-  rv = windowWatcher->OpenWindow(nsnull,
-                                 PREF_MIGRATION_PROGRESS_URL,
-                                 "_blank",
-                                 "centerscreen,modal,titlebar",
-                                 nsnull,
-                                 getter_AddRefs(mPMProgressWindow));
-  if (NS_FAILED(rv)) return rv;
-
-  return NS_OK;
-}
-
-
-static PRThread* gMigrationThread = nsnull;
-
-
-extern "C" void ProfileMigrationController(void *data)
-{
-  if (!data) return;
-
-  nsPrefMigration* migrator = (nsPrefMigration*)data;
-  nsIPrefMigration* interfaceM = (nsIPrefMigration*)data;
-  PRInt32 index = 0;
-  PRInt32 choice = 0;
-  nsresult rv = NS_OK;
-
-  nsCOMPtr<nsIPrefMigration> prefProxy;
-
-  do {
-    
-    choice = 0;
-    migrator->mErrorCode = 0;
-    MigrateProfileItem* item = nsnull;
-
-    if (migrator->mProfilesToMigrate.Count() != 0)
-      item = (MigrateProfileItem*)migrator->mProfilesToMigrate.ElementAt(index);
-    if (item)
-    {
-        rv = migrator->ProcessPrefsCallback(item->oldFile, item->newFile);
-        if (NS_FAILED(rv))
-        {
-          migrator->mErrorCode = rv;
-#ifdef DEBUG
-          printf("failed to migrate properly.  err=%d\n",rv);
-#endif
-        }
-    }
-    else
-    {
-      migrator->mErrorCode = NS_ERROR_FAILURE;
-      return;
-    }
-
-    nsCOMPtr<nsIPrefMigration> migratorInterface = do_QueryInterface(interfaceM, &rv);
-    if (NS_FAILED(rv))
-    {
-      migrator->mErrorCode = rv;
-      return;
-    }
-
-    if (!prefProxy)
-    {
-        rv = NS_GetProxyForObject(NS_PROXY_TO_MAIN_THREAD,
-                                  NS_GET_IID(nsIPrefMigration),
-                                  migratorInterface, NS_PROXY_SYNC,
-                                  getter_AddRefs(prefProxy));
-        if (NS_FAILED(rv))
-        {
-          migrator->mErrorCode = rv;
-          return;
-        }
-    }
-
-
-    if (migrator->mErrorCode != 0)
-    {
-      if (migrator->mErrorCode == MIGRATION_RETRY)
-      {
-        rv = prefProxy->ShowSpaceDialog(&choice);
-        if (NS_FAILED(rv))
-        {
-          migrator->mErrorCode = rv;
-          return;
-        }
-        choice++;// Increment choice to match the RETRY=1, CANCEL=2 and CREATE_NEW=3 format
-      }
-    }
-
-  } while (choice == MIGRATION_RETRY);
-
-  prefProxy->WindowCloseCallback();
-  migrator->mErrorCode = choice;
-
-}
-
-NS_IMETHODIMP
-nsPrefMigration::WindowCloseCallback()
-{
-  nsCOMPtr<nsPIDOMWindow> window(do_QueryInterface(mPMProgressWindow));
-  if (!window) return NS_ERROR_FAILURE;
-
-  nsCOMPtr<nsIDocShellTreeItem> treeItem =
-    do_QueryInterface(window->GetDocShell());
-  if (!treeItem) return NS_ERROR_FAILURE;
-  nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
-  treeItem->GetTreeOwner(getter_AddRefs(treeOwner));
-  if (!treeOwner) return NS_ERROR_FAILURE;
-  nsCOMPtr<nsIBaseWindow> baseWindow(do_QueryInterface(treeOwner));
-  if (baseWindow)
-    baseWindow->Destroy();
-   
-#ifdef DEBUG
-   printf("end of pref migration\n");
-#endif
-   return NS_OK;
-}
-
-
-NS_IMETHODIMP
-nsPrefMigration::ShowSpaceDialog(PRInt32 *choice)
-{
-  nsresult rv;
-  nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
-  if (NS_FAILED(rv)) return rv;
-
-  nsCOMPtr<nsIStringBundle> bundle;
-  rv = bundleService->CreateBundle(MIGRATION_PROPERTIES_URL, getter_AddRefs(bundle));
-  if (NS_FAILED(rv)) return rv;
-
-  nsXPIDLString noSpaceTitle, noSpaceText, retryLabel, createNewLabel;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("noSpace.title").get(), getter_Copies(noSpaceTitle));
-  if (NS_FAILED(rv)) return rv;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("noSpace.text").get(), getter_Copies(noSpaceText));
-  if (NS_FAILED(rv)) return rv;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("retry.label").get(), getter_Copies(retryLabel));
-  if (NS_FAILED(rv)) return rv;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("createNew.label").get(), getter_Copies(createNewLabel));
-  if (NS_FAILED(rv)) return rv;
-
-  nsCOMPtr<nsIPromptService> promptService = do_GetService(NS_PROMPTSERVICE_CONTRACTID, &rv);
-  if (NS_FAILED(rv)) return rv;
-
-  const PRUint32 buttons =
-    (nsIPromptService::BUTTON_TITLE_IS_STRING * nsIPromptService::BUTTON_POS_0)+
-    (nsIPromptService::BUTTON_TITLE_CANCEL * nsIPromptService::BUTTON_POS_1)+
-    (nsIPromptService::BUTTON_TITLE_IS_STRING * nsIPromptService::BUTTON_POS_2);
-  return promptService->ConfirmEx(mPMProgressWindow, noSpaceTitle, noSpaceText,
-                                  buttons, retryLabel, nsnull, createNewLabel,
-                                  nsnull, nsnull, choice);
-}
-
-
-NS_IMETHODIMP
-nsPrefMigration::ProcessPrefsFromJS()  // called via js so that we can have progress bar that show up.
-{
-  gMigrationThread = PR_CreateThread(PR_USER_THREAD,
-                                     ProfileMigrationController,
-                                     this, 
-                                     PR_PRIORITY_NORMAL, 
-                                     PR_GLOBAL_THREAD, 
-                                     PR_UNJOINABLE_THREAD,
-                                     0);  
-  return NS_OK;
-}  
-    
-
-NS_IMETHODIMP
-nsPrefMigration::GetError()
-{
-  return mErrorCode;
-}
-
-nsresult
-nsPrefMigration::ConvertPersistentStringToFileSpec(const char *str, nsIFileSpec *path)
-{
-	nsresult rv;
-	if (!str || !path) return NS_ERROR_NULL_POINTER;
-	
-	rv = path->SetPersistentDescriptorString(str);
-	return rv;
-}
-     
-/*--------------------------------------------------------------------------
- * ProcessPrefsCallback is the primary funtion for the class nsPrefMigration.
- *
- * Called by: The Profile Manager (nsProfile.cpp)
- * INPUT: The specific profile path (prefPath) and the 5.0 installed path
- * OUTPUT: The modified 5.0 prefs files
- * RETURN: Success or a failure code
- *
- *-------------------------------------------------------------------------*/
-nsresult
-nsPrefMigration::ProcessPrefsCallback(const char* oldProfilePathStr, const char * newProfilePathStr)
-{ 
-  nsresult rv;
-  
-  nsCOMPtr<nsIFileSpec> oldProfilePath;
-  nsCOMPtr<nsIFileSpec> newProfilePath; 
-  nsCOMPtr<nsIFileSpec> oldPOPMailPath;
-  nsCOMPtr<nsIFileSpec> newPOPMailPath;
-  nsCOMPtr<nsIFileSpec> oldIMAPMailPath;
-  nsCOMPtr<nsIFileSpec> newIMAPMailPath;
-  nsCOMPtr<nsIFileSpec> oldIMAPLocalMailPath;
-  nsCOMPtr<nsIFileSpec> newIMAPLocalMailPath;
-  nsCOMPtr<nsIFileSpec> oldNewsPath;
-  nsCOMPtr<nsIFileSpec> newNewsPath;
-  nsCOMPtr<nsILocalFile> newPrefsFile;
-#ifdef HAVE_MOVEMAIL
-  nsCOMPtr<nsIFileSpec> oldMOVEMAILMailPath;
-  nsCOMPtr<nsIFileSpec> newMOVEMAILMailPath;
-#endif /* HAVE_MOVEMAIL */
-  PRBool exists                  = PR_FALSE, 
-         enoughSpace             = PR_TRUE,
-         localMailDriveDefault   = PR_FALSE,
-         summaryMailDriveDefault = PR_FALSE,
-         newsDriveDefault        = PR_FALSE,
-         copyMailFileInMigration = PR_TRUE;
-
-  nsFileSpec localMailSpec,
-             summaryMailSpec,
-             newsSpec, 
-             oldProfileSpec, newProfileSpec;
-
-  PRInt32 serverType = POP_4X_MAIL_TYPE; 
-  char *popServerName = nsnull;
-
-  PRUint32 totalLocalMailSize = 0,
-           totalSummaryFileSize = 0,
-           totalNewsSize = 0, 
-           totalProfileSize = 0,
-           totalRequired = 0;
-
-
-  PRInt64  localMailDrive   = LL_Zero(),
-           summaryMailDrive = LL_Zero(),
-           newsDrive        = LL_Zero(),
-           profileDrive     = LL_Zero();
-
-  PRInt64  DriveID[MAX_DRIVES];
-  PRUint32 SpaceRequired[MAX_DRIVES];
-  
-#if defined(NS_DEBUG)
-  printf("*Entered Actual Migration routine*\n");
-#endif
-
-  for (int i=0; i < MAX_DRIVES; i++)
-  {
-    DriveID[i] = LL_Zero();
-    SpaceRequired[i] = 0;
-  }
-  
-  rv = getPrefService();
-  if (NS_FAILED(rv)) return rv;
-
-  rv = NS_NewFileSpec(getter_AddRefs(oldProfilePath));
-  if (NS_FAILED(rv)) return rv;
-  rv = NS_NewFileSpec(getter_AddRefs(newProfilePath));
-  if (NS_FAILED(rv)) return rv;
-      
-  rv = ConvertPersistentStringToFileSpec(oldProfilePathStr, oldProfilePath);
-  if (NS_FAILED(rv)) return rv;
-  rv = ConvertPersistentStringToFileSpec(newProfilePathStr, newProfilePath);
-  if (NS_FAILED(rv)) return rv;
-
-  oldProfilePath->GetFileSpec(&oldProfileSpec);
-  newProfilePath->GetFileSpec(&newProfileSpec);
-  
-
-  /* initialize prefs with the old prefs.js file (which is a copy of the 4.x preferences file) */
-  nsCOMPtr<nsIFileSpec> PrefsFile4x;
-
-  //Get the location of the 4.x prefs file
-  rv = NS_NewFileSpec(getter_AddRefs(PrefsFile4x));
-  if (NS_FAILED(rv)) return rv;
-  
-  rv = PrefsFile4x->FromFileSpec(oldProfilePath);
-  if (NS_FAILED(rv)) return rv;
-
-  rv = PrefsFile4x->AppendRelativeUnixPath(PREF_FILE_NAME_IN_4x);
-  if (NS_FAILED(rv)) return rv;
-
-  //Need to convert PrefsFile4x to an IFile in order to copy it to a 
-  //unique name in the system temp directory.
-  nsFileSpec PrefsFile4xAsFileSpec;
-  rv = PrefsFile4x->GetFileSpec(&PrefsFile4xAsFileSpec);
-  if (NS_FAILED(rv)) return rv;
-  
-  nsCOMPtr<nsILocalFile> PrefsFile4xAsIFile;
-  rv = NS_FileSpecToIFile(&PrefsFile4xAsFileSpec,
-                     getter_AddRefs(PrefsFile4xAsIFile));
-  if (NS_FAILED(rv)) return rv;
-
-  nsCOMPtr<nsIFile> systemTempDir;
-  rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(systemTempDir));
-  if (NS_FAILED(rv)) return rv;
-
-  systemTempDir->AppendNative(NS_LITERAL_CSTRING("migrate"));
-  
-  //Create a unique directory in the system temp dir based on the name of the 4.x prefs file
-  rv = systemTempDir->CreateUnique(nsIFile::DIRECTORY_TYPE, 0700); 
-  if (NS_FAILED(rv)) return rv;
-
-  rv = PrefsFile4xAsIFile->CopyToNative(systemTempDir, NS_LITERAL_CSTRING(PREF_FILE_NAME_IN_4x));
-  if (NS_FAILED(rv)) return rv;
-  
-  nsCOMPtr<nsIFile> cloneFile;
-  rv = systemTempDir->Clone(getter_AddRefs(cloneFile));
-  if (NS_FAILED(rv)) return rv;
-
-  m_prefsFile = do_QueryInterface(cloneFile, &rv);
-  if (NS_FAILED(rv)) return rv;
-
-  rv = m_prefsFile->AppendNative(NS_LITERAL_CSTRING(PREF_FILE_NAME_IN_4x));
-  if (NS_FAILED(rv)) return rv;
-
-  nsCOMPtr<nsIPrefService> psvc(do_QueryInterface(m_prefBranch));
-
-  //Clear the prefs in case a previous set was read in.
-  psvc->ResetPrefs();
-
-  //Now read the prefs from the prefs file in the system directory
-  psvc->ReadUserPrefs(m_prefsFile);
-
-  //
-  // Start computing the sizes required for migration
-  //
-  rv = GetSizes(oldProfileSpec, PR_FALSE, &totalProfileSize);
-  profileDrive = newProfileSpec.GetDiskSpaceAvailable();
-
-  rv = m_prefBranch->GetIntPref(PREF_MAIL_SERVER_TYPE, &serverType);
-  if (NS_FAILED(rv)) return rv;
-
-  // get the migration mode for mail
-  rv = m_prefBranch->GetBoolPref(PREF_MIGRATION_MODE_FOR_MAIL,
-                                 &copyMailFileInMigration);
-  if (NS_FAILED(rv))
-    return rv;
-
-  if (serverType == POP_4X_MAIL_TYPE) {
-    summaryMailDriveDefault = PR_TRUE; //summary files are only used in IMAP so just set it to true here.
-    summaryMailDrive = profileDrive;   //just set the drive for summary files to be the same as the new profile
-
-    rv = NS_NewFileSpec(getter_AddRefs(newPOPMailPath));
-    if (NS_FAILED(rv)) return rv;
-
-    rv = NS_NewFileSpec(getter_AddRefs(oldPOPMailPath));
-    if (NS_FAILED(rv)) return rv;
-    
-    rv = GetDirFromPref(oldProfilePath,newProfilePath,NEW_MAIL_DIR_NAME, PREF_MAIL_DIRECTORY, newPOPMailPath, oldPOPMailPath);
-    if (NS_FAILED(rv)) {
-      rv = DetermineOldPath(oldProfilePath, OLD_MAIL_DIR_NAME, "mailDirName", oldPOPMailPath);
-      if (NS_FAILED(rv)) return rv;
-
-      rv = SetPremigratedFilePref(PREF_MAIL_DIRECTORY, oldPOPMailPath);
-      if (NS_FAILED(rv)) return rv;
-
-      rv = newPOPMailPath->FromFileSpec(newProfilePath);
-      if (NS_FAILED(rv)) return rv;
-
-      localMailDriveDefault = PR_TRUE;
-    }
-    oldPOPMailPath->GetFileSpec(&localMailSpec);
-    rv = GetSizes(localMailSpec, PR_TRUE, &totalLocalMailSize);
-    localMailDrive = localMailSpec.GetDiskSpaceAvailable();
-  }
-  else if(serverType == IMAP_4X_MAIL_TYPE) {
-    rv = NS_NewFileSpec(getter_AddRefs(newIMAPLocalMailPath));
-    if (NS_FAILED(rv)) return rv;
-      
-    rv = NS_NewFileSpec(getter_AddRefs(oldIMAPLocalMailPath));
-    if (NS_FAILED(rv)) return rv;
-        
-    /* First get the actual 4.x "Local Mail" files location */
-    rv = GetDirFromPref(oldProfilePath,newProfilePath, NEW_MAIL_DIR_NAME, PREF_MAIL_DIRECTORY, newIMAPLocalMailPath, oldIMAPLocalMailPath);
-    if (NS_FAILED(rv)) {
-      rv = DetermineOldPath(oldProfilePath, OLD_MAIL_DIR_NAME, "mailDirName", oldIMAPLocalMailPath);
-      if (NS_FAILED(rv)) return rv;
-
-      rv = SetPremigratedFilePref(PREF_MAIL_DIRECTORY, oldIMAPLocalMailPath);
-      if (NS_FAILED(rv)) return rv;
-
-      rv = newIMAPLocalMailPath->FromFileSpec(newProfilePath);
-      if (NS_FAILED(rv)) return rv;
-      
-      localMailDriveDefault = PR_TRUE;
-    }
-
-    oldIMAPLocalMailPath->GetFileSpec(&localMailSpec);
-    rv = GetSizes(localMailSpec, PR_TRUE, &totalLocalMailSize);
-    localMailDrive = localMailSpec.GetDiskSpaceAvailable();
-
-    /* Next get IMAP mail summary files location */
-    rv = NS_NewFileSpec(getter_AddRefs(newIMAPMailPath));
-    if (NS_FAILED(rv)) return rv;
-    
-    rv = NS_NewFileSpec(getter_AddRefs(oldIMAPMailPath));
-    if (NS_FAILED(rv)) return rv;
-
-    rv = GetDirFromPref(oldProfilePath,newProfilePath, NEW_IMAPMAIL_DIR_NAME, PREF_MAIL_IMAP_ROOT_DIR,newIMAPMailPath,oldIMAPMailPath);
-    if (NS_FAILED(rv)) {
-      rv = oldIMAPMailPath->FromFileSpec(oldProfilePath);
-      if (NS_FAILED(rv)) return rv;
-        
-      /* we didn't over localize "ImapMail" in 4.x, so this is all we have to do */
-      rv = oldIMAPMailPath->AppendRelativeUnixPath(OLD_IMAPMAIL_DIR_NAME);
-      if (NS_FAILED(rv)) return rv;
-
-      rv = SetPremigratedFilePref(PREF_MAIL_IMAP_ROOT_DIR, oldIMAPMailPath);
-      if (NS_FAILED(rv)) return rv;   
-      
-      rv = newIMAPMailPath->FromFileSpec(newProfilePath);
-      if (NS_FAILED(rv)) return rv;
-
-      summaryMailDriveDefault = PR_TRUE;
-    }
-
-    oldIMAPMailPath->GetFileSpec(&summaryMailSpec);
-    rv = GetSizes(summaryMailSpec, PR_TRUE, &totalSummaryFileSize);
-    summaryMailDrive = summaryMailSpec.GetDiskSpaceAvailable();
-  }   
-
-#ifdef HAVE_MOVEMAIL
-  else if (serverType == MOVEMAIL_4X_MAIL_TYPE) {
-    
-    summaryMailDriveDefault = PR_TRUE;
-    summaryMailDrive = profileDrive;
-
-    rv = NS_NewFileSpec(getter_AddRefs(newMOVEMAILMailPath));
-    if (NS_FAILED(rv)) return rv;
-
-    rv = NS_NewFileSpec(getter_AddRefs(oldMOVEMAILMailPath));
-    if (NS_FAILED(rv)) return rv;
-    
-    rv = GetDirFromPref(oldProfilePath,newProfilePath,NEW_MAIL_DIR_NAME, PREF_MAIL_DIRECTORY, newMOVEMAILMailPath, oldMOVEMAILMailPath);
-    if (NS_FAILED(rv)) {
-      rv = oldMOVEMAILMailPath->FromFileSpec(oldProfilePath);
-      if (NS_FAILED(rv)) return rv;
-
-      /* we didn't over localize this in 4.x, so this is all we have to do */
-      rv = oldMOVEMAILMailPath->AppendRelativeUnixPath(OLD_MAIL_DIR_NAME);
-      if (NS_FAILED(rv)) return rv;
-      
-      rv = SetPremigratedFilePref(PREF_MAIL_DIRECTORY, oldMOVEMAILMailPath);
-      if (NS_FAILED(rv)) return rv;
-
-      rv = newMOVEMAILMailPath->FromFileSpec(newProfilePath);
-      if (NS_FAILED(rv)) return rv;
-
-      localMailDriveDefault = PR_TRUE;
-    }
-    oldMOVEMAILMailPath->GetFileSpec(&localMailSpec);
-    rv = GetSizes(localMailSpec, PR_TRUE, &totalLocalMailSize);
-
-    localMailDrive = localMailSpec.GetDiskSpaceAvailable();
-   
-  }    
-#endif //HAVE_MOVEMAIL
-
-    ////////////////////////////////////////////////////////////////////////////
-    // Now get the NEWS disk space requirements for migration.
-    ////////////////////////////////////////////////////////////////////////////
-    rv = NS_NewFileSpec(getter_AddRefs(newNewsPath));
-    if (NS_FAILED(rv)) return rv;
-    
-    rv = NS_NewFileSpec(getter_AddRefs(oldNewsPath));
-    if (NS_FAILED(rv)) return rv;
-    
-    rv = GetDirFromPref(oldProfilePath,newProfilePath, NEW_NEWS_DIR_NAME, PREF_NEWS_DIRECTORY, newNewsPath,oldNewsPath);
-    if (NS_FAILED(rv)) {
-      rv = DetermineOldPath(oldProfilePath, OLD_NEWS_DIR_NAME, "newsDirName", oldNewsPath);
-      if (NS_FAILED(rv)) return rv;
-
-      rv = SetPremigratedFilePref(PREF_NEWS_DIRECTORY, oldNewsPath);
-      if (NS_FAILED(rv)) return rv; 
-
-      rv = newNewsPath->FromFileSpec(newProfilePath);
-      if (NS_FAILED(rv)) return rv;
-
-      newsDriveDefault = PR_TRUE;
-    }
-    oldNewsPath->GetFileSpec(&newsSpec);
-    rv = GetSizes(newsSpec, PR_TRUE, &totalNewsSize);
-    newsDrive = newsSpec.GetDiskSpaceAvailable();
-
-    // 
-    // Compute the space needed to migrate the profile
-    //
-    if(newsDriveDefault && localMailDriveDefault && summaryMailDriveDefault) // DEFAULT: All on the same drive
-    {
-      totalRequired = totalNewsSize + totalLocalMailSize + totalSummaryFileSize + totalProfileSize;
-      rv = ComputeSpaceRequirements(DriveID, SpaceRequired, profileDrive, totalRequired);
-      if (NS_FAILED(rv))
-        enoughSpace = PR_FALSE;
-    }
-    else
-    {
-      rv = ComputeSpaceRequirements(DriveID, SpaceRequired, profileDrive, totalProfileSize);
-      if (NS_FAILED(rv))
-        enoughSpace = PR_FALSE;
-      rv = ComputeSpaceRequirements(DriveID, SpaceRequired, localMailDrive, totalLocalMailSize);
-      if (NS_FAILED(rv))
-        enoughSpace = PR_FALSE;
-      rv = ComputeSpaceRequirements(DriveID, SpaceRequired, summaryMailDrive, totalSummaryFileSize);
-      if (NS_FAILED(rv))
-        enoughSpace = PR_FALSE;
-      rv = ComputeSpaceRequirements(DriveID, SpaceRequired, newsDrive, totalNewsSize);
-      if (NS_FAILED(rv))
-        enoughSpace = PR_FALSE;
-    }
-
-    if (!enoughSpace)
-    {
-      mErrorCode = MIGRATION_RETRY; 
-      return NS_OK;
-    }
-
-  ////////////////////////////////////////////////////////////////////////////
-  // If we reached this point, there is enough room to do a migration.
-  // Start creating directories and setting new pref values.
-  ////////////////////////////////////////////////////////////////////////////
-
-  /* Create the new profile tree for 5.x */
-  rv = CreateNewUser5Tree(oldProfilePath, newProfilePath);
-  if (NS_FAILED(rv)) return rv;
-
-  
-  if (serverType == POP_4X_MAIL_TYPE) {
-
-    rv = newPOPMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newPOPMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    rv = newPOPMailPath->AppendRelativeUnixPath(NEW_MAIL_DIR_NAME);
-    if (NS_FAILED(rv)) return rv;
- 
-    rv = newPOPMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newPOPMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    {
-      // temporarily go through nsFileSpec
-      nsFileSpec newPOPMailPathSpec;
-      newPOPMailPath->GetFileSpec(&newPOPMailPathSpec);
-      
-      nsCOMPtr<nsILocalFile> newPOPMailPathFile;
-      NS_FileSpecToIFile(&newPOPMailPathSpec,
-                         getter_AddRefs(newPOPMailPathFile));
-      
-      rv = m_prefBranch->SetComplexValue(PREF_MAIL_DIRECTORY,
-                                         NS_GET_IID(nsILocalFile),
-                                         newPOPMailPathFile);
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    m_prefBranch->GetCharPref(PREF_NETWORK_HOSTS_POP_SERVER, &popServerName);
-
-    nsCAutoString popServerNamewithoutPort(popServerName);
-    PRInt32 colonPos = popServerNamewithoutPort.FindChar(':');
-
-    if (colonPos != -1 ) {
-	popServerNamewithoutPort.Truncate(colonPos);
-	rv = newPOPMailPath->AppendRelativeUnixPath(popServerNamewithoutPort.get());
-    }
-    else {
-	rv = newPOPMailPath->AppendRelativeUnixPath(popServerName);
-    }
-
-    if (NS_FAILED(rv)) return rv;				  
-    
-    rv = newPOPMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newPOPMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-  }
-  else if (serverType == IMAP_4X_MAIL_TYPE) {
-   if( copyMailFileInMigration )  // copy mail files in migration 
-   {
-    rv = newIMAPLocalMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newIMAPLocalMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-      
-    rv = newIMAPLocalMailPath->AppendRelativeUnixPath(NEW_MAIL_DIR_NAME);
-    if (NS_FAILED(rv)) return rv;
-
-    /* Now create the new "Mail/Local Folders" directory */
-    rv = newIMAPLocalMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      newIMAPLocalMailPath->CreateDir();
-    }
-
-    {
-      // temporarily go through nsFileSpec
-      nsFileSpec newIMAPLocalMailPathSpec;
-      newIMAPLocalMailPath->GetFileSpec(&newIMAPLocalMailPathSpec);
-      
-      nsCOMPtr<nsILocalFile> newIMAPLocalMailPathFile;
-      NS_FileSpecToIFile(&newIMAPLocalMailPathSpec,
-                         getter_AddRefs(newIMAPLocalMailPathFile));
-      
-      rv = m_prefBranch->SetComplexValue(PREF_MAIL_DIRECTORY,
-                                         NS_GET_IID(nsILocalFile),
-                                         newIMAPLocalMailPathFile);
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    rv = newIMAPLocalMailPath->AppendRelativeUnixPath(NEW_LOCAL_MAIL_DIR_NAME);
-    if (NS_FAILED(rv)) return rv;
-    rv = newIMAPLocalMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newIMAPLocalMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    /* Now deal with the IMAP mail summary file location */
-    rv = newIMAPMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newIMAPMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    rv = newIMAPMailPath->AppendRelativeUnixPath(NEW_IMAPMAIL_DIR_NAME);
-    if (NS_FAILED(rv)) return rv;
-
-    rv = newIMAPMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newIMAPMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    {
-      // temporarily go through nsFileSpec
-      nsFileSpec newIMAPMailPathSpec;
-      newIMAPMailPath->GetFileSpec(&newIMAPMailPathSpec);
-      
-      nsCOMPtr<nsILocalFile> newIMAPMailPathFile;
-      NS_FileSpecToIFile(&newIMAPMailPathSpec,
-                         getter_AddRefs(newIMAPMailPathFile));
-      
-      rv = m_prefBranch->SetComplexValue(PREF_MAIL_IMAP_ROOT_DIR,
-                                         NS_GET_IID(nsILocalFile),
-                                         newIMAPMailPathFile);
-      if (NS_FAILED(rv)) return rv;
-    }
-   }
-   else
-   {
-    {
-      // temporarily go through nsFileSpec
-      nsFileSpec oldIMAPLocalMailPathSpec;
-      oldIMAPLocalMailPath->GetFileSpec(&oldIMAPLocalMailPathSpec);
-
-      nsCOMPtr<nsILocalFile> oldIMAPLocalMailPathFile;
-      NS_FileSpecToIFile(&oldIMAPLocalMailPathSpec,
-                         getter_AddRefs(oldIMAPLocalMailPathFile));
-
-      rv = m_prefBranch->SetComplexValue(PREF_MAIL_DIRECTORY,
-                                         NS_GET_IID(nsILocalFile),
-                                         oldIMAPLocalMailPathFile);
-      if (NS_FAILED(rv)) return rv;
-    }
-    {
-      // temporarily go through nsFileSpec
-      nsFileSpec oldIMAPMailPathSpec;
-      oldIMAPMailPath->GetFileSpec(&oldIMAPMailPathSpec);
-
-      nsCOMPtr<nsILocalFile> oldIMAPMailPathFile;
-      NS_FileSpecToIFile(&oldIMAPMailPathSpec,
-                         getter_AddRefs(oldIMAPMailPathFile));
-
-      rv = m_prefBranch->SetComplexValue(PREF_MAIL_IMAP_ROOT_DIR,
-                                         NS_GET_IID(nsILocalFile),
-                                         oldIMAPMailPathFile);
-      if (NS_FAILED(rv)) return rv;
-    }
-   }
-  }
-
-#ifdef HAVE_MOVEMAIL
-  else if (serverType == MOVEMAIL_4X_MAIL_TYPE) {
-
-    rv = newMOVEMAILMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newMOVEMAILMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    rv = newMOVEMAILMailPath->AppendRelativeUnixPath(NEW_MAIL_DIR_NAME);
-    if (NS_FAILED(rv)) return rv;
-
-    rv = newMOVEMAILMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newMOVEMAILMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    {
-      // temporarily go through nsFileSpec
-      nsFileSpec newMOVEMAILPathSpec;
-      newMOVEMAILMailPath->GetFileSpec(&newMOVEMAILPathSpec);
-      
-      nsCOMPtr<nsILocalFile> newMOVEMAILPathFile;
-      NS_FileSpecToIFile(&newMOVEMAILPathSpec,
-                         getter_AddRefs(newMOVEMAILPathFile));
-      
-      rv = m_prefBranch->SetComplexValue(PREF_MAIL_DIRECTORY,
-                                         NS_GET_IID(nsILocalFile),
-                                         newMOVEMAILPathFile); 
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    rv = newMOVEMAILMailPath->AppendRelativeUnixPath(NEW_MOVEMAIL_DIR_NAME);
-    if (NS_FAILED(rv)) return rv;
-
-    rv = newMOVEMAILMailPath->Exists(&exists);
-    if (NS_FAILED(rv)) return rv;
-    if (!exists)  {
-      rv = newMOVEMAILMailPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-    rv = NS_OK;
-  }
-#endif /* HAVE_MOVEMAIL */
-  else {
-    NS_ASSERTION(0,"failure, didn't recognize your mail server type.\n");
-    return NS_ERROR_UNEXPECTED;
-  }
-  
-  ////////////////////////////////////////////////////////////////////////////
-  // Set all the appropriate NEWS prefs.
-  ////////////////////////////////////////////////////////////////////////////
-
-  rv = newNewsPath->Exists(&exists);
-  if (NS_FAILED(rv)) return rv;
-  if (!exists)  {
-    rv = newNewsPath->CreateDir();
-    if (NS_FAILED(rv)) return rv;
-  }
-
-  rv = newNewsPath->AppendRelativeUnixPath(NEW_NEWS_DIR_NAME);
-  if (NS_FAILED(rv)) return rv;
-
-  rv = newNewsPath->Exists(&exists);
-  if (NS_FAILED(rv)) return rv;
-  if (!exists)  {
-    rv = newNewsPath->CreateDir();
-    if (NS_FAILED(rv)) return rv;
-  }
-
-  {
-    // temporarily go through nsFileSpec
-    nsFileSpec newNewsPathSpec;
-    newNewsPath->GetFileSpec(&newNewsPathSpec);
-    
-    nsCOMPtr<nsILocalFile> newNewsPathFile;
-    NS_FileSpecToIFile(&newNewsPathSpec,
-                       getter_AddRefs(newNewsPathFile));
-    
-    rv = m_prefBranch->SetComplexValue(PREF_NEWS_DIRECTORY,
-                                       NS_GET_IID(nsILocalFile),
-                                       newNewsPathFile); 
-    if (NS_FAILED(rv)) return rv;
-  }
-
-  PRBool needToRenameFilterFiles;
-  if (PL_strcmp(IMAP_MAIL_FILTER_FILE_NAME_IN_4x,IMAP_MAIL_FILTER_FILE_NAME_IN_5x)) {
-#ifdef IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x
-    // if we defined a format, the filter files don't live in the host directories
-    // (mac does this.)  we'll take care of those filter files later, in DoSpecialUpdates()
-    needToRenameFilterFiles = PR_FALSE;
-#else
-    needToRenameFilterFiles = PR_TRUE;
-#endif /* IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x */
-  }
-  else {
-    // if the name was the same in 4x as in 5x, no need to rename it
-    needToRenameFilterFiles = PR_FALSE;
-  }
-  
-  // just copy what we need
-  rv = DoTheCopy(oldProfilePath, newProfilePath, COOKIES_FILE_NAME_IN_4x);
-  if (NS_FAILED(rv)) return rv;
-  rv = DoTheCopy(oldProfilePath, newProfilePath, BOOKMARKS_FILE_NAME_IN_4x);
-  if (NS_FAILED(rv)) return rv;
-#if defined(XP_MACOSX)
-  rv = DoTheCopy(oldProfilePath, newProfilePath, SECURITY_PATH, PR_TRUE);
-  if (NS_FAILED(rv)) return rv;
-#else
-  rv = DoTheCopy(oldProfilePath, newProfilePath, PSM_CERT7_DB);
-  if (NS_FAILED(rv)) return rv;
-  rv = DoTheCopy(oldProfilePath, newProfilePath, PSM_KEY3_DB);
-  if (NS_FAILED(rv)) return rv;
-  rv = DoTheCopy(oldProfilePath, newProfilePath, PSM_SECMODULE_DB);
-  if (NS_FAILED(rv)) return rv;
-#endif /* XP_MACOSX */
-
-#if defined(XP_MACOSX)
-  // Copy the Mac filter rule files which sits at the top level dir of a 4.x profile.
-  if(serverType == IMAP_4X_MAIL_TYPE) {
-    rv = CopyFilesByPattern(oldProfilePath, newProfilePath, MAC_RULES_FILE_ENDING_STRING_IN_4X);
-    NS_ENSURE_SUCCESS(rv,rv);
-  }
-#endif
-
-  rv = DoTheCopy(oldNewsPath, newNewsPath, PR_TRUE);
-  if (NS_FAILED(rv)) return rv;
-
-#ifdef NEED_TO_COPY_AND_RENAME_NEWSRC_FILES
-  /* in 4.x, the newsrc files were in $HOME.  Now that we can have multiple
-   * profiles in 5.x, with the same user, this won't fly.
-   * when they migrate, we need to copy from $HOME/.newsrc-<host> to
-   * ~/.mozilla/<profile>/News/newsrc-<host>
-   */
-  rv = CopyAndRenameNewsrcFiles(newNewsPath);
-  if (NS_FAILED(rv)) return rv;
-#endif /* NEED_TO_COPY_AND_RENAME_NEWSRC_FILES */
-
-  if (serverType == IMAP_4X_MAIL_TYPE) {
-    if( copyMailFileInMigration )  // copy mail files in migration
-    {
-    rv = DoTheCopyAndRename(oldIMAPMailPath, newIMAPMailPath, PR_TRUE, needToRenameFilterFiles, IMAP_MAIL_FILTER_FILE_NAME_IN_4x, IMAP_MAIL_FILTER_FILE_NAME_IN_5x);
-    if (NS_FAILED(rv)) return rv;
-    rv = DoTheCopyAndRename(oldIMAPLocalMailPath, newIMAPLocalMailPath, PR_TRUE, needToRenameFilterFiles,IMAP_MAIL_FILTER_FILE_NAME_IN_4x,IMAP_MAIL_FILTER_FILE_NAME_IN_5x);
-    if (NS_FAILED(rv)) return rv;
-    }
-    else  // Copy & Rename filter files
-    {
-      // IMAP path
-      // don't care if this fails
-      (void)DoTheCopyAndRename(oldIMAPMailPath, PR_TRUE, IMAP_MAIL_FILTER_FILE_NAME_IN_4x, IMAP_MAIL_FILTER_FILE_NAME_IN_5x);
-      
-      // Local Folders path
-      // don't care if this fails
-      (void)DoTheCopyAndRename(oldIMAPLocalMailPath, PR_TRUE, IMAP_MAIL_FILTER_FILE_NAME_IN_4x, IMAP_MAIL_FILTER_FILE_NAME_IN_5x);
-    }
-  }
-  else if (serverType == POP_4X_MAIL_TYPE) {
-    // fix for bug #202010
-    // copy over the pop filter and popstate files now
-    // and later, in DoSpecialUpdates()
-    // we'll move and rename them
-#ifdef POP_MAIL_FILTER_FILE_NAME_IN_4x
-    rv = DoTheCopy(oldProfilePath, newProfilePath, POP_MAIL_FILTER_FILE_NAME_IN_4x);
-    if (NS_FAILED(rv)) return rv;
-#endif
-    
-#ifdef POPSTATE_FILE_IN_4x 
-    rv = DoTheCopy(oldProfilePath, newProfilePath, POPSTATE_FILE_IN_4x);
-    if (NS_FAILED(rv)) return rv;
-#endif
-    
-    rv = DoTheCopy(oldPOPMailPath, newPOPMailPath, PR_TRUE);
-    if (NS_FAILED(rv)) return rv;
-  }
-#ifdef HAVE_MOVEMAIL
-  else if (serverType == MOVEMAIL_4X_MAIL_TYPE) {
-    // in 4.x, the movemail filter name was the same as the pop filter name
-    // copy over the filter file now
-    // and later, in DoSpecialUpdates()
-    // we'll move and rename them
-    rv = DoTheCopy(oldProfilePath, newProfilePath, POP_MAIL_FILTER_FILE_NAME_IN_4x);
-    if (NS_FAILED(rv)) return rv;
-    
-    rv = DoTheCopy(oldMOVEMAILMailPath, newMOVEMAILMailPath, PR_TRUE);
-  }
-#endif /* HAVE_MOVEMAIL */
-  else {
-    NS_ASSERTION(0, "unknown mail server type!");
-    return NS_ERROR_FAILURE;
-  }
-  
-  // Don't inherit the 4.x cache file location for mozilla!
-  // The cache pref later gets set with a default in nsAppRunner::InitCachePrefs().
-  m_prefBranch->ClearUserPref(PREF_BROWSER_CACHE_DIRECTORY);
-
-  rv = DoSpecialUpdates(newProfilePath);
-  if (NS_FAILED(rv)) return rv;
-  PR_FREEIF(popServerName);
-
-  nsXPIDLCString path;
-
-  newProfilePath->GetNativePath(getter_Copies(path));
-  NS_NewNativeLocalFile(path, PR_TRUE, getter_AddRefs(newPrefsFile));
-
-  rv = newPrefsFile->AppendNative(NS_LITERAL_CSTRING(PREF_FILE_NAME_IN_5x));
-  if (NS_FAILED(rv)) return rv;
-
-  rv=psvc->SavePrefFile(newPrefsFile);
-  if (NS_FAILED(rv)) return rv;
-  rv=psvc->ResetPrefs();
-  if (NS_FAILED(rv)) return rv;
-
-  PRBool flagExists = PR_FALSE;
-  m_prefsFile->Exists(&flagExists); //Delete the prefs.js file in the temp directory.
-  if (flagExists)
-    m_prefsFile->Remove(PR_FALSE);
-  
-  systemTempDir->Exists(&flagExists); //Delete the unique dir in the system temp dir.
-  if (flagExists)
-    systemTempDir->Remove(PR_FALSE);
-
-  return rv;
-}
-
-
-/*----------------------------------------------------------------------------
- * CreateNewUsers5Tree creates the directory called users5 (parent of the
- * of the profile directories) and the profile directory itself
- *---------------------------------------------------------------------------*/
-
-nsresult
-nsPrefMigration::CreateNewUser5Tree(nsIFileSpec * oldProfilePath, nsIFileSpec * newProfilePath)
-{
-  nsresult rv;
-  PRBool exists;
-  
-  NS_ASSERTION(*PREF_FILE_NAME_IN_4x, "don't know how to migrate your platform");
-  if (!*PREF_FILE_NAME_IN_4x) {
-    return NS_ERROR_UNEXPECTED;
-  }
-      
-  /* Copy the old prefs file to the new profile directory for modification and reading.  
-     after copying it, rename it to pref.js, the 5.x pref file name on all platforms */
-  nsCOMPtr<nsIFileSpec> oldPrefsFile;
-  rv = NS_NewFileSpec(getter_AddRefs(oldPrefsFile)); 
-  if (NS_FAILED(rv)) return rv;
-  
-  rv = oldPrefsFile->FromFileSpec(oldProfilePath);
-  if (NS_FAILED(rv)) return rv;
-  
-  rv = oldPrefsFile->AppendRelativeUnixPath(PREF_FILE_NAME_IN_4x);
-  if (NS_FAILED(rv)) return rv;
-
-
-  /* the new prefs file */
-  nsCOMPtr<nsIFileSpec> newPrefsFile;
-  rv = NS_NewFileSpec(getter_AddRefs(newPrefsFile)); 
-  if (NS_FAILED(rv)) return rv;
-  
-  rv = newPrefsFile->FromFileSpec(newProfilePath);
-  if (NS_FAILED(rv)) return rv;
-  
-  rv = newPrefsFile->Exists(&exists);
-  if (!exists)
-  {
-	  rv = newPrefsFile->CreateDir();
-  }
-
-  rv = oldPrefsFile->CopyToDir(newPrefsFile);
-  NS_ASSERTION(NS_SUCCEEDED(rv),"failed to copy prefs file");
-
-  rv = newPrefsFile->AppendRelativeUnixPath(PREF_FILE_NAME_IN_4x);
-  rv = newPrefsFile->Rename(PREF_FILE_NAME_IN_5x);
- 
-  rv = getPrefService();
-  if (NS_FAILED(rv)) return rv;
-
-  return NS_OK;
-}
-
-/*---------------------------------------------------------------------------------
- * GetDirFromPref gets a directory based on a preference set in the 4.x
- * preferences file, adds a 5 and resets the preference.
- *
- * INPUT: 
- *         oldProfilePath - the path to the old 4.x profile directory.  
- *                          currently only used by UNIX
- *
- *         newProfilePath - the path to the 5.0 profile directory
- *                          currently only used by UNIX
- *
- *         newDirName     - the leaf name of the directory in the 5.0 world that corresponds to
- *                          this pref.  Examples:  "Mail", "ImapMail", "News".
- *                          only used on UNIX.
- *
- *         pref - the pref in the "dot" format (e.g. mail.directory)
- *
- * OUTPUT: newPath - The old path with a 5 added (on mac and windows)
- *                   the newProfilePath + "/" + newDirName (on UNIX)
- *         oldPath - The old path from the pref (if any)
- *
- *
- * RETURNS: NS_OK if the pref was successfully pulled from the prefs file
- *
- *--------------------------------------------------------------------------------*/
-nsresult
-nsPrefMigration::GetDirFromPref(nsIFileSpec * oldProfilePath, nsIFileSpec * newProfilePath, const char *newDirName, const char* pref, nsIFileSpec* newPath, nsIFileSpec* oldPath)
-{
-  nsresult rv;
-  
-  if (!oldProfilePath || !newProfilePath || !newDirName || !pref || !newPath || !oldPath) return NS_ERROR_NULL_POINTER;
-  
-  rv = getPrefService();
-  if (NS_FAILED(rv)) return rv;  
-  
-  nsCOMPtr <nsIFileSpec> oldPrefPath;
-  nsXPIDLCString oldPrefPathStr;
-  rv = m_prefBranch->GetCharPref(pref, getter_Copies(oldPrefPathStr));
-  if (NS_FAILED(rv)) return rv;
-  
-  // the default on the mac was "".  doing GetFileXPref on that would return
-  // the current working directory, like viewer_debug.  yikes!
-  if (oldPrefPathStr.IsEmpty()) {
-  	rv = NS_ERROR_FAILURE;
-  }
-  if (NS_FAILED(rv)) return rv;
-  
-  nsCOMPtr <nsILocalFile> oldPrefPathFile;
-  rv = m_prefBranch->GetComplexValue(pref, NS_GET_IID(nsILocalFile),
-                                     getter_AddRefs(oldPrefPathFile));
-  if (NS_FAILED(rv)) return rv;
-  
-  // convert nsILocalFile to nsIFileSpec
-  rv = oldPrefPathFile->GetNativePath(oldPrefPathStr);
-  if (NS_FAILED(rv)) return rv;
-
-  rv = NS_NewFileSpec(getter_AddRefs(oldPrefPath));
-  if (NS_FAILED(rv)) return rv;
-  
-  rv = oldPrefPath->SetNativePath(oldPrefPathStr);
-  if (NS_FAILED(rv)) return rv;
-
-  // oldPath will also needs the conversion from nsILocalFile
-  // this is nasty, eventually we'll switch entirely over to nsILocalFile
-  rv = oldPath->SetNativePath(oldPrefPathStr);
-  if (NS_FAILED(rv)) return rv;
-
-  
-#ifdef XP_UNIX
-	// what if they don't want to go to <profile>/<newDirName>?
-	// what if unix users want "mail.directory" + "5" (like "~/ns_imap5")
-	// or "mail.imap.root_dir" + "5" (like "~/nsmail5")?
-	// should we let them?  no.  let's migrate them to
-	// <profile>/Mail and <profile>/ImapMail
-	// let's make all three platforms the same.
-	if (PR_TRUE) {
-#else
-	nsCOMPtr <nsIFileSpec> oldPrefPathParent;
-	rv = oldPrefPath->GetParent(getter_AddRefs(oldPrefPathParent));
-	if (NS_FAILED(rv)) return rv;
-
-	// if the pref pointed to the default directory
-	// treat it as if the pref wasn't set
-	// this way it will get migrated as the user expects
-	PRBool pathsMatch;
-	rv = oldProfilePath->Equals(oldPrefPathParent, &pathsMatch);
-	if (NS_SUCCEEDED(rv) && pathsMatch) {
-#endif /* XP_UNIX */
-		rv = newPath->FromFileSpec(newProfilePath);
-		if (NS_FAILED(rv)) return rv;
-	}
-	else {
-		nsXPIDLCString leafname;
-		rv = newPath->FromFileSpec(oldPath);
-		if (NS_FAILED(rv)) return rv;
-		rv = newPath->GetLeafName(getter_Copies(leafname));
-		if (NS_FAILED(rv)) return rv;
-		nsCString newleafname((const char *)leafname);
-		newleafname += NEW_DIR_SUFFIX;
-		rv = newPath->SetLeafName(newleafname.get());
-		if (NS_FAILED(rv)) return rv;
-	}
-
-  rv = SetPremigratedFilePref(pref, oldPath);
-  if (NS_FAILED(rv)) return rv;
-  
-#ifdef XP_UNIX
-  /* on UNIX, we kept the newsrc files in "news.directory", (which was usually ~)
-   * and the summary files in ~/.netscape/xover-cache
-   * oldPath should point to ~/.netscape/xover-cache, not "news.directory"
-   * but we want to save the old "news.directory" in "premigration.news.directory"
-   * later, again for UNIX only, 
-   * we will copy the .newsrc files (from "news.directory") into the new <profile>/News directory.
-   * isn't this fun?  
-   */
-  if (PL_strcmp(PREF_NEWS_DIRECTORY, pref) == 0) {
-    rv = oldPath->FromFileSpec(oldProfilePath);
-    if (NS_FAILED(rv)) return rv;
-    rv = oldPath->AppendRelativeUnixPath(OLD_NEWS_DIR_NAME);
-    if (NS_FAILED(rv)) return rv;
-  }
-#endif /* XP_UNIX */
-  return rv;
-}
-
-static PRBool
-nsCStringEndsWith(nsCString& name, const char *ending)
-{
-  if (!ending) return PR_FALSE;
-
-  PRInt32 len = name.Length();
-  if (len == 0) return PR_FALSE;
-
-  PRInt32 endingLen = PL_strlen(ending);
-  if (len > endingLen && name.RFind(ending, PR_TRUE) == len - endingLen) {
-        return PR_TRUE;
-  }
-  else {
-        return PR_FALSE;
-  }
-}
-
-#ifdef NEED_TO_COPY_AND_RENAME_NEWSRC_FILES
-static PRBool
-nsCStringStartsWith(nsCString& name, const char *starting)
-{
-	if (!starting) return PR_FALSE;
-	PRInt32	len = name.Length();
-	if (len == 0) return PR_FALSE;
-	
-	PRInt32 startingLen = PL_strlen(starting);
-	if (len > startingLen && name.RFind(starting, PR_TRUE) == 0) {
-		return PR_TRUE;
-	}
-	else {
-		return PR_FALSE;
-	}
-}
-#endif
- 
-/*---------------------------------------------------------------------------------
- * GetSizes reads the 4.x files in the profile tree and accumulates their sizes
- *
- * INPUT:
- *
- * OUPUT:
- *
- * RETURNS:
- *
- *--------------------------------------------------------------------------------*/
-nsresult
-nsPrefMigration::GetSizes(nsFileSpec inputPath, PRBool readSubdirs, PRUint32 *sizeTotal)
-{
-  nsCAutoString fileOrDirNameStr;
-
-  for (nsDirectoryIterator dir(inputPath, PR_FALSE); dir.Exists(); dir++)
-  {
-    nsFileSpec fileOrDirName = dir.Spec();
-    char* folderName = fileOrDirName.GetLeafName();
-    fileOrDirNameStr.Assign(folderName);
-    if (!nsCStringEndsWith(fileOrDirNameStr, MAIL_SUMMARY_SUFFIX_IN_4x) && !nsCStringEndsWith(fileOrDirNameStr, NEWS_SUMMARY_SUFFIX_IN_4x) && !nsCStringEndsWith(fileOrDirNameStr, SUMMARY_SUFFIX_IN_5x)) /* Don't copy the summary files */
-    {
-      if (fileOrDirName.IsDirectory())
-      {
-        if(readSubdirs)
-        {
-          GetSizes(fileOrDirName, PR_TRUE, sizeTotal); /* re-enter the GetSizes function */
-        }
-      }
-      else
-        *sizeTotal += fileOrDirName.GetFileSize();
-    }
-    nsCRT::free(folderName);
-  }
-
-  return NS_OK;
-}
-
-/*---------------------------------------------------------------------------*
- * ComputeSpaceRequirments
- *
- *---------------------------------------------------------------------------*/
-nsresult
-nsPrefMigration::ComputeSpaceRequirements(PRInt64 DriveArray[MAX_DRIVES], 
-                                          PRUint32 SpaceReqArray[MAX_DRIVES], 
-                                          PRInt64 Drive, 
-                                          PRUint32 SpaceNeeded)
-{
-  int i=0;
-  PRFloat64 temp;
-
-  while(LL_NE(DriveArray[i],LL_Zero()) && LL_NE(DriveArray[i], Drive) && i < MAX_DRIVES)
-    i++;
-
-  if (LL_EQ(DriveArray[i], LL_Zero()))
-  {
-    DriveArray[i] = Drive;
-    SpaceReqArray[i] += SpaceNeeded;
-  }
-  else if (LL_EQ(DriveArray[i], Drive))
-    SpaceReqArray[i] += SpaceNeeded;
-  else
-    return NS_ERROR_FAILURE;
-  
-  LL_L2F(temp, DriveArray[i]);
-  if (SpaceReqArray[i] > temp)
-    return NS_ERROR_FAILURE;
-  
-  return NS_OK;
-}
-
-#ifdef NEED_TO_COPY_AND_RENAME_NEWSRC_FILES
-nsresult 
-nsPrefMigration::CopyAndRenameNewsrcFiles(nsIFileSpec * newPathSpec)
-{
-  nsresult rv;
-  nsCOMPtr <nsIFileSpec>oldPathSpec;
-  nsFileSpec oldPath;
-  nsFileSpec newPath;
-  nsCAutoString fileOrDirNameStr;
-
-  rv = GetPremigratedFilePref(PREF_NEWS_DIRECTORY, getter_AddRefs(oldPathSpec));
-  if (NS_FAILED(rv)) return rv;
-  rv = oldPathSpec->GetFileSpec(&oldPath);
-  if (NS_FAILED(rv)) return rv;
-  rv = newPathSpec->GetFileSpec(&newPath);
-  if (NS_FAILED(rv)) return rv;
-
-  for (nsDirectoryIterator dir(oldPath, PR_FALSE); dir.Exists(); dir++)
-  {
-    nsFileSpec fileOrDirName = dir.Spec(); //set first file or dir to a nsFileSpec
-    //get the filename without the full path
-    char* folderName = fileOrDirName.GetLeafName();
-    fileOrDirNameStr.Assign(folderName);
-
-    if (nsCStringStartsWith(fileOrDirNameStr, NEWSRC_PREFIX_IN_4x) || nsCStringStartsWith(fileOrDirNameStr, SNEWSRC_PREFIX_IN_4x)) {
-#ifdef DEBUG_seth
-	    printf("newsrc file == %s\n",folderName);
-#endif /* DEBUG_seth */
-
-	    rv = fileOrDirName.CopyToDir(newPath);
-        NS_ASSERTION(NS_SUCCEEDED(rv),"failed to copy news file");
-
-        nsFileSpec newFile = newPath;
-        newFile += fileOrDirNameStr.get();
-        newFile.Rename(folderName + 1); /* rename .newsrc-news to newsrc-news, no need to keep it hidden anymore */
-    }
-    nsCRT::free(folderName);
-  }
-
-  return NS_OK;
-}
-#endif /* NEED_TO_COPY_AND_RENAME_NEWSRC_FILES */
-
-/*-------------------------------------------------------------------------
- * DoTheCopyAndRename copies the files listed in oldPath to newPath
- *                    and renames files, if necessary
- *
- * INPUT: oldPath - The old profile path plus the specific data type 
- *                  (e.g. mail or news)
- *        newPath - The new profile path plus the specific data type
- *
- *        readSubdirs
- *
- *        needToRenameFiles - do we need to search for files named oldFile
- *                            and rename them to newFile
- *
- *        oldFile           - old file name (used for renaming)
- *
- *        newFile           - new file name (used for renaming)
- *
- * RETURNS: NS_OK if successful
- *          NS_ERROR_FAILURE if failed
- *
- *--------------------------------------------------------------------------*/
-nsresult
-nsPrefMigration::DoTheCopyAndRename(nsIFileSpec * oldPathSpec, nsIFileSpec *newPathSpec, PRBool readSubdirs, PRBool needToRenameFiles, const char *oldName, const char *newName)
-{
-  nsresult rv;
-  nsCAutoString fileOrDirNameStr;
-  nsFileSpec oldPath;
-  nsFileSpec newPath;
-  
-  rv = oldPathSpec->GetFileSpec(&oldPath);
-  if (NS_FAILED(rv)) return rv;
-  rv = newPathSpec->GetFileSpec(&newPath);
-  if (NS_FAILED(rv)) return rv;
-  
-  for (nsDirectoryIterator dir(oldPath, PR_FALSE); dir.Exists(); dir++)
-  {
-    nsFileSpec fileOrDirName = dir.Spec(); //set first file or dir to a nsFileSpec
-    //get the filename without the full path
-    char* folderName = fileOrDirName.GetLeafName();
-    fileOrDirNameStr.Assign(folderName);
-
-    if (!nsCStringEndsWith(fileOrDirNameStr, MAIL_SUMMARY_SUFFIX_IN_4x) && !nsCStringEndsWith(fileOrDirNameStr, NEWS_SUMMARY_SUFFIX_IN_4x) && !nsCStringEndsWith(fileOrDirNameStr, SUMMARY_SUFFIX_IN_5x)) /* Don't copy the summary files */
-    {
-      if (fileOrDirName.IsDirectory())
-      {
-        if(readSubdirs)
-        {
-          nsCOMPtr<nsIFileSpec> newPathExtended;
-          rv = NS_NewFileSpecWithSpec(newPath, getter_AddRefs(newPathExtended));
-          rv = newPathExtended->AppendRelativeUnixPath(folderName);
-          rv = newPathExtended->CreateDir();
-          
-          nsCOMPtr<nsIFileSpec>fileOrDirNameSpec;
-          rv = NS_NewFileSpecWithSpec(fileOrDirName, getter_AddRefs(fileOrDirNameSpec));
-          DoTheCopyAndRename(fileOrDirNameSpec, newPathExtended, PR_TRUE, needToRenameFiles, oldName, newName); /* re-enter the DoTheCopyAndRename function */
-        }
-      }
-      else {
-        // copy the file
-        rv = fileOrDirName.CopyToDir(newPath);
-        NS_ASSERTION(NS_SUCCEEDED(rv),"failed to copy file");
-
-        if (needToRenameFiles) {
-          // rename the file, if it matches
-          if (fileOrDirNameStr.Equals(oldName)) {
-            nsFileSpec newFile = newPath;
-            newFile += fileOrDirNameStr.get();
-            newFile.Rename(newName);
-          }
-        }
-      }
-    }
-    nsCRT::free(folderName);
-  }  
-  
-  return NS_OK;
-}
-
-/*-------------------------------------------------------------------------
- * DoTheCopyAndRename copies and renames files
- *
- * INPUT: aPath - the path
- *
- *        aReadSubdirs - if sub directories should be handled
- *
- *        aOldFile - old file name (used for renaming)
- *
- *        aNewFile - new file name (used for renaming)
- *
- * RETURNS: NS_OK if successful
- *          NS_ERROR_FAILURE if failed
- *
- *--------------------------------------------------------------------------*/
-nsresult
-nsPrefMigration::DoTheCopyAndRename(nsIFileSpec * aPathSpec, PRBool aReadSubdirs, const char *aOldName, const char *aNewName)
-{
-  if( !aOldName || !aNewName || !strcmp(aOldName, aNewName) )
-    return NS_ERROR_FAILURE;
-
-  nsresult rv;
-  nsFileSpec path, file;
-  
-  rv = aPathSpec->GetFileSpec(&path);
-  if (NS_FAILED(rv))
-    return rv;
-  rv = aPathSpec->GetFileSpec(&file);
-  if (NS_FAILED(rv))
-    return rv;
-  file += aOldName;
-  
-  // Handle sub folders
-  for (nsDirectoryIterator dir(path, PR_FALSE); dir.Exists(); dir++)
-  {
-    nsFileSpec fileOrDirName = dir.Spec(); //set first file or dir to a nsFileSpec
-    if (fileOrDirName.IsDirectory())
-    {
-      if( aReadSubdirs )
-      {
-        nsCOMPtr<nsIFileSpec>fileOrDirNameSpec;
-        rv = NS_NewFileSpecWithSpec(fileOrDirName, getter_AddRefs(fileOrDirNameSpec));
-        DoTheCopyAndRename(fileOrDirNameSpec, aReadSubdirs, aOldName, aNewName); /* re-enter the DoTheCopyAndRename function */
-      }
-      else
-        continue;
-    }
-  }
-
-  nsCOMPtr<nsILocalFile> localFileOld, localFileDirectory;
-  rv = NS_FileSpecToIFile(&file, getter_AddRefs(localFileOld));
-  if (NS_FAILED(rv))
-    return rv;
-  rv = NS_FileSpecToIFile(&path, getter_AddRefs(localFileDirectory));
-  if (NS_FAILED(rv))
-    return rv;
-  NS_ConvertUTF8toUTF16 newName(aNewName);
-  localFileOld->CopyTo(localFileDirectory, newName);
-
-  return NS_OK;
-}
-
-nsresult
-nsPrefMigration::CopyFilesByPattern(nsIFileSpec * oldPathSpec, nsIFileSpec * newPathSpec, const char *pattern)
-{
-  nsFileSpec oldPath;
-  nsFileSpec newPath;
-  
-  nsresult rv = oldPathSpec->GetFileSpec(&oldPath);
-  NS_ENSURE_SUCCESS(rv,rv);
-  rv = newPathSpec->GetFileSpec(&newPath);
-  NS_ENSURE_SUCCESS(rv,rv);
-  
-  for (nsDirectoryIterator dir(oldPath, PR_FALSE); dir.Exists(); dir++)
-  {
-    nsFileSpec fileOrDirName = dir.Spec();    //set first file or dir to a nsFileSpec
-
-    if (fileOrDirName.IsDirectory())
-      continue;
-
-    nsCAutoString fileOrDirNameStr(fileOrDirName.GetLeafName());
-    if (!nsCStringEndsWith(fileOrDirNameStr, pattern))
-      continue;
-
-    // copy the file
-    rv = fileOrDirName.CopyToDir(newPath);
-    NS_ENSURE_SUCCESS(rv,rv);
-  }  
-  
-  return NS_OK;
-}
-
-nsresult
-nsPrefMigration::DoTheCopy(nsIFileSpec * oldPath, nsIFileSpec * newPath, PRBool readSubdirs)
-{
-  return DoTheCopyAndRename(oldPath, newPath, readSubdirs, PR_FALSE, "", "");
-}
-
-nsresult
-nsPrefMigration::DoTheCopy(nsIFileSpec * oldPath, nsIFileSpec * newPath, const char *fileOrDirName, PRBool isDirectory)
-{
-  nsresult rv;
-
-  if (isDirectory)
-  {
-    nsCOMPtr<nsIFileSpec> oldSubPath;
-
-    NS_NewFileSpec(getter_AddRefs(oldSubPath));
-    oldSubPath->FromFileSpec(oldPath);
-    rv = oldSubPath->AppendRelativeUnixPath(fileOrDirName);
-    if (NS_FAILED(rv)) return rv;
-    PRBool exist;
-    rv = oldSubPath->Exists(&exist);
-    if (NS_FAILED(rv)) return rv;
-    if (!exist)
-    {
-      rv = oldSubPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    nsCOMPtr<nsIFileSpec> newSubPath;
-
-    NS_NewFileSpec(getter_AddRefs(newSubPath));
-    newSubPath->FromFileSpec(newPath);
-    rv = newSubPath->AppendRelativeUnixPath(fileOrDirName);
-    if (NS_FAILED(rv)) return rv;
-    rv = newSubPath->Exists(&exist);
-    if (NS_FAILED(rv)) return rv;
-    if (!exist)
-    {
-      rv = newSubPath->CreateDir();
-      if (NS_FAILED(rv)) return rv;
-    }
-
-    DoTheCopy(oldSubPath, newSubPath, PR_TRUE);
-  }
-  else
-  {
-    nsCOMPtr<nsIFileSpec> file;
-    NS_NewFileSpec(getter_AddRefs(file));
-    file->FromFileSpec(oldPath);
-    rv = file->AppendRelativeUnixPath(fileOrDirName);
-    if( NS_FAILED(rv) ) return rv;
-    PRBool exist;
-    rv = file->Exists(&exist);
-    if( NS_FAILED(rv) ) return rv;
-    if( exist) {
-      file->CopyToDir(newPath);
-    }
-  }
-
-  return rv;
-}
-
-#if defined(NEED_TO_FIX_4X_COOKIES)
-/* this code only works on the mac.  in 4.x, the line endings where '\r' on the mac.
-   this code will fix the expire times and the line endings, so the code is nsCookie.cpp
-   can read the migrate cookies. */
-static PRInt32
-GetCookieLine(nsInputFileStream &strm, nsAutoString& aLine) 
-{
-  /* read the line */
-  aLine.Truncate();
-  char c;
-  for (;;) {
-    c = strm.get();
-    
-    /* note that eof is not set until we read past the end of the file */
-    if (strm.eof()) {
-      return -1;
-    }
-
-    /* stop at the '\r' */
-    if (c != '\r') {
-      aLine.Append(PRUnichar(c));
-    }
-    else {
-      break;
-    }
-  }
-  return 0;
-}
-
-static nsresult
-PutCookieLine(nsOutputFileStream &strm, const nsString& aLine)
-{
-  /* allocate a buffer from the heap */
-  char * cp = ToNewCString(aLine);
-  if (! cp) {
-    return NS_ERROR_FAILURE;
-  }
-
-  /* output each character */
-  char* p = cp;
-  while (*p) {
-    strm.put(*(p++));
-  }
-  NS_Free(cp);
-  // the lines in a 5.x cookie file call end with '\n', on all platforms
-  strm.put('\n');
-  return NS_OK;
-}
-
-static nsresult
-Fix4xCookies(nsIFileSpec * profilePath) {
-  nsAutoString inBuffer, outBuffer;
-  nsFileSpec profileDirectory;
-  nsresult rv = profilePath->GetFileSpec(&profileDirectory);
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-
-  /* open input file */
-  nsFileSpec oldCookies(profileDirectory);
-  oldCookies += COOKIES_FILE_NAME_IN_4x;
-  
-  /* it is possible that the 4.x cookies file does not exist.  just return normally.  see #55444 */
-  if (!oldCookies.Exists()) return NS_OK;
-  
-  nsInputFileStream inStream(oldCookies);
-  if (!inStream.is_open()) {
-    return NS_ERROR_FAILURE;
-  }
-
-  /* open output file */
-  nsFileSpec newCookies(profileDirectory);
-  newCookies += COOKIES_FILE_NAME_IN_5x;
-  
-  nsOutputFileStream outStream(newCookies);
-  if (!outStream.is_open()) {
-    return NS_ERROR_FAILURE;
-  }
-
-  while (GetCookieLine(inStream,inBuffer) != -1){
-
-    /* skip line if it is a comment or null line */
-    if (inBuffer.IsEmpty() || inBuffer.CharAt(0) == '#' ||
-        inBuffer.CharAt(0) == nsCRT::CR || inBuffer.CharAt(0) == nsCRT::LF) {
-      PutCookieLine(outStream, inBuffer);
-      continue;
-    }
-
-    /* locate expire field, skip line if it does not contain all its fields */
-    int hostIndex, isDomainIndex, pathIndex, xxxIndex, expiresIndex, nameIndex, cookieIndex;
-    hostIndex = 0;
-    if ((isDomainIndex=inBuffer.FindChar('\t', hostIndex)+1) == 0 ||
-        (pathIndex=inBuffer.FindChar('\t', isDomainIndex)+1) == 0 ||
-        (xxxIndex=inBuffer.FindChar('\t', pathIndex)+1) == 0 ||
-        (expiresIndex=inBuffer.FindChar('\t', xxxIndex)+1) == 0 ||
-        (nameIndex=inBuffer.FindChar('\t', expiresIndex)+1) == 0 ||
-        (cookieIndex=inBuffer.FindChar('\t', nameIndex)+1) == 0 ) {
-      continue;
-    }
-
-    /* separate the expires field from the rest of the cookie line */
-    nsAutoString prefix, expiresString, suffix;
-    inBuffer.Mid(prefix, hostIndex, expiresIndex-hostIndex-1);
-    inBuffer.Mid(expiresString, expiresIndex, nameIndex-expiresIndex-1);
-    inBuffer.Mid(suffix, nameIndex, inBuffer.Length()-nameIndex);
-
-    /* correct the expires field */
-    char * expiresCString = ToNewCString(expiresString);
-    unsigned long expires = strtoul(expiresCString, nsnull, 10);
-    NS_Free(expiresCString);
-
-    /* if the cookie is supposed to expire at the end of the session
-     * expires == 0.  don't adjust those cookies.
-     */
-    if (expires) {
-    	expires -= SECONDS_BETWEEN_1900_AND_1970;
-    }
-    char dateString[36];
-    PR_snprintf(dateString, sizeof(dateString), "%lu", expires);
-
-    /* generate the output buffer and write it to file */
-    outBuffer = prefix;
-    outBuffer.Append(PRUnichar('\t'));
-    outBuffer.AppendWithConversion(dateString);
-    outBuffer.Append(PRUnichar('\t'));
-    outBuffer.Append(suffix);
-    PutCookieLine(outStream, outBuffer);
-  }
-
-  inStream.close();
-  outStream.close();
-  return NS_OK;
-}
-
-#endif /* NEED_TO_FIX_4X_COOKIES */
-
-/*----------------------------------------------------------------------------
- * DoSpecialUpdates updates is a routine that does some miscellaneous updates 
- * like renaming certain files, etc.
- *--------------------------------------------------------------------------*/
-nsresult
-nsPrefMigration::DoSpecialUpdates(nsIFileSpec  * profilePath)
-{
-  nsresult rv;
-  PRInt32 serverType;
-  nsFileSpec fs;
-
-  rv = profilePath->GetFileSpec(&fs);
-  if (NS_FAILED(rv)) return rv;
-  
-  fs += PREF_FILE_NAME_IN_5x;
-  
-  nsOutputFileStream fsStream(fs, (PR_WRONLY | PR_CREATE_FILE | PR_APPEND));
-  
-  if (!fsStream.is_open())
-  {
-    return NS_ERROR_FAILURE;
-  }
-
-  /* Need to add a string to the top of the prefs.js file to prevent it
-   * from being loaded as a standard javascript file which would be a
-   * security hole.
-   */
-  fsStream << PREF_FILE_HEADER_STRING << nsEndl ;
-  fsStream.close();
-
-  // rename the cookies file, but only if we need to.
-#if defined(NEED_TO_FIX_4X_COOKIES)
-  rv = Fix4xCookies(profilePath);  
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-#else
-  rv = Rename4xFileAfterMigration(profilePath,COOKIES_FILE_NAME_IN_4x,COOKIES_FILE_NAME_IN_5x);
-  if (NS_FAILED(rv)) return rv;
-#endif /* NEED_TO_FIX_4X_COOKIES */
-
-  // rename the bookmarks file, but only if we need to.
-  rv = Rename4xFileAfterMigration(profilePath,BOOKMARKS_FILE_NAME_IN_4x,BOOKMARKS_FILE_NAME_IN_5x);
-  if (NS_FAILED(rv)) return rv;
-    
-  /* Create the new mail directory from the setting in prefs.js or a default */
-  rv = m_prefBranch->GetIntPref(PREF_MAIL_SERVER_TYPE, &serverType);
-  if (NS_FAILED(rv)) return rv; 
-  if (serverType == POP_4X_MAIL_TYPE) {
-	rv = RenameAndMove4xPopFilterFile(profilePath);
-  	if (NS_FAILED(rv)) return rv; 
-
-	rv = RenameAndMove4xPopStateFile(profilePath);
-  	if (NS_FAILED(rv)) return rv; 
-  }
-#ifdef IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x 
-  else if (serverType == IMAP_4X_MAIL_TYPE) {
-  	rv = RenameAndMove4xImapFilterFiles(profilePath);
-	if (NS_FAILED(rv)) return rv;
-  }
-#endif /* IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x */
-
-  return rv;
-}
-
-nsresult
-nsPrefMigration::RenameAndMove4xPopFilterFile(nsIFileSpec * profilePath)
-{
-  return RenameAndMove4xPopFile(profilePath, POP_MAIL_FILTER_FILE_NAME_IN_4x, POP_MAIL_FILTER_FILE_NAME_IN_5x);
-}
-
-nsresult
-nsPrefMigration::RenameAndMove4xPopStateFile(nsIFileSpec * profilePath)
-{
-#ifdef POPSTATE_FILE_IN_4x
-  return RenameAndMove4xPopFile(profilePath, POPSTATE_FILE_IN_4x, POPSTATE_FILE_IN_5x);
-#else 
-  // on windows, popstate.dat was in Users\<profile>\MAIL\popstate.dat
-  // which is the right place, unlike linux and mac.
-  // so, when we migrate Users\<profile>\Mail to Users50\<profile>\Mail\<hostname>
-  // it just works
-  return NS_OK;
-#endif /* POPSTATE_FILE_IN_4x */
-}
-
-nsresult
-nsPrefMigration::RenameAndMove4xPopFile(nsIFileSpec * profilePath, const char *fileNameIn4x, const char *fileNameIn5x)
-{
-  nsFileSpec file;
-  nsresult rv = profilePath->GetFileSpec(&file);
-  if (NS_FAILED(rv)) return rv;
-  
-  // we assume the 4.x pop files live at <profile>/<fileNameIn4x>
-  file += fileNameIn4x;
-
-  // figure out where the 4.x pop mail directory got copied to
-  char *popServerName = nsnull;
-  nsFileSpec migratedPopDirectory;
-  rv = profilePath->GetFileSpec(&migratedPopDirectory);
-  migratedPopDirectory += NEW_MAIL_DIR_NAME;
-  m_prefBranch->GetCharPref(PREF_NETWORK_HOSTS_POP_SERVER, &popServerName);
-  migratedPopDirectory += popServerName;
-  PR_FREEIF(popServerName);
-
-  // copy the 4.x file from <profile>/<fileNameIn4x> to the <profile>/Mail/<hostname>/<fileNameIn4x>
-  rv = file.CopyToDir(migratedPopDirectory);
-  NS_ASSERTION(NS_SUCCEEDED(rv),"failed to copy pop file");
-  
-  // XXX todo, delete the old file
-  // we are leaving it behind
-  
-  // make migratedPopDirectory point the the copied filter file,
-  // <profile>/Mail/<hostname>/<fileNameIn4x>
-  migratedPopDirectory += fileNameIn4x;
-
-  // rename <profile>/Mail/<hostname>/<fileNameIn4x>to <profile>/Mail/<hostname>/<fileNameIn5x>, if necessary
-  if (PL_strcmp(fileNameIn4x,fileNameIn5x)) {
-	  migratedPopDirectory.Rename(fileNameIn5x);
-  }
-
-  return NS_OK;
-}
-
-
-#ifdef IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x
-#define BUFFER_LEN	128
-nsresult
-nsPrefMigration::RenameAndMove4xImapFilterFile(nsIFileSpec * profilePath, const char *hostname)
-{
-  nsresult rv = NS_OK;
-  char imapFilterFileName[BUFFER_LEN];
-
-  // the 4.x imap filter file lives in "<profile>/<hostname> Rules"
-  nsFileSpec file;
-  rv = profilePath->GetFileSpec(&file);
-  if (NS_FAILED(rv)) return rv;
-  
-  PR_snprintf(imapFilterFileName, BUFFER_LEN, IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x, hostname);
-  file += imapFilterFileName;
-
-  // if that file didn't exist, because they didn't use filters for that server, return now
-  if (!file.Exists()) return NS_OK;
-
-  // figure out where the 4.x pop mail directory got copied to
-  nsFileSpec migratedImapDirectory;
-  rv = profilePath->GetFileSpec(&migratedImapDirectory);
-  migratedImapDirectory += NEW_IMAPMAIL_DIR_NAME;
-  migratedImapDirectory += hostname;
-
-  // copy the 4.x file from "<profile>/<hostname> Rules" to <profile>/ImapMail/<hostname>/
-  rv = file.CopyToDir(migratedImapDirectory);
-  NS_ASSERTION(NS_SUCCEEDED(rv),"failed to copy imap file");
-
-  // make migratedPopDirectory point the the copied filter file,
-  // "<profile>/ImapMail/<hostname>/<hostname> Rules"
-  migratedImapDirectory += imapFilterFileName;
-
-  // rename "<profile>/ImapMail/<hostname>/<hostname> Rules" to  "<profile>/ImapMail/<hostname>/rules.dat"
-  migratedImapDirectory.Rename(IMAP_MAIL_FILTER_FILE_NAME_IN_5x);
-
-  return NS_OK;         
-}
-
-nsresult
-nsPrefMigration::RenameAndMove4xImapFilterFiles(nsIFileSpec * profilePath)
-{
-  nsresult rv;
-  char *hostList=nsnull;
-
-  rv = m_prefBranch->GetCharPref(PREF_4X_NETWORK_HOSTS_IMAP_SERVER, &hostList);
-  if (NS_FAILED(rv)) return rv;
-
-  if (!hostList || !*hostList) return NS_OK; 
-
-  char *token = nsnull;
-  char *rest = hostList;
-  nsCAutoString str;
-
-  token = nsCRT::strtok(rest, ",", &rest);
-  while (token && *token) {
-    str = token;
-    str.StripWhitespace();
-
-    if (!str.IsEmpty()) {
-      // str is the hostname
-      rv = RenameAndMove4xImapFilterFile(profilePath,str.get());
-      if  (NS_FAILED(rv)) {
-        // failed to migrate.  bail.
-        return rv;
-      }
-      str = "";
-    }
-    token = nsCRT::strtok(rest, ",", &rest);
-  }
-  PR_FREEIF(hostList);
-  return NS_OK;    
-}
-#endif /* IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x */
-
-nsresult
-nsPrefMigration::Rename4xFileAfterMigration(nsIFileSpec * profilePath, const char *oldFileName, const char *newFileName)
-{
-  nsresult rv = NS_OK;
-  // if they are the same, don't bother to rename the file.
-  if (PL_strcmp(oldFileName, newFileName) == 0) {
-    return rv;
-  }
-               
-  nsFileSpec file;
-  rv = profilePath->GetFileSpec(&file);
-  if (NS_FAILED(rv)) return rv;
-  
-  file += oldFileName;
-  
-  // make sure it exists before you try to rename it
-  if (file.Exists()) {
-    file.Rename(newFileName);
-  }
-  return rv;
-}
-
-#ifdef NEED_TO_COPY_AND_RENAME_NEWSRC_FILES
-nsresult
-nsPrefMigration::GetPremigratedFilePref(const char *pref_name, nsIFileSpec **path)
-{
-        nsresult rv;
-
-        if (!pref_name) return NS_ERROR_FAILURE;
-
-        char premigration_pref[MAX_PREF_LEN];
-        PR_snprintf(premigration_pref,MAX_PREF_LEN,"%s%s",PREMIGRATION_PREFIX,pref_name);
-#ifdef DEBUG_seth
-        printf("getting %s (into a nsFileSpec)\n", premigration_pref);
-#endif
-        rv = m_prefBranch->GetComplexValue((const char *)premigration_pref,
-                                           NS_GET_IID(nsIFileSpec),
-                                           (void **)path);
-        return rv;
-}
-
-#endif /* NEED_TO_COPY_AND_RENAME_NEWSRC_FILES */
-
-nsresult 
-nsPrefMigration::SetPremigratedFilePref(const char *pref_name, nsIFileSpec *path)
-{
-	nsresult rv;
-
-	if (!pref_name) return NS_ERROR_FAILURE;
-
-	// save off the old pref, prefixed with "premigration"
-	// for example, we need the old "mail.directory" pref when
-	// migrating the copies and folder prefs in nsMsgAccountManager.cpp
-	//
-	// note we do this for all platforms.
-	char premigration_pref[MAX_PREF_LEN];
-	PR_snprintf(premigration_pref,MAX_PREF_LEN,"%s%s",PREMIGRATION_PREFIX,pref_name);
-#ifdef DEBUG_seth
-	printf("setting %s (from a nsFileSpec) for later...\n", premigration_pref);
-#endif
-
-  // need to convert nsIFileSpec->nsILocalFile
-  nsFileSpec pathSpec;
-  path->GetFileSpec(&pathSpec);
-  
-  nsCOMPtr<nsILocalFile> pathFile;
-  rv = NS_FileSpecToIFile(&pathSpec, getter_AddRefs(pathFile));
-  if (NS_FAILED(rv)) return rv;
-  
-  PRBool exists = PR_FALSE;
-  pathFile->Exists(&exists);
-  
-  NS_ASSERTION(exists, "the path does not exist.  see bug #55444");
-  if (!exists) return NS_OK;
-  
-  rv = m_prefBranch->SetComplexValue((const char *)premigration_pref,
-                                     NS_GET_IID(nsILocalFile), pathFile);
-  return rv;
-}
-
-nsresult 
-nsPrefMigration::DetermineOldPath(nsIFileSpec *profilePath, const char *oldPathName, const char *oldPathEntityName, nsIFileSpec *oldPath)
-{
-	nsresult rv;
-
-  	/* set oldLocalFile to profilePath.  need to convert nsIFileSpec->nsILocalFile */
-	nsCOMPtr<nsILocalFile> oldLocalFile;
-	nsFileSpec pathSpec;
-	profilePath->GetFileSpec(&pathSpec);
-	rv = NS_FileSpecToIFile(&pathSpec, getter_AddRefs(oldLocalFile));
-	if (NS_FAILED(rv)) return rv;
-	
-	/* get the string bundle, and get the appropriate localized string out of it */
-	nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
-	if (NS_FAILED(rv)) return rv;
-
-    nsCOMPtr<nsIStringBundle> bundle;
-    rv = bundleService->CreateBundle(MIGRATION_PROPERTIES_URL, getter_AddRefs(bundle));
-	if (NS_FAILED(rv)) return rv;
-
-	nsXPIDLString localizedDirName;
-	nsAutoString entityName;
-	entityName.AssignWithConversion(oldPathEntityName);
-	rv = bundle->GetStringFromName(entityName.get(), getter_Copies(localizedDirName));
-	if (NS_FAILED(rv)) return rv;
-
-	rv = oldLocalFile->AppendRelativePath(localizedDirName);
-	if (NS_FAILED(rv)) return rv;
-
-	PRBool exists = PR_FALSE;
-	rv = oldLocalFile->Exists(&exists);
-	if (!exists) {
-		/* if the localized name doesn't exist, use the english name */
-		rv = oldPath->FromFileSpec(profilePath);
-		if (NS_FAILED(rv)) return rv;
-		
-		rv = oldPath->AppendRelativeUnixPath(oldPathName);
-		if (NS_FAILED(rv)) return rv;
-		
-		return NS_OK;
-	}
-
-	/* at this point, the folder with the localized name exists, so use it */
-	nsCAutoString persistentDescriptor;
-	rv = oldLocalFile->GetPersistentDescriptor(persistentDescriptor);
-	if (NS_FAILED(rv)) return rv;
-	rv = oldPath->SetPersistentDescriptorString(persistentDescriptor.get());
-	if (NS_FAILED(rv)) return rv;
-
-	return NS_OK;
-}
-
-////////////////////////////////////////////////////////////////////////
-// nsPrefConverter
-////////////////////////////////////////////////////////////////////////
-
-/* 
-  these are the prefs we know we need to convert to utf8.
-  we'll also be converting:
-
-  Please make sure that any pref that contains native characters
-  in its value is not included in this list as we do not want to 
-  convert them into UTF-8 format. Prefs are being get and set in a 
-  unicode format (FileXPref) now and there is no need for 
-  conversion of those prefs. 
-
- "ldap_2.server.*.description"
- "intl.font*.fixed_font"
- "intl.font*.prop_font"
- "mail.identity.vcard.*"
- */
-
-static const char *prefsToConvert[] = {
-      "custtoolbar.personal_toolbar_folder",
-      "editor.author",
-      "li.server.ldap.userbase",
-      "mail.identity.organization",
-      "mail.identity.username",
-      nsnull
-};
-
-nsPrefConverter::~nsPrefConverter()
-{
-}
-
-
-nsPrefConverter::nsPrefConverter()
-{
-}
-
-NS_IMPL_ISUPPORTS1(nsPrefConverter, nsIPrefConverter)
-
-// Apply a charset conversion from the given charset to UTF-8 for the input C string.
-static
-nsresult 
-ConvertStringToUTF8(const char* aCharset, const char* inString, char** outString)
-{
-  if (nsnull == outString)
-    return NS_ERROR_NULL_POINTER;
-
-  nsresult rv;
-  // convert result to unicode
-  nsCOMPtr<nsICharsetConverterManager> ccm = 
-           do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
-
-  if(NS_SUCCEEDED(rv)) {
-    nsCOMPtr <nsIUnicodeDecoder> decoder; // this may be cached
-
-    rv = ccm->GetUnicodeDecoderRaw(aCharset, getter_AddRefs(decoder));
-    if(NS_SUCCEEDED(rv) && decoder) {
-      PRInt32 uniLength = 0;
-      PRInt32 srcLength = strlen(inString);
-      rv = decoder->GetMaxLength(inString, srcLength, &uniLength);
-      if (NS_SUCCEEDED(rv)) {
-        PRUnichar *unichars = new PRUnichar [uniLength];
-
-        if (nsnull != unichars) {
-          // convert to unicode
-          rv = decoder->Convert(inString, &srcLength, unichars, &uniLength);
-          if (NS_SUCCEEDED(rv)) {
-            nsAutoString aString;
-            aString.Assign(unichars, uniLength);
-            // convert to UTF-8
-            *outString = ToNewUTF8String(aString);
-          }
-          delete [] unichars;
-        }
-        else {
-          rv = NS_ERROR_OUT_OF_MEMORY;
-        }
-      }
-    }    
-  }
-
-  return rv;
-}
-
-nsresult
-ConvertPrefToUTF8(const char *prefname, nsIPrefBranch *prefs, const char* charSet)
-{
-    nsresult rv;
-
-    if (!prefname || !prefs) return NS_ERROR_FAILURE;
-#ifdef DEBUG_UTF8_CONVERSION 
-    printf("converting %s to UTF8\n", prefname);
-#endif /* DEBUG_UTF8_CONVERSION */
-    
-    nsXPIDLCString prefval;
-
-    rv = prefs->GetCharPref(prefname, getter_Copies(prefval));
-    if (NS_FAILED(rv)) return rv;
-
-    if (prefval.IsEmpty()) {
-        // no need to convert ""
-        return NS_OK;
-    }
-
-    nsXPIDLCString outval;
-    rv = ConvertStringToUTF8(charSet, (const char *)prefval, getter_Copies(outval));
-    // only set the pref if the conversion worked, and it convert to something non null
-    if (NS_SUCCEEDED(rv) && (const char *)outval && PL_strlen((const char *)outval)) {
-#ifdef DEBUG_UTF8_CONVERSION
-        printf("converting %s to %s\n",(const char *)prefval, (const char *)outval);
-#endif /* DEBUG_UTF8_CONVERSION */
-        rv = prefs->SetCharPref(prefname, (const char *)outval);
-    }
-
-    return NS_OK;
-}
-
-
-static PRBool charEndsWith(const char *str, const char *endStr)
-{
-    PRUint32 endStrLen = PL_strlen(endStr);
-    PRUint32 strLen = PL_strlen(str);
-    
-    if (strLen < endStrLen) return PR_FALSE;
-
-    PRUint32 pos = strLen - endStrLen;
-    if (PL_strncmp(str + pos, endStr, endStrLen) == 0) {
-        return PR_TRUE;
-    }
-    else {
-        return PR_FALSE;
-    }
-}
-
-static
-void fontPrefEnumerationFunction(const char *name, nsCStringArray *arr)
-{
-#ifdef DEBUG_UTF8_CONVERSION
-  printf("fontPrefEnumerationFunction: %s\n", name);
-#endif 
-
-  if (charEndsWith(name,".fixed_font") || charEndsWith(name,".prop_font")) {
-    nsCString str(name);
-    arr->AppendCString(str);
-  }
-}
-
-static
-void ldapPrefEnumerationFunction(const char *name, nsCStringArray *arr)
-{
-#ifdef DEBUG_UTF8_CONVERSION
-  printf("ldapPrefEnumerationFunction: %s\n", name);
-#endif 
-
-  // we only want to convert "ldap_2.servers.*.description"
-  if (charEndsWith(name,".description")) {
-    nsCString str(name);
-    arr->AppendCString(str);
-  }
-}
-
-static
-void vCardPrefEnumerationFunction(const char *name, nsCStringArray *arr)
-{
-#ifdef DEBUG_UTF8_CONVERSION
-  printf("vCardPrefEnumerationFunction: %s\n", name);
-#endif 
-
-  // the 4.x vCard prefs might need converting
-  nsCString str(name);
-  arr->AppendCString(str);
-}
-
-
-typedef struct {
-    nsIPrefBranch *prefs;
-    const char* charSet;
-} PrefEnumerationClosure;
-
-PRBool
-convertPref(nsCString &aElement, void *aData)
-{
-  PrefEnumerationClosure *closure;
-  closure = (PrefEnumerationClosure *)aData;
-
-  ConvertPrefToUTF8(aElement.get(), closure->prefs, closure->charSet);
-  return PR_TRUE;
-}
-
-NS_IMETHODIMP
-nsPrefConverter::ConvertPrefsToUTF8()
-{
-  nsresult rv;
-
-  nsCStringArray prefsToMigrate;
-
-  nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
-  if(NS_FAILED(rv)) return rv;
-  if (!prefs) return NS_ERROR_FAILURE;
-
-  nsCAutoString charSet;
-  rv = GetPlatformCharset(charSet);
-  
-  if (NS_FAILED(rv)) return rv;
-
-  PRUint32 i;
-
-  for (i = 0; prefsToConvert[i]; i++) {
-    nsCString prefnameStr( prefsToConvert[i] );
-    prefsToMigrate.AppendCString(prefnameStr);
-  }
-
-  PRUint32 count;
-  char **childArray;
-
-  if (NS_SUCCEEDED(prefs->GetChildList("intl.font.", &count, &childArray))) {
-    for (i = 0; i < count; i++)
-      fontPrefEnumerationFunction(childArray[i], &prefsToMigrate);
-
-    NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, childArray);
-  }
-
-  if (NS_SUCCEEDED(prefs->GetChildList("ldap_2.servers.", &count, &childArray))) {
-    for (i = 0; i < count; i++)
-      ldapPrefEnumerationFunction(childArray[i], &prefsToMigrate);
-
-    NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, childArray);
-  }
-
-  if (NS_SUCCEEDED(prefs->GetChildList("mail.identity.vcard.", &count, &childArray))) {
-    for (i = 0; i < count; i++)
-      vCardPrefEnumerationFunction(childArray[i], &prefsToMigrate);
-
-    NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, childArray);
-  }
-
-  PrefEnumerationClosure closure;
-
-  closure.prefs = prefs;
-  closure.charSet = charSet.get();
-
-  prefsToMigrate.EnumerateForwards((nsCStringArrayEnumFunc)convertPref, (void *)(&closure));
-
-  rv = prefs->SetBoolPref("prefs.converted-to-utf8", PR_TRUE);
-  return NS_OK;
-}
-
-// A wrapper function to call the interface to get a platform file charset.
-nsresult 
-nsPrefConverter::GetPlatformCharset(nsCString& aCharset)
-{
-  nsresult rv;
-
-  // we may cache it since the platform charset will not change through application life
-  nsCOMPtr <nsIPlatformCharset> platformCharset = do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv);
-  if (NS_SUCCEEDED(rv) && platformCharset) {
-   rv = platformCharset->GetCharset(kPlatformCharsetSel_4xPrefsJS, aCharset);
-  }
-  if (NS_FAILED(rv)) {
-   aCharset.AssignLiteral("ISO-8859-1");  // use ISO-8859-1 in case of any error
-  }
- 
-  return rv;
-}
-
-
deleted file mode 100644
--- a/profile/pref-migrator/src/nsPrefMigration.h
+++ /dev/null
@@ -1,185 +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 Communicator client 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):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 nsPrefMigration_h___
-#define nsPrefMigration_h___
-
-
-#include "nscore.h"
-#include "nsIFactory.h"
-#include "nsISupports.h"
-#include "nsFileSpec.h"
-#include "nsIPrefBranch.h"
-#include "nsIServiceManager.h"
-#include "nsCOMPtr.h"
-#include "nsIDOMWindowInternal.h"
-#include "nsIFileSpec.h"
-#include "nsPrefMigrationCIDs.h"
-#include "nsIPrefMigration.h"
-#include "nsVoidArray.h"
-#include "nsILocalFile.h"
-
-#define MIGRATION_SUCCESS    0
-#define MIGRATION_RETRY      1
-#define MIGRATION_CANCEL     2
-#define MIGRATION_CREATE_NEW 3
-
-#define MAX_DRIVES 4
-
-//Interfaces Needed
-
-#if defined(XP_MACOSX)
-#define IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x "%s Rules" 
-#endif
-
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
-#define NEED_TO_COPY_AND_RENAME_NEWSRC_FILES
-#endif
-
-class nsPrefConverter: public nsIPrefConverter
-{
-    public:
-      NS_DEFINE_STATIC_CID_ACCESSOR(NS_PREFCONVERTER_CID) 
-
-      nsPrefConverter();
-      virtual ~nsPrefConverter();
-
-      NS_DECL_ISUPPORTS
-      NS_DECL_NSIPREFCONVERTER
-
-      nsresult GetPlatformCharset(nsCString& aCharset);
-};
-
-class nsPrefMigration: public nsIPrefMigration
-{
-    public:
-      NS_DEFINE_STATIC_CID_ACCESSOR(NS_PREFMIGRATION_CID) 
-
-      static nsPrefMigration *GetInstance();
-
-      nsPrefMigration();
-      virtual ~nsPrefMigration();
-
-      NS_DECL_ISUPPORTS
-
-      NS_DECL_NSIPREFMIGRATION
-
-      // todo try to move this to private.  We need this because we need to call this
-      // from a thread.
-
-      nsVoidArray mProfilesToMigrate;
-      nsresult ProcessPrefsCallback(const char* oldProfilePathStr, const char * newProfilePathStr);
-      void WaitForThread();
-
-      nsresult mErrorCode;
-
-    private:
-      
-      static nsPrefMigration* mInstance;
-	
-      nsresult ConvertPersistentStringToFileSpec(const char *str, nsIFileSpec *path);
-      nsresult CreateNewUser5Tree(nsIFileSpec* oldProfilePath, 
-                                  nsIFileSpec* newProfilePath);
-
-      nsresult GetDirFromPref(nsIFileSpec* oldProfilePath,
-                              nsIFileSpec* newProfilePath, 
-                              const char* newDirName,
-                              const char* pref, 
-                              nsIFileSpec* newPath, 
-                              nsIFileSpec* oldPath);
-
-      nsresult GetSizes(nsFileSpec inputPath,
-                        PRBool readSubdirs,
-                        PRUint32* sizeTotal);
-
-      nsresult ComputeSpaceRequirements(PRInt64 DriveArray[], 
-                                        PRUint32 SpaceReqArray[], 
-                                        PRInt64 Drive, 
-                                        PRUint32 SpaceNeeded);
-
-      nsresult DoTheCopy(nsIFileSpec *oldPath, 
-                         nsIFileSpec *newPath,
-                         PRBool readSubdirs); 
-      nsresult DoTheCopy(nsIFileSpec *oldPath,
-                         nsIFileSpec *newPath,
-                         const char *fileOrDirName,
-                         PRBool isDirectory = PR_FALSE);
-
-      nsresult DoTheCopyAndRename(nsIFileSpec *oldPath, 
-                              nsIFileSpec *newPath,
-                              PRBool readSubdirs,
-                              PRBool needToRenameFiles,
-                              const char *oldName,
-                              const char *newName); 
-      nsresult DoTheCopyAndRename(nsIFileSpec *aPath, 
-                              PRBool aReadSubdirs,
-                              const char *aOldName,
-                              const char *aNewName);
-      nsresult CopyFilesByPattern(nsIFileSpec * oldPathSpec,
-                              nsIFileSpec * newPathSpec,
-                              const char *pattern);
-
-
-#ifdef NEED_TO_COPY_AND_RENAME_NEWSRC_FILES
-      nsresult CopyAndRenameNewsrcFiles(nsIFileSpec *newPath);
-#endif /* NEED_TO_COPY_AND_RENAME_NEWSRC_FILES */
-
-      nsresult DoSpecialUpdates(nsIFileSpec * profilePath);
-      nsresult Rename4xFileAfterMigration(nsIFileSpec *profilePath, const char *oldFileName, const char *newFileName);
-#ifdef IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x
-      nsresult RenameAndMove4xImapFilterFile(nsIFileSpec *profilePath, const char *hostname);
-      nsresult RenameAndMove4xImapFilterFiles(nsIFileSpec *profilePath);
-#endif /* IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x */
-      nsresult RenameAndMove4xPopStateFile(nsIFileSpec *profilePath);
-      nsresult RenameAndMove4xPopFilterFile(nsIFileSpec *profilePath);
-      nsresult RenameAndMove4xPopFile(nsIFileSpec * profilePath, const char *fileNameIn4x, const char *fileNameIn5x);
-  
-      nsresult DetermineOldPath(nsIFileSpec *profilePath, const char *oldPathName, const char *oldPathEntityName, nsIFileSpec *oldPath);
-      nsresult SetPremigratedFilePref(const char *pref_name, nsIFileSpec *filePath);
-#ifdef NEED_TO_COPY_AND_RENAME_NEWSRC_FILES
-      nsresult GetPremigratedFilePref(const char *pref_name, nsIFileSpec **filePath);
-#endif /* NEED_TO_COPY_AND_RENAME_NEWSRC_FILES */
-
-      nsresult getPrefService();
-
-      nsCOMPtr<nsIPrefBranch>    m_prefBranch;
-      nsCOMPtr<nsILocalFile>     m_prefsFile; 
-      nsCOMPtr<nsIDOMWindowInternal>    m_parentWindow;
-      nsCOMPtr<nsIDOMWindow>    mPMProgressWindow;
-};
-
-#endif /* nsPrefMigration_h___ */
deleted file mode 100644
--- a/profile/pref-migrator/src/nsPrefMigrationFactory.cpp
+++ /dev/null
@@ -1,79 +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 Communicator client 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):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 "nsIModule.h"
-#include "nsIGenericFactory.h"
-
-#include "nsPrefMigration.h"
-#include "nsPrefMigrationFactory.h"
-                          
-static NS_IMETHODIMP  
-CreateNewPrefMigration(nsISupports* aOuter, REFNSIID aIID, void **aResult)
-{                                                  
-    if (!aResult) {                                                  
-        return NS_ERROR_NULL_POINTER;                             
-    }                                                                
-    if (aOuter) {                                                    
-        *aResult = nsnull;                                           
-        return NS_ERROR_NO_AGGREGATION;                              
-    }                                                                
-    nsPrefMigration* inst = nsPrefMigration::GetInstance();   
-    if (inst == nsnull)
-      return NS_ERROR_OUT_OF_MEMORY;
-                               
-    nsresult rv = inst->QueryInterface(aIID, aResult);                        
-    if (NS_FAILED(rv)) {                                             
-        *aResult = nsnull;                                           
-    }                                                                
-    return rv;                                                       
-}
-
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrefConverter)
-
-static const nsModuleComponentInfo components[] = 
-{
-    { "Profile Migration", 
-      NS_PREFMIGRATION_CID,
-      NS_PROFILEMIGRATION_CONTRACTID, 
-      CreateNewPrefMigration },
-    { "Pref Conversion",
-      NS_PREFCONVERTER_CID,
-      NS_PREFCONVERTER_CONTRACTID, nsPrefConverterConstructor}
-};
-
-NS_IMPL_NSGETMODULE(nsPrefMigrationModule, components)
deleted file mode 100644
--- a/profile/pref-migrator/src/nsPrefMigrationFactory.h
+++ /dev/null
@@ -1,68 +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 Communicator client 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):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 nsPrefMigrationFactory_h___
-#define nsPrefMigrationFactory_h___
-
-#include "nsPrefMigrationCIDs.h"
-#include "nsIPrefMigration.h"
-#include "nsCOMPtr.h"
-#include "nsIModule.h"
-#include "nsIGenericFactory.h"
-
-// Module implementation
-class nsPrefMigrationModule : public nsIModule
-{
-public:
-    nsPrefMigrationModule();
-    virtual ~nsPrefMigrationModule();
-
-    NS_DECL_ISUPPORTS
-
-    NS_DECL_NSIMODULE
-
-protected:
-    nsresult Initialize();
-
-    void Shutdown();
-
-    PRBool mInitialized;
-    nsCOMPtr<nsIGenericFactory> mFactory;
-};
-
-
-#endif
--- a/testing/mochitest/runtests.py.in
+++ b/testing/mochitest/runtests.py.in
@@ -360,29 +360,35 @@ Are you executing $objdir/_tests/testing
 
   # Server's no longer needed, and perhaps more importantly, anything it might
   # spew to console shouldn't disrupt the leak information table we print next.
   server.stop()
 
   if not os.path.exists(LEAK_REPORT_FILE):
     log.info("WARNING refcount logging is off, so leaks can't be detected!")
   else:
-    leaks = open(LEAK_REPORT_FILE, "r")
-    for line in leaks:
-      log.info(line.rstrip())
-    leaks.close()
-
-    threshold = options.leakThreshold
-    leaks = open(LEAK_REPORT_FILE, "r")
     #                  Per-Inst  Leaked      Total  Rem ...
     #   0 TOTAL              17     192  419115886    2 ...
     # 833 nsTimerImpl        60     120      24726    2 ...
     lineRe = re.compile(r"^\s*\d+\s+(?P<name>\S+)\s+"
                         r"(?P<size>-?\d+)\s+(?P<bytesLeaked>-?\d+)\s+"
                         r"\d+\s+(?P<numLeaked>-?\d+)")
+
+    leaks = open(LEAK_REPORT_FILE, "r")
+    for line in leaks:
+      matches = lineRe.match(line)
+      if (matches and
+          int(matches.group("numLeaked")) == 0 and
+          matches.group("name") != "TOTAL"):
+        continue
+      log.info(line.rstrip())
+    leaks.close()
+
+    threshold = options.leakThreshold
+    leaks = open(LEAK_REPORT_FILE, "r")
     seenTotal = False
     prefix = "TEST-PASS"
     for line in leaks:
       matches = lineRe.match(line)
       if not matches:
         continue
       name = matches.group("name")
       size = int(matches.group("size"))
--- a/toolkit/components/downloads/src/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/src/nsDownloadManager.cpp
@@ -1279,34 +1279,55 @@ nsDownloadManager::GetDefaultDownloadsDi
 
   // Check to see if we have the desktop or the Safari downloads folder
   PRBool equals;
   rv = downloadDir->Equals(desktopDir, &equals);
   NS_ENSURE_SUCCESS(rv, rv);
   if (equals) {
     rv = downloadDir->Append(folderName);
     NS_ENSURE_SUCCESS(rv, rv);
+
+    // This could be the first time we are creating the downloads folder on the
+    // desktop, so make sure it exists.
+    PRBool exists;
+    rv = downloadDir->Exists(&exists);
+    NS_ENSURE_SUCCESS(rv, rv);
+    if (!exists) {
+      rv = downloadDir->Create(nsIFile::DIRECTORY_TYPE, 0755);
+      NS_ENSURE_SUCCESS(rv, rv);
+    }
   }
 #elif defined(XP_WIN) && !defined(WINCE)
   rv = dirService->Get(NS_WIN_DEFAULT_DOWNLOAD_DIR,
                        NS_GET_IID(nsILocalFile),
                        getter_AddRefs(downloadDir));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Check the os version
   nsCOMPtr<nsIPropertyBag2> infoService =
      do_GetService(NS_SYSTEMINFO_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRInt32 version;
   NS_NAMED_LITERAL_STRING(osVersion, "version");
   rv = infoService->GetPropertyAsInt32(osVersion, &version);
+  NS_ENSURE_SUCCESS(rv, rv);
   if (version < 6) { // XP/2K
     rv = downloadDir->Append(folderName);
     NS_ENSURE_SUCCESS(rv, rv);
+
+    // This could be the first time we are creating the downloads folder on the
+    // desktop, so make sure it exists.
+    PRBool exists;
+    rv = downloadDir->Exists(&exists);
+    NS_ENSURE_SUCCESS(rv, rv);
+    if (!exists) {
+      rv = downloadDir->Create(nsIFile::DIRECTORY_TYPE, 0755);
+      NS_ENSURE_SUCCESS(rv, rv);
+    }
   }
 #elif defined(XP_UNIX)
   rv = dirService->Get(NS_UNIX_DEFAULT_DOWNLOAD_DIR,
                        NS_GET_IID(nsILocalFile),
                        getter_AddRefs(downloadDir));
   // fallback to Home/Downloads
   if (NS_FAILED(rv)) {
     rv = dirService->Get(NS_UNIX_HOME_DIR,
@@ -1320,17 +1341,17 @@ nsDownloadManager::GetDefaultDownloadsDi
   rv = dirService->Get(NS_OS_HOME_DIR,
                        NS_GET_IID(nsILocalFile),
                        getter_AddRefs(downloadDir));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = downloadDir->Append(folderName);
   NS_ENSURE_SUCCESS(rv, rv);
 #endif
 
-  NS_ADDREF(*aResult = downloadDir);
+  downloadDir.swap(*aResult);
 
   return NS_OK;
 }
 
 #define NS_BRANCH_DOWNLOAD     "browser.download."
 #define NS_PREF_FOLDERLIST     "folderList"
 #define NS_PREF_DIR            "dir"
 
@@ -1351,74 +1372,71 @@ nsDownloadManager::GetUserDownloadsDirec
                               getter_AddRefs(prefBranch));
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRInt32 val;
   rv = prefBranch->GetIntPref(NS_PREF_FOLDERLIST,
                               &val);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  PRBool bRes = PR_FALSE;
-
   switch(val) {
     case 0: // Desktop
       {
         nsCOMPtr<nsILocalFile> downloadDir;
         nsCOMPtr<nsIProperties> dirService =
            do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
         NS_ENSURE_SUCCESS(rv, rv);
         rv = dirService->Get(NS_OS_DESKTOP_DIR,
                              NS_GET_IID(nsILocalFile),
                              getter_AddRefs(downloadDir));
         NS_ENSURE_SUCCESS(rv, rv);
-        NS_ADDREF(*aResult = downloadDir);
+        downloadDir.swap(*aResult);
         return NS_OK;
       }
       break;
     case 1: // Downloads
-      {
-        rv = GetDefaultDownloadsDirectory(aResult); // refup
-        NS_ENSURE_SUCCESS(rv, rv);
-        (*aResult)->Exists(&bRes);
-        if (!bRes) {
-          rv = (*aResult)->Create(nsIFile::DIRECTORY_TYPE, 0755);
-          NS_ENSURE_SUCCESS(rv, rv);
-        }
-        return NS_OK;
-      }
-      break;
+      return GetDefaultDownloadsDirectory(aResult);
     case 2: // Custom
       {
         nsCOMPtr<nsILocalFile> customDirectory;
         prefBranch->GetComplexValue(NS_PREF_DIR,
                                     NS_GET_IID(nsILocalFile),
                                     getter_AddRefs(customDirectory));
         if (customDirectory) {
-          customDirectory->Exists(&bRes);
-          if (bRes) {
-            NS_ADDREF(*aResult = customDirectory);
+          PRBool exists = PR_FALSE;
+          (void)customDirectory->Exists(&exists);
+
+          if (!exists) {
+            rv = customDirectory->Create(nsIFile::DIRECTORY_TYPE, 0755);
+            if (NS_SUCCEEDED(rv)) {
+              customDirectory.swap(*aResult);
+              return NS_OK;
+            }
+
+            // Create failed, so it still doesn't exist.  Fall out and get the
+            // default downloads directory.
+          }
+
+          PRBool writable = PR_FALSE;
+          PRBool directory = PR_FALSE;
+          (void)customDirectory->IsWritable(&writable);
+          (void)customDirectory->IsDirectory(&directory);
+
+          if (exists && writable && directory) {
+            customDirectory.swap(*aResult);
             return NS_OK;
           }
-          rv = customDirectory->Create(nsIFile::DIRECTORY_TYPE, 0755);
-          NS_ENSURE_SUCCESS(rv, rv);
-          NS_ADDREF(*aResult = customDirectory);
-          return NS_OK;
         }
-        rv = GetDefaultDownloadsDirectory(aResult); // refup
-        NS_ENSURE_SUCCESS(rv, rv);
-        (*aResult)->Exists(&bRes);
-        if (!bRes) {
-          rv = (*aResult)->Create(nsIFile::DIRECTORY_TYPE, 0755);
-          NS_ENSURE_SUCCESS(rv, rv);
-          // Update dir pref
-          prefBranch->SetComplexValue(NS_PREF_DIR,
-                                      NS_GET_IID(nsILocalFile),
-                                      *aResult);
+        rv = GetDefaultDownloadsDirectory(aResult);
+        if (NS_SUCCEEDED(rv)) {
+          (void)prefBranch->SetComplexValue(NS_PREF_DIR,
+                                            NS_GET_IID(nsILocalFile),
+                                            *aResult);
         }
-        return NS_OK;
+        return rv;
       }
       break;
   }
   return NS_ERROR_INVALID_ARG;
 }
 
 NS_IMETHODIMP
 nsDownloadManager::AddDownload(DownloadType aDownloadType,
--- a/toolkit/components/passwordmgr/test/test_privbrowsing.html
+++ b/toolkit/components/passwordmgr/test/test_privbrowsing.html
@@ -193,19 +193,16 @@ var _PBSvc = null;
 function get_PBSvc() {
   if (_PBSvc)
     return _PBSvc;
 
   netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
   try {
     _PBSvc = Cc["@mozilla.org/privatebrowsing;1"].
              getService(Ci.nsIPrivateBrowsingService);
-    if (_PBSvc) {
-      observer.register();
-    }
     return _PBSvc;
   } catch (e) {}
   return null;
 }
 
 
 var ignoreLoad = false;
 function handleLoad(aEvent) {
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -249,18 +249,20 @@
                 readonly="true"/>
 
       <field name="_docShell">null</field>
 
       <property name="docShell"
                 onget="return this._docShell || (this._docShell = this.boxObject.QueryInterface(Components.interfaces.nsIContainerBoxObject).docShell);"
                 readonly="true"/>
 
+      <field name="_webNavigation">null</field>
+
       <property name="webNavigation"
-                onget="return this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);"
+                onget="return this._webNavigation || (this._webNavigation = this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation));"
                 readonly="true"/>
 
       <field name="_webBrowserFind">null</field>
 
       <property name="webBrowserFind"
                 readonly="true">
         <getter>
         <![CDATA[
@@ -306,19 +308,21 @@
         ]]>
         </getter>
       </property>
       
       <property name="webProgress"
                 readonly="true"
                 onget="return this.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebProgress);"/>
 
+      <field name="_contentWindow">null</field>
+
       <property name="contentWindow"
                 readonly="true"
-                onget="return this.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindow);"/>
+                onget="return this._contentWindow || (this._contentWindow = this.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindow));"/>
 
       <property name="sessionHistory"
                 onget="return this.webNavigation.sessionHistory;"
                 readonly="true"/>
 
       <property name="markupDocumentViewer"
                 onget="return this.docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);"
                 readonly="true"/>
@@ -958,17 +962,17 @@
         </body>
       </method>
 
       <method name="swapDocShells">
         <parameter name="aOtherBrowser"/>
         <body>
         <![CDATA[
           // We need to swap fields that are tied to our docshell
-          var fieldsToSwap = [ "_docShell", "_webBrowserFind" ];
+          var fieldsToSwap = [ "_docShell", "_webBrowserFind", "_contentWindow", "_webNavigation" ];
 
           var ourTabBrowser = this.getTabBrowser();
 
           // _fastFind is tied to the docshell if we don't have a tabbrowser
           if ((ourTabBrowser != null) !=
               (aOtherBrowser.getTabBrowser() != null))
             throw "Unable to perform swap on <browsers> if one is in a <tabbrowser> and one is not";
 
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -634,30 +634,34 @@
       </property>
 
       <property name="selected" readonly="true"
                 onget="return this.getAttribute('selected') == 'true';"/>
 
       <property name="_selected">
         <setter>
           <![CDATA[
-          this.setAttribute("selected", val);
+          if (val)
+            this.setAttribute("selected", "true");
+          else
+            this.removeAttribute("selected");
+
           if (this.previousSibling && this.previousSibling.localName == "tab") {
             if (val)
-              this.previousSibling.setAttribute("beforeselected", val);
+              this.previousSibling.setAttribute("beforeselected", "true");
             else
               this.previousSibling.removeAttribute("beforeselected");
             this.removeAttribute("first-tab");
           }
           else
             this.setAttribute("first-tab", "true");
 
           if (this.nextSibling && this.nextSibling.localName == "tab") {
             if (val)
-              this.nextSibling.setAttribute("afterselected", val);
+              this.nextSibling.setAttribute("afterselected", "true");
             else
               this.nextSibling.removeAttribute("afterselected");
             this.removeAttribute("last-tab");
           }
           else
             this.setAttribute("last-tab", "true");
           return val;
         ]]>
--- a/toolkit/mozapps/downloads/src/nsHelperAppDlg.js.in
+++ b/toolkit/mozapps/downloads/src/nsHelperAppDlg.js.in
@@ -39,16 +39,35 @@
 # 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 *****
 */
 
+///////////////////////////////////////////////////////////////////////////////
+//// Helper Functions
+
+/**
+ * Determines if a given directory is able to be used to download to.
+ *
+ * @param aDirectory
+ *        The directory to check.
+ * @returns true if we can use the directory, false otherwise.
+ */
+function isUsableDirectory(aDirectory)
+{
+  return aDirectory.exists() && aDirectory.isDirectory() &&
+         aDirectory.isWritable();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//// nsUnkownContentTypeDialog
+
 /* This file implements the nsIHelperAppLauncherDialog interface.
  *
  * The implementation consists of a JavaScript "class" named nsUnknownContentTypeDialog,
  * comprised of:
  *   - a JS constructor function
  *   - a prototype providing all the interface methods and implementation stuff
  *
  * In addition, this file implements an nsIModule object that registers the
@@ -198,29 +217,31 @@ nsUnknownContentTypeDialog.prototype = {
       var wildCardExtension = "*";
       if (aSuggestedFileExtension) {
         wildCardExtension += aSuggestedFileExtension;
         picker.appendFilter(this.mLauncher.MIMEInfo.description, wildCardExtension);
       }
 
       picker.appendFilters( nsIFilePicker.filterAll );
 
-      // Default to lastDir if it's valid, use the user's default
-      // downloads directory otherwise.
+      // Default to lastDir if it is valid, otherwise use the user's default
+      // downloads directory.  userDownloadsDirectory should always return a
+      // valid directory, so we can safely default to it.
       var dnldMgr = Components.classes["@mozilla.org/download-manager;1"]
                               .getService(Components.interfaces.nsIDownloadManager);
+      picker.displayDirectory = dnldMgr.userDownloadsDirectory;
+
+      // The last directory preference may not exist, which will throw.
       try {
         var lastDir = prefs.getComplexValue("browser.download.lastDir",
                             Components.interfaces.nsILocalFile);
-        if (lastDir.exists())
+        if (isUsableDirectory(lastDir))
           picker.displayDirectory = lastDir;
-        else
-          picker.displayDirectory = dnldMgr.userDownloadsDirectory;
-      } catch (ex) {
-        picker.displayDirectory = dnldMgr.userDownloadsDirectory;
+      }
+      catch (ex) {
       }
 
       if (picker.show() == nsIFilePicker.returnCancel) {
         // null result means user cancelled.
         return null;
       }
 
       // Be sure to save the directory the user chose through the Save As... 
@@ -269,17 +290,17 @@ nsUnknownContentTypeDialog.prototype = {
      * @param   aFileExt
      *          the extension of the file, if one is known; this will be ignored
      *          if aLeafName is non-empty
      * @returns nsILocalFile
      *          the created file
      */
     validateLeafName: function (aLocalFile, aLeafName, aFileExt)
     {
-      if (!aLocalFile || !aLocalFile.exists())
+      if (!(aLocalFile && isUsableDirectory(aLocalFile)))
         return null;
 
       // Remove any leading periods, since we don't want to save hidden files
       // automatically.
       aLeafName = aLeafName.replace(/^\.+/, "");
 
       if (aLeafName == "")
         aLeafName = "unnamed" + (aFileExt ? "." + aFileExt : "");
--- a/toolkit/mozapps/update/src/updater/Makefile.in
+++ b/toolkit/mozapps/update/src/updater/Makefile.in
@@ -61,17 +61,20 @@ LIBS += \
 	$(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
 	$(BZ2_LIBS) \
 	$(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 HAVE_PROGRESSUI = 1
 RCINCLUDE = updater.rc
-CPPSRCS += progressui_win.cpp
+CPPSRCS += \
+	progressui_win.cpp \
+	readstrings.cpp \
+	$(NULL)
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 ws2_32 shell32)
 DEFINES += -DUNICODE -D_UNICODE
 ifndef GNU_CC
 RCFLAGS += -I$(srcdir)
 else
 RCFLAGS += --include-dir $(srcdir)
 endif
 endif
--- a/toolkit/mozapps/update/src/updater/progressui_win.cpp
+++ b/toolkit/mozapps/update/src/updater/progressui_win.cpp
@@ -39,22 +39,22 @@
 
 #include <stdio.h>
 #include <windows.h>
 #include <commctrl.h>
 #include <process.h>
 #include <io.h>
 #include "resource.h"
 #include "progressui.h"
+#include "readstrings.h"
+#include "errors.h"
 
 #define TIMER_ID 1
 #define TIMER_INTERVAL 100
 
-#define MAX_INFO_LENGTH 512
-
 #define RESIZE_WINDOW(hwnd, extrax, extray) \
   { \
     RECT windowSize; \
     GetWindowRect(hwnd, &windowSize); \
     SetWindowPos(hwnd, 0, 0, 0, windowSize.right - windowSize.left + extrax, \
                  windowSize.bottom - windowSize.top + extray, \
                  SWP_NOMOVE | SWP_NOZORDER); \
   }
@@ -65,17 +65,16 @@
     windowPos.length = sizeof(windowPos); \
     GetWindowPlacement(hwnd, &windowPos); \
     SetWindowPos(hwnd, 0, windowPos.rcNormalPosition.left + dx, windowPos.rcNormalPosition.top + dy, 0, 0, \
                  SWP_NOSIZE | SWP_NOZORDER); \
   }
 
 static float sProgress;  // between 0 and 100
 static BOOL  sQuit = FALSE;
-static HFONT sSystemFont = 0;
 
 static BOOL
 GetStringsFile(WCHAR filename[MAX_PATH])
 {
   if (!GetModuleFileNameW(NULL, filename, MAX_PATH))
     return FALSE;
  
   WCHAR *dot = wcsrchr(filename, '.');
@@ -91,17 +90,17 @@ UpdateDialog(HWND hDlg)
 {
   int pos = int(sProgress + 0.5f);
   SendDlgItemMessage(hDlg, IDC_PROGRESS, PBM_SETPOS, pos, 0L);
 }
 
 static void
 ResizeDialogToFit(HWND hDlg)
 {
-  WCHAR text[MAX_INFO_LENGTH];
+  WCHAR text[MAX_TEXT_LEN];
   RECT infoSize, textSize;
   HFONT hInfoFont, hOldFont;
 
   HWND hWndInfo = GetDlgItem(hDlg, IDC_INFO);
   HWND hWndPro  = GetDlgItem(hDlg, IDC_PROGRESS);
 
   // Get the text that is displayed - this is what we're going to make fit.
   if (!GetWindowText(hWndInfo, text, sizeof(text)))
@@ -169,48 +168,39 @@ CenterDialog(HWND hDlg)
                HWND_TOP, 
                rcOwner.left + (rc.right / 2), 
                rcOwner.top + (rc.bottom / 2), 
                0, 0,          // ignores size arguments 
                SWP_NOSIZE); 
 }
 
 static void
-SetItemText(HWND hwnd, const WCHAR *key, const WCHAR *ini)
-{
-  WCHAR text[MAX_INFO_LENGTH];
-  if (!GetPrivateProfileStringW(L"Strings", key, NULL, text, sizeof(text), ini))
-    return;
-  SetWindowTextW(hwnd, text);
-}
-
-static void
 InitDialog(HWND hDlg)
 {
   WCHAR filename[MAX_PATH];
   if (!GetStringsFile(filename))
     return;
 
-  SetItemText(hDlg, L"Title", filename);
-  SetItemText(GetDlgItem(hDlg, IDC_INFO), L"Info", filename);
+  char path[MAX_PATH];
+  WideCharToMultiByte(CP_UTF8, 0, filename, -1, path,
+                      sizeof(path)/sizeof(path[0]), NULL, NULL );
+  StringTable uiStrings;
+  if (ReadStrings(path, &uiStrings) != OK)
+    return;
 
-  // On Win9x, we need to send WM_SETFONT for l10n builds.  Yes, we shouldn't
-  // use the system font.  For example, if the text has Japanese characters on
-  // Win98-en, then the text may not be displayed correctly.  We should perhaps
-  // support loading a font named in updater.ini; however, even then there are
-  // cases where it might not work properly.
-  if (!sSystemFont) {
-    NONCLIENTMETRICS ncm;
-    memset(&ncm, 0, sizeof(ncm));
-    ncm.cbSize = sizeof(ncm);
-    SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
-    sSystemFont = CreateFontIndirect(&ncm.lfMessageFont);
-  }
-  if (sSystemFont)
-    SendDlgItemMessage(hDlg, IDC_INFO, WM_SETFONT, (WPARAM)sSystemFont, 0L);
+  WCHAR szwTitle[MAX_TEXT_LEN];
+  WCHAR szwInfo[MAX_TEXT_LEN];
+
+  MultiByteToWideChar(CP_UTF8, 0, uiStrings.title, strlen(uiStrings.title) + 1,
+                      szwTitle, sizeof(szwTitle)/sizeof(szwTitle[0]));
+  MultiByteToWideChar(CP_UTF8, 0, uiStrings.info, strlen(uiStrings.info) + 1,
+                      szwInfo, sizeof(szwInfo)/sizeof(szwInfo[0]));
+
+  SetWindowTextW(hDlg, szwTitle);
+  SetWindowTextW(GetDlgItem(hDlg, IDC_INFO), szwInfo);
 
   // Set dialog icon
   HICON hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_DIALOG));
   if (hIcon)
     SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
 
   SendDlgItemMessage(hDlg, IDC_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 100));
 
@@ -230,20 +220,16 @@ DialogProc(HWND hDlg, UINT message, WPAR
   {
   case WM_INITDIALOG:
     InitDialog(hDlg);
     return TRUE;
 
   case WM_TIMER:
     if (sQuit) {
       EndDialog(hDlg, 0);
-      if (sSystemFont) {
-        DeleteObject(sSystemFont);
-        sSystemFont = 0;
-      }
     } else {
       UpdateDialog(hDlg);
     }
     return TRUE;
 
   case WM_COMMAND:
     return TRUE;
   }
--- a/toolkit/themes/pinstripe/global/tabbox.css
+++ b/toolkit/themes/pinstripe/global/tabbox.css
@@ -30,21 +30,21 @@ tabbox > tabs {
   margin-bottom: -12px;
   position: relative;
 }
 
 tab {
   -moz-appearance: tab;
 }
 
-tab[first-tab=true] {
+tab:first-of-type {
   -moz-padding-start: 2px;
 }
 
-tab[last-tab=true] {
+tab:last-of-type {
   -moz-padding-end: 2px;
 }
 
 .tab-middle {
   padding: 2px 6px;
 }
 
 .tabs-left,
@@ -111,23 +111,23 @@ tabs.tabs-bottom > tab[selected=true] {
 }
 
 tabbox.tabs-bottom > tabs > tab[beforeselected=true],
 tabs.tabs-bottom > tab[beforeselected=true] {
   -moz-border-end-color: transparent;
   -moz-margin-end: -2px;
 }
 
-tabbox.tabs-bottom > tabs > tab:not([selected=true])[first-tab=true],
-tabs.tabs-bottom > tab:not([selected=true])[first-tab=true] {
+tabbox.tabs-bottom > tabs > tab:first-of-type:not([selected=true]),
+tabs.tabs-bottom > tab:first-of-type:not([selected=true]) {
   -moz-border-start: 4px solid transparent;
 }
 
-tabbox.tabs-bottom > tabs > tab[selected=true][first-tab=true],
-tabs.tabs-bottom > tab[selected=true][first-tab=true] {
+tabbox.tabs-bottom > tabs > tab:first-of-type[selected=true],
+tabs.tabs-bottom > tab:first-of-type[selected=true] {
   -moz-margin-start: 2px;
 }
 
 tabbox.tabs-bottom,
 tabbox.tabs-bottom > tabpanels,
 tabbox.tabs-bottom > tabs > tab[selected=true] > .tab-middle,
 tabs.tabs-bottom > tab[selected=true] > .tab-middle {
   -moz-appearance: dialog;
--- a/toolkit/themes/winstripe/global/tabbox.css
+++ b/toolkit/themes/winstripe/global/tabbox.css
@@ -101,29 +101,29 @@ tab[selected="true"] {
   padding: 1px 6px 4px 6px;
 }
 
 tab:focus > .tab-middle {
   /* Don't specify the outline-color, we should always use initial value. */
   outline: 1px dotted;
 }
 
-tab[beforeselected="true"],
-tab[afterselected="true"][chromedir="rtl"] {
+tab[beforeselected="true"]:not([chromedir="rtl"]),
+tab[selected="true"][chromedir="rtl"] + tab {
   border-right: none;
   -moz-border-radius-topright: 0;
 }
 
-tab[afterselected="true"],
+tab[selected="true"]:not([chromedir="rtl"]) + tab,
 tab[beforeselected="true"][chromedir="rtl"] {
   border-left: none;
   -moz-border-radius-topleft: 0;
 }
 
-tab[first-tab="true"][selected="true"] {
+tab:first-of-type[selected="true"] {
   padding-right: 5px;
   padding-left: 5px;
 }
 
 /* ::::: tab-bottom ::::::::::
    :: Tabs that are attached to the bottom of a panel, but not necessarily
    :: a tabpanels.
    ::::: */
@@ -143,22 +143,22 @@ tab[first-tab="true"][selected="true"] {
 }
 
 .tab-bottom[selected="true"] {
   margin-bottom: 0;
   -moz-border-top-colors: -moz-Dialog;
   padding: 4px 6px 1px 6px;
 }
 
-.tab-bottom[beforeselected="true"],
-.tab-bottom[afterselected="true"][chromedir="rtl"] {
+.tab-bottom[beforeselected="true"]:not([chromedir="rtl"]),
+.tab-bottom[selected="true"][chromedir="rtl"] + .tab-bottom {
   -moz-border-radius-bottomright: 0;
 }
 
-.tab-bottom[afterselected="true"],
+.tab-bottom[selected="true"]:not([chromedir="rtl"]) + .tab-bottom,
 .tab-bottom[beforeselected="true"][chromedir="rtl"] {
   -moz-border-radius-bottomleft: 0;
 }
 
 /* ::::: tabs-bottom ::::: */
 
 .tabs-bottom > .tabs-left,
 .tabs-bottom > .tabs-right {
--- a/widget/src/gtk2/nsFilePicker.cpp
+++ b/widget/src/gtk2/nsFilePicker.cpp
@@ -443,43 +443,50 @@ nsFilePicker::Show(PRInt16 *aReturn)
     gtk_file_chooser_set_preview_widget(GTK_FILE_CHOOSER(file_chooser), img_preview);
     g_signal_connect(file_chooser, "update-preview", G_CALLBACK(UpdateFilePreviewWidget), img_preview);
   }
 
   if (parent_widget && parent_widget->group) {
     gtk_window_group_add_window(parent_widget->group, GTK_WINDOW(file_chooser));
   }
 
-  nsCAutoString directory;
-  if (mDisplayDirectory) {
-    mDisplayDirectory->GetNativePath(directory);
-  } else if (mPrevDisplayDirectory) {
-    mPrevDisplayDirectory->GetNativePath(directory);
-  }
-
-  if (!directory.IsEmpty()) {
-    gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser),
-                                        directory.get());
-  }
-
   NS_ConvertUTF16toUTF8 defaultName(mDefault);
   switch (mMode) {
     case nsIFilePicker::modeOpenMultiple:
       gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(file_chooser), TRUE);
-      // fall through
-    case nsIFilePicker::modeOpen:
-      if (!defaultName.IsEmpty())
-        gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_chooser), defaultName.get());
       break;
     case nsIFilePicker::modeSave:
       gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(file_chooser),
                                         defaultName.get());
       break;
   }
 
+  nsCOMPtr<nsIFile> defaultPath;
+  if (mDisplayDirectory) {
+    mDisplayDirectory->Clone(getter_AddRefs(defaultPath));
+  } else if (mPrevDisplayDirectory) {
+    mPrevDisplayDirectory->Clone(getter_AddRefs(defaultPath));
+  }
+
+  if (defaultPath) {
+    if (!defaultName.IsEmpty() && mMode != nsIFilePicker::modeSave) {
+      // Try to select the intended file. Even if it doesn't exist, GTK still switches
+      // directories.
+      defaultPath->AppendNative(defaultName);
+      nsCAutoString path;
+      defaultPath->GetNativePath(path);
+      gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_chooser), path.get());
+    } else {
+      nsCAutoString directory;
+      defaultPath->GetNativePath(directory);
+      gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser),
+                                          directory.get());
+    }
+  }
+
   gtk_dialog_set_default_response(GTK_DIALOG(file_chooser), GTK_RESPONSE_ACCEPT);
 
   PRInt32 count = mFilters.Count();
   for (PRInt32 i = 0; i < count; ++i) {
     // This is fun... the GTK file picker does not accept a list of filters
     // so we need to split out each string, and add it manually.
 
     char **patterns = g_strsplit(mFilters[i]->get(), ";", -1);
--- a/widget/src/xpwidgets/nsWidgetAtomList.h
+++ b/widget/src/xpwidgets/nsWidgetAtomList.h
@@ -67,30 +67,28 @@ WIDGET_ATOM(collapsed, "collapsed")
 WIDGET_ATOM(comboboxControlFrame, "ComboboxControlFrame")
 WIDGET_ATOM(command, "command")
 WIDGET_ATOM(curpos, "curpos")
 WIDGET_ATOM(_default, "default")
 WIDGET_ATOM(descending, "descending")
 WIDGET_ATOM(dir, "dir")
 WIDGET_ATOM(disabled, "disabled")
 WIDGET_ATOM(_false, "false")
-WIDGET_ATOM(firsttab, "first-tab")
 WIDGET_ATOM(focused, "focused")
 WIDGET_ATOM(Forward, "Forward")
 WIDGET_ATOM(Home, "Home")
 WIDGET_ATOM(hidden, "hidden")
 WIDGET_ATOM(hidecolumnpicker, "hidecolumnpicker")
 WIDGET_ATOM(horizontal, "horizontal")
 WIDGET_ATOM(vertical, "vertical")
 WIDGET_ATOM(id, "id")
 WIDGET_ATOM(image, "image")
 WIDGET_ATOM(input, "input")
 WIDGET_ATOM(key, "key") // The key element / attribute
 WIDGET_ATOM(label, "label")
-WIDGET_ATOM(lasttab, "last-tab")
 WIDGET_ATOM(max, "max")
 WIDGET_ATOM(maxpos, "maxpos")
 WIDGET_ATOM(menu, "menu") // Represents an XP menu
 WIDGET_ATOM(menuitem, "menuitem") // Represents an XP menu item
 WIDGET_ATOM(menupopup, "menupopup") // The XP menu's children.
 WIDGET_ATOM(menuseparator, "menuseparator")  // Divider between menu items
 WIDGET_ATOM(menuFrame, "MenuFrame")
 WIDGET_ATOM(minpos, "minpos")
--- a/xpcom/base/Makefile.in
+++ b/xpcom/base/Makefile.in
@@ -117,16 +117,17 @@ SDK_HEADERS     = \
 		nscore.h \
 		nsCycleCollector.h \
 		nsObjCExceptions.h \
 
 XPIDLSRCS	= \
 		nsIConsoleListener.idl \
 		nsIConsoleMessage.idl \
 		nsIConsoleService.idl \
+		nsIDebug2.idl \
 		nsIErrorService.idl \
 		nsIException.idl \
 		nsIExceptionService.idl \
 		nsIVersionComparator.idl \
 		nsIUUIDGenerator.idl \
 		nsIMutable.idl \
 		nsIMemoryReporter.idl \
 		$(NULL)
--- a/xpcom/base/nsDebugImpl.cpp
+++ b/xpcom/base/nsDebugImpl.cpp
@@ -43,16 +43,17 @@
 #include "prprf.h"
 #include "prlog.h"
 #include "prinit.h"
 #include "plstr.h"
 #include "nsError.h"
 #include "prerror.h"
 #include "prerr.h"
 #include "prenv.h"
+#include "pratom.h"
 
 #if defined(XP_BEOS)
 /* For DEBUGGER macros */
 #include <Debug.h>
 #endif
 
 #if defined(XP_UNIX) || defined(_WIN32) || defined(XP_OS2) || defined(XP_BEOS)
 /* for abort() and getenv() */
@@ -86,17 +87,19 @@ Break(const char *aMsg);
 #if defined(_WIN32)
 #include <windows.h>
 #include <signal.h>
 #include <malloc.h> // for _alloca
 #elif defined(XP_UNIX)
 #include <stdlib.h>
 #endif
 
-NS_IMPL_QUERY_INTERFACE1(nsDebugImpl, nsIDebug)
+static PRInt32 gAssertionCount = 0;
+
+NS_IMPL_QUERY_INTERFACE2(nsDebugImpl, nsIDebug, nsIDebug2)
 
 NS_IMETHODIMP_(nsrefcnt)
 nsDebugImpl::AddRef()
 {
   return 2;
 }
 
 NS_IMETHODIMP_(nsrefcnt)
@@ -129,16 +132,23 @@ nsDebugImpl::Break(const char *aFile, PR
 
 NS_IMETHODIMP
 nsDebugImpl::Abort(const char *aFile, PRInt32 aLine)
 {
   NS_DebugBreak(NS_DEBUG_ABORT, nsnull, nsnull, aFile, aLine);
   return NS_OK;
 }
 
+NS_IMETHODIMP
+nsDebugImpl::GetAssertionCount(PRInt32* aResult)
+{
+  *aResult = gAssertionCount;
+  return NS_OK;
+}
+
 /**
  * Implementation of the nsDebug methods. Note that this code is
  * always compiled in, in case some other module that uses it is
  * compiled with debugging even if this library is not.
  */
 static PRLogModuleInfo* gDebugLog;
 
 static void InitLog(void)
@@ -297,16 +307,17 @@ NS_DebugBreak(PRUint32 aSeverity, const 
 
    case NS_DEBUG_ABORT:
      nsTraceRefcntImpl::WalkTheStack(stderr);
      Abort(buf.buffer);
      return;
    }
 
    // Now we deal with assertions
+   PR_AtomicIncrement(&gAssertionCount);
 
    switch (GetAssertBehavior()) {
    case NS_ASSERT_WARN:
      return;
 
    case NS_ASSERT_SUSPEND:
 #ifdef XP_UNIX
       fprintf(stderr, "Suspending process; attach with the debugger.\n");
--- a/xpcom/base/nsDebugImpl.h
+++ b/xpcom/base/nsDebugImpl.h
@@ -30,22 +30,24 @@
  * 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 "nsIDebug.h"
+#include "nsIDebug2.h"
 
-class nsDebugImpl : public nsIDebug
+class nsDebugImpl : public nsIDebug2
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIDEBUG
+    NS_DECL_NSIDEBUG2
     
     static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
 };
 
 
 #define NS_DEBUG_CONTRACTID "@mozilla.org/xpcom/debug;1"
 #define NS_DEBUG_CLASSNAME  "nsDebug Interface"
 #define NS_DEBUG_CID                                 \
new file mode 100644
--- /dev/null
+++ b/xpcom/base/nsIDebug2.idl
@@ -0,0 +1,49 @@
+/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */
+/* ***** 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 nsIDebugInfoService.
+ *
+ * The Initial Developer of the Original Code is the Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   L. David Baron <dbaron@dbaron.org>, Mozilla Corporation (original author)
+ *
+ * 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 ***** */
+
+/* interface to expose information about calls to NS_DebugBreak */
+
+#include "nsIDebug.idl"
+
+[scriptable, uuid(15c0b474-fedb-4789-878b-def834b84735)]
+interface nsIDebug2 : nsIDebug
+{
+    /**
+     * The number of assertions since process start.
+     */
+    readonly attribute long assertionCount;
+};
--- a/xpcom/glue/nsHashKeys.h
+++ b/xpcom/glue/nsHashKeys.h
@@ -54,16 +54,18 @@
 /** @file nsHashKeys.h
  * standard HashKey classes for nsBaseHashtable and relatives. Each of these
  * classes follows the nsTHashtable::EntryType specification
  *
  * Lightweight keytypes provided here:
  * nsStringHashKey
  * nsCStringHashKey
  * nsUint32HashKey
+ * nsPtrHashkey
+ * nsClearingPtrHashKey
  * nsVoidPtrHashKey
  * nsClearingVoidPtrHashKey
  * nsISupportsHashKey
  * nsIDHashKey
  * nsDepCharHashKey
  * nsCharPtrHashKey
  * nsUnicharPtrHashKey
  * nsHashableHashKey
@@ -190,81 +192,66 @@ public:
   }
   enum { ALLOW_MEMMOVE = PR_TRUE };
 
 private:
   nsCOMPtr<nsISupports> mSupports;
 };
 
 /**
- * hashkey wrapper using void* KeyType
+ * hashkey wrapper using T* KeyType
  *
  * @see nsTHashtable::EntryType for specification
  */
-class nsVoidPtrHashKey : public PLDHashEntryHdr
+template<class T>
+class nsPtrHashKey : public PLDHashEntryHdr
 {
-public:
-  typedef const void* KeyType;
-  typedef const void* KeyTypePointer;
+ public:
+  typedef T *KeyType;
+  typedef const T *KeyTypePointer;
 
-  nsVoidPtrHashKey(const void* key) :
-    mKey(key) { }
-  nsVoidPtrHashKey(const nsVoidPtrHashKey& toCopy) :
-    mKey(toCopy.mKey) { }
-  ~nsVoidPtrHashKey() { }
+  nsPtrHashKey(const T *key) : mKey(const_cast<T*>(key)) {}
+  nsPtrHashKey(const nsPtrHashKey<T> &toCopy) : mKey(toCopy.mKey) {}
+  ~nsPtrHashKey() {}
 
   KeyType GetKey() const { return mKey; }
-  
-  PRBool KeyEquals(KeyTypePointer aKey) const { return aKey == mKey; }
+
+  PRBool KeyEquals(KeyTypePointer key) const { return key == mKey; }
 
-  static KeyTypePointer KeyToPointer(KeyType aKey) { return aKey; }
-  static PLDHashNumber HashKey(KeyTypePointer aKey)
+  static KeyTypePointer KeyToPointer(KeyType key) { return key; }
+  static PLDHashNumber HashKey(KeyTypePointer key)
   {
-    return NS_PTR_TO_INT32(aKey) >>2;
+    return NS_PTR_TO_INT32(key) >> 2;
   }
   enum { ALLOW_MEMMOVE = PR_TRUE };
 
-private:
-  const void* mKey;
+ protected:
+  T *mKey;
 };
 
 /**
- * hashkey wrapper using void* KeyType, that sets key to NULL upon
+ * hashkey wrapper using T* KeyType that sets key to NULL upon
  * destruction. Relevant only in cases where a memory pointer-scanner
  * like valgrind might get confused about stale references.
  *
  * @see nsTHashtable::EntryType for specification
  */
 
-class nsClearingVoidPtrHashKey : public PLDHashEntryHdr
+template<class T>
+class nsClearingPtrHashKey : public nsPtrHashKey<T>
 {
-public:
-  typedef const void* KeyType;
-  typedef const void* KeyTypePointer;
-
-  nsClearingVoidPtrHashKey(const void* key) :
-    mKey(key) { }
-  nsClearingVoidPtrHashKey(const nsClearingVoidPtrHashKey& toCopy) :
-    mKey(toCopy.mKey) { }
-  ~nsClearingVoidPtrHashKey() { mKey = NULL; }
+ public:
+  nsClearingPtrHashKey(const T *key) : nsPtrHashKey<T>(key) {}
+  nsClearingPtrHashKey(const nsClearingPtrHashKey<T> &toCopy) :
+    nsPtrHashKey<T>(toCopy) {}
+  ~nsClearingPtrHashKey() { nsPtrHashKey<T>::mKey = nsnull; }
+};
 
-  KeyType GetKey() const { return mKey; }
-  
-  PRBool KeyEquals(KeyTypePointer aKey) const { return aKey == mKey; }
-
-  static KeyTypePointer KeyToPointer(KeyType aKey) { return aKey; }
-  static PLDHashNumber HashKey(KeyTypePointer aKey)
-  {
-    return NS_PTR_TO_INT32(aKey) >>2;
-  }
-  enum { ALLOW_MEMMOVE = PR_TRUE };
-
-private:
-  const void* mKey;
-};
+typedef nsPtrHashKey<const void> nsVoidPtrHashKey; 
+typedef nsClearingPtrHashKey<const void> nsClearingVoidPtrHashKey;
 
 /**
  * hashkey wrapper using nsID KeyType
  *
  * @see nsTHashtable::EntryType for specification
  */
 class nsIDHashKey : public PLDHashEntryHdr
 {