Merge TM -> JM
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 22 May 2011 08:59:06 -0700
changeset 75092 5113ddba6f6078ddc3b46c43eecd22ab1f89f649
parent 75091 7c4d5e4cd9cfe4c72b8cab4eed2b7c25e49b40f0 (current diff)
parent 69960 57412df720cf576d0970271a25288abd018daef3 (diff)
child 75093 f8159830d8b7cc6ffbaacaaa6e9a5386983c7b17
push id1199
push userjorendorff@mozilla.com
push dateSat, 13 Aug 2011 18:32:33 +0000
treeherdermozilla-inbound@080fece621e4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge TM -> JM
accessible/tests/mochitest/events/test_aria_hidden.html
browser/base/content/browser.js
browser/components/migration/src/nsCaminoProfileMigrator.cpp
browser/components/migration/src/nsCaminoProfileMigrator.h
browser/components/migration/src/nsDogbertProfileMigrator.cpp
browser/components/migration/src/nsDogbertProfileMigrator.h
browser/components/migration/src/nsICabProfileMigrator.cpp
browser/components/migration/src/nsICabProfileMigrator.h
browser/components/migration/src/nsMacIEProfileMigrator.cpp
browser/components/migration/src/nsMacIEProfileMigrator.h
browser/components/migration/src/nsOmniWebProfileMigrator.cpp
browser/components/migration/src/nsOmniWebProfileMigrator.h
browser/components/migration/src/nsPhoenixProfileMigrator.cpp
browser/components/migration/src/nsPhoenixProfileMigrator.h
browser/themes/pinstripe/browser/places/livemarkItem.png
browser/themes/winstripe/browser/places/dropDown-aero.png
browser/themes/winstripe/browser/places/libraryNavigation-aero.png
browser/themes/winstripe/browser/places/libraryNavigation.png
config/preprocessor.pl
config/preprocessor.txt
content/events/test/Makefile.in
dom/base/nsDOMClassInfo.cpp
dom/base/nsGlobalWindow.cpp
dom/base/nsJSEnvironment.cpp
dom/interfaces/range/nsIDOMDocumentRange.idl
dom/plugins/base/nsIPluginInstance.idl
js/src/assembler/assembler/MacroAssemblerX86Common.h
js/src/assembler/jit/ExecutableAllocator.h
js/src/config/autoconf.mk.in
js/src/config/preprocessor.pl
js/src/configure.in
js/src/jit-test/jit_test.py
js/src/jsapi-tests/Makefile.in
js/src/jsapi.cpp
js/src/jsapi.h
js/src/jsarena.h
js/src/jsarray.cpp
js/src/jsatom.cpp
js/src/jsbuiltins.cpp
js/src/jsbuiltins.h
js/src/jsclone.cpp
js/src/jscntxt.cpp
js/src/jscntxt.h
js/src/jscompartment.cpp
js/src/jsdbgapi.cpp
js/src/jsemit.cpp
js/src/jsfun.cpp
js/src/jsfun.h
js/src/jsgc.cpp
js/src/jsgc.h
js/src/jsgcmark.cpp
js/src/jsinfer.cpp
js/src/jsinferinlines.h
js/src/jsinterp.cpp
js/src/jsobj.cpp
js/src/jsobjinlines.h
js/src/json.cpp
js/src/jsopcode.cpp
js/src/jsparse.cpp
js/src/jspubtd.h
js/src/jsreflect.cpp
js/src/jsscope.h
js/src/jsscript.cpp
js/src/jsscript.h
js/src/jsstr.cpp
js/src/jsstrinlines.h
js/src/jstracer.cpp
js/src/jswrapper.cpp
js/src/jswrapper.h
js/src/jsxml.cpp
js/src/methodjit/BaseAssembler.h
js/src/methodjit/FastArithmetic.cpp
js/src/methodjit/MethodJIT.cpp
js/src/methodjit/PolyIC.cpp
js/src/tests/Patterns.pm
js/src/tests/SisyphusMakefile
js/src/tests/bisect.sh
js/src/tests/changes.sh
js/src/tests/config.mk
js/src/tests/config.sh
js/src/tests/detect-universe.sh
js/src/tests/dikdik-n.tests
js/src/tests/get-universe.sh
js/src/tests/importList.html
js/src/tests/importList.js
js/src/tests/js-test-driver-quirks.html
js/src/tests/js-test-driver-standards.html
js/src/tests/known-failures.pl
js/src/tests/menufoot.html
js/src/tests/menuhead.html
js/src/tests/menuhead.js
js/src/tests/mkhtml.pl
js/src/tests/mklistpage.pl
js/src/tests/pattern-expander.pl
js/src/tests/pattern-extracter.pl
js/src/tests/performance-1.8.0.tests
js/src/tests/performance-1.8.1.tests
js/src/tests/performance-1.9.0.tests
js/src/tests/performance-1.9.1.tests
js/src/tests/performance-1.9.2.tests
js/src/tests/post-process-logs.pl
js/src/tests/process-logs.sh
js/src/tests/remove-fixed-failures.sh
js/src/tests/runtests.sh
js/src/tests/slow-n-1.8.1-browser.tests
js/src/tests/slow-n-1.8.1.tests
js/src/tests/slow-n-1.9.0-browser.tests
js/src/tests/slow-n-1.9.0.tests
js/src/tests/slow-n-1.9.1-browser.tests
js/src/tests/slow-n-1.9.1.tests
js/src/tests/slow-n-1.9.2-browser.tests
js/src/tests/slow-n-1.9.2.tests
js/src/tests/spidermonkey-n-1.8.0.tests
js/src/tests/spidermonkey-n-1.8.1.tests
js/src/tests/spidermonkey-n-1.9.0.tests
js/src/tests/spidermonkey-n-1.9.1.tests
js/src/tests/spidermonkey-n-1.9.2.tests
js/src/tests/spidermonkey-n-1.9.3.tests
js/src/tests/test.sh
js/src/tests/userhookeach.js
js/src/xpconnect/shell/xpcshell.cpp
js/src/xpconnect/src/nsXPConnect.cpp
js/src/xpconnect/src/xpcinlines.h
js/src/xpconnect/src/xpcprivate.h
layout/reftests/css-invalid/input/success-ref.html
modules/lib7z/7zLib.cpp
modules/lib7z/7zLib.h
modules/lib7z/7zobjs.mk
modules/lib7z/LZMASDK/7zC.txt
modules/lib7z/LZMASDK/7zFormat.txt
modules/lib7z/LZMASDK/Asm/x64/7zCrcT8U.asm
modules/lib7z/LZMASDK/Asm/x86/7zCrcT8U.asm
modules/lib7z/LZMASDK/C/7z.h
modules/lib7z/LZMASDK/C/7zBuf.c
modules/lib7z/LZMASDK/C/7zBuf.h
modules/lib7z/LZMASDK/C/7zBuf2.c
modules/lib7z/LZMASDK/C/7zCrc.c
modules/lib7z/LZMASDK/C/7zCrc.h
modules/lib7z/LZMASDK/C/7zCrcT8.c
modules/lib7z/LZMASDK/C/7zDec.c
modules/lib7z/LZMASDK/C/7zFile.c
modules/lib7z/LZMASDK/C/7zFile.h
modules/lib7z/LZMASDK/C/7zIn.c
modules/lib7z/LZMASDK/C/7zStream.c
modules/lib7z/LZMASDK/C/7zVersion.h
modules/lib7z/LZMASDK/C/Alloc.c
modules/lib7z/LZMASDK/C/Alloc.h
modules/lib7z/LZMASDK/C/Bcj2.c
modules/lib7z/LZMASDK/C/Bcj2.h
modules/lib7z/LZMASDK/C/Bra.c
modules/lib7z/LZMASDK/C/Bra.h
modules/lib7z/LZMASDK/C/Bra86.c
modules/lib7z/LZMASDK/C/BraIA64.c
modules/lib7z/LZMASDK/C/CpuArch.h
modules/lib7z/LZMASDK/C/Delta.c
modules/lib7z/LZMASDK/C/Delta.h
modules/lib7z/LZMASDK/C/LzFind.c
modules/lib7z/LZMASDK/C/LzFind.h
modules/lib7z/LZMASDK/C/LzFindMt.c
modules/lib7z/LZMASDK/C/LzFindMt.h
modules/lib7z/LZMASDK/C/LzHash.h
modules/lib7z/LZMASDK/C/Lzma2Dec.c
modules/lib7z/LZMASDK/C/Lzma2Dec.h
modules/lib7z/LZMASDK/C/Lzma2Enc.c
modules/lib7z/LZMASDK/C/Lzma2Enc.h
modules/lib7z/LZMASDK/C/Lzma86.h
modules/lib7z/LZMASDK/C/Lzma86Dec.c
modules/lib7z/LZMASDK/C/Lzma86Enc.c
modules/lib7z/LZMASDK/C/LzmaDec.c
modules/lib7z/LZMASDK/C/LzmaDec.h
modules/lib7z/LZMASDK/C/LzmaEnc.c
modules/lib7z/LZMASDK/C/LzmaEnc.h
modules/lib7z/LZMASDK/C/LzmaLib.c
modules/lib7z/LZMASDK/C/LzmaLib.h
modules/lib7z/LZMASDK/C/MtCoder.c
modules/lib7z/LZMASDK/C/MtCoder.h
modules/lib7z/LZMASDK/C/RotateDefs.h
modules/lib7z/LZMASDK/C/Sha256.c
modules/lib7z/LZMASDK/C/Sha256.h
modules/lib7z/LZMASDK/C/Threads.c
modules/lib7z/LZMASDK/C/Threads.h
modules/lib7z/LZMASDK/C/Types.h
modules/lib7z/LZMASDK/C/Util/7z/7z.dsp
modules/lib7z/LZMASDK/C/Util/7z/7z.dsw
modules/lib7z/LZMASDK/C/Util/7z/7zAlloc.c
modules/lib7z/LZMASDK/C/Util/7z/7zAlloc.h
modules/lib7z/LZMASDK/C/Util/7z/7zMain.c
modules/lib7z/LZMASDK/C/Util/7z/makefile
modules/lib7z/LZMASDK/C/Util/7z/makefile.gcc
modules/lib7z/LZMASDK/C/Util/Lzma/LzmaUtil.c
modules/lib7z/LZMASDK/C/Util/Lzma/LzmaUtil.dsp
modules/lib7z/LZMASDK/C/Util/Lzma/LzmaUtil.dsw
modules/lib7z/LZMASDK/C/Util/Lzma/makefile
modules/lib7z/LZMASDK/C/Util/Lzma/makefile.gcc
modules/lib7z/LZMASDK/C/Util/LzmaLib/LzmaLib.def
modules/lib7z/LZMASDK/C/Util/LzmaLib/LzmaLib.dsp
modules/lib7z/LZMASDK/C/Util/LzmaLib/LzmaLib.dsw
modules/lib7z/LZMASDK/C/Util/LzmaLib/LzmaLibExports.c
modules/lib7z/LZMASDK/C/Util/LzmaLib/makefile
modules/lib7z/LZMASDK/C/Util/LzmaLib/resource.rc
modules/lib7z/LZMASDK/C/Xz.c
modules/lib7z/LZMASDK/C/Xz.h
modules/lib7z/LZMASDK/C/XzCrc64.c
modules/lib7z/LZMASDK/C/XzCrc64.h
modules/lib7z/LZMASDK/C/XzDec.c
modules/lib7z/LZMASDK/C/XzEnc.c
modules/lib7z/LZMASDK/C/XzEnc.h
modules/lib7z/LZMASDK/C/XzIn.c
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zCompressionMode.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zCompressionMode.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zDecode.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zDecode.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zEncode.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zEncode.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zExtract.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zFolderInStream.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zFolderInStream.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zFolderOutStream.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zFolderOutStream.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zHandler.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zHandler.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zHandlerOut.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zHeader.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zHeader.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zIn.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zIn.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zItem.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zOut.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zOut.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zProperties.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zProperties.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zRegister.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zSpecStream.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zSpecStream.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zUpdate.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/7zUpdate.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/StdAfx.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/7z/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Archive.def
modules/lib7z/LZMASDK/CPP/7zip/Archive/Archive2.def
modules/lib7z/LZMASDK/CPP/7zip/Archive/ArchiveExports.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/CoderMixer2.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/CoderMixer2.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/CoderMixer2MT.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/CoderMixer2MT.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/CrossThreadProgress.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/CrossThreadProgress.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/DummyOutStream.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/DummyOutStream.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/HandlerOut.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/HandlerOut.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/InStreamWithCRC.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/InStreamWithCRC.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/ItemNameUtils.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/ItemNameUtils.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/MultiStream.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/MultiStream.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/OutStreamWithCRC.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/ParseProperties.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/ParseProperties.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Common/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/DllExports2.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/IArchive.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/Icons/7z.ico
modules/lib7z/LZMASDK/CPP/7zip/Archive/LzmaHandler.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/SplitHandler.cpp
modules/lib7z/LZMASDK/CPP/7zip/Archive/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Archive/XzHandler.cpp
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Alone7z/Alone.dsp
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Alone7z/Alone.dsw
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Alone7z/StdAfx.cpp
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Alone7z/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Alone7z/makefile
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Alone7z/resource.rc
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Format7zExtractR/makefile
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Format7zExtractR/resource.rc
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Format7zR/StdAfx.cpp
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Format7zR/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Format7zR/makefile
modules/lib7z/LZMASDK/CPP/7zip/Bundles/Format7zR/resource.rc
modules/lib7z/LZMASDK/CPP/7zip/Common/CWrappers.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/CWrappers.h
modules/lib7z/LZMASDK/CPP/7zip/Common/CreateCoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/CreateCoder.h
modules/lib7z/LZMASDK/CPP/7zip/Common/FilePathAutoRename.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/FilePathAutoRename.h
modules/lib7z/LZMASDK/CPP/7zip/Common/FileStreams.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/FileStreams.h
modules/lib7z/LZMASDK/CPP/7zip/Common/FilterCoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/FilterCoder.h
modules/lib7z/LZMASDK/CPP/7zip/Common/InBuffer.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/InBuffer.h
modules/lib7z/LZMASDK/CPP/7zip/Common/InOutTempBuffer.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/InOutTempBuffer.h
modules/lib7z/LZMASDK/CPP/7zip/Common/LimitedStreams.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/LimitedStreams.h
modules/lib7z/LZMASDK/CPP/7zip/Common/LockedStream.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/LockedStream.h
modules/lib7z/LZMASDK/CPP/7zip/Common/MethodId.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/MethodId.h
modules/lib7z/LZMASDK/CPP/7zip/Common/MethodProps.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/MethodProps.h
modules/lib7z/LZMASDK/CPP/7zip/Common/OffsetStream.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/OffsetStream.h
modules/lib7z/LZMASDK/CPP/7zip/Common/OutBuffer.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/OutBuffer.h
modules/lib7z/LZMASDK/CPP/7zip/Common/ProgressUtils.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/ProgressUtils.h
modules/lib7z/LZMASDK/CPP/7zip/Common/RegisterArc.h
modules/lib7z/LZMASDK/CPP/7zip/Common/RegisterCodec.h
modules/lib7z/LZMASDK/CPP/7zip/Common/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Common/StreamBinder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/StreamBinder.h
modules/lib7z/LZMASDK/CPP/7zip/Common/StreamObjects.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/StreamObjects.h
modules/lib7z/LZMASDK/CPP/7zip/Common/StreamUtils.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/StreamUtils.h
modules/lib7z/LZMASDK/CPP/7zip/Common/VirtThread.cpp
modules/lib7z/LZMASDK/CPP/7zip/Common/VirtThread.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/Bcj2Coder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/Bcj2Coder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/Bcj2Register.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/BcjCoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/BcjCoder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/BcjRegister.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/BranchCoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/BranchCoder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/BranchMisc.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/BranchMisc.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/BranchRegister.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/ByteSwap.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/CodecExports.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/CopyCoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/CopyCoder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/CopyRegister.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/DeltaFilter.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/AloneLZMA.dsp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/AloneLZMA.dsw
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/LzmaAlone.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/LzmaBench.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/StdAfx.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/makefile
modules/lib7z/LZMASDK/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
modules/lib7z/LZMASDK/CPP/7zip/Compress/Lzma2Decoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/Lzma2Decoder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/Lzma2Encoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/Lzma2Encoder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/Lzma2Register.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LzmaDecoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LzmaDecoder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/LzmaEncoder.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/LzmaEncoder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/LzmaRegister.cpp
modules/lib7z/LZMASDK/CPP/7zip/Compress/RangeCoder.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/RangeCoderBit.h
modules/lib7z/LZMASDK/CPP/7zip/Compress/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/Crc.mak
modules/lib7z/LZMASDK/CPP/7zip/Crc2.mak
modules/lib7z/LZMASDK/CPP/7zip/Guid.txt
modules/lib7z/LZMASDK/CPP/7zip/ICoder.h
modules/lib7z/LZMASDK/CPP/7zip/IDecl.h
modules/lib7z/LZMASDK/CPP/7zip/IPassword.h
modules/lib7z/LZMASDK/CPP/7zip/IProgress.h
modules/lib7z/LZMASDK/CPP/7zip/IStream.h
modules/lib7z/LZMASDK/CPP/7zip/MyVersion.h
modules/lib7z/LZMASDK/CPP/7zip/MyVersionInfo.rc
modules/lib7z/LZMASDK/CPP/7zip/PropID.h
modules/lib7z/LZMASDK/CPP/7zip/SubBuild.mak
modules/lib7z/LZMASDK/CPP/7zip/UI/Client7z/Client7z.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Client7z/Client7z.dsp
modules/lib7z/LZMASDK/CPP/7zip/UI/Client7z/Client7z.dsw
modules/lib7z/LZMASDK/CPP/7zip/UI/Client7z/StdAfx.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Client7z/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Client7z/makefile
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ArchiveCommandLine.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ArchiveExtractCallback.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ArchiveName.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ArchiveName.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ArchiveOpenCallback.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/DefaultName.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/DefaultName.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/DirItem.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/EnumDirItems.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/EnumDirItems.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ExitCode.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/Extract.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/Extract.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ExtractMode.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ExtractingFilePath.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ExtractingFilePath.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/IFileExtractCallback.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/LoadCodecs.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/LoadCodecs.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/OpenArchive.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/OpenArchive.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/PropIDUtils.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/PropIDUtils.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/Property.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/SetProperties.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/SetProperties.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/SortUtils.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/SortUtils.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/TempFiles.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/TempFiles.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/Update.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/Update.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/UpdateAction.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/UpdateAction.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/UpdateCallback.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/UpdateCallback.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/UpdatePair.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/UpdatePair.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/UpdateProduce.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/UpdateProduce.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/WorkDir.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/WorkDir.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Common/ZipRegistry.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/ConsoleClose.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/ConsoleClose.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/ExtractCallbackConsole.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/List.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/List.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/Main.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/MainAr.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/OpenCallbackConsole.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/OpenCallbackConsole.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/PercentPrinter.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/PercentPrinter.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/StdAfx.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/StdAfx.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/UpdateCallbackConsole.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/UserInputUtils.cpp
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/UserInputUtils.h
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/makefile
modules/lib7z/LZMASDK/CPP/7zip/UI/Console/resource.rc
modules/lib7z/LZMASDK/CPP/Build.mak
modules/lib7z/LZMASDK/CPP/Common/AutoPtr.h
modules/lib7z/LZMASDK/CPP/Common/Buffer.h
modules/lib7z/LZMASDK/CPP/Common/CRC.cpp
modules/lib7z/LZMASDK/CPP/Common/C_FileIO.cpp
modules/lib7z/LZMASDK/CPP/Common/C_FileIO.h
modules/lib7z/LZMASDK/CPP/Common/ComTry.h
modules/lib7z/LZMASDK/CPP/Common/CommandLineParser.cpp
modules/lib7z/LZMASDK/CPP/Common/CommandLineParser.h
modules/lib7z/LZMASDK/CPP/Common/Defs.h
modules/lib7z/LZMASDK/CPP/Common/DynamicBuffer.h
modules/lib7z/LZMASDK/CPP/Common/IntToString.cpp
modules/lib7z/LZMASDK/CPP/Common/IntToString.h
modules/lib7z/LZMASDK/CPP/Common/ListFileUtils.cpp
modules/lib7z/LZMASDK/CPP/Common/ListFileUtils.h
modules/lib7z/LZMASDK/CPP/Common/MyCom.h
modules/lib7z/LZMASDK/CPP/Common/MyException.h
modules/lib7z/LZMASDK/CPP/Common/MyGuidDef.h
modules/lib7z/LZMASDK/CPP/Common/MyInitGuid.h
modules/lib7z/LZMASDK/CPP/Common/MyString.cpp
modules/lib7z/LZMASDK/CPP/Common/MyString.h
modules/lib7z/LZMASDK/CPP/Common/MyUnknown.h
modules/lib7z/LZMASDK/CPP/Common/MyVector.cpp
modules/lib7z/LZMASDK/CPP/Common/MyVector.h
modules/lib7z/LZMASDK/CPP/Common/MyWindows.h
modules/lib7z/LZMASDK/CPP/Common/NewHandler.cpp
modules/lib7z/LZMASDK/CPP/Common/NewHandler.h
modules/lib7z/LZMASDK/CPP/Common/StdAfx.h
modules/lib7z/LZMASDK/CPP/Common/StdInStream.cpp
modules/lib7z/LZMASDK/CPP/Common/StdInStream.h
modules/lib7z/LZMASDK/CPP/Common/StdOutStream.cpp
modules/lib7z/LZMASDK/CPP/Common/StdOutStream.h
modules/lib7z/LZMASDK/CPP/Common/StringConvert.cpp
modules/lib7z/LZMASDK/CPP/Common/StringConvert.h
modules/lib7z/LZMASDK/CPP/Common/StringToInt.cpp
modules/lib7z/LZMASDK/CPP/Common/StringToInt.h
modules/lib7z/LZMASDK/CPP/Common/Types.h
modules/lib7z/LZMASDK/CPP/Common/UTFConvert.cpp
modules/lib7z/LZMASDK/CPP/Common/UTFConvert.h
modules/lib7z/LZMASDK/CPP/Common/Wildcard.cpp
modules/lib7z/LZMASDK/CPP/Common/Wildcard.h
modules/lib7z/LZMASDK/CPP/Windows/DLL.cpp
modules/lib7z/LZMASDK/CPP/Windows/DLL.h
modules/lib7z/LZMASDK/CPP/Windows/Defs.h
modules/lib7z/LZMASDK/CPP/Windows/Error.cpp
modules/lib7z/LZMASDK/CPP/Windows/Error.h
modules/lib7z/LZMASDK/CPP/Windows/FileDir.cpp
modules/lib7z/LZMASDK/CPP/Windows/FileDir.h
modules/lib7z/LZMASDK/CPP/Windows/FileFind.cpp
modules/lib7z/LZMASDK/CPP/Windows/FileFind.h
modules/lib7z/LZMASDK/CPP/Windows/FileIO.cpp
modules/lib7z/LZMASDK/CPP/Windows/FileIO.h
modules/lib7z/LZMASDK/CPP/Windows/FileMapping.cpp
modules/lib7z/LZMASDK/CPP/Windows/FileMapping.h
modules/lib7z/LZMASDK/CPP/Windows/FileName.cpp
modules/lib7z/LZMASDK/CPP/Windows/FileName.h
modules/lib7z/LZMASDK/CPP/Windows/Handle.h
modules/lib7z/LZMASDK/CPP/Windows/MemoryLock.cpp
modules/lib7z/LZMASDK/CPP/Windows/MemoryLock.h
modules/lib7z/LZMASDK/CPP/Windows/NtCheck.h
modules/lib7z/LZMASDK/CPP/Windows/PropVariant.cpp
modules/lib7z/LZMASDK/CPP/Windows/PropVariant.h
modules/lib7z/LZMASDK/CPP/Windows/PropVariantConversions.cpp
modules/lib7z/LZMASDK/CPP/Windows/PropVariantConversions.h
modules/lib7z/LZMASDK/CPP/Windows/Registry.cpp
modules/lib7z/LZMASDK/CPP/Windows/Registry.h
modules/lib7z/LZMASDK/CPP/Windows/StdAfx.h
modules/lib7z/LZMASDK/CPP/Windows/Synchronization.cpp
modules/lib7z/LZMASDK/CPP/Windows/Synchronization.h
modules/lib7z/LZMASDK/CPP/Windows/System.cpp
modules/lib7z/LZMASDK/CPP/Windows/System.h
modules/lib7z/LZMASDK/CPP/Windows/Thread.h
modules/lib7z/LZMASDK/CPP/Windows/Time.cpp
modules/lib7z/LZMASDK/CPP/Windows/Time.h
modules/lib7z/LZMASDK/CS/7zip/Common/CRC.cs
modules/lib7z/LZMASDK/CS/7zip/Common/CommandLineParser.cs
modules/lib7z/LZMASDK/CS/7zip/Common/InBuffer.cs
modules/lib7z/LZMASDK/CS/7zip/Common/OutBuffer.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LZ/IMatchFinder.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LZ/LzBinTree.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LZ/LzInWindow.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LZ/LzOutWindow.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LZMA/LzmaBase.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LZMA/LzmaDecoder.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LZMA/LzmaEncoder.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LzmaAlone/LzmaAlone.csproj
modules/lib7z/LZMASDK/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln
modules/lib7z/LZMASDK/CS/7zip/Compress/LzmaAlone/LzmaBench.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/RangeCoder/RangeCoder.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs
modules/lib7z/LZMASDK/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs
modules/lib7z/LZMASDK/CS/7zip/ICoder.cs
modules/lib7z/LZMASDK/Java/SevenZip/CRC.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/LZ/BinTree.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/LZ/InWindow.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/LZ/OutWindow.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/LZMA/Base.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/LZMA/Decoder.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/LZMA/Encoder.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/RangeCoder/Decoder.java
modules/lib7z/LZMASDK/Java/SevenZip/Compression/RangeCoder/Encoder.java
modules/lib7z/LZMASDK/Java/SevenZip/ICodeProgress.java
modules/lib7z/LZMASDK/Java/SevenZip/LzmaAlone.java
modules/lib7z/LZMASDK/Java/SevenZip/LzmaBench.java
modules/lib7z/LZMASDK/Methods.txt
modules/lib7z/LZMASDK/README.mozilla
modules/lib7z/LZMASDK/history.txt
modules/lib7z/LZMASDK/lzma.txt
modules/lib7z/Makefile.in
modules/libpref/src/init/all.js
modules/plugin/Makefile.in
modules/plugin/test/Makefile.in
modules/plugin/test/crashtests/110650-1.html
modules/plugin/test/crashtests/41276-1.html
modules/plugin/test/crashtests/48856-1.html
modules/plugin/test/crashtests/539897-1.html
modules/plugin/test/crashtests/540114-1.html
modules/plugin/test/crashtests/570884.html
modules/plugin/test/crashtests/598862.html
modules/plugin/test/crashtests/626602-1.html
modules/plugin/test/crashtests/crashtests.list
modules/plugin/test/mochitest/307-xo-redirect.sjs
modules/plugin/test/mochitest/Makefile.in
modules/plugin/test/mochitest/cocoa_focus.html
modules/plugin/test/mochitest/cocoa_window_focus.html
modules/plugin/test/mochitest/crashing_subpage.html
modules/plugin/test/mochitest/large-pic.jpg
modules/plugin/test/mochitest/loremipsum.txt
modules/plugin/test/mochitest/loremipsum.xtest
modules/plugin/test/mochitest/loremipsum.xtest^headers^
modules/plugin/test/mochitest/loremipsum_file.txt
modules/plugin/test/mochitest/loremipsum_nocache.txt
modules/plugin/test/mochitest/loremipsum_nocache.txt^headers^
modules/plugin/test/mochitest/neverending.sjs
modules/plugin/test/mochitest/plugin_visibility_loader.html
modules/plugin/test/mochitest/plugin_window.html
modules/plugin/test/mochitest/pluginstream.js
modules/plugin/test/mochitest/post.sjs
modules/plugin/test/mochitest/test_GCrace.html
modules/plugin/test/mochitest/test_bug479979.xul
modules/plugin/test/mochitest/test_bug532208.html
modules/plugin/test/mochitest/test_bug539565-1.html
modules/plugin/test/mochitest/test_bug539565-2.html
modules/plugin/test/mochitest/test_clear_site_data.html
modules/plugin/test/mochitest/test_cocoa_focus.html
modules/plugin/test/mochitest/test_cocoa_window_focus.html
modules/plugin/test/mochitest/test_convertpoint.xul
modules/plugin/test/mochitest/test_cookies.html
modules/plugin/test/mochitest/test_copyText.html
modules/plugin/test/mochitest/test_crash_nested_loop.html
modules/plugin/test/mochitest/test_crash_notify.xul
modules/plugin/test/mochitest/test_crash_notify_no_report.xul
modules/plugin/test/mochitest/test_crash_submit.xul
modules/plugin/test/mochitest/test_crashing.html
modules/plugin/test/mochitest/test_crashing2.html
modules/plugin/test/mochitest/test_enumerate.html
modules/plugin/test/mochitest/test_fullpage.html
modules/plugin/test/mochitest/test_getauthenticationinfo.html
modules/plugin/test/mochitest/test_hanging.html
modules/plugin/test/mochitest/test_instantiation.html
modules/plugin/test/mochitest/test_multipleinstanceobjects.html
modules/plugin/test/mochitest/test_newstreamondestroy.html
modules/plugin/test/mochitest/test_npn_asynccall.html
modules/plugin/test/mochitest/test_npn_timers.html
modules/plugin/test/mochitest/test_npobject_getters.html
modules/plugin/test/mochitest/test_npruntime.xul
modules/plugin/test/mochitest/test_npruntime_construct.html
modules/plugin/test/mochitest/test_npruntime_identifiers.html
modules/plugin/test/mochitest/test_npruntime_npnevaluate.html
modules/plugin/test/mochitest/test_npruntime_npninvoke.html
modules/plugin/test/mochitest/test_npruntime_npninvokedefault.html
modules/plugin/test/mochitest/test_npruntime_npnsetexception.html
modules/plugin/test/mochitest/test_painting.html
modules/plugin/test/mochitest/test_plugin_scroll_painting.html
modules/plugin/test/mochitest/test_pluginstream_asfile.html
modules/plugin/test/mochitest/test_pluginstream_asfileonly.html
modules/plugin/test/mochitest/test_pluginstream_err.html
modules/plugin/test/mochitest/test_pluginstream_geturl.html
modules/plugin/test/mochitest/test_pluginstream_geturlnotify.html
modules/plugin/test/mochitest/test_pluginstream_newstream.html
modules/plugin/test/mochitest/test_pluginstream_post.html
modules/plugin/test/mochitest/test_pluginstream_poststream.html
modules/plugin/test/mochitest/test_pluginstream_seek.html
modules/plugin/test/mochitest/test_pluginstream_seek_close.html
modules/plugin/test/mochitest/test_pluginstream_src.html
modules/plugin/test/mochitest/test_positioning.html
modules/plugin/test/mochitest/test_privatemode.xul
modules/plugin/test/mochitest/test_propertyAndMethod.html
modules/plugin/test/mochitest/test_redirect_handling.html
modules/plugin/test/mochitest/test_streamNotify.html
modules/plugin/test/mochitest/test_streamatclose.html
modules/plugin/test/mochitest/test_twostreams.html
modules/plugin/test/mochitest/test_visibility.html
modules/plugin/test/mochitest/test_windowed_invalidate.html
modules/plugin/test/mochitest/test_wmode.xul
modules/plugin/test/mochitest/test_xulbrowser_plugin_visibility.xul
modules/plugin/test/mochitest/utils.js
modules/plugin/test/mochitest/xulbrowser_plugin_visibility.xul
modules/plugin/test/reftest/border-padding-1-ref.html
modules/plugin/test/reftest/border-padding-1.html
modules/plugin/test/reftest/border-padding-2-ref.html
modules/plugin/test/reftest/border-padding-2.html
modules/plugin/test/reftest/border-padding-3-ref.html
modules/plugin/test/reftest/border-padding-3.html
modules/plugin/test/reftest/div-alpha-opacity.html
modules/plugin/test/reftest/div-alpha-zindex.html
modules/plugin/test/reftest/div-sanity.html
modules/plugin/test/reftest/plugin-alpha-opacity.html
modules/plugin/test/reftest/plugin-alpha-zindex.html
modules/plugin/test/reftest/plugin-background-1-step.html
modules/plugin/test/reftest/plugin-background-10-step.html
modules/plugin/test/reftest/plugin-background-2-step.html
modules/plugin/test/reftest/plugin-background-5-step.html
modules/plugin/test/reftest/plugin-background-ref.html
modules/plugin/test/reftest/plugin-background.css
modules/plugin/test/reftest/plugin-background.html
modules/plugin/test/reftest/plugin-background.js
modules/plugin/test/reftest/plugin-busy-alpha-zindex.html
modules/plugin/test/reftest/plugin-canvas-alpha-zindex.html
modules/plugin/test/reftest/plugin-sanity.html
modules/plugin/test/reftest/plugin-transform-1-ref.html
modules/plugin/test/reftest/plugin-transform-1.html
modules/plugin/test/reftest/plugin-transform-2-ref.html
modules/plugin/test/reftest/plugin-transform-2.html
modules/plugin/test/reftest/plugin-transform-alpha-zindex.html
modules/plugin/test/reftest/pluginproblemui-direction-1-ref.html
modules/plugin/test/reftest/pluginproblemui-direction-1.html
modules/plugin/test/reftest/pluginproblemui-direction-2-ref.html
modules/plugin/test/reftest/pluginproblemui-direction-2.html
modules/plugin/test/reftest/reftest.list
modules/plugin/test/reftest/windowless-clipping-1-ref.html
modules/plugin/test/reftest/windowless-clipping-1.html
modules/plugin/test/testplugin/Info.plist
modules/plugin/test/testplugin/Makefile.in
modules/plugin/test/testplugin/README
modules/plugin/test/testplugin/nptest.cpp
modules/plugin/test/testplugin/nptest.def
modules/plugin/test/testplugin/nptest.h
modules/plugin/test/testplugin/nptest.rc
modules/plugin/test/testplugin/nptest_droid.cpp
modules/plugin/test/testplugin/nptest_gtk2.cpp
modules/plugin/test/testplugin/nptest_macosx.mm
modules/plugin/test/testplugin/nptest_os2.cpp
modules/plugin/test/testplugin/nptest_platform.h
modules/plugin/test/testplugin/nptest_qt.cpp
modules/plugin/test/testplugin/nptest_utils.cpp
modules/plugin/test/testplugin/nptest_utils.h
modules/plugin/test/testplugin/nptest_windows.cpp
modules/plugin/test/unit/head_plugins.js
modules/plugin/test/unit/test_bug455213.js
modules/plugin/test/unit/test_bug471245.js
testing/mochitest/harness-a11y.xul
testing/mochitest/pywebsocket_ignore_sigint.py
testing/mochitest/redirect-a11y.html
xpcom/base/nsTelemetry.cpp
--- a/.hgtags
+++ b/.hgtags
@@ -57,8 +57,9 @@ 138f593553b66c9f815e8f57870c19d6347f7702
 138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R11_1_MU
 e56ecd8b3a68c158025207c5fd081d043e28f5ce GECKO_2_0_BASE
 e273946b74c8d631ed86bd74ba9afe0e67b12378 GECKO_2_1_BASE
 b70744835d94e54eec97b8fd186c96da5708a506 PRE_MOBILE_MERGE
 b70744835d94e54eec97b8fd186c96da5708a506 PRE_MOBILE_MERGE_20110406
 a71bd564ebf5bf4f93d13e84114f759c263130b0 MOBILE_MERGE_DONE
 a71bd564ebf5bf4f93d13e84114f759c263130b0 MOBILE_MERGE_DONE_20110406
 a95d426422816513477e5863add1b00ac7041dcb AURORA_BASE_20110412
+138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R14
--- a/Makefile.in
+++ b/Makefile.in
@@ -157,17 +157,17 @@ endif
 SYM_STORE_SOURCE_DIRS := $(topsrcdir)
 
 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
 
 ifdef MOZ_SYMBOLS_EXTRA_BUILDID
 EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
 endif
 
-export SYMBOL_INDEX_NAME = \
+SYMBOL_INDEX_NAME = \
   $(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_TARGET)-$(BUILDID)$(EXTRA_BUILDID)-symbols.txt
 
 buildsymbols:
 ifdef MOZ_CRASHREPORTER
 ifdef USE_ELF_HACK
 	$(MAKE) -C $(MOZ_BUILD_APP)/installer elfhack
 endif
 	echo building symbol store
@@ -189,17 +189,17 @@ endif
 	grep "sym" $(SYMBOL_INDEX_NAME) > $(SYMBOL_INDEX_NAME).tmp && \
 	  mv $(SYMBOL_INDEX_NAME).tmp $(SYMBOL_INDEX_NAME)
 	cd $(DIST)/crashreporter-symbols && \
           zip -r9D "../$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip" . -i "*.sym" -i "*.txt"
 endif # MOZ_CRASHREPORTER
 
 uploadsymbols:
 ifdef MOZ_CRASHREPORTER
-	$(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh "$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip"
+	$(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_INDEX_NAME) "$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip"
 endif
 
 # defined in package-name.mk
 export MOZ_SOURCE_STAMP
 
 #XXX: this is a hack, since we don't want to clobber for MSVC
 # PGO support, but we can't do this test in client.mk
 ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
--- a/accessible/src/atk/nsAccessibleWrap.cpp
+++ b/accessible/src/atk/nsAccessibleWrap.cpp
@@ -336,19 +336,17 @@ void nsAccessibleWrap::SetMaiHyperlink(M
 {
     NS_ASSERTION(quark_mai_hyperlink, "quark_mai_hyperlink not initialized");
     NS_ASSERTION(IS_MAI_OBJECT(mAtkObject), "Invalid AtkObject");
     if (quark_mai_hyperlink && IS_MAI_OBJECT(mAtkObject)) {
         MaiHyperlink* maiHyperlink = GetMaiHyperlink(PR_FALSE);
         if (!maiHyperlink && !aMaiHyperlink) {
             return; // Never set and we're shutting down
         }
-        if (maiHyperlink) {
-            delete maiHyperlink;
-        }
+        delete maiHyperlink;
         g_object_set_qdata(G_OBJECT(mAtkObject), quark_mai_hyperlink,
                            aMaiHyperlink);
     }
 }
 
 NS_IMETHODIMP nsAccessibleWrap::GetNativeInterface(void **aOutAccessible)
 {
     *aOutAccessible = nsnull;
--- a/accessible/src/base/nsAccTreeWalker.cpp
+++ b/accessible/src/base/nsAccTreeWalker.cpp
@@ -62,17 +62,17 @@ struct WalkState
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccTreeWalker
 ////////////////////////////////////////////////////////////////////////////////
 
 nsAccTreeWalker::
   nsAccTreeWalker(nsIWeakReference* aShell, nsIContent* aContent,
                   PRBool aWalkAnonContent, bool aWalkCache) :
-  mWeakShell(aShell), mState(nsnull), mWalkCache(aWalkCache)
+  mWeakShell(aShell), mWalkCache(aWalkCache), mState(nsnull)
 {
   NS_ASSERTION(aContent, "No node for the accessible tree walker!");
 
   if (aContent)
     mState = new WalkState(aContent);
 
   mChildFilter = aWalkAnonContent ? nsIContent::eAllChildren :
                                   nsIContent::eAllButXBL;
--- a/accessible/src/base/nsAccessNode.h
+++ b/accessible/src/base/nsAccessNode.h
@@ -166,17 +166,17 @@ public:
   {
     return GetNode() && GetNode()->IsNodeOfType(nsINode::eCONTENT);
   }
   bool IsElement() const
   {
     nsINode* node = GetNode();
     return node && node->IsElement();
   }
-  PRBool IsDocument() const
+  bool IsDocumentNode() const
   {
     return GetNode() && GetNode()->IsNodeOfType(nsINode::eDOCUMENT);
   }
 
   /**
    * Return the corresponding press shell for this accessible.
    */
   already_AddRefed<nsIPresShell> GetPresShell();
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -63,17 +63,17 @@
 #include "nsIDOMHTMLObjectElement.h"
 #include "nsIDOMHTMLOptGroupElement.h"
 #include "nsIDOMHTMLOptionElement.h"
 #include "nsIDOMXULElement.h"
 #include "nsIHTMLDocument.h"
 #include "nsImageFrame.h"
 #include "nsILink.h"
 #include "nsIObserverService.h"
-#include "nsIPluginInstance.h"
+#include "nsNPAPIPluginInstance.h"
 #include "nsISupportsUtils.h"
 #include "nsObjectFrame.h"
 #include "nsOuterDocAccessible.h"
 #include "nsRootAccessibleWrap.h"
 #include "nsTextFragment.h"
 #include "mozilla/Services.h"
 #include "nsEventStates.h"
 
@@ -341,18 +341,18 @@ nsAccessibilityService::CreateHTMLObject
     nsCOMPtr<nsIDOMDocument> domDoc;
     obj->GetContentDocument(getter_AddRefs(domDoc));
     if (domDoc)
       return CreateOuterDocAccessible(aContent, aPresShell);
   }
 
 #if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
   // 2) for plugins
-  nsCOMPtr<nsIPluginInstance> pluginInstance;
-  if (NS_SUCCEEDED(aFrame->GetPluginInstance(*getter_AddRefs(pluginInstance))) &&
+  nsRefPtr<nsNPAPIPluginInstance> pluginInstance;
+  if (NS_SUCCEEDED(aFrame->GetPluginInstance(getter_AddRefs(pluginInstance))) &&
       pluginInstance) {
 #ifdef XP_WIN
     // Note: pluginPort will be null if windowless.
     HWND pluginPort = nsnull;
     aFrame->GetPluginPort(&pluginPort);
 
     nsAccessible* accessible = new nsHTMLWin32ObjectOwnerAccessible(aContent,
                                                                     weakShell,
--- a/accessible/src/base/nsAccessible.cpp
+++ b/accessible/src/base/nsAccessible.cpp
@@ -52,17 +52,16 @@
 #include "nsAccTreeWalker.h"
 #include "nsRelUtils.h"
 #include "nsTextEquivUtils.h"
 #include "States.h"
 
 #include "nsIDOMElement.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMDocumentXBL.h"
-#include "nsIDOMDocumentTraversal.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsIDOMHTMLFormElement.h"
 #include "nsIDOMNodeFilter.h"
 #include "nsIDOMNSHTMLElement.h"
 #include "nsIDOMTreeWalker.h"
 #include "nsIDOMXULButtonElement.h"
 #include "nsIDOMXULDocument.h"
 #include "nsIDOMXULElement.h"
@@ -3215,26 +3214,25 @@ nsAccessible::GetSiblingAtOffset(PRInt32
 nsAccessible *
 nsAccessible::GetFirstAvailableAccessible(nsINode *aStartNode) const
 {
   nsAccessible* accessible =
     GetAccService()->GetAccessibleInWeakShell(aStartNode, mWeakShell);
   if (accessible)
     return accessible;
 
-  nsCOMPtr<nsIDOMDocumentTraversal> trav =
-    do_QueryInterface(aStartNode->GetOwnerDoc());
-  NS_ENSURE_TRUE(trav, nsnull);
+  nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(aStartNode->GetOwnerDoc());
+  NS_ENSURE_TRUE(domDoc, nsnull);
 
   nsCOMPtr<nsIDOMNode> currentNode = do_QueryInterface(aStartNode);
-  nsCOMPtr<nsIDOMNode> rootNode(do_QueryInterface(GetNode()));
+  nsCOMPtr<nsIDOMNode> rootNode = do_QueryInterface(GetNode());
   nsCOMPtr<nsIDOMTreeWalker> walker;
-  trav->CreateTreeWalker(rootNode,
-                         nsIDOMNodeFilter::SHOW_ELEMENT | nsIDOMNodeFilter::SHOW_TEXT,
-                         nsnull, PR_FALSE, getter_AddRefs(walker));
+  domDoc->CreateTreeWalker(rootNode,
+                           nsIDOMNodeFilter::SHOW_ELEMENT | nsIDOMNodeFilter::SHOW_TEXT,
+                           nsnull, PR_FALSE, getter_AddRefs(walker));
   NS_ENSURE_TRUE(walker, nsnull);
 
   walker->SetCurrentNode(currentNode);
   while (true) {
     walker->NextNode(getter_AddRefs(currentNode));
     if (!currentNode)
       return nsnull;
 
--- a/accessible/src/base/nsAccessible.h
+++ b/accessible/src/base/nsAccessible.h
@@ -371,16 +371,19 @@ public:
    */
   void TestChildCache(nsAccessible* aCachedChild) const;
 
   //////////////////////////////////////////////////////////////////////////////
   // Downcasting
 
   inline bool IsApplication() const { return mFlags & eApplicationAccessible; }
 
+  inline bool IsDoc() const { return mFlags & eDocAccessible; }
+  nsDocAccessible* AsDoc();
+
   inline bool IsHyperText() const { return mFlags & eHyperTextAccessible; }
   nsHyperTextAccessible* AsHyperText();
 
   inline bool IsHTMLListItem() const { return mFlags & eHTMLListItemAccessible; }
   nsHTMLLIAccessible* AsHTMLListItem();
 
   inline bool IsRoot() const { return mFlags & eRootAccessible; }
   nsRootAccessible* AsRoot();
@@ -524,20 +527,21 @@ protected:
     { mFlags = (mFlags & ~kChildrenFlagsMask) | aFlag; }
 
   /**
    * Flags describing the accessible itself.
    * @note keep these flags in sync with ChildrenFlags
    */
   enum AccessibleTypes {
     eApplicationAccessible = 1 << 2,
-    eHyperTextAccessible = 1 << 3,
-    eHTMLListItemAccessible = 1 << 4,
-    eRootAccessible = 1 << 5,
-    eTextLeafAccessible = 1 << 6
+    eDocAccessible = 1 << 3,
+    eHyperTextAccessible = 1 << 4,
+    eHTMLListItemAccessible = 1 << 5,
+    eRootAccessible = 1 << 6,
+    eTextLeafAccessible = 1 << 7
   };
 
   //////////////////////////////////////////////////////////////////////////////
   // Miscellaneous helpers
 
   /**
    * Return ARIA role (helper method).
    */
--- a/accessible/src/base/nsDocAccessible.cpp
+++ b/accessible/src/base/nsDocAccessible.cpp
@@ -104,16 +104,18 @@ static const PRUint32 kRelationAttrsLen 
 
 nsDocAccessible::
   nsDocAccessible(nsIDocument *aDocument, nsIContent *aRootContent,
                   nsIWeakReference *aShell) :
   nsHyperTextAccessibleWrap(aRootContent, aShell),
   mDocument(aDocument), mScrollPositionChangedTicks(0), mIsLoaded(PR_FALSE),
   mCacheRoot(nsnull), mIsPostCacheProcessing(PR_FALSE)
 {
+  mFlags |= eDocAccessible;
+
   mDependentIDsHash.Init();
   // XXX aaronl should we use an algorithm for the initial cache size?
   mAccessibleCache.Init(kDefaultCacheSize);
   mNodeToAccessibleMap.Init(kDefaultCacheSize);
 
   // If this is a XUL Document, it should not implement nsHyperText
   if (mDocument && mDocument->IsXUL())
     mFlags &= ~eHyperTextAccessible;
@@ -1109,17 +1111,18 @@ nsDocAccessible::ARIAAttributeChanged(ns
     }
     return;
   }
 
   // For aria drag and drop changes we fire a generic attribute change event;
   // at least until native API comes up with a more meaningful event.
   if (aAttribute == nsAccessibilityAtoms::aria_grabbed ||
       aAttribute == nsAccessibilityAtoms::aria_dropeffect ||
-      aAttribute == nsAccessibilityAtoms::aria_hidden) {
+      aAttribute == nsAccessibilityAtoms::aria_hidden ||
+      aAttribute == nsAccessibilityAtoms::aria_sort) {
     FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED,
                                aContent);
   }
 
   // We treat aria-expanded as a global ARIA state for historical reasons
   if (aAttribute == nsAccessibilityAtoms::aria_expanded) {
     nsRefPtr<AccEvent> event =
       new AccStateChangeEvent(aContent, states::EXPANDED);
--- a/accessible/src/base/nsDocAccessible.h
+++ b/accessible/src/base/nsDocAccessible.h
@@ -547,9 +547,16 @@ protected:
    */
   nsRefPtr<NotificationController> mNotificationController;
   friend class NotificationController;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsDocAccessible,
                               NS_DOCACCESSIBLE_IMPL_CID)
 
+inline nsDocAccessible*
+nsAccessible::AsDoc()
+{
+  return mFlags & eDocAccessible ?
+    static_cast<nsDocAccessible*>(this) : nsnull;
+}
+
 #endif
--- a/accessible/src/base/nsTextEquivUtils.cpp
+++ b/accessible/src/base/nsTextEquivUtils.cpp
@@ -292,17 +292,17 @@ nsTextEquivUtils::AppendFromValue(nsAcce
     nsresult rv = aAccessible->GetValue(text);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return AppendString(aString, text) ?
       NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
   }
 
   //XXX: is it necessary to care the accessible is not a document?
-  if (aAccessible->IsDocument())
+  if (aAccessible->IsDocumentNode())
     return NS_ERROR_UNEXPECTED;
 
   nsIContent *content = aAccessible->GetContent();
 
   nsCOMPtr<nsIContent> parent = content->GetParent();
   PRInt32 indexOf = parent->IndexOf(content);
 
   for (PRInt32 i = indexOf - 1; i >= 0; i--) {
--- a/accessible/src/html/nsHTMLTableAccessible.cpp
+++ b/accessible/src/html/nsHTMLTableAccessible.cpp
@@ -44,17 +44,16 @@
 #include "nsAccTreeWalker.h"
 #include "nsAccUtils.h"
 #include "nsDocAccessible.h"
 #include "nsRelUtils.h"
 #include "nsTextEquivUtils.h"
 
 #include "nsIDOMElement.h"
 #include "nsIDOMDocument.h"
-#include "nsIDOMDocumentRange.h"
 #include "nsIDOMRange.h"
 #include "nsISelection2.h"
 #include "nsISelectionPrivate.h"
 #include "nsINameSpaceManager.h"
 #include "nsIDOMHTMLCollection.h"
 #include "nsIDOMHTMLTableCellElement.h"
 #include "nsIDOMHTMLTableElement.h"
 #include "nsIDOMHTMLTableRowElement.h"
--- a/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/accessible/src/html/nsHyperTextAccessible.cpp
@@ -911,17 +911,17 @@ nsresult nsHyperTextAccessible::GetTextH
       // otherwise screen readers will announce the wrong line as the user presses up or down arrow and land
       // at the end of a line.
       nsCOMPtr<nsISelection> domSel;
       nsresult rv = GetSelections(nsISelectionController::SELECTION_NORMAL,
                                   nsnull, getter_AddRefs(domSel));
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsCOMPtr<nsISelectionPrivate> privateSelection(do_QueryInterface(domSel));
-      nsCOMPtr<nsFrameSelection> frameSelection;
+      nsRefPtr<nsFrameSelection> frameSelection;
       rv = privateSelection->GetFrameSelection(getter_AddRefs(frameSelection));
       NS_ENSURE_SUCCESS(rv, rv);
 
       if (frameSelection->GetHint() == nsFrameSelection::HINTLEFT) {
         -- aOffset;  // We are at the start of a line
       }
     }
   }
@@ -1675,17 +1675,17 @@ PRInt32 nsHyperTextAccessible::GetCaretL
 {
   // Provide the line number for the caret, relative to the
   // currently focused node. Use a 1-based index
   nsCOMPtr<nsISelection> domSel;
   GetSelections(nsISelectionController::SELECTION_NORMAL, nsnull,
                 getter_AddRefs(domSel));
   nsCOMPtr<nsISelectionPrivate> privateSelection(do_QueryInterface(domSel));
   NS_ENSURE_TRUE(privateSelection, -1);
-  nsCOMPtr<nsFrameSelection> frameSelection;
+  nsRefPtr<nsFrameSelection> frameSelection;
   privateSelection->GetFrameSelection(getter_AddRefs(frameSelection));
   NS_ENSURE_TRUE(frameSelection, -1);
 
   nsCOMPtr<nsIDOMNode> caretNode;
   domSel->GetFocusNode(getter_AddRefs(caretNode));
   nsCOMPtr<nsIContent> caretContent = do_QueryInterface(caretNode);
   if (!caretContent || !nsCoreUtils::IsAncestorOf(GetNode(), caretContent))
     return -1;
--- a/accessible/src/mac/mozAccessible.mm
+++ b/accessible/src/mac/mozAccessible.mm
@@ -233,25 +233,25 @@ GetNativeFromGeckoAccessible(nsIAccessib
   if ([attribute isEqualToString:NSAccessibilityEnabledAttribute])
     return [NSNumber numberWithBool:[self isEnabled]];
   if ([attribute isEqualToString:NSAccessibilityValueAttribute])
     return [self value];
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
   if ([attribute isEqualToString:NSAccessibilityRoleDescriptionAttribute])
     return NSAccessibilityRoleDescription([self role], nil);
 #endif
-  if ([attribute isEqualToString:kInstanceDescriptionAttribute])
+  if ([attribute isEqualToString: (NSString*) kInstanceDescriptionAttribute])
     return [self customDescription];
   if ([attribute isEqualToString:NSAccessibilityFocusedAttribute])
     return [NSNumber numberWithBool:[self isFocused]];
   if ([attribute isEqualToString:NSAccessibilitySizeAttribute])
     return [self size];
   if ([attribute isEqualToString:NSAccessibilityWindowAttribute])
     return [self window];
-  if ([attribute isEqualToString:kTopLevelUIElementAttribute])
+  if ([attribute isEqualToString: (NSString*) kTopLevelUIElementAttribute])
     return [self window];
   if ([attribute isEqualToString:NSAccessibilityTitleAttribute] || 
       [attribute isEqualToString:NSAccessibilityTitleUIElementAttribute])
     return [self title];
   if ([attribute isEqualToString:NSAccessibilityHelpAttribute])
     return [self help];
     
 #ifdef DEBUG
@@ -466,17 +466,17 @@ GetNativeFromGeckoAccessible(nsIAccessib
 }
 
 - (NSString*)role
 {
 #ifdef DEBUG_A11Y
   NS_ASSERTION(nsAccUtils::IsTextInterfaceSupportCorrect(mGeckoAccessible),
                "Does not support nsIAccessibleText when it should");
 #endif
-  return AXRoles[mRole];
+  return (NSString*) AXRoles[mRole];
 }
 
 - (NSString*)subrole
 {
   return nil;
 }
 
 - (NSString*)title
--- a/accessible/src/mac/nsAccessibleWrap.h
+++ b/accessible/src/mac/nsAccessibleWrap.h
@@ -38,45 +38,46 @@
 
 /* For documentation of the accessibility architecture, 
  * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
  */
 
 #ifndef _nsAccessibleWrap_H_
 #define _nsAccessibleWrap_H_
 
+#include <objc/objc.h>
+
 #include "nsAccessible.h"
 #include "nsAccUtils.h"
 #include "States.h"
 
 #include "nsCOMPtr.h"
 #include "nsRect.h"
 
 #include "nsTArray.h"
 #include "nsAutoPtr.h"
 
 struct AccessibleWrapper;
-struct objc_class;
 
 class nsAccessibleWrap : public nsAccessible
 {
   public: // construction, destruction
     nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
     virtual ~nsAccessibleWrap();
     
     // creates the native accessible connected to this one.
     virtual PRBool Init ();
     
     // get the native obj-c object (mozAccessible)
     NS_IMETHOD GetNativeInterface (void **aOutAccessible);
     
     // the objective-c |Class| type that this accessible's native object
     // should be instantied with.   used on runtime to determine the
     // right type for this accessible's associated native object.
-    virtual objc_class* GetNativeType ();
+    virtual Class GetNativeType ();
 
     virtual void Shutdown ();
     virtual void InvalidateChildren();
 
     virtual nsresult HandleAccEvent(AccEvent* aEvent);
 
     // ignored means that the accessible might still have children, but is not displayed
     // to the user. it also has no native accessible object represented for it.
--- a/accessible/src/mac/nsAccessibleWrap.mm
+++ b/accessible/src/mac/nsAccessibleWrap.mm
@@ -83,17 +83,17 @@ nsAccessibleWrap::GetNativeInterface (vo
     *aOutInterface = (void**)mNativeWrapper->getNativeObject();
     return NS_OK;
   }
   return NS_ERROR_FAILURE;
 }
 
 // overridden in subclasses to create the right kind of object. by default we create a generic
 // 'mozAccessible' node.
-objc_class*
+Class
 nsAccessibleWrap::GetNativeType () 
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
 
   PRUint32 role = Role();
   switch (role) {
     case nsIAccessibleRole::ROLE_PUSHBUTTON:
     case nsIAccessibleRole::ROLE_SPLITBUTTON:
--- a/accessible/src/mac/nsRootAccessibleWrap.h
+++ b/accessible/src/mac/nsRootAccessibleWrap.h
@@ -49,17 +49,17 @@ struct objc_class;
 
 class nsRootAccessibleWrap : public nsRootAccessible
 {
 public:
   nsRootAccessibleWrap(nsIDocument *aDocument, nsIContent *aRootContent,
                        nsIWeakReference *aShell);
   virtual ~nsRootAccessibleWrap();
 
-    objc_class* GetNativeType ();
+    Class GetNativeType ();
     
     // let's our native accessible get in touch with the
     // native cocoa view that is our accessible parent.
     void GetNativeWidget (void **aOutView);
 };
 
 
 #endif
--- a/accessible/src/mac/nsRootAccessibleWrap.mm
+++ b/accessible/src/mac/nsRootAccessibleWrap.mm
@@ -54,17 +54,17 @@ nsRootAccessibleWrap::
   nsRootAccessible(aDocument, aRootContent, aShell)
 {
 }
 
 nsRootAccessibleWrap::~nsRootAccessibleWrap()
 {
 }
 
-objc_class*
+Class
 nsRootAccessibleWrap::GetNativeType ()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
 
   return [mozRootAccessible class];
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
 }
--- a/accessible/src/msaa/nsAccessNodeWrap.cpp
+++ b/accessible/src/msaa/nsAccessNodeWrap.cpp
@@ -270,17 +270,17 @@ STDMETHODIMP nsAccessNodeWrap::get_attri
     /* [length_is][size_is][out] */ BSTR __RPC_FAR *aAttribNames,
     /* [length_is][size_is][out] */ short __RPC_FAR *aNameSpaceIDs,
     /* [length_is][size_is][out] */ BSTR __RPC_FAR *aAttribValues,
     /* [out] */ unsigned short __RPC_FAR *aNumAttribs)
 {
 __try{
   *aNumAttribs = 0;
 
-  if (IsDefunct() || IsDocument())
+  if (IsDefunct() || IsDocumentNode())
     return E_FAIL;
 
   PRUint32 numAttribs = mContent->GetAttrCount();
   if (numAttribs > aMaxAttribs)
     numAttribs = aMaxAttribs;
   *aNumAttribs = static_cast<unsigned short>(numAttribs);
 
   for (PRUint32 index = 0; index < numAttribs; index++) {
@@ -343,17 +343,17 @@ STDMETHODIMP nsAccessNodeWrap::get_compu
     /* [in] */ boolean aUseAlternateView,
     /* [length_is][size_is][out] */ BSTR __RPC_FAR *aStyleProperties,
     /* [length_is][size_is][out] */ BSTR __RPC_FAR *aStyleValues,
     /* [out] */ unsigned short __RPC_FAR *aNumStyleProperties)
 {
 __try{
   *aNumStyleProperties = 0;
 
-  if (IsDefunct() || IsDocument())
+  if (IsDefunct() || IsDocumentNode())
     return E_FAIL;
 
   nsCOMPtr<nsIDOMCSSStyleDeclaration> cssDecl =
     nsCoreUtils::GetComputedStyleDeclaration(EmptyString(), mContent);
   NS_ENSURE_TRUE(cssDecl, E_FAIL);
 
   PRUint32 length;
   cssDecl->GetLength(&length);
@@ -378,17 +378,17 @@ STDMETHODIMP nsAccessNodeWrap::get_compu
 
 STDMETHODIMP nsAccessNodeWrap::get_computedStyleForProperties( 
     /* [in] */ unsigned short aNumStyleProperties,
     /* [in] */ boolean aUseAlternateView,
     /* [length_is][size_is][in] */ BSTR __RPC_FAR *aStyleProperties,
     /* [length_is][size_is][out] */ BSTR __RPC_FAR *aStyleValues)
 {
 __try {
-  if (IsDefunct() || IsDocument())
+  if (IsDefunct() || IsDocumentNode())
     return E_FAIL;
  
   nsCOMPtr<nsIDOMCSSStyleDeclaration> cssDecl =
     nsCoreUtils::GetComputedStyleDeclaration(EmptyString(), mContent);
   NS_ENSURE_TRUE(cssDecl, E_FAIL);
 
   PRUint32 index;
   for (index = 0; index < aNumStyleProperties; index ++) {
--- a/accessible/src/msaa/nsAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsAccessibleWrap.cpp
@@ -1757,16 +1757,48 @@ nsAccessibleWrap::GetXPAccessibleFor(con
 
   // if its us real easy - this seems to always be the case
   if (aVarChild.lVal == CHILDID_SELF)
     return this;
 
   if (nsAccUtils::MustPrune(this))
     return nsnull;
 
+  // If lVal negative then it is treated as child ID and we should look for
+  // accessible through whole accessible subtree including subdocuments.
+  // Otherwise we treat lVal as index in parent.
+
+  if (aVarChild.lVal < 0) {
+    // Convert child ID to unique ID.
+    void* uniqueID = reinterpret_cast<void*>(-aVarChild.lVal);
+
+    // Document.
+    if (IsDoc())
+      return AsDoc()->GetAccessibleByUniqueIDInSubtree(uniqueID);
+
+    // ARIA document.
+    if (ARIARole() == nsIAccessibleRole::ROLE_DOCUMENT) {
+      nsDocAccessible* document = GetDocAccessible();
+      nsAccessible* child =
+        document->GetAccessibleByUniqueIDInSubtree(uniqueID);
+
+      // Check whether the accessible for the given ID is a child of ARIA
+      // document.
+      nsAccessible* parent = child ? child->GetParent() : nsnull;
+      while (parent && parent != document) {
+        if (parent == this)
+          return child;
+
+        parent = parent->GetParent();
+      }
+    }
+
+    return nsnull;
+  }
+
   // Gecko child indices are 0-based in contrast to indices used in MSAA.
   return GetChildAt(aVarChild.lVal - 1);
 }
 
 void nsAccessibleWrap::UpdateSystemCaret()
 {
   // Move the system caret so that Windows Tablet Edition and tradional ATs with 
   // off-screen model can follow the caret
--- a/accessible/src/msaa/nsAccessibleWrap.h
+++ b/accessible/src/msaa/nsAccessibleWrap.h
@@ -322,17 +322,17 @@ public: // construction, destruction
    * We will use an invisible system caret.
    * Gecko is still responsible for drawing its own caret
    */
   void UpdateSystemCaret();
 
   /**
    * Find an accessible by the given child ID in cached documents.
    */
-  virtual nsAccessible *GetXPAccessibleFor(const VARIANT& aVarChild);
+  nsAccessible* GetXPAccessibleFor(const VARIANT& aVarChild);
 
   NS_IMETHOD GetNativeInterface(void **aOutAccessible);
 
   // NT4 does not have the oleacc that defines these methods. So we define copies here that automatically
   // load the library only if needed.
   static STDMETHODIMP AccessibleObjectFromWindow(HWND hwnd,DWORD dwObjectID,REFIID riid,void **ppvObject);
   static STDMETHODIMP NotifyWinEvent(DWORD event,HWND hwnd,LONG idObjectType,LONG idObject);
 
--- a/accessible/src/msaa/nsDocAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsDocAccessibleWrap.cpp
@@ -94,32 +94,16 @@ STDMETHODIMP nsDocAccessibleWrap::QueryI
 
   if (NULL == *ppv)
     return nsHyperTextAccessibleWrap::QueryInterface(iid, ppv);
     
   (reinterpret_cast<IUnknown*>(*ppv))->AddRef();
   return S_OK;
 }
 
-nsAccessible*
-nsDocAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild)
-{
-  // If lVal negative then it is treated as child ID and we should look for
-  // accessible through whole accessible subtree including subdocuments.
-  // Otherwise we treat lVal as index in parent.
-
-  if (aVarChild.vt == VT_I4 && aVarChild.lVal < 0) {
-    // Convert child ID to unique ID.
-    void* uniqueID = reinterpret_cast<void*>(-aVarChild.lVal);
-    return GetAccessibleByUniqueIDInSubtree(uniqueID);
-  }
-
-  return nsAccessibleWrap::GetXPAccessibleFor(aVarChild);
-}
-
 STDMETHODIMP nsDocAccessibleWrap::get_URL(/* [out] */ BSTR __RPC_FAR *aURL)
 {
 __try {
   *aURL = NULL;
 
   nsAutoString URL;
   nsresult rv = GetURL(URL);
   if (NS_FAILED(rv))
--- a/accessible/src/msaa/nsDocAccessibleWrap.h
+++ b/accessible/src/msaa/nsDocAccessibleWrap.h
@@ -87,19 +87,16 @@ public:
     // Override get_accValue to provide URL when no other value is available
     virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_accValue( 
         /* [optional][in] */ VARIANT varChild,
         /* [retval][out] */ BSTR __RPC_FAR *pszValue);
 
   // nsAccessNode
   virtual void Shutdown();
 
-  // nsAccessibleWrap
-  virtual nsAccessible *GetXPAccessibleFor(const VARIANT& varChild);
-
   // nsDocAccessible
   virtual void* GetNativeWindow() const;
 
 protected:
   // nsDocAccessible
   virtual void NotifyOfInitialUpdate();
 
 protected:
--- a/accessible/tests/mochitest/events/Makefile.in
+++ b/accessible/tests/mochitest/events/Makefile.in
@@ -46,18 +46,18 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =\
 		docload_wnd.html \
 		docload_wnd.xul \
 		focus.html \
 		scroll.html \
 		test_aria_alert.html \
-		test_aria_hidden.html \
 		test_aria_menu.html \
+		test_aria_objattr.html \
 		test_aria_statechange.html \
 		test_attrs.html \
 		test_caretmove.html \
 		test_caretmove.xul \
 		test_coalescence.html \
 		test_contextmenu.html \
 		test_docload.html \
 		test_docload.xul \
rename from accessible/tests/mochitest/events/test_aria_hidden.html
rename to accessible/tests/mochitest/events/test_aria_objattr.html
--- a/accessible/tests/mochitest/events/test_aria_hidden.html
+++ b/accessible/tests/mochitest/events/test_aria_objattr.html
@@ -1,12 +1,12 @@
 <html>
 
 <head>
-  <title>Accessible ARIA hidden attribute</title>
+  <title>Accessible ARIA object attribute changes</title>
 
   <link rel="stylesheet" type="text/css"
         href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 
   <script type="application/javascript"
           src="chrome://mochikit/content/MochiKit/packed.js"></script>
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
@@ -38,42 +38,73 @@
       }
 
       this.getID = function hideNode_getID()
       {
         return "aria-hidden for " + aID + " " + bHide;
       }
     }
 
+    function updateSort(aID, aSort)
+    {
+      this.node = getNode(aID);
+      this.accessible = getAccessible(this.node);
+
+      this.eventSeq = [
+        new invokerChecker(EVENT_OBJECT_ATTRIBUTE_CHANGED, this.accessible),
+      ];
+
+      this.invoke = function updateSort_invoke()
+      {
+        this.node.setAttribute("aria-sort", aSort);
+      }
+
+      this.getID = function updateSort_getID()
+      {
+        return "aria-sort for " + aID + " " + aSort;
+      }
+    }
+
+    // Debug stuff.
+    // gA11yEventDumpID = "eventdump";
+    // gA11yEventDumpToConsole = true;
+    
     function doTests()
     {
-      //gA11yEventDumpID = "eventdump"; // debug stuff
-
       gQueue = new eventQueue();
 
       gQueue.push(new hideNode("hideable", "true"));
 
+      gQueue.push(new updateSort("sortable", "ascending"));
+
       gQueue.invoke(); // Will call SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTests);
   </script>
 </head>
 
 <body>
 
   <a target="_blank"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=581096"
      title="Add support for aria-hidden">
     Mozilla Bug 581096
   </a>
 
+  <a target="_blank"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=640707"
+     title="Add event support for aria-sort">
+    Mozilla Bug 640707
+  </a>
+
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
   <div id="eventdump"></div>
 
   <div id="hideable"><div>Hi</div><div>there</div></div>
 
+  <div id="sortable" role="columnheader" aria-sort"none">aria-sort</div>
 </body>
 </html>
--- a/accessible/tests/mochitest/text/Makefile.in
+++ b/accessible/tests/mochitest/text/Makefile.in
@@ -45,15 +45,15 @@ relativesrcdir  = accessible/text
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
 		doc.html \
 		test_doc.html \
 		test_hypertext.html \
 		test_passwords.html \
-		test_singleline.html \
-		test_whitespaces.html \
+		$(warning test_singleline.html disabled due to bug 652459) \
+		$(warning test_whitespaces.html disabled due to bug 652459) \
 		test_words.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -180,18 +180,17 @@ EXTRA_DEPS	+= \
 DEFINES		+= $(STATIC_DEFINES)
 CPPSRCS		+= $(STATIC_CPPSRCS)
 EXTRA_DSO_LIBS	+= $(STATIC_EXTRA_DSO_LIBS)
 EXTRA_LIBS	+= $(STATIC_EXTRA_LIBS)
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
-OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32 delayimp)
-LDFLAGS += -delayload:xul.dll -delayload:xpcom.dll -delayload:plc4.dll -delayload:nspr4.dll -delayload:mozalloc.dll
+OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 RCINCLUDE = splash.rc
 ifndef GNU_CC
 RCFLAGS += -DMOZ_PHOENIX -I$(srcdir)
 else
 RCFLAGS += -DMOZ_PHOENIX --include-dir $(srcdir)
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -51,17 +51,16 @@
 
 #include "nsCOMPtr.h"
 #include "nsILocalFile.h"
 #include "nsStringGlue.h"
 
 #ifdef XP_WIN
 // we want to use the DLL blocklist if possible
 #define XRE_WANT_DLL_BLOCKLIST
-#define XRE_PRELOAD_XUL
 // we want a wmain entry point
 #include "nsWindowsWMain.cpp"
 #endif
 
 static void Output(const char *fmt, ... )
 {
   va_list ap;
   va_start(ap, fmt);
--- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js
+++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js
@@ -249,28 +249,25 @@ let TestPilotSetup = {
       { notify: function(timer) {
           self.reloadRemoteExperiments(function() {
             self._notifyUserOfTasks();
 	  });
       }}, this._prefs.getValue(POPUP_REMINDER_INTERVAL, 86400000),
       Ci.nsITimer.TYPE_REPEATING_SLACK);
 
       this.getVersion(function() {
-      // Show first run page (in front window) if newly installed or upgraded.
-        let currVersion = self._prefs.getValue(VERSION_PREF, "firstrun");
-
-        if (currVersion != self.version) {
-          if(!self._isBetaChannel()) {
-            // Don't show first run page in ffx4 beta version.
+        /* Show first run page (in front window) only the first time after install;
+         * Don't show first run page in Feedback UI version. */
+        if ((self._prefs.getValue(VERSION_PREF, "") == "") &&
+           (!self._interfaceBuilder.channelUsesFeedback())) {
             self._prefs.setValue(VERSION_PREF, self.version);
             let browser = self._getFrontBrowserWindow().getBrowser();
             let url = self._prefs.getValue(FIRST_RUN_PREF, "");
             let tab = browser.addTab(url);
             browser.selectedTab = tab;
-          }
         }
 
         // Install tasks. (This requires knowing the version, so it is
         // inside the callback from getVersion.)
         self.checkForTasks(function() {
           /* Callback to complete startup after we finish
            * checking for tasks. */
          self.startupComplete = true;
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -780,16 +780,18 @@ pref("browser.sessionstore.max_windows_u
 // (this pref has no effect if more than 6 hours have passed since the last crash)
 pref("browser.sessionstore.max_resumed_crashes", 1);
 // The number of tabs that can restore concurrently:
 // < 0 = All tabs can restore at the same time
 //   0 = Only the selected tab in each window will be restored
 //       Other tabs won't be restored until they are selected
 //   N = The number of tabs to restore at the same time
 pref("browser.sessionstore.max_concurrent_tabs", 3);
+// Whether to automatically restore hidden tabs (i.e., tabs in other tab groups) or not
+pref("browser.sessionstore.restore_hidden_tabs", false);
 
 // allow META refresh by default
 pref("accessibility.blockautorefresh", false);
 
 // Whether history is enabled or not.
 pref("places.history.enabled", true);
 
 // The percentage of system memory that the Places database can use.  Out of the
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -354,17 +354,16 @@ appUpdater.prototype =
      * See nsIUpdateService.idl
      */
     onError: function(aRequest, aUpdate) {
       // Errors in the update check are treated as no updates found. If the
       // update check fails repeatedly without a success the user will be
       // notified with the normal app update user interface so this is safe.
       gAppUpdater.isChecking = false;
       gAppUpdater.selectPanel("noUpdatesFound");
-      return;
     },
 
     /**
      * See nsISupports.idl
      */
     QueryInterface: function(aIID) {
       if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) &&
           !aIID.equals(Components.interfaces.nsISupports))
@@ -608,16 +607,18 @@ var gChannelSelector = {
 
   apply: function() {
     this.channelValue = document.getElementById("channelMenulist").selectedItem.value;
     this.setChannelLabel(this.channelValue);
 
     // Change app update channel.
     Services.prefs.setCharPref("app.update.desiredChannel", this.channelValue);
 
+    // Stop any downloads in progress
+    gAppUpdater.aus.pauseDownload();
     // App updater will look at app.update.desiredChannel for new channel value
     // and will clear it when the update is complete.
     gAppUpdater.isChecking = true;
     gAppUpdater.checker.checkForUpdates(gAppUpdater.updateCheckListener, true);
 
     this.hide();
   },
 
--- a/browser/base/content/browser-tabview.js
+++ b/browser/base/content/browser-tabview.js
@@ -35,51 +35,65 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 let TabView = {
   _deck: null,
   _iframe: null,
   _window: null,
-  _firstUseExperienced: false,
   _browserKeyHandlerInitialized: false,
   _isFrameLoading: false,
   _initFrameCallbacks: [],
+  PREF_BRANCH: "browser.panorama.",
+  PREF_FIRST_RUN: "browser.panorama.experienced_first_run",
+  PREF_STARTUP_PAGE: "browser.startup.page",
+  PREF_RESTORE_ENABLED_ONCE: "browser.panorama.session_restore_enabled_once",
   VISIBILITY_IDENTIFIER: "tabview-visibility",
 
   // ----------
   get windowTitle() {
     delete this.windowTitle;
     let brandBundle = document.getElementById("bundle_brand");
     let brandShortName = brandBundle.getString("brandShortName");
     let title = gNavigatorBundle.getFormattedString("tabView2.title", [brandShortName]);
     return this.windowTitle = title;
   },
 
   // ----------
   get firstUseExperienced() {
-    return this._firstUseExperienced;
+    let pref = this.PREF_FIRST_RUN;
+    if (Services.prefs.prefHasUserValue(pref))
+      return Services.prefs.getBoolPref(pref);
+
+    return false;
   },
 
   // ----------
   set firstUseExperienced(val) {
-    if (val != this._firstUseExperienced)
-      Services.prefs.setBoolPref("browser.panorama.experienced_first_run", val);
+    Services.prefs.setBoolPref(this.PREF_FIRST_RUN, val);
+  },
+
+  // ----------
+  get sessionRestoreEnabledOnce() {
+    let pref = this.PREF_RESTORE_ENABLED_ONCE;
+    if (Services.prefs.prefHasUserValue(pref))
+      return Services.prefs.getBoolPref(pref);
+
+    return false;
+  },
+
+  // ----------
+  set sessionRestoreEnabledOnce(val) {
+    Services.prefs.setBoolPref(this.PREF_RESTORE_ENABLED_ONCE, val);
   },
 
   // ----------
   init: function TabView_init() {
-    if (!Services.prefs.prefHasUserValue("browser.panorama.experienced_first_run") ||
-        !Services.prefs.getBoolPref("browser.panorama.experienced_first_run")) {
-      Services.prefs.addObserver(
-        "browser.panorama.experienced_first_run", this, false);
-    } else {
-      this._firstUseExperienced = true;
-
+    if (this.firstUseExperienced) {
       if ((gBrowser.tabs.length - gBrowser.visibleTabs.length) > 0)
         this._setBrowserKeyHandlers();
 
       // ___ visibility
       let sessionstore =
         Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
       let data = sessionstore.getWindowValue(window, this.VISIBILITY_IDENTIFIER);
 
@@ -95,36 +109,34 @@ let TabView = {
             self._initFrame(function() {
               self._window.UI.onTabSelect(gBrowser.selectedTab);
             });
         };
         gBrowser.tabContainer.addEventListener(
           "TabShow", this._tabShowEventListener, true);
       }
     }
+
+    Services.prefs.addObserver(this.PREF_BRANCH, this, false);
   },
 
   // ----------
   // Observes topic changes.
   observe: function TabView_observe(subject, topic, data) {
-    if (topic == "nsPref:changed") {
-      Services.prefs.removeObserver(
-        "browser.panorama.experienced_first_run", this);
-      this._firstUseExperienced = true;
+    if (data == this.PREF_FIRST_RUN && this.firstUseExperienced) {
       this._addToolbarButton();
+      this.enableSessionRestore();
     }
   },
 
   // ----------
   // Uninitializes TabView.
   uninit: function TabView_uninit() {
-    if (!this._firstUseExperienced) {
-      Services.prefs.removeObserver(
-        "browser.panorama.experienced_first_run", this);
-    }
+    Services.prefs.removeObserver(this.PREF_BRANCH, this);
+
     if (this._tabShowEventListener) {
       gBrowser.tabContainer.removeEventListener(
         "TabShow", this._tabShowEventListener, true);
     }
   },
 
   // ----------
   // Creates the frame and calls the callback once it's loaded. 
@@ -361,10 +373,28 @@ let TabView = {
     if (-1 == alltabsPos)
       return;
 
     currentSet[alltabsPos] += "," + buttonId;
     currentSet = currentSet.join(",");
     toolbar.currentSet = currentSet;
     toolbar.setAttribute("currentset", currentSet);
     document.persist(toolbar.id, "currentset");
+  },
+
+  // ----------
+  // Function: enableSessionRestore
+  // Enables automatic session restore when the browser is started. Does
+  // nothing if we already did that once in the past.
+  enableSessionRestore: function UI_enableSessionRestore() {
+    if (!this._window || !this.firstUseExperienced)
+      return;
+
+    // do nothing if we already enabled session restore once
+    if (this.sessionRestoreEnabledOnce)
+      return;
+
+    this.sessionRestoreEnabledOnce = true;
+
+    // enable session restore
+    Services.prefs.setIntPref(this.PREF_STARTUP_PAGE, 3);
   }
 };
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -301,32 +301,38 @@ function SetClickAndHoldHandlers() {
 
   function _addClickAndHoldListenersOnElement(aElm) {
     aElm.addEventListener("mousedown", mousedownHandler, true);
     aElm.addEventListener("mouseup", stopTimer, false);
     aElm.addEventListener("mouseout", stopTimer, false);
     aElm.addEventListener("click", clickHandler, true);
   }
 
-  // Bug 414797: Clone the dropmarker's menu into both the back and
-  // the forward buttons.
+  // Bug 414797: Clone unified-back-forward-button's context menu into both the
+  // back and the forward buttons.
   var unifiedButton = document.getElementById("unified-back-forward-button");
   if (unifiedButton && !unifiedButton._clickHandlersAttached) {
-    var popup = document.getElementById("backForwardMenu").cloneNode(true);
+    unifiedButton._clickHandlersAttached = true;
+
+    let popup = document.getElementById("backForwardMenu").cloneNode(true);
     popup.removeAttribute("id");
-    var backButton = document.getElementById("back-button");
+    // Prevent the context attribute on unified-back-forward-button from being
+    // inherited.
+    popup.setAttribute("context", "");
+
+    let backButton = document.getElementById("back-button");
     backButton.setAttribute("type", "menu");
     backButton.appendChild(popup);
     _addClickAndHoldListenersOnElement(backButton);
-    var forwardButton = document.getElementById("forward-button");
+
+    let forwardButton = document.getElementById("forward-button");
     popup = popup.cloneNode(true);
     forwardButton.setAttribute("type", "menu");
     forwardButton.appendChild(popup);
     _addClickAndHoldListenersOnElement(forwardButton);
-    unifiedButton._clickHandlersAttached = true;
   }
 }
 
 const gSessionHistoryObserver = {
   observe: function(subject, topic, data)
   {
     if (topic != "browser:purge-session-history")
       return;
@@ -4113,17 +4119,17 @@ var XULBrowserWindow = {
   status: "",
   defaultStatus: "",
   jsStatus: "",
   jsDefaultStatus: "",
   overLink: "",
   startTime: 0,
   statusText: "",
   isBusy: false,
-  inContentWhitelist: ["about:addons"],
+  inContentWhitelist: ["about:addons", "about:permissions"],
 
   QueryInterface: function (aIID) {
     if (aIID.equals(Ci.nsIWebProgressListener) ||
         aIID.equals(Ci.nsIWebProgressListener2) ||
         aIID.equals(Ci.nsISupportsWeakReference) ||
         aIID.equals(Ci.nsIXULBrowserWindow) ||
         aIID.equals(Ci.nsISupports))
       return this;
@@ -8484,26 +8490,31 @@ function restoreLastSession() {
   ss.restoreLastSession();
 }
 
 var TabContextMenu = {
   contextTab: null,
   updateContextMenu: function updateContextMenu(aPopupMenu) {
     this.contextTab = document.popupNode.localName == "tab" ?
                       document.popupNode : gBrowser.selectedTab;
-    let disabled = gBrowser.visibleTabs.length == 1;
+    let disabled = gBrowser.tabs.length == 1;
 
     // Enable the "Close Tab" menuitem when the window doesn't close with the last tab.
     document.getElementById("context_closeTab").disabled =
       disabled && gBrowser.tabContainer._closeWindowWithLastTab;
 
     var menuItems = aPopupMenu.getElementsByAttribute("tbattr", "tabbrowser-multiple");
     for (var i = 0; i < menuItems.length; i++)
       menuItems[i].disabled = disabled;
 
+    disabled = gBrowser.visibleTabs.length == 1;
+    menuItems = aPopupMenu.getElementsByAttribute("tbattr", "tabbrowser-multiple-visible");
+    for (var i = 0; i < menuItems.length; i++)
+      menuItems[i].disabled = disabled;
+
     // Session store
     document.getElementById("context_undoCloseTab").disabled =
       Cc["@mozilla.org/browser/sessionstore;1"].
       getService(Ci.nsISessionStore).
       getClosedTabCount(window) == 0;
 
     // Only one of pin/unpin should be visible
     document.getElementById("context_pinTab").hidden = this.contextTab.pinned;
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -134,17 +134,17 @@
         </menupopup>
       </menu>
       <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
                 accesskey="&moveToNewWindow.accesskey;"
                 tbattr="tabbrowser-multiple"
                 oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
       <menuseparator/>
       <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
-                tbattr="tabbrowser-multiple"
+                tbattr="tabbrowser-multiple-visible"
                 oncommand="gBrowser.reloadAllTabs();"/>
       <menuitem id="context_bookmarkAllTabs"
                 label="&bookmarkAllTabs.label;"
                 accesskey="&bookmarkAllTabs.accesskey;"
                 command="Browser:BookmarkAllTabs"/>
       <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
                 oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
       <menuseparator/>
@@ -839,19 +839,18 @@
                      removable="true">
         <menupopup id="alltabs-popup"
                    position="after_end">
           <menuitem id="menu_tabview"
                     class="menuitem-iconic"
                     key="key_tabview"
                     label="&viewTabGroups.label;"
                     command="Browser:ToggleTabView"
-                    observes="tabviewGroupsNumber"
-                    keepme="true"/>
-          <menuseparator id="alltabs-popup-separator" keepme="true"/>
+                    observes="tabviewGroupsNumber"/>
+          <menuseparator id="alltabs-popup-separator"/>
         </menupopup>
       </toolbarbutton>
 
       <toolbarbutton id="tabs-closebutton"
                      class="close-button tabs-closebutton"
                      command="cmd_close"
                      label="&closeTab.label;"
                      tooltiptext="&closeTab.label;"/>
--- a/browser/base/content/syncSetup.js
+++ b/browser/base/content/syncSetup.js
@@ -87,19 +87,19 @@ var gSyncSetup = {
     if (this._settingUpNew)
       return document.getElementById("server").selectedIndex == 0;
     return document.getElementById("existingServer").selectedIndex == 0;
   },
 
   init: function () {
     let obs = [
       ["weave:service:changepph:finish", "onResetPassphrase"],
-      ["weave:service:verify-login:start",  "onLoginStart"],
-      ["weave:service:verify-login:error",  "onLoginEnd"],
-      ["weave:service:verify-login:finish", "onLoginEnd"]];
+      ["weave:service:login:start",  "onLoginStart"],
+      ["weave:service:login:error",  "onLoginEnd"],
+      ["weave:service:login:finish", "onLoginEnd"]];
 
     // Add the observers now and remove them on unload
     let self = this;
     let addRem = function(add) {
       obs.forEach(function([topic, func]) {
         //XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
         //        of `this`. Fix in a followup. (bug 583347)
         if (add)
@@ -211,16 +211,18 @@ var gSyncSetup = {
 
     let feedback;
     switch (Weave.Status.login) {
       case Weave.LOGIN_FAILED_NETWORK_ERROR:
       case Weave.LOGIN_FAILED_SERVER_ERROR:
         feedback = server;
         break;
       case Weave.LOGIN_FAILED_LOGIN_REJECTED:
+      case Weave.LOGIN_FAILED_NO_USERNAME:
+      case Weave.LOGIN_FAILED_NO_PASSWORD:
         feedback = password;
         break;
       case Weave.LOGIN_FAILED_INVALID_PASSPHRASE:
         feedback = passphrase;
         break;
     }
     this._setFeedbackMessage(feedback, false, Weave.Status.login);
   },
--- a/browser/base/content/syncUtils.js
+++ b/browser/base/content/syncUtils.js
@@ -189,22 +189,23 @@ let gSyncUtils = {
 
   /**
    * Save passphrase backup document to disk as HTML file.
    * 
    * @param elid : ID of the form element containing the passphrase.
    */
   passphraseSave: function(elid) {
     let dialogTitle = this.bundle.GetStringFromName("save.synckey.title");
+    let defaultSaveName = this.bundle.GetStringFromName("save.default.label");
     this._preparePPiframe(elid, function(iframe) {
       let filepicker = Cc["@mozilla.org/filepicker;1"]
                          .createInstance(Ci.nsIFilePicker);
       filepicker.init(window, dialogTitle, Ci.nsIFilePicker.modeSave);
       filepicker.appendFilters(Ci.nsIFilePicker.filterHTML);
-      filepicker.defaultString = "Firefox Sync Key.html";
+      filepicker.defaultString = defaultSaveName;
       let rv = filepicker.show();
       if (rv == Ci.nsIFilePicker.returnOK
           || rv == Ci.nsIFilePicker.returnReplace) {
         let stream = Cc["@mozilla.org/network/file-output-stream;1"]
                        .createInstance(Ci.nsIFileOutputStream);
         stream.init(filepicker.file, -1, -1, 0);
 
         let serializer = new XMLSerializer();
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1535,18 +1535,20 @@
                   this._removingTabs.length == 0 &&
                   (this._windowIsClosing = window.closeWindow(true)))
                 return null;
 
               newTab = true;
             }
 
             this._removingTabs.push(aTab);
-
-            this.tabContainer.updateVisibility();
+            if (newTab)
+              this.addTab("about:blank", {skipAnimation: true});
+            else
+              this.tabContainer.updateVisibility();
 
             // We're committed to closing the tab now.
             // Dispatch a notification.
             // We dispatch it before any teardown so that event listeners can
             // inspect the tab that's about to close.
             var evt = document.createEvent("UIEvent");
             evt.initUIEvent("TabClose", true, false, window, aTabWillBeMoved ? 1 : 0);
             aTab.dispatchEvent(evt);
@@ -1592,18 +1594,16 @@
               aCloseWindow = false;
               aNewTab = false;
             }
 
             this._lastRelatedTab = null;
 
             // update the UI early for responsiveness
             aTab.collapsed = true;
-            if (aNewTab)
-              this.addTab("about:blank", {skipAnimation: true});
             this.tabContainer._fillTrailingGap();
             this._blurTab(aTab);
 
             this._removingTabs.splice(this._removingTabs.indexOf(aTab), 1);
 
             if (aCloseWindow) {
               this._windowIsClosing = true;
               while (this._removingTabs.length)
@@ -3137,22 +3137,25 @@
               event.screenY <= t.boxObject.screenY + t.boxObject.height)
             this.mTabstrip.ensureElementIsVisible(t);
         ]]></body>
       </method>
 
       <method name="_handleNewTab">
         <parameter name="tab"/>
         <body><![CDATA[
-          if (tab.parentNode != this || tab._fullyOpen)
+          if (tab.parentNode != this)
+            return;
+
+          this.adjustTabstrip();
+
+          if (tab._fullyOpen)
             return;
           tab._fullyOpen = true;
 
-          this.adjustTabstrip();
-
           if (tab.getAttribute("selected") == "true") {
             this._fillTrailingGap();
             this._handleTabSelect();
           } else {
             this._notifyBackgroundTab(tab);
           }
 
           // XXXmano: this is a temporary workaround for bug 345399
@@ -3730,17 +3733,22 @@
         <body><![CDATA[
           var tabContainer = gBrowser.tabContainer;
           // We don't want menu item decoration unless there is overflow.
           if (tabContainer.getAttribute("overflow") != "true")
             return;
 
           var tabstripBO = tabContainer.mTabstrip.scrollBoxObject;
           for (var i = 0; i < this.childNodes.length; i++) {
-            var curTabBO = this.childNodes[i].tab.boxObject;
+            let curTab = this.childNodes[i].tab;
+            if (!curTab) // "Tab Groups" menuitem and its menuseparator
+              continue;
+            let curTabBO = curTab.boxObject;
+            if (!curTabBO) // "Tabs From Other Computers" menuitem
+              continue;
             if (curTabBO.screenX >= tabstripBO.screenX &&
                 curTabBO.screenX + curTabBO.width <= tabstripBO.screenX + tabstripBO.width)
               this.childNodes[i].setAttribute("tabIsVisible", "true"); 
             else
               this.childNodes[i].removeAttribute("tabIsVisible");
           }
         ]]></body>
       </method>
@@ -3807,17 +3815,17 @@
         this._updateTabsVisibilityStatus();
       ]]></handler>
 
       <handler event="popuphidden">
       <![CDATA[
         // clear out the menu popup and remove the listeners
         for (let i = this.childNodes.length - 1; i > 0; i--) {
           let menuItem = this.childNodes[i];
-          if (!menuItem.hasAttribute("keepme")) {
+          if (menuItem.tab) {
             menuItem.removeEventListener("command", this, false);
             menuItem.tab.mCorrespondingMenuitem = null;
             this.removeChild(menuItem);
           }
         }
         var tabcontainer = gBrowser.tabContainer;
         tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
         tabcontainer.removeEventListener("TabOpen", this, false);
--- a/browser/base/content/tabview/groupitems.js
+++ b/browser/base/content/tabview/groupitems.js
@@ -1908,32 +1908,32 @@ let GroupItems = {
     this._cleanupFunctions.push(function() {
       AllTabs.unregister("attrModified", handleAttrModified);
       AllTabs.unregister("close", handleClose);
     });
   },
 
   // ----------
   // Function: uninit
-  uninit : function GroupItems_uninit () {
+  uninit: function GroupItems_uninit() {
     // call our cleanup functions
     this._cleanupFunctions.forEach(function(func) {
       func();
     });
 
     this._cleanupFunctions = [];
 
     // additional clean up
     this.groupItems = null;
   },
 
   // ----------
   // Function: newGroup
   // Creates a new empty group.
-  newGroup: function () {
+  newGroup: function GroupItems_newGroup() {
     let bounds = new Rect(20, 20, 250, 200);
     return new GroupItem([], {bounds: bounds, immediately: true});
   },
 
   // ----------
   // Function: pauseArrange
   // Bypass arrange() calls and collect for resolution in
   // resumeArrange()
@@ -2158,17 +2158,26 @@ let GroupItems = {
               };
   
               new GroupItem([], Utils.extend({}, data, options));
             }
           }
         }
 
         toClose.forEach(function(groupItem) {
-          groupItem.destroy({immediately: true});
+          // All remaining children in to-be-closed groups are re-used by
+          // session restore. Reconnect them so that they're put into their
+          // right groups.
+          groupItem.getChildren().forEach(function (tabItem) {
+            if (tabItem.parent && tabItem.parent.hidden)
+              iQ(tabItem.container).show();
+            tabItem._reconnected = false;
+            tabItem._reconnect();
+          });
+          groupItem.close({immediately: true});
         });
       }
 
       // set active group item
       if (activeGroupId) {
         let activeGroupItem = this.groupItem(activeGroupId);
         if (activeGroupItem)
           UI.setActive(activeGroupItem);
--- a/browser/base/content/tabview/modules/AllTabs.jsm
+++ b/browser/base/content/tabview/modules/AllTabs.jsm
@@ -52,17 +52,20 @@ let AllTabs = {
    * Get an array of all tabs from all tabbrowser windows.
    *
    * @usage let numAllTabs = AllTabs.tabs.length;
    *        AllTabs.tabs.forEach(handleAllTabs);
    */
   get tabs() {
     // Get tabs from each browser window and flatten them into one array
     return Array.concat.apply(null, browserWindows.map(function(browserWindow) {
-      return Array.slice(browserWindow.gBrowser.tabs);
+      let removingTabs = browserWindow.gBrowser._removingTabs;
+      return Array.filter(browserWindow.gBrowser.tabs, function (tab) {
+        return removingTabs.indexOf(tab) == -1;
+      });
     }));
   },
 
   /**
    * Attach a callback for a given tab event.
    *
    * @param eventName
    *        Name of the corresponding Tab* Event; one of "attrModified",
--- a/browser/base/content/tabview/ui.js
+++ b/browser/base/content/tabview/ui.js
@@ -547,16 +547,19 @@ let UI = {
       self.setActive(null, { onlyRemoveActiveTab: true });
       dispatchEvent(event);
 
       // Flush pending updates
       GroupItems.flushAppTabUpdates();
 
       TabItems.resumePainting();
     }
+
+    if (gTabView.firstUseExperienced)
+      gTabView.enableSessionRestore();
   },
 
   // ----------
   // Function: hideTabView
   // Hides TabView and shows the main browser UI.
   hideTabView: function UI_hideTabView() {
     if (!this.isTabViewVisible())
       return;
@@ -734,19 +737,19 @@ let UI = {
         
       if (self.isTabViewVisible()) {
         // just closed the selected tab in the TabView interface.
         if (self._currentTab == tab)
           self._closedSelectedTabInTabView = true;
       } else {
         // If we're currently in the process of entering private browsing,
         // we don't want to go to the Tab View UI. 
-        if (self._privateBrowsing.transitionMode)
-          return; 
-          
+        if (self._storageBusyCount)
+          return;
+
         // if not closing the last tab
         if (gBrowser.tabs.length > 1) {
           // Don't return to TabView if there are any app tabs
           for (let a = 0; a < gBrowser._numPinnedTabs; a++) {
             let theTab = gBrowser.tabs[a]; 
             if (gBrowser._removingTabs.indexOf(theTab) == -1) 
               return;
           }
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -195,16 +195,17 @@ endif
                  browser_scratchpad_initialization.js \
                  browser_scratchpad_contexts.js \
                  browser_scratchpad_execute_print.js \
                  browser_scratchpad_inspect.js \
                  browser_scratchpad_files.js \
                  browser_scratchpad_ui.js \
                  browser_scratchpad_bug_646070_chrome_context_pref.js \
                  browser_overflowScroll.js \
+                 browser_locationBarExternalLoad.js \
                  browser_pageInfo.js \
                  browser_page_style_menu.js \
                  browser_pinnedTabs.js \
                  browser_plainTextLinks.js \
                  browser_pluginnotification.js \
                  browser_relatedTabs.js \
                  browser_sanitize-passwordDisabledHosts.js \
                  browser_sanitize-sitepermissions.js \
--- a/browser/base/content/test/browser_bug553455.js
+++ b/browser/base/content/test/browser_bug553455.js
@@ -91,21 +91,20 @@ function test_disabled_install() {
     let notification = aPanel.childNodes[0];
     is(notification.id, "xpinstall-disabled-notification", "Should have seen installs disabled");
     is(notification.button.label, "Enable", "Should have seen the right button");
     is(notification.getAttribute("label"),
        "Software installation is currently disabled. Click Enable and try again.");
 
     wait_for_notification_close(function() {
       try {
-        Services.prefs.getBoolPref("xpinstall.disabled");
-        ok(false, "xpinstall.disabled should not be set");
+        ok(Services.prefs.getBoolPref("xpinstall.enabled"), "Installation should be enabled");
       }
       catch (e) {
-        ok(true, "xpinstall.disabled should not be set");
+        ok(false, "xpinstall.enabled should be set");
       }
 
       gBrowser.removeTab(gBrowser.selectedTab);
 
       AddonManager.getAllInstalls(function(aInstalls) {
         is(aInstalls.length, 1, "Should have been one install created");
         aInstalls[0].cancel();
 
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/browser_locationBarExternalLoad.js
@@ -0,0 +1,45 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+function test() {
+  waitForExplicitFinish();
+
+  nextTest();
+}
+
+let urls = [
+  "javascript:'foopy';",
+  "data:text/html,<script>document.write(document.domain);</script>"
+];
+
+function nextTest() {
+  let url = urls.shift();
+  if (url)
+    testURL(url, nextTest);
+  else
+    finish();
+}
+
+function testURL(newURL, func) {
+  let tab = gBrowser.selectedTab = gBrowser.addTab();
+  registerCleanupFunction(function () {
+    gBrowser.removeTab(tab);
+  });
+  addPageShowListener(function () {
+    let pagePrincipal = gBrowser.contentPrincipal;
+    gURLBar.value = newURL;
+    gURLBar.handleCommand();
+
+    addPageShowListener(function () {
+      ok(!gBrowser.contentPrincipal.equals(pagePrincipal), "load of " + newURL + " produced a page with a different principal");
+      func();
+    });
+  });
+}
+
+function addPageShowListener(func) {
+  gBrowser.selectedBrowser.addEventListener("pageshow", function loadListener() {
+    gBrowser.selectedBrowser.removeEventListener("pageshow", loadListener, false);
+    func();
+  });
+}
--- a/browser/base/content/test/browser_urlHighlight.js
+++ b/browser/base/content/test/browser_urlHighlight.js
@@ -20,16 +20,22 @@ function test() {
 
   registerCleanupFunction(function () {
     Services.prefs.clearUserPref(prefname);
     URLBarSetURI();
   });
 
   Services.prefs.setBoolPref(prefname, true);
 
+  gURLBar.focus();
+
+  testVal("http://mozilla.org/");
+
+  gBrowser.selectedBrowser.focus();
+
   testVal("<http://>mozilla.org");
   testVal("<http://>mozilla.org</>");
   testVal("<http://>mözilla.org</>");
   testVal("<http://>mozilla.imaginatory</>");
   testVal("<http://www.>mozilla.org</>");
   testVal("<http://sub.>mozilla.org</>");
   testVal("<http://sub1.sub2.sub3.>mozilla.org</>");
   testVal("<http://ftp.>mozilla.org</>");
--- a/browser/base/content/test/browser_visibleTabs_contextMenu.js
+++ b/browser/base/content/test/browser_visibleTabs_contextMenu.js
@@ -51,17 +51,17 @@ function test() {
   // Hide the original tab.
   gBrowser.selectedTab = testTab;
   gBrowser.showOnlyTheseTabs([testTab]);
   is(gBrowser.visibleTabs.length, 1, "now there is only one visible tab");
   
   // Check the context menu with one tab.
   popup(testTab);
   is(TabContextMenu.contextTab, testTab, "TabContextMenu context is the test tab");
-  is(document.getElementById("context_closeTab").disabled, true, "Close Tab is disabled");
+  is(document.getElementById("context_closeTab").disabled, false, "Close Tab is enabled when more than one tab exists");
   is(document.getElementById("context_reloadAllTabs").disabled, true, "Reload All Tabs is disabled");
   
   // Add a tab that will get pinned
   // So now there's one pinned tab, one visible unpinned tab, and one hidden tab
   let pinned = gBrowser.addTab();
   gBrowser.pinTab(pinned);
   is(gBrowser.visibleTabs.length, 2, "now there are two visible tabs");
 
--- a/browser/base/content/test/tabview/Makefile.in
+++ b/browser/base/content/test/tabview/Makefile.in
@@ -59,16 +59,17 @@ include $(topsrcdir)/config/rules.mk
                  browser_tabview_bug590606.js \
                  browser_tabview_bug591706.js \
                  browser_tabview_bug594958.js \
                  browser_tabview_bug595191.js \
                  browser_tabview_bug595436.js \
                  browser_tabview_bug595518.js \
                  browser_tabview_bug595521.js \
                  browser_tabview_bug595560.js \
+                 browser_tabview_bug595601.js \
                  browser_tabview_bug595804.js \
                  browser_tabview_bug595930.js \
                  browser_tabview_bug595943.js \
                  browser_tabview_bug595965.js \
                  browser_tabview_bug596781.js \
                  browser_tabview_bug597248.js \
                  browser_tabview_bug597360.js \
                  browser_tabview_bug597399.js \
@@ -100,16 +101,17 @@ include $(topsrcdir)/config/rules.mk
                  browser_tabview_bug622872.js \
                  browser_tabview_bug623768.js \
                  browser_tabview_bug624265.js \
                  browser_tabview_bug624692.js \
                  browser_tabview_bug624727.js \
                  browser_tabview_bug624847.js \
                  browser_tabview_bug624931.js \
                  browser_tabview_bug624953.js \
+                 browser_tabview_bug625195.js \
                  browser_tabview_bug625269.js \
                  browser_tabview_bug625424.js \
                  browser_tabview_bug625666.js \
                  browser_tabview_bug626368.js \
                  browser_tabview_bug626525.js \
                  browser_tabview_bug626791.js \
                  browser_tabview_bug627288.js \
                  browser_tabview_bug627736.js \
@@ -125,23 +127,26 @@ include $(topsrcdir)/config/rules.mk
                  browser_tabview_bug634077.js \
                  browser_tabview_bug634085.js \
                  browser_tabview_bug634158.js \
                  browser_tabview_bug634672.js \
                  browser_tabview_bug635696.js \
                  browser_tabview_bug640765.js \
                  browser_tabview_bug641802.js \
                  browser_tabview_bug642793.js \
+                 browser_tabview_bug643392.js \
                  browser_tabview_bug644097.js \
                  browser_tabview_bug645653.js \
                  browser_tabview_bug648882.js \
                  browser_tabview_bug649006.js \
                  browser_tabview_bug649307.js \
+                 browser_tabview_bug650573.js \
                  browser_tabview_bug651311.js \
                  browser_tabview_bug654941.js \
+                 browser_tabview_bug656778.js \
                  browser_tabview_dragdrop.js \
                  browser_tabview_exit_button.js \
                  browser_tabview_expander.js \
                  browser_tabview_firstrun_pref.js \
                  browser_tabview_group.js \
                  browser_tabview_launch.js \
                  browser_tabview_multiwindow_search.js \
                  browser_tabview_orphaned_tabs.js \
--- a/browser/base/content/test/tabview/browser_tabview_bug589324.js
+++ b/browser/base/content/test/tabview/browser_tabview_bug589324.js
@@ -1,93 +1,121 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
+const ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
+
+const DUMMY_PAGE_URL = "http://mochi.test:8888/browser/browser/base/content/test/tabview/dummy_page.html";
+const DUMMY_PAGE_URL_2 = "http://mochi.test:8888/";
+
+let state = {
+  windows: [{
+    tabs: [{
+      entries: [{ url: DUMMY_PAGE_URL }],
+      hidden: true,
+      attributes: {},
+      extData: {
+        "tabview-tab":
+          '{"bounds":{"left":21,"top":29,"width":204,"height":153},' +
+          '"userSize":null,"url":"' + DUMMY_PAGE_URL + '","groupID":1,' + 
+          '"imageData":null,"title":null}'
+      }
+    },{
+      entries: [{ url: DUMMY_PAGE_URL_2 }],
+      hidden: false,
+      attributes: {},
+      extData: {
+        "tabview-tab": 
+          '{"bounds":{"left":315,"top":29,"width":111,"height":84},' + 
+          '"userSize":null,"url":"' + DUMMY_PAGE_URL_2 + '","groupID":2,' + 
+          '"imageData":null,"title":null}'
+      },
+    }],
+    selected:2,
+    _closedTabs: [],
+    extData: {
+      "tabview-groups": '{"nextID":3,"activeGroupId":2}',
+      "tabview-group": 
+        '{"1":{"bounds":{"left":15,"top":5,"width":280,"height":232},' + 
+        '"userSize":null,"title":"","id":1},' + 
+        '"2":{"bounds":{"left":309,"top":5,"width":267,"height":226},' + 
+        '"userSize":null,"title":"","id":2}}',
+      "tabview-ui": '{"pageBounds":{"left":0,"top":0,"width":788,"height":548}}'
+    }, sizemode:"normal"
+  }]
+};
+
 function test() {
-  const DUMMY_PAGE_URL = "http://mochi.test:8888/browser/browser/base/content/test/tabview/dummy_page.html";
-  const DUMMY_PAGE_URL_2 = "http://mochi.test:8888/";
-
-  let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
   waitForExplicitFinish();
 
-  // open a new window and setup the window state.
-  let newWin = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
-  newWin.addEventListener("load", function(event) {
-    this.removeEventListener("load", arguments.callee, false);
+  registerCleanupFunction(function () {
+    Services.prefs.clearUserPref("browser.sessionstore.restore_hidden_tabs");
+  });
+
+  Services.prefs.setBoolPref("browser.sessionstore.restore_hidden_tabs", false);
+
+  testTabSwitchAfterRestore(function () {
+    Services.prefs.setBoolPref("browser.sessionstore.restore_hidden_tabs", true);
+
+    testTabSwitchAfterRestore(function () {
+      waitForFocus(finish);
+    });
+  });
+}
+
+function testTabSwitchAfterRestore(callback) {
+  newWindowWithState(state, function (win) {
+    registerCleanupFunction(function () win.close());
+
+    let [firstTab, secondTab] = win.gBrowser.tabs;
+    is(firstTab.linkedBrowser.currentURI.spec, DUMMY_PAGE_URL,
+       "The url of first tab url is dummy_page.html");
+
+    // check the hidden state of both tabs.
+    ok(firstTab.hidden, "The first tab is hidden");
+    ok(!secondTab.hidden, "The second tab is not hidden");
+    is(secondTab, win.gBrowser.selectedTab, "The second tab is selected");
 
-    let newState = {
-      windows: [{
-        tabs: [{
-          entries: [{ url: DUMMY_PAGE_URL }],
-          hidden: true,
-          attributes: {},
-          extData: {
-            "tabview-tab":
-              '{"bounds":{"left":21,"top":29,"width":204,"height":153},' +
-              '"userSize":null,"url":"' + DUMMY_PAGE_URL + '","groupID":1,' + 
-              '"imageData":null,"title":null}'
-          }
-        },{
-          entries: [{ url: DUMMY_PAGE_URL_2 }],
-          hidden: false,
-          attributes: {},
-          extData: {
-            "tabview-tab": 
-              '{"bounds":{"left":315,"top":29,"width":111,"height":84},' + 
-              '"userSize":null,"url":"' + DUMMY_PAGE_URL_2 + '","groupID":2,' + 
-              '"imageData":null,"title":null}'
-          },
-        }],
-        selected:2,
-        _closedTabs: [],
-        extData: {
-          "tabview-groups": '{"nextID":3,"activeGroupId":2}',
-          "tabview-group": 
-            '{"1":{"bounds":{"left":15,"top":5,"width":280,"height":232},' + 
-            '"userSize":null,"title":"","id":1},' + 
-            '"2":{"bounds":{"left":309,"top":5,"width":267,"height":226},' + 
-            '"userSize":null,"title":"","id":2}}',
-          "tabview-ui": '{"pageBounds":{"left":0,"top":0,"width":788,"height":548}}'
-        }, sizemode:"normal"
-      }]
-    };
-    ss.setWindowState(newWin, JSON.stringify(newState), true);
+    // when the second tab is hidden, Panorama should be initialized and
+    // the first tab should be visible.
+    let container = win.gBrowser.tabContainer;
+    container.addEventListener("TabHide", function onTabHide() {
+      container.removeEventListener("TabHide", onTabHide, false);
+
+      ok(win.TabView.getContentWindow(), "Panorama is loaded");
+      ok(!firstTab.hidden, "The first tab is not hidden");
+      is(firstTab, win.gBrowser.selectedTab, "The first tab is selected");
+      ok(secondTab.hidden, "The second tab is hidden");
+
+      callback();
+    }, false);
 
-    let firstTab = newWin.gBrowser.tabs[0];
-    let secondTab = newWin.gBrowser.tabs[1];
-
-    // wait until the first tab is fully loaded
-    let browser = newWin.gBrowser.getBrowserForTab(firstTab);
-    let onLoad = function() {
-      browser.removeEventListener("load", onLoad, true);
+    // switch to another tab
+    win.switchToTabHavingURI(DUMMY_PAGE_URL);
+  });
+}
 
-      is(browser.currentURI.spec, DUMMY_PAGE_URL, 
-         "The url of first tab url is dummy_page.html");
-
-      // check the hidden state of both tabs.
-      ok(firstTab.hidden, "The first tab is hidden");
-      ok(!secondTab.hidden, "The second tab is not hidden");
-      is(secondTab, newWin.gBrowser.selectedTab, "The second tab is selected");
+function newWindowWithState(state, callback) {
+  let opts = "chrome,all,dialog=no,height=800,width=800";
+  let win = window.openDialog(getBrowserURL(), "_blank", opts);
 
-      // when the second tab is hidden, the iframe should be initialized and 
-      // the first tab should be visible.
-      let onTabHide = function() {
-        newWin.gBrowser.tabContainer.removeEventListener("TabHide", onTabHide, true);
-
-        ok(newWin.TabView.getContentWindow(), "");
-
-        ok(!firstTab.hidden, "The first tab is not hidden");
-        is(firstTab, newWin.gBrowser.selectedTab, "The first tab is selected");
-        ok(secondTab.hidden, "The second tab is hidden");
+  whenWindowLoaded(win, function () {
+    ss.setWindowState(win, JSON.stringify(state), true);
+  });
 
-        // clean up and finish
-        newWin.close();
+  whenWindowStateReady(win, function () {
+    afterAllTabsLoaded(function () callback(win), win);
+  });
+}
 
-        finish();
-      };
-      newWin.gBrowser.tabContainer.addEventListener("TabHide", onTabHide, true);
-
-      // switch to another tab
-      newWin.switchToTabHavingURI(DUMMY_PAGE_URL);
-    }
-    browser.addEventListener("load", onLoad, true);
+function whenWindowLoaded(win, callback) {
+  win.addEventListener("load", function onLoad() {
+    win.removeEventListener("load", onLoad, false);
+    executeSoon(callback);
   }, false);
 }
+
+function whenWindowStateReady(win, callback) {
+  win.addEventListener("SSWindowStateReady", function onReady() {
+    win.removeEventListener("SSWindowStateReady", onReady, false);
+    executeSoon(callback);
+  }, false);
+}
--- a/browser/base/content/test/tabview/browser_tabview_bug595560.js
+++ b/browser/base/content/test/tabview/browser_tabview_bug595560.js
@@ -1,134 +1,97 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-let newTabOne;
-let originalTab;
+let win;
+let cw;
 
 function test() {
   waitForExplicitFinish();
 
-  originalTab = gBrowser.visibleTabs[0];
-  newTabOne = gBrowser.addTab("http://mochi.test:8888/");
+  let onLoad = function (tvwin) {
+    win = tvwin;
+    registerCleanupFunction(function () win.close());
+    win.gBrowser.loadOneTab("http://mochi.test:8888/", {inBackground: true});
+  };
+
+  let onShow = function () {
+    cw = win.TabView.getContentWindow();
+    ok(win.TabView.isVisible(), "Tab View is visible");
+    afterAllTabItemsUpdated(testOne, win);
+  };
 
-  let browser = gBrowser.getBrowserForTab(newTabOne);
-  let onLoad = function() {
-    browser.removeEventListener("load", onLoad, true);
-    
-    // show the tab view
-    window.addEventListener("tabviewshown", onTabViewWindowLoaded, false);
-    TabView.toggle();
-  }
-  browser.addEventListener("load", onLoad, true);
+  newWindowWithTabView(onShow, onLoad);
+}
+
+function testOne() {
+  whenSearchEnabledAndDisabled(testTwo);
+  // press cmd/ctrl F
+  EventUtils.synthesizeKey("f", {accelKey: true}, cw);
+}
+
+function testTwo() {
+  whenSearchEnabledAndDisabled(testThree);
+  // press /
+  EventUtils.synthesizeKey("VK_SLASH", {}, cw);
 }
 
-function onTabViewWindowLoaded() {
-  window.removeEventListener("tabviewshown", onTabViewWindowLoaded, false);
-  ok(TabView.isVisible(), "Tab View is visible");
+function testThree() {
+  let onTabViewShown = function () {
+    is(cw.UI.getActiveTab(), groupItem.getChild(0), 
+       "The active tab is newly created tab item");
+
+    let onSearchEnabled = function () {
+      let doc = cw.document;
+      let searchBox = cw.iQ("#searchbox");
+      let hasFocus = doc.hasFocus() && doc.activeElement == searchBox[0];
+      ok(hasFocus, "The search box has focus");
+
+      let tab = win.gBrowser.tabs[1];
+      searchBox.val(tab._tabViewTabItem.$tabTitle[0].innerHTML);
+
+      cw.performSearch();
+
+      whenTabViewIsHidden(function () {
+        is(tab, win.gBrowser.selectedTab, "The search result tab is shown");
+        waitForFocus(finish);
+      }, win);
 
-  afterAllTabItemsUpdated(function() { 
-    let contentWindow = document.getElementById("tab-view").contentWindow;
-    testOne(contentWindow);
+      // use the tabview menu (the same as pressing cmd/ctrl + e)
+      win.document.getElementById("menu_tabview").doCommand();
+    };
+
+    whenSearchEnabled(onSearchEnabled);
+    EventUtils.synthesizeKey("VK_SLASH", {}, cw);
+  };
+
+  whenTabViewIsHidden(function () {
+    showTabView(onTabViewShown, win);
+  }, win);
+
+  // click on the + button
+  let groupItem = createEmptyGroupItem(cw, 300, 300, 200);
+  let newTabButton = groupItem.container.getElementsByClassName("newTabButton");
+  ok(newTabButton[0], "New tab button exists");
+
+  EventUtils.sendMouseEvent({type: "click"}, newTabButton[0], cw);
+}
+
+function whenSearchEnabledAndDisabled(callback) {
+  whenSearchEnabled(function () {
+    whenSearchDisabled(callback);
+    cw.hideSearch();
   });
 }
 
-function testOne(contentWindow) {
-  onSearchEnabledAndDisabled(contentWindow, function() {
-    testTwo(contentWindow); 
-  });
-  // press cmd/ctrl F
-  EventUtils.synthesizeKey("f", { accelKey: true });
-}
-
-function testTwo(contentWindow) {
-  onSearchEnabledAndDisabled(contentWindow, function() { 
-    testThree(contentWindow);
-  });
-  // press /
-  EventUtils.synthesizeKey("VK_SLASH", { type: "keydown" }, contentWindow);
+function whenSearchEnabled(callback) {
+  cw.addEventListener("tabviewsearchenabled", function onSearchEnabled() {
+    cw.removeEventListener("tabviewsearchenabled", onSearchEnabled, false);
+    callback();
+  }, false);
 }
 
-function testThree(contentWindow) {
-  let groupItem = createEmptyGroupItem(contentWindow, 200);
-
-  let onTabViewHidden = function() {
-    window.removeEventListener("tabviewhidden", onTabViewHidden, false);
-    TabView.toggle();
-  };
-  let onTabViewShown = function() {
-    window.removeEventListener("tabviewshown", onTabViewShown, false);
-
-    is(contentWindow.UI.getActiveTab(), groupItem.getChild(0), 
-       "The active tab is newly created tab item");
-
-    let onSearchEnabled = function() {
-      contentWindow.removeEventListener(
-        "tabviewsearchenabled", onSearchEnabled, false);
-
-      let searchBox = contentWindow.iQ("#searchbox");
-
-      ok(contentWindow.document.hasFocus() && 
-         contentWindow.document.activeElement == searchBox[0], 
-         "The search box has focus");
-      searchBox.val(newTabOne._tabViewTabItem.$tabTitle[0].innerHTML);
-
-      contentWindow.performSearch();
-
-      let checkSelectedTab = function() {
-        window.removeEventListener("tabviewhidden", checkSelectedTab, false);
-        is(newTabOne, gBrowser.selectedTab, "The search result tab is shown");
-        cleanUpAndFinish(groupItem.getChild(0), contentWindow);
-      };
-      window.addEventListener("tabviewhidden", checkSelectedTab, false);
-
-      // use the tabview menu (the same as pressing cmd/ctrl + e)
-      document.getElementById("menu_tabview").doCommand();
-   };
-   contentWindow.addEventListener("tabviewsearchenabled", onSearchEnabled, false);
-   EventUtils.synthesizeKey("VK_SLASH", { type: "keydown" }, contentWindow);
-  };
-  window.addEventListener("tabviewhidden", onTabViewHidden, false);
-  window.addEventListener("tabviewshown", onTabViewShown, false);
-  
-  // click on the + button
-  let newTabButton = groupItem.container.getElementsByClassName("newTabButton");
-  ok(newTabButton[0], "New tab button exists");
-
-  EventUtils.sendMouseEvent({ type: "click" }, newTabButton[0], contentWindow);
+function whenSearchDisabled(callback) {
+  cw.addEventListener("tabviewsearchdisabled", function onSearchDisabled() {
+    cw.removeEventListener("tabviewsearchdisabled", onSearchDisabled, false);
+    callback();
+  }, false);
 }
-
-function onSearchEnabledAndDisabled(contentWindow, callback) {
-  let onSearchEnabled = function() {
-    contentWindow.removeEventListener(
-      "tabviewsearchenabled", onSearchEnabled, false);
-    contentWindow.addEventListener("tabviewsearchdisabled", onSearchDisabled, false);
-    contentWindow.hideSearch();
-  }
-  let onSearchDisabled = function() {
-    contentWindow.removeEventListener(
-      "tabviewsearchdisabled", onSearchDisabled, false);
-    callback();
-  }
-  contentWindow.addEventListener("tabviewsearchenabled", onSearchEnabled, false);
-}
-
-function cleanUpAndFinish(tabItem, contentWindow) {
-  gBrowser.selectedTab = originalTab;
-  gBrowser.removeTab(newTabOne);
-  gBrowser.removeTab(tabItem.tab);
-  
-  finish();
-}
-
-function createEmptyGroupItem(contentWindow, padding) {
-  let pageBounds = contentWindow.Items.getPageBounds();
-  pageBounds.inset(padding, padding);
-
-  let box = new contentWindow.Rect(pageBounds);
-  box.width = 300;
-  box.height = 300;
-
-  let emptyGroupItem = new contentWindow.GroupItem([], { bounds: box });
-
-  return emptyGroupItem;
-}
-
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/tabview/browser_tabview_bug595601.js
@@ -0,0 +1,184 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
+
+const TAB_STATE_NEEDS_RESTORE = 1;
+const TAB_STATE_RESTORING = 2;
+
+let stateBackup = ss.getBrowserState();
+
+let state = {windows:[{tabs:[
+  // first group
+  {entries:[{url:"http://example.com#1"}],extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#1\",\"groupID\":2}"}},
+  {entries:[{url:"http://example.com#2"}],extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#2\",\"groupID\":2}"}},
+  {entries:[{url:"http://example.com#3"}],extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#3\",\"groupID\":2}"}},
+  {entries:[{url:"http://example.com#4"}],extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#4\",\"groupID\":2}"}},
+
+  // second group
+  {entries:[{url:"http://example.com#5"}],hidden:true,extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#5\",\"groupID\":1}"}},
+  {entries:[{url:"http://example.com#6"}],hidden:true,extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#6\",\"groupID\":1}"}},
+  {entries:[{url:"http://example.com#7"}],hidden:true,extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#7\",\"groupID\":1}"}},
+  {entries:[{url:"http://example.com#8"}],hidden:true,extData:{"tabview-tab":"{\"bounds\":{\"left\":20,\"top\":20,\"width\":20,\"height\":20},\"url\":\"http://example.com#8\",\"groupID\":1}"}}
+],selected:5,extData:{
+  "tabview-groups":"{\"nextID\":8,\"activeGroupId\":1}","tabview-group":"{\"1\":{\"bounds\":{\"left\":15,\"top\":10,\"width\":415,\"height\":367},\"userSize\":{\"x\":415,\"y\":367},\"title\":\"\",\"id\":1},\"2\":{\"bounds\":{\"left\":286,\"top\":488,\"width\":418,\"height\":313},\"title\":\"\",\"id\":2}}",
+  "tabview-ui":"{\"pageBounds\":{\"left\":0,\"top\":0,\"width\":940,\"height\":1075}}"
+}}]};
+
+function test() {
+  waitForExplicitFinish();
+
+  Services.prefs.setBoolPref("browser.sessionstore.restore_hidden_tabs", false);
+
+  TabsProgressListener.init();
+
+  registerCleanupFunction(function () {
+    TabsProgressListener.uninit();
+
+    Services.prefs.clearUserPref("browser.sessionstore.max_concurrent_tabs");
+    Services.prefs.clearUserPref("browser.sessionstore.restore_hidden_tabs");
+
+    ss.setBrowserState(stateBackup);
+  });
+
+  Services.prefs.setIntPref("browser.sessionstore.max_concurrent_tabs", 3);
+
+  TabView._initFrame(function () {
+    executeSoon(testRestoreWithHiddenTabs);
+  });
+}
+
+function testRestoreWithHiddenTabs() {
+  let checked = false;
+  let ssReady = false;
+  let tabsRestored = false;
+
+  let check = function () {
+    if (checked || !ssReady || !tabsRestored)
+      return;
+
+    checked = true;
+
+    is(gBrowser.tabs.length, 8, "there are now eight tabs");
+    is(gBrowser.visibleTabs.length, 4, "four visible tabs");
+
+    let cw = TabView.getContentWindow();
+    is(cw.GroupItems.groupItems.length, 2, "there are now two groupItems");
+
+    testSwitchToInactiveGroup();
+  }
+
+  whenSessionStoreReady(function () {
+    ssReady = true;
+    check();
+  });
+
+  TabsProgressListener.setCallback(function (needsRestore, isRestoring) {
+    if (4 < needsRestore)
+      return;
+
+    TabsProgressListener.unsetCallback();
+    is(needsRestore, 4, "4/8 tabs restored");
+
+    tabsRestored = true;
+    check();
+  });
+
+  ss.setBrowserState(JSON.stringify(state));
+}
+
+function testSwitchToInactiveGroup() {
+  let firstProgress = true;
+
+  TabsProgressListener.setCallback(function (needsRestore, isRestoring) {
+    if (firstProgress) {
+      firstProgress = false;
+      is(isRestoring, 3, "restoring 3 tabs concurrently");
+    } else {
+      ok(isRestoring < 4, "restoring max. 3 tabs concurrently");
+    }
+
+    if (needsRestore)
+      return;
+
+    TabsProgressListener.unsetCallback();
+
+    is(gBrowser.visibleTabs.length, 4, "four visible tabs");
+    waitForFocus(finish);
+  });
+
+  gBrowser.selectedTab = gBrowser.tabs[4];
+}
+
+function whenSessionStoreReady(callback) {
+  window.addEventListener("SSWindowStateReady", function onReady() {
+    window.removeEventListener("SSWindowStateReady", onReady, false);
+    executeSoon(callback);
+  }, false);
+}
+
+function countTabs() {
+  let needsRestore = 0, isRestoring = 0;
+  let windowsEnum = Services.wm.getEnumerator("navigator:browser");
+
+  while (windowsEnum.hasMoreElements()) {
+    let window = windowsEnum.getNext();
+    if (window.closed)
+      continue;
+
+    for (let i = 0; i < window.gBrowser.tabs.length; i++) {
+      let browser = window.gBrowser.tabs[i].linkedBrowser;
+      if (browser.__SS_restoreState == TAB_STATE_RESTORING)
+        isRestoring++;
+      else if (browser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE)
+        needsRestore++;
+    }
+  }
+
+  return [needsRestore, isRestoring];
+}
+
+let TabsProgressListener = {
+  init: function () {
+    gBrowser.addTabsProgressListener(this);
+  },
+
+  uninit: function () {
+    this.unsetCallback();
+    gBrowser.removeTabsProgressListener(this);
+ },
+
+  setCallback: function (callback) {
+    this.callback = callback;
+  },
+
+  unsetCallback: function () {
+    delete this.callback;
+  },
+
+  onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+    let isNetwork = aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK;
+    let isWindow = aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW;
+
+    if (!(this.callback && isNetwork && isWindow))
+      return;
+
+    let self = this;
+    let finalize = function () {
+      if (wasRestoring)
+        delete aBrowser.__wasRestoring;
+
+      self.callback.apply(null, countTabs());
+    };
+
+    let isRestoring = aBrowser.__SS_restoreState == TAB_STATE_RESTORING;
+    let wasRestoring = !aBrowser.__SS_restoreState && aBrowser.__wasRestoring;
+    let hasStopped = aStateFlags & Ci.nsIWebProgressListener.STATE_STOP;
+
+    if (isRestoring && !hasStopped)
+      aBrowser.__wasRestoring = true;
+
+    if (hasStopped && (isRestoring || wasRestoring))
+      finalize();
+  }
+}
--- a/browser/base/content/test/tabview/browser_tabview_bug624265.js
+++ b/browser/base/content/test/tabview/browser_tabview_bug624265.js
@@ -33,16 +33,17 @@ function test() {
       gBrowser.removeTab(gBrowser.tabs[1]);
 
     hideTabView(function () {
       let callback = tests.shift();
 
       if (!callback)
         callback = finish;
 
+      assertOneSingleGroupItem();
       callback();
     });
   }
 
   // ----------
   // [624265] testing undo close tab
   let testUndoCloseTabs = function () {
     gBrowser.loadOneTab('http://mochi.test:8888/', {inBackground: true});
@@ -106,17 +107,17 @@ function test() {
         });
       });
     }
 
     // The executeSoon() call is really needed here because there's probably
     // some callback waiting to be fired after gBrowser.loadOneTab(). After
     // that the browser is in a state where loadURI() will create a new entry
     // in the session history (that is vital for back/forward functionality).
-    afterAllTabsLoaded(function () SimpleTest.executeSoon(continueTest));
+    afterAllTabsLoaded(function () executeSoon(continueTest));
   }
 
   // ----------
   // [624102] check state after return from private browsing
   let testPrivateBrowsing = function () {
     gBrowser.loadOneTab('http://mochi.test:8888/#1', {inBackground: true});
     gBrowser.loadOneTab('http://mochi.test:8888/#2', {inBackground: true});
 
@@ -185,15 +186,15 @@ function enterAndLeavePrivateBrowsing(ca
   function pbObserver(aSubject, aTopic, aData) {
     if (aTopic != "private-browsing-transition-complete")
       return;
 
     if (pb.privateBrowsingEnabled)
       pb.privateBrowsingEnabled = false;
     else {
       Services.obs.removeObserver(pbObserver, "private-browsing-transition-complete");
-      afterAllTabsLoaded(callback);
+      afterAllTabsLoaded(function () executeSoon(callback));
     }
   }
 
   Services.obs.addObserver(pbObserver, "private-browsing-transition-complete", false);
   pb.privateBrowsingEnabled = true;
 }
--- a/browser/base/content/test/tabview/browser_tabview_bug624727.js
+++ b/browser/base/content/test/tabview/browser_tabview_bug624727.js
@@ -57,17 +57,20 @@ function test() {
     let [group1, group2] = cw.GroupItems.groupItems;
     assertOneTabInGroup(prefix, group1);
     assertOneTabInGroup(prefix, group2);
   }
 
   let testStateAfterEnteringPB = function () {
     let prefix = 'enter';
     ok(!pb.privateBrowsingEnabled, prefix + ': private browsing is disabled');
-    registerCleanupFunction(function () pb.privateBrowsingEnabled = false);
+    registerCleanupFunction(function () {
+      if (pb.privateBrowsingEnabled)
+        pb.privateBrowsingEnabled = false
+    });
 
     togglePrivateBrowsing(function () {
       assertTabViewIsHidden(prefix);
 
       showTabView(function () {
         assertNumberOfGroups(prefix, 1);
         assertNumberOfTabs(prefix, 1);
         assertOneTabInGroup(prefix, cw.GroupItems.groupItems[0]);
@@ -105,16 +108,18 @@ function test() {
   }
 
   waitForExplicitFinish();
   registerCleanupFunction(function () TabView.hide());
   assertValidPrerequisites('start');
 
   showTabView(function () {
     cw = TabView.getContentWindow();
+    assertNumberOfGroups('start', 1);
+
     createGroupItem();
 
     afterAllTabsLoaded(function () {
       // setup
       let groupItems = cw.GroupItems.groupItems;
       let [tabItem1, tabItem2, ] = groupItems[1].getChildren();
       gBrowser.pinTab(tabItem1.tab);
       gBrowser.pinTab(tabItem2.tab);
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/tabview/browser_tabview_bug625195.js
@@ -0,0 +1,53 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+function test() {
+  is(gBrowser.tabs.length, 1, "Only one tab exist");
+
+  let originalTab = gBrowser.tabs[0];
+
+  popup(originalTab);
+  ok(document.getElementById("context_closeTab").disabled, "The 'Close tab' menu item is disabled");
+  ok(document.getElementById("context_openTabInWindow").disabled, "The 'Move to New Window' menu item is disabled");
+
+  let newTabOne = gBrowser.addTab("about:blank", {skipAnimation: true});
+
+  waitForExplicitFinish();
+
+  showTabView(function() {
+    registerCleanupFunction(function () {
+      while (gBrowser.tabs.length > 1)
+        gBrowser.removeTab(gBrowser.tabs[1]);
+      TabView.hide();
+    });
+
+    let contentWindow = TabView.getContentWindow();
+    is(contentWindow.GroupItems.groupItems.length, 1, "Has one group only");
+
+    let tabItems = contentWindow.GroupItems.groupItems[0].getChildren();
+    ok(tabItems.length, 2, "There are two tabItems in this group");
+
+    whenTabViewIsHidden(function() {
+      popup(gBrowser.tabs[0]);
+
+      ok(!document.getElementById("context_closeTab").disabled, "The 'Close tab' menu item is enabled");
+      ok(!document.getElementById("context_openTabInWindow").disabled, "The 'Move to New Window' menu item is enabled");
+
+      let newTabTwo = gBrowser.selectedTab;
+      gBrowser.selected = originalTab;
+
+      gBrowser.removeTab(newTabOne);
+      gBrowser.removeTab(newTabTwo);
+
+      finish();
+    });
+    let newGroup = contentWindow.GroupItems.newGroup();
+    newGroup.newTab();
+  });
+}
+
+function popup(tab) {
+  document.popupNode = tab;
+  TabContextMenu.updateContextMenu(document.getElementById("tabContextMenu"));
+}
+
--- a/browser/base/content/test/tabview/browser_tabview_bug629195.js
+++ b/browser/base/content/test/tabview/browser_tabview_bug629195.js
@@ -104,11 +104,11 @@ function restore(groupId) {
         "tabview-group": 
           '{"' + groupId + '":{"bounds":{"left":202,"top":30,"width":455,"height":249},' + 
           '"userSize":null,"locked":{},"title":"","id":' + groupId +'}}',
         "tabview-ui": '{"pageBounds":{"left":0,"top":0,"width":788,"height":548}}'
       }, sizemode:"normal"
     }]
   };
   let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
-  ss.setWindowState(win, JSON.stringify(newState), false);
+  ss.setWindowState(win, JSON.stringify(newState), true);
 }
 
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/tabview/browser_tabview_bug643392.js
@@ -0,0 +1,56 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+const ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
+
+let state = {
+  windows: [{
+    tabs: [{
+      entries: [{ url: "about:home" }],
+      hidden: true,
+      extData: {"tabview-tab": '{"url":"about:home","groupID":1,"bounds":{"left":20,"top":20,"width":20,"height":20}}'}
+    },{
+      entries: [{ url: "about:home" }],
+      hidden: false,
+      extData: {"tabview-tab": '{"url":"about:home","groupID":2,"bounds":{"left":20,"top":20,"width":20,"height":20}}'},
+    }],
+    selected: 2,
+    extData: {
+      "tabview-groups": '{"nextID":3,"activeGroupId":2}',
+      "tabview-group":
+        '{"1":{"bounds":{"left":15,"top":5,"width":280,"height":232},"id":1},' +
+        '"2":{"bounds":{"left":309,"top":5,"width":267,"height":226},"id":2}}'
+    }
+  }]
+};
+
+function test() {
+  waitForExplicitFinish();
+
+  newWindowWithState(state, function (win) {
+    registerCleanupFunction(function () win.close());
+
+    is(win.gBrowser.tabs.length, 2, "two tabs");
+
+    let opts = {animate: true, byMouse: true};
+    win.gBrowser.removeTab(win.gBrowser.visibleTabs[0], opts);
+
+    let checkTabCount = function () {
+      if (win.gBrowser.tabs.length > 1) {
+        executeSoon(checkTabCount);
+        return;
+      }
+
+      is(win.gBrowser.tabs.length, 1, "one tab");
+
+      showTabView(function () {
+        let cw = win.TabView.getContentWindow();
+        is(cw.TabItems.items.length, 1, "one tabItem");
+
+        waitForFocus(finish);
+      }, win);
+    };
+
+    checkTabCount();
+  });
+}
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/tabview/browser_tabview_bug650573.js
@@ -0,0 +1,100 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
+let stateBackup = ss.getBrowserState();
+
+function test() {
+  waitForExplicitFinish();
+
+  registerCleanupFunction(function () {
+    ss.setBrowserState(stateBackup);
+  });
+
+  TabView._initFrame(function() {
+    executeSoon(testRestoreNormal);
+  });
+}
+
+function testRestoreNormal() {
+  testRestore("normal", function () {
+    waitForBrowserState(JSON.parse(stateBackup), testRestorePinned);
+  });
+}
+
+function testRestorePinned() {
+  gBrowser.loadOneTab("about:blank", {inBackground: true});
+  gBrowser.pinTab(gBrowser.tabs[0]);
+
+  testRestore("pinned", function () {
+    waitForBrowserState(JSON.parse(stateBackup), testRestoreHidden);
+  });
+}
+
+function testRestoreHidden() {
+  let groupItem = createGroupItemWithBlankTabs(window, 20, 20, 20, 1);
+  let tabItem = groupItem.getChild(0);
+
+  hideGroupItem(groupItem, function () {
+    testRestore("hidden", function () {
+      isnot(tabItem.container.style.display, "none", "tabItem is visible");
+      waitForFocus(finish);
+    });
+  });
+}
+
+function testRestore(prefix, callback) {
+  waitForBrowserState(createBrowserState(), function () {
+    is(gBrowser.tabs.length, 2, prefix + ": two tabs restored");
+
+    let cw = TabView.getContentWindow();
+    is(cw.GroupItems.groupItems.length, 2, prefix + ": we have two groupItems");
+
+    let [groupItem1, groupItem2] = cw.GroupItems.groupItems;
+    is(groupItem1.id, "1st-group-id", prefix + ": groupItem1's ID is valid");
+    is(groupItem1.getChildren().length, 1, prefix + ": groupItem1 has one child");
+
+    is(groupItem2.id, "2nd-group-id", prefix + ": groupItem2's ID is valid");
+    is(groupItem2.getChildren().length, 1, prefix + ": groupItem2 has one child");
+
+    callback();
+  });
+}
+
+function waitForBrowserState(state, callback) {
+  window.addEventListener("SSWindowStateReady", function onReady() {
+    window.removeEventListener("SSWindowStateReady", onReady, false);
+    executeSoon(callback);
+  }, false);
+
+  ss.setBrowserState(JSON.stringify(state));
+}
+
+function createBrowserState() {
+  let bounds = {left: 20, top: 20, width: 20, height: 20};
+
+  let tabViewGroups = {nextID: 99, activeGroupId: 1};
+  let tabViewGroup = {
+    "1st-group-id": {bounds: bounds, title: "new group 1", id: "1st-group-id"},
+    "2nd-group-id": {bounds: bounds, title: "new group 2", id: "2nd-group-id"}
+  };
+
+  let tab1Data = {bounds: bounds, url: "about:robots", groupID: "2nd-group-id"};
+  let tab1 = {
+    entries: [{url: "about:robots"}],
+    extData: {"tabview-tab": JSON.stringify(tab1Data)}
+  };
+
+  let tab2Data = {bounds: bounds, url: "about:mozilla", groupID: "1st-group-id"};
+  let tab2 = {
+    entries: [{url: "about:mozilla"}],
+    extData: {"tabview-tab": JSON.stringify(tab2Data)}
+  };
+
+  return {windows: [{
+    tabs: [tab1, tab2],
+    selected: 1,
+    extData: {"tabview-groups": JSON.stringify(tabViewGroups),
+    "tabview-group": JSON.stringify(tabViewGroup)}
+  }]};
+}
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/tabview/browser_tabview_bug656778.js
@@ -0,0 +1,141 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+function test() {
+  waitForExplicitFinish();
+
+  registerCleanupFunction(function () {
+    Services.prefs.clearUserPref(TabView.PREF_FIRST_RUN);
+    Services.prefs.clearUserPref(TabView.PREF_STARTUP_PAGE);
+    Services.prefs.clearUserPref(TabView.PREF_RESTORE_ENABLED_ONCE);
+  });
+
+  let assertBoolPref = function (pref, value) {
+    is(Services.prefs.getBoolPref(pref), value, pref + " is " + value);
+  };
+
+  let assertIntPref = function (pref, value) {
+    is(Services.prefs.getIntPref(pref), value, pref + " is " + value);
+  };
+
+  let setPreferences = function (startupPage, firstRun, enabledOnce) {
+    Services.prefs.setIntPref(TabView.PREF_STARTUP_PAGE, startupPage);
+    Services.prefs.setBoolPref(TabView.PREF_FIRST_RUN, firstRun);
+    Services.prefs.setBoolPref(TabView.PREF_RESTORE_ENABLED_ONCE, enabledOnce);
+  };
+
+  let assertPreferences = function (startupPage, firstRun, enabledOnce) {
+    assertIntPref(TabView.PREF_STARTUP_PAGE, startupPage);
+    assertBoolPref(TabView.PREF_FIRST_RUN, firstRun);
+    assertBoolPref(TabView.PREF_RESTORE_ENABLED_ONCE, enabledOnce);
+  };
+
+  let next = function () {
+    if (tests.length == 0) {
+      waitForFocus(finish);
+      return;
+    }
+
+    let test = tests.shift();
+    info("running " + test.name + "...");
+    test();
+  };
+
+  // State:
+  // Panorama was already used before (firstUseExperienced = true) but session
+  // restore is deactivated. We did not automatically enable SR, yet.
+  //
+  // Expected result:
+  // When entering Panorma session restore will be enabled and a notification
+  // banner is shown.
+  let test1 = function test1() {
+    setPreferences(1, true, false);
+
+    newWindowWithTabView(function (win) {
+      assertPreferences(3, true, true);
+
+      win.close();
+      next();
+    });
+  };
+
+  // State:
+  // Panorama has not been used before (firstUseExperienced = false) and session
+  // restore is deactivated. We did not automatically enable SR, yet. That state
+  // is equal to starting the browser the first time.
+  //
+  // Expected result:
+  // When entering Panorma nothing happens. When we detect that Panorama is
+  // really used (firstUseExperienced = true) we notify that session restore
+  // is now enabled.
+  let test2 = function test2() {
+    setPreferences(1, false, false);
+
+    newWindowWithTabView(function (win) {
+      assertPreferences(1, false, false);
+
+      win.TabView.firstUseExperienced = true;
+
+      assertPreferences(3, true, true);
+
+      win.close();
+      next();
+    });
+  };
+
+  // State:
+  // Panorama was already used before (firstUseExperienced = true) and session
+  // restore is activated. We did not automatically enable SR, yet.
+  //
+  // Expected result:
+  // When entering Panorama nothing happens because session store is already
+  // enabled so there's no reason to notify.
+  let test3 = function test3() {
+    setPreferences(3, true, false);
+
+    newWindowWithTabView(function (win) {
+      assertPreferences(3, true, true);
+
+      win.close();
+      next();
+    });
+  };
+
+  // State:
+  // Panorama was already used before (firstUseExperienced = true) and session
+  // restore has been automatically activated.
+  //
+  // Expected result:
+  // When entering Panorama nothing happens.
+  let test4 = function test4() {
+    setPreferences(3, true, true);
+
+    newWindowWithTabView(function (win) {
+      assertPreferences(3, true, true);
+
+      win.close();
+      next();
+    });
+  };
+
+  // State:
+  // Panorama was already used before (firstUseExperienced = true) and session
+  // restore has been automatically activated. Session store was afterwards
+  // disabled by the user so we won't touch that again.
+  //
+  // Expected result:
+  // When entering Panorama nothing happens and we didn't enable session restore.
+  let test5 = function test5() {
+    setPreferences(1, true, true);
+
+    newWindowWithTabView(function (win) {
+      assertPreferences(1, true, true);
+
+      win.close();
+      next();
+    });
+  };
+
+  let tests = [test1, test2, test3, test4, test5];
+  next();
+}
--- a/browser/base/content/test/tabview/head.js
+++ b/browser/base/content/test/tabview/head.js
@@ -88,38 +88,48 @@ function newWindowWithTabView(shownCallb
     win.addEventListener("tabviewshown", onShown, false);
     win.TabView.toggle();
   }
   win.addEventListener("load", onLoad, false);
 }
 
 // ----------
 function afterAllTabsLoaded(callback, win) {
+  const TAB_STATE_NEEDS_RESTORE = 1;
+
   win = win || window;
 
   let stillToLoad = 0;
+  let restoreHiddenTabs = Services.prefs.getBoolPref(
+                          "browser.sessionstore.restore_hidden_tabs");
 
   function onLoad() {
     this.removeEventListener("load", onLoad, true);
     stillToLoad--;
     if (!stillToLoad)
       callback();
   }
 
   for (let a = 0; a < win.gBrowser.tabs.length; a++) {
-    let browser = win.gBrowser.tabs[a].linkedBrowser;
-    if (browser.contentDocument.readyState != "complete" ||
+    let tab = win.gBrowser.tabs[a];
+    let browser = tab.linkedBrowser;
+
+    let isRestorable = !(tab.hidden && !restoreHiddenTabs &&
+                         browser.__SS_restoreState &&
+                         browser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE);
+
+    if (isRestorable && browser.contentDocument.readyState != "complete" ||
         browser.webProgress.isLoadingDocument) {
       stillToLoad++;
       browser.addEventListener("load", onLoad, true);
     }
   }
 
   if (!stillToLoad)
-    callback();
+    executeSoon(callback);
 }
 
 // ----------
 function showTabView(callback, win) {
   win = win || window;
 
   if (win.TabView.isVisible()) {
     callback();
@@ -256,8 +266,38 @@ function unhideGroupItem(groupItem, call
   }
 
   groupItem.addSubscriber(groupItem, "groupShown", function () {
     groupItem.removeSubscriber(groupItem, "groupShown");
     callback();
   });
   groupItem._unhide();
 }
+
+// ----------
+function whenWindowLoaded(win, callback) {
+  win.addEventListener("load", function onLoad() {
+    win.removeEventListener("load", onLoad, false);
+    executeSoon(callback);
+  }, false);
+}
+
+// ----------
+function whenWindowStateReady(win, callback) {
+  win.addEventListener("SSWindowStateReady", function onReady() {
+    win.removeEventListener("SSWindowStateReady", onReady, false);
+    executeSoon(callback);
+  }, false);
+}
+
+// ----------
+function newWindowWithState(state, callback) {
+  let opts = "chrome,all,dialog=no,height=800,width=800";
+  let win = window.openDialog(getBrowserURL(), "_blank", opts);
+
+  whenWindowLoaded(win, function () {
+    ss.setWindowState(win, JSON.stringify(state), true);
+  });
+
+  whenWindowStateReady(win, function () {
+    afterAllTabsLoaded(function () callback(win), win);
+  });
+}
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -178,17 +178,17 @@
           }
           return returnValue;
         ]]></body>
       </method>
 
       <field name="_formattingEnabled">true</field>
       <method name="formatValue">
         <body><![CDATA[
-          if (!this._formattingEnabled)
+          if (!this._formattingEnabled || this.focused)
             return;
 
           let controller = this.editor.selectionController;
           let selection = controller.getSelection(controller.SELECTION_URLSECONDARY);
           selection.removeAllRanges();
 
           let textNode = this.editor.rootElement.firstChild;
           let value = textNode.textContent;
@@ -311,19 +311,23 @@
             this.handleRevert();
             content.focus();
             gBrowser.loadOneTab(url, {
                                 postData: postData,
                                 inBackground: false,
                                 allowThirdPartyFixup: true});
             aTriggeringEvent.preventDefault();
             aTriggeringEvent.stopPropagation();
+          } else {
+            // Pass LOAD_FLAGS_DISALLOW_INHERIT_OWNER to prevent any loads from
+            // inheriting the currently loaded document's principal.
+            let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
+                        Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
+            gBrowser.loadURIWithFlags(url, flags, null, null, postData);
           }
-          else
-            loadURI(url, null, postData, true /* allow third party fixup */);
 
           gBrowser.selectedBrowser.focus();
         ]]></body>
       </method>
 
       <method name="_canonizeURL">
         <parameter name="aTriggeringEvent"/>
         <body><![CDATA[
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -98,16 +98,18 @@ static RedirEntry kRedirMap[] = {
     nsIAboutModule::ALLOW_SCRIPT },
 #ifdef MOZ_SERVICES_SYNC
   { "sync-tabs", "chrome://browser/content/aboutSyncTabs.xul",
     nsIAboutModule::ALLOW_SCRIPT },
 #endif
   { "home", "chrome://browser/content/aboutHome.xhtml",
     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
     nsIAboutModule::ALLOW_SCRIPT },
+  { "permissions", "chrome://browser/content/preferences/aboutPermissions.xul",
+    nsIAboutModule::ALLOW_SCRIPT },
 };
 static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);
 
 static nsCAutoString
 GetAboutModuleName(nsIURI *aURI)
 {
   nsCAutoString path;
   aURI->GetPath(path);
--- a/browser/components/build/nsBrowserCompsCID.h
+++ b/browser/components/build/nsBrowserCompsCID.h
@@ -41,43 +41,24 @@
 #ifdef XP_WIN
 #define NS_WINIEPROFILEMIGRATOR_CID \
 { 0xbc15c73d, 0xc05b, 0x497b, { 0xa3, 0x73, 0x4b, 0xae, 0x6c, 0x17, 0x86, 0x31 } }
 #endif
 
 #ifdef XP_MACOSX
 #define NS_SAFARIPROFILEMIGRATOR_CID \
 { 0x29e3b139, 0xad19, 0x44f3, { 0xb2, 0xc2, 0xe9, 0xf1, 0x3b, 0xa2, 0xbb, 0xc6 } }
-
-#define NS_MACIEPROFILEMIGRATOR_CID \
-{ 0xf1a4e549, 0x5c4b, 0x41ff, { 0xb5, 0xe3, 0xeb, 0x87, 0xae, 0x31, 0x41, 0x9b } }
-
-#define NS_OMNIWEBPROFILEMIGRATOR_CID \
-{ 0xb80ae6d8, 0x766c, 0x43da, { 0x9c, 0x7a, 0xd, 0x82, 0x44, 0x52, 0x61, 0x6a } }
-
-#define NS_CAMINOPROFILEMIGRATOR_CID \
-{ 0x01d88ea9, 0x0feb, 0x495e, { 0x8c, 0x9b, 0x41, 0x65, 0x99, 0x55, 0x52, 0x65 } }
-
-#define NS_ICABPROFILEMIGRATOR_CID \
-{ 0xf394a036, 0xc5e1, 0x46d8, { 0x99, 0x39, 0x6b, 0x35, 0xe1, 0x13, 0x0a, 0x27 } }
-
 #endif
 
 #define NS_OPERAPROFILEMIGRATOR_CID \
 { 0xf34ff792, 0x722e, 0x4490, { 0xb1, 0x95, 0x47, 0xd2, 0x42, 0xed, 0xca, 0x1c } }
 
-#define NS_DOGBERTPROFILEMIGRATOR_CID \
-{ 0x24f92fae, 0xf793, 0x473b, { 0x80, 0x61, 0x71, 0x34, 0x8, 0xbd, 0x11, 0xd5 } }
-
 #define NS_SEAMONKEYPROFILEMIGRATOR_CID \
 { 0x9a28ffa7, 0xe6ef, 0x4b52, { 0xa1, 0x27, 0x6a, 0xd9, 0x51, 0xde, 0x8e, 0x9b } }
 
-#define NS_PHOENIXPROFILEMIGRATOR_CID \
-{ 0x78481e4a, 0x50e4, 0x4489, { 0xb6, 0x8a, 0xef, 0x82, 0x67, 0xe, 0xd6, 0x3f } }
-
 #define NS_SHELLSERVICE_CID \
 { 0x63c7b9f4, 0xcc8, 0x43f8, { 0xb6, 0x66, 0xa, 0x66, 0x16, 0x55, 0xcb, 0x73 } }
 
 #define NS_SHELLSERVICE_CONTRACTID \
   "@mozilla.org/browser/shell-service;1"
 
 #define NS_RDF_FORWARDPROXY_INFER_DATASOURCE_CID \
 { 0x7a024bcf, 0xedd5, 0x4d9a, { 0x86, 0x14, 0xd4, 0x4b, 0xe1, 0xda, 0xda, 0xd3 } }
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -45,30 +45,24 @@
 #include "nsWindowsShellService.h"
 #elif defined(XP_MACOSX)
 #include "nsMacShellService.h"
 #elif defined(MOZ_WIDGET_GTK2)
 #include "nsGNOMEShellService.h"
 #endif
 
 #include "nsProfileMigrator.h"
-#include "nsDogbertProfileMigrator.h"
 #if !defined(XP_OS2)
 #include "nsOperaProfileMigrator.h"
 #endif
-#include "nsPhoenixProfileMigrator.h"
 #include "nsSeamonkeyProfileMigrator.h"
 #if defined(XP_WIN) && !defined(__MINGW32__)
 #include "nsIEProfileMigrator.h"
 #elif defined(XP_MACOSX)
 #include "nsSafariProfileMigrator.h"
-#include "nsOmniWebProfileMigrator.h"
-#include "nsMacIEProfileMigrator.h"
-#include "nsCaminoProfileMigrator.h"
-#include "nsICabProfileMigrator.h"
 #endif
 
 #include "rdf.h"
 #include "nsFeedSniffer.h"
 #include "AboutRedirector.h"
 #include "nsIAboutModule.h"
 
 #include "nsPrivateBrowsingServiceWrapper.h"
@@ -82,31 +76,25 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(Directory
 #if defined(XP_WIN)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
 #elif defined(XP_MACOSX)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
 #elif defined(MOZ_WIDGET_GTK2)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
 #endif
 
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsDogbertProfileMigrator)
 #if !defined(XP_OS2)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
 #endif
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsPhoenixProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSeamonkeyProfileMigrator)
 #if defined(XP_WIN) && !defined(__MINGW32__)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfileMigrator)
 #elif defined(XP_MACOSX)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafariProfileMigrator)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsOmniWebProfileMigrator)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacIEProfileMigrator)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsCaminoProfileMigrator)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsICabProfileMigrator)
 #endif
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrivateBrowsingServiceWrapper, Init)
 
 NS_DEFINE_NAMED_CID(NS_BROWSERDIRECTORYPROVIDER_CID);
 #if defined(XP_WIN)
@@ -117,26 +105,20 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID)
 NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID);
 NS_DEFINE_NAMED_CID(NS_BROWSER_ABOUT_REDIRECTOR_CID);
 NS_DEFINE_NAMED_CID(NS_FIREFOX_PROFILEMIGRATOR_CID);
 #if defined(XP_WIN) && !defined(__MINGW32__)
 NS_DEFINE_NAMED_CID(NS_WINIEPROFILEMIGRATOR_CID);
 #elif defined(XP_MACOSX)
 NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_SAFARIPROFILEMIGRATOR_CID);
-NS_DEFINE_NAMED_CID(NS_MACIEPROFILEMIGRATOR_CID);
-NS_DEFINE_NAMED_CID(NS_OMNIWEBPROFILEMIGRATOR_CID);
-NS_DEFINE_NAMED_CID(NS_CAMINOPROFILEMIGRATOR_CID);
-NS_DEFINE_NAMED_CID(NS_ICABPROFILEMIGRATOR_CID);
 #endif
 #if !defined(XP_OS2)
 NS_DEFINE_NAMED_CID(NS_OPERAPROFILEMIGRATOR_CID);
 #endif
-NS_DEFINE_NAMED_CID(NS_DOGBERTPROFILEMIGRATOR_CID);
-NS_DEFINE_NAMED_CID(NS_PHOENIXPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
 
 static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
     { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, NULL, DirectoryProviderConstructor },
 #if defined(XP_WIN)
     { &kNS_SHELLSERVICE_CID, false, NULL, nsWindowsShellServiceConstructor },
 #elif defined(MOZ_WIDGET_GTK2)
@@ -145,26 +127,20 @@ static const mozilla::Module::CIDEntry k
     { &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
     { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
     { &kNS_FIREFOX_PROFILEMIGRATOR_CID, false, NULL, nsProfileMigratorConstructor },
 #if defined(XP_WIN) && !defined(__MINGW32__)
     { &kNS_WINIEPROFILEMIGRATOR_CID, false, NULL, nsIEProfileMigratorConstructor },
 #elif defined(XP_MACOSX)
     { &kNS_SHELLSERVICE_CID, false, NULL, nsMacShellServiceConstructor },
     { &kNS_SAFARIPROFILEMIGRATOR_CID, false, NULL, nsSafariProfileMigratorConstructor },
-    { &kNS_MACIEPROFILEMIGRATOR_CID, false, NULL, nsMacIEProfileMigratorConstructor },
-    { &kNS_OMNIWEBPROFILEMIGRATOR_CID, false, NULL, nsOmniWebProfileMigratorConstructor },
-    { &kNS_CAMINOPROFILEMIGRATOR_CID, false, NULL, nsCaminoProfileMigratorConstructor },
-    { &kNS_ICABPROFILEMIGRATOR_CID, false, NULL, nsICabProfileMigratorConstructor },
 #endif
 #if !defined(XP_OS2)
     { &kNS_OPERAPROFILEMIGRATOR_CID, false, NULL, nsOperaProfileMigratorConstructor },
 #endif
-    { &kNS_DOGBERTPROFILEMIGRATOR_CID, false, NULL, nsDogbertProfileMigratorConstructor },
-    { &kNS_PHOENIXPROFILEMIGRATOR_CID, false, NULL, nsPhoenixProfileMigratorConstructor },
     { &kNS_SEAMONKEYPROFILEMIGRATOR_CID, false, NULL, nsSeamonkeyProfileMigratorConstructor },
     { &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID, false, NULL, nsPrivateBrowsingServiceWrapperConstructor },
     { NULL }
 };
 
 static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
     { NS_BROWSERDIRECTORYPROVIDER_CONTRACTID, &kNS_BROWSERDIRECTORYPROVIDER_CID },
 #if defined(XP_WIN)
@@ -181,32 +157,27 @@ static const mozilla::Module::ContractID
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "rights", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
 #ifdef MOZ_SERVICES_SYNC
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "sync-tabs", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
 #endif
     { NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+    { NS_ABOUT_MODULE_CONTRACTID_PREFIX "permissions", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
     { NS_PROFILEMIGRATOR_CONTRACTID, &kNS_FIREFOX_PROFILEMIGRATOR_CID },
 #if defined(XP_WIN) && !defined(__MINGW32__)
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "ie", &kNS_WINIEPROFILEMIGRATOR_CID },
 #elif defined(XP_MACOSX)
     { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "safari", &kNS_SAFARIPROFILEMIGRATOR_CID },
-    { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "macie", &kNS_MACIEPROFILEMIGRATOR_CID },
-    { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "omniweb", &kNS_OMNIWEBPROFILEMIGRATOR_CID },
-    { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "camino", &kNS_CAMINOPROFILEMIGRATOR_CID },
-    { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "icab", &kNS_ICABPROFILEMIGRATOR_CID },
 #endif
 #if !defined(XP_OS2)
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "opera", &kNS_OPERAPROFILEMIGRATOR_CID },
 #endif
-    { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "dogbert", &kNS_DOGBERTPROFILEMIGRATOR_CID },
-    { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "phoenix", &kNS_PHOENIXPROFILEMIGRATOR_CID },
     { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey", &kNS_SEAMONKEYPROFILEMIGRATOR_CID },
     { NS_PRIVATE_BROWSING_SERVICE_CONTRACTID, &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID },
     { NULL }
 };
 
 static const mozilla::Module::CategoryEntry kBrowserCategories[] = {
     { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "browser-directory-provider", NS_BROWSERDIRECTORYPROVIDER_CONTRACTID },
     { NS_CONTENT_SNIFFER_CATEGORY, "Feed Sniffer", NS_FEEDSNIFFER_CONTRACTID },
new file mode 100644
--- /dev/null
+++ b/browser/components/dirprovider/tests/unit/xpcshell.ini
@@ -0,0 +1,6 @@
+[DEFAULT]
+head = head_dirprovider.js
+tail = 
+
+[test_bookmark_pref.js]
+[test_keys.js]
new file mode 100644
--- /dev/null
+++ b/browser/components/feeds/test/unit/xpcshell.ini
@@ -0,0 +1,5 @@
+[DEFAULT]
+head = head_feeds.js
+tail = 
+
+[test_355473.js]
--- a/browser/components/migration/content/migration.js
+++ b/browser/components/migration/content/migration.js
@@ -123,18 +123,17 @@ var MigrationWizard = {
         try {
           var migrator = Components.classes[contractID].createInstance(kIMig);
         }
         catch (e) {
           dump("*** invalid contractID =" + contractID + "\n");
           return;
         }
 
-        if (migrator.sourceExists &&
-            !(suffix == "phoenix" && !this._autoMigrate)) {
+        if (migrator.sourceExists) {
           // Save this as the first selectable item, if we don't already have
           // one, or if it is the migrator that was passed to us.
           if (!selectedMigrator || this._source == suffix)
             selectedMigrator = group.childNodes[i];
         } else {
           // Hide this option
           group.childNodes[i].hidden = true;
         }
@@ -328,25 +327,21 @@ var MigrationWizard = {
 
     var singleStart = document.getElementById("homePageSingleStart");
     singleStart.setAttribute("label", mainStr);
     singleStart.setAttribute("value", "DEFAULT");
 
     var source = null;
     switch (this._source) {
       case "ie":
-      case "macie":
         source = "sourceNameIE";
         break;
       case "opera":
         source = "sourceNameOpera";
         break;
-      case "dogbert":
-        source = "sourceNameDogbert";
-        break;
       case "safari":
         source = "sourceNameSafari";
         break;
       case "seamonkey":
         source = "sourceNameSeamonkey";
         break;
     }
 
--- a/browser/components/migration/content/migration.xul
+++ b/browser/components/migration/content/migration.xul
@@ -63,53 +63,31 @@
     <description id="importAll" control="importSourceGroup">&importFromUnix.label;</description>
 #endif
     <description id="importBookmarks" control="importSourceGroup" hidden="true">&importFromBookmarks.label;</description>
 
     <radiogroup id="importSourceGroup" align="start">
       <!-- If you are adding a migrator, please add the appropriate
            hooks to GetDefaultBrowserMigratorKey in
            browser/components/migration/src/nsProfileMigrator.cpp -->
-      <radio id="phoenix"   label="&importFromPhoenix.label;"   accesskey="&importFromPhoenix.accesskey;"/>
-#ifdef XP_UNIX
 #ifdef XP_MACOSX
       <radio id="safari"    label="&importFromSafari.label;"    accesskey="&importFromSafari.accesskey;"/>
-      <radio id="macie"     label="&importFromIE.label;"        accesskey="&importFromIE.accesskey;"/>
-<!-- XXXben - uncomment these as we write migrators for them
-      <radio id="camino"    label="&importFromCamino.label;"    accesskey="&importFromCamino.accesskey;"/>
-      <radio id="omniweb"   label="&importFromOmniWeb.label;"   accesskey="&importFromOmniWeb.accesskey;"/>
-      <radio id="icab"      label="&importFromICab.label;"      accesskey="&importFromICab.accesskey;"/>
--->
-      <radio id="seamonkey" label="&importFromSeamonkey.label;" accesskey="&importFromSeamonkey.accesskey;"/>
-      <radio id="dogbert"   label="&importFromNetscape4.label;" accesskey="&importFromNetscape4.accesskey;"/>
-      <radio id="opera"     label="&importFromOpera.label;"     accesskey="&importFromOpera.accesskey;"/>
-#else
       <radio id="seamonkey" label="&importFromSeamonkey.label;" accesskey="&importFromSeamonkey.accesskey;"/>
-      <radio id="dogbert"   label="&importFromNetscape4.label;" accesskey="&importFromNetscape4.accesskey;"/>
       <radio id="opera"     label="&importFromOpera.label;"     accesskey="&importFromOpera.accesskey;"/>
-<!-- XXXben - uncomment these as we write migrators for them
-      <radio id="konqueror" label="&importFromKonqueror.label;" accesskey="&importFromKonqueror.accesskey;"/>
-      <radio id="epiphany"  label="&importFromEpiphany.label;"  accesskey="&importFromEpiphany.accesskey;"/>
-      <radio id="galeon"    label="&importFromGaleon.label;"    accesskey="&importFromGaleon.accesskey;"/>
-  -->
-#endif
-#endif
-#ifdef XP_WIN
+#elifdef XP_UNIX
+      <radio id="seamonkey" label="&importFromSeamonkey.label;" accesskey="&importFromSeamonkey.accesskey;"/>
+      <radio id="opera"     label="&importFromOpera.label;"     accesskey="&importFromOpera.accesskey;"/>
+#elifdef XP_WIN
 #ifndef NO_IE_MIGRATOR
       <radio id="ie"        label="&importFromIE.label;"        accesskey="&importFromIE.accesskey;"/>
 #endif
       <radio id="seamonkey" label="&importFromSeamonkey.label;" accesskey="&importFromSeamonkey.accesskey;"/>
-      <radio id="dogbert"   label="&importFromNetscape4.label;" accesskey="&importFromNetscape4.accesskey;"/>
       <radio id="opera"     label="&importFromOpera.label;"     accesskey="&importFromOpera.accesskey;"/>
-#endif
-#ifndef XP_UNIX
-#ifndef XP_WIN
+#else
       <radio id="seamonkey" label="&importFromSeamonkey.label;" accesskey="&importFromSeamonkey.accesskey;"/>
-      <radio id="dogbert"   label="&importFromNetscape4.label;" accesskey="&importFromNetscape4.accesskey;"/>
-#endif
 #endif
       <radio id="fromfile"  label="&importFromHTMLFile.label;"  accesskey="&importFromHTMLFile.accesskey;" hidden="true"/>
       <radio id="nothing"   label="&importFromNothing.label;"   accesskey="&importFromNothing.accesskey;" hidden="true"/>
     </radiogroup>
     <label id="noSources" hidden="true">&noMigrationSources.label;</label>
   </wizardpage>
 
   <wizardpage id="selectProfile" pageid="selectProfile" label="&selectProfile.title;"
--- a/browser/components/migration/src/Makefile.in
+++ b/browser/components/migration/src/Makefile.in
@@ -49,32 +49,26 @@ ifndef MOZ_MEMORY
 USE_STATIC_LIBS = 1
 endif
 
 
 CPPSRCS  = nsProfileMigrator.cpp \
            nsBrowserProfileMigratorUtils.cpp \
            nsNetscapeProfileMigratorBase.cpp \
            nsSeamonkeyProfileMigrator.cpp \
-           nsPhoenixProfileMigrator.cpp \
-           nsDogbertProfileMigrator.cpp \
            $(NULL)
 
 ifneq ($(OS_ARCH),OS2)
 CPPSRCS += nsOperaProfileMigrator.cpp
 endif
 
 ifeq ($(OS_ARCH)_$(GNU_CXX),WINNT_)
 CPPSRCS += nsIEProfileMigrator.cpp \
            $(NULL)
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 CPPSRCS += nsSafariProfileMigrator.cpp \
-           nsMacIEProfileMigrator.cpp \
-           nsOmniWebProfileMigrator.cpp \
-           nsCaminoProfileMigrator.cpp \
-           nsICabProfileMigrator.cpp \
            $(NULL)
 endif            
 
 include $(topsrcdir)/config/rules.mk
 
deleted file mode 100644
--- a/browser/components/migration/src/nsCaminoProfileMigrator.cpp
+++ /dev/null
@@ -1,115 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsBrowserProfileMigratorUtils.h"
-#include "nsCaminoProfileMigrator.h"
-#include "nsIObserverService.h"
-#include "nsIProfileMigrator.h"
-#include "nsIServiceManager.h"
-#include "nsISupportsArray.h"
-#include "nsISupportsPrimitives.h"
-#include "nsServiceManagerUtils.h"
-
-///////////////////////////////////////////////////////////////////////////////
-// nsCaminoProfileMigrator
-
-NS_IMPL_ISUPPORTS1(nsCaminoProfileMigrator, nsIBrowserProfileMigrator)
-
-nsCaminoProfileMigrator::nsCaminoProfileMigrator()
-{
-  mObserverService = do_GetService("@mozilla.org/observer-service;1");
-}
-
-nsCaminoProfileMigrator::~nsCaminoProfileMigrator()
-{
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsIBrowserProfileMigrator
-
-NS_IMETHODIMP
-nsCaminoProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
-{
-  nsresult rv = NS_OK;
-
-  NOTIFY_OBSERVERS(MIGRATION_STARTED, nsnull);
-
-  NOTIFY_OBSERVERS(MIGRATION_ENDED, nsnull);
-
-  return rv;
-}
-
-NS_IMETHODIMP
-nsCaminoProfileMigrator::GetMigrateData(const PRUnichar* aProfile, 
-                                        PRBool aReplace, 
-                                        PRUint16* aResult)
-{
-  *aResult = 0; // XXXben implement me
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCaminoProfileMigrator::GetSourceExists(PRBool* aResult)
-{
-  *aResult = PR_FALSE; // XXXben implement me
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCaminoProfileMigrator::GetSourceHasMultipleProfiles(PRBool* aResult)
-{
-  *aResult = PR_FALSE;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCaminoProfileMigrator::GetSourceProfiles(nsISupportsArray** aResult)
-{
-  *aResult = nsnull;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCaminoProfileMigrator::GetSourceHomePageURL(nsACString& aResult)
-{
-  aResult.Truncate();
-  return NS_OK;
-}
-///////////////////////////////////////////////////////////////////////////////
-// nsCaminoProfileMigrator
-
deleted file mode 100644
--- a/browser/components/migration/src/nsCaminoProfileMigrator.h
+++ /dev/null
@@ -1,61 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef caminoprofilemigrator___h___
-#define caminoprofilemigrator___h___
-
-#include "nsIBrowserProfileMigrator.h"
-#include "nsIObserverService.h"
-#include "nsISupportsArray.h"
-#include "nsStringAPI.h"
-
-class nsCaminoProfileMigrator : public nsIBrowserProfileMigrator
-{
-public:
-  NS_DECL_NSIBROWSERPROFILEMIGRATOR
-  NS_DECL_ISUPPORTS
-
-  nsCaminoProfileMigrator();
-  virtual ~nsCaminoProfileMigrator();
-
-protected:
-
-private:
-  nsCOMPtr<nsIObserverService> mObserverService;
-};
- 
-#endif
deleted file mode 100644
--- a/browser/components/migration/src/nsDogbertProfileMigrator.cpp
+++ /dev/null
@@ -1,672 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsAppDirectoryServiceDefs.h"
-#include "nsBrowserProfileMigratorUtils.h"
-#include "nsDogbertProfileMigrator.h"
-#include "nsICookieManager2.h"
-#include "nsIFile.h"
-#include "nsIInputStream.h"
-#include "nsILineInputStream.h"
-#include "nsIObserverService.h"
-#include "nsIOutputStream.h"
-#include "nsIPrefBranch.h"
-#include "nsIPrefLocalizedString.h"
-#include "nsIPrefService.h"
-#include "nsIServiceManager.h"
-#include "nsISupportsArray.h"
-#include "nsISupportsPrimitives.h"
-#include "nsNetCID.h"
-#include "nsNetUtil.h"
-#include "prprf.h"
-#include "prenv.h"
-#include "NSReg.h"
-#include "nsDirectoryServiceDefs.h"
-#include "nsDirectoryServiceUtils.h"
-#include <stdlib.h>
-#include <limits.h>
-
-#ifndef MAXPATHLEN
-#ifdef PATH_MAX
-#define MAXPATHLEN PATH_MAX
-#elif defined(_MAX_PATH)
-#define MAXPATHLEN _MAX_PATH
-#elif defined(CCHMAXPATH)
-#define MAXPATHLEN CCHMAXPATH
-#else
-#define MAXPATHLEN 1024
-#endif
-#endif
-
-#define PREF_FILE_HEADER_STRING "# Mozilla User Preferences    " 
-
-#if defined(XP_MACOSX)
-#define OLDREG_NAME               "Netscape Registry"
-#define OLDREG_DIR                NS_MAC_PREFS_DIR
-#define PREF_FILE_NAME_IN_4x      NS_LITERAL_STRING("Netscape Preferences")
-#define COOKIES_FILE_NAME_IN_4x   NS_LITERAL_STRING("MagicCookie")
-#define BOOKMARKS_FILE_NAME_IN_4x NS_LITERAL_STRING("Bookmarks.html")
-#define SECURITY_PATH             "Security"
-#define PSM_CERT7_DB              NS_LITERAL_STRING("Certificates7")
-#define PSM_KEY3_DB               NS_LITERAL_STRING("Key Database3")
-#define PSM_SECMODULE_DB          NS_LITERAL_STRING("Security Modules")
-
-#elif defined(XP_WIN) || defined(XP_OS2)
-#define OLDREG_NAME               "nsreg.dat"
-#ifdef XP_WIN
-#define OLDREG_DIR                NS_WIN_WINDOWS_DIR
-#else
-#define OLDREG_DIR                NS_OS2_DIR
-#endif
-#define PREF_FILE_NAME_IN_4x      NS_LITERAL_STRING("prefs.js")
-#define COOKIES_FILE_NAME_IN_4x   NS_LITERAL_STRING("cookies.txt")
-#define BOOKMARKS_FILE_NAME_IN_4x NS_LITERAL_STRING("bookmark.htm")
-#define PSM_CERT7_DB              NS_LITERAL_STRING("cert7.db")
-#define PSM_KEY3_DB               NS_LITERAL_STRING("key3.db")
-#define PSM_SECMODULE_DB          NS_LITERAL_STRING("secmod.db")
-
-#elif defined(XP_UNIX)
-#define PREF_FILE_NAME_IN_4x      NS_LITERAL_STRING("preferences.js")
-#define COOKIES_FILE_NAME_IN_4x   NS_LITERAL_STRING("cookies")
-#define BOOKMARKS_FILE_NAME_IN_4x NS_LITERAL_STRING("bookmarks.html")
-#define PSM_CERT7_DB              NS_LITERAL_STRING("cert7.db")
-#define PSM_KEY3_DB               NS_LITERAL_STRING("key3.db")
-#define PSM_SECMODULE_DB          NS_LITERAL_STRING("secmodule.db")
-#define HOME_ENVIRONMENT_VARIABLE         "HOME"
-#define PROFILE_HOME_ENVIRONMENT_VARIABLE "PROFILE_HOME"
-#define DEFAULT_UNIX_PROFILE_NAME         "default"
-#else
-#error No netscape4.x profile-migrator on this platform.
-#endif /* XP_UNIX */
-
-#define COOKIES_FILE_NAME_IN_5x   NS_LITERAL_STRING("cookies.txt")
-#define BOOKMARKS_FILE_NAME_IN_5x NS_LITERAL_STRING("bookmarks.html")
-#define PREF_FILE_NAME_IN_5x      NS_LITERAL_STRING("prefs.js")
-
-///////////////////////////////////////////////////////////////////////////////
-// nsDogbertProfileMigrator
-
-NS_IMPL_ISUPPORTS1(nsDogbertProfileMigrator, nsIBrowserProfileMigrator)
-
-nsDogbertProfileMigrator::nsDogbertProfileMigrator()
-{
-  mObserverService = do_GetService("@mozilla.org/observer-service;1");
-}
-
-nsDogbertProfileMigrator::~nsDogbertProfileMigrator()
-{
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsIBrowserProfileMigrator
-
-NS_IMETHODIMP
-nsDogbertProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup,
-                                  const PRUnichar* aProfile)
-{
-  nsresult rv = NS_OK;
-  PRBool aReplace = aStartup ? PR_TRUE : PR_FALSE;
-
-  if (!mTargetProfile) { 
-    GetProfilePath(aStartup, mTargetProfile);
-    if (!mTargetProfile) return NS_ERROR_FAILURE;
-  }
-
-  if (!mSourceProfile) {
-    GetSourceProfile(aProfile);
-    if (!mSourceProfile)
-      return NS_ERROR_FAILURE;
-  }
-
-  NOTIFY_OBSERVERS(MIGRATION_STARTED, nsnull);
-
-  COPY_DATA(CopyPreferences,  aReplace, nsIBrowserProfileMigrator::SETTINGS);
-  COPY_DATA(CopyCookies,      aReplace, nsIBrowserProfileMigrator::COOKIES);
-  COPY_DATA(CopyBookmarks,    aReplace, nsIBrowserProfileMigrator::BOOKMARKS);
-
-  NOTIFY_OBSERVERS(MIGRATION_ENDED, nsnull);
-
-  return rv;
-}
-
-// on win/mac/os2, NS4x uses a registry to determine profile locations
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
-void
-nsDogbertProfileMigrator::GetSourceProfile(const PRUnichar* aProfile)
-{
-  nsresult rv;
-
-  nsCOMPtr<nsIFile> regFile;
-  rv = NS_GetSpecialDirectory(OLDREG_DIR, getter_AddRefs(regFile));
-  if (NS_FAILED(rv)) return;
-
-  regFile->AppendNative(NS_LITERAL_CSTRING(OLDREG_NAME));
-  
-  nsCAutoString path;
-  rv = regFile->GetNativePath(path);
-  if (NS_FAILED(rv)) return;
-
-  if (NR_StartupRegistry())
-    return;
-
-  HREG reg = nsnull;
-  RKEY profile = nsnull;
-
-  if (NR_RegOpen(path.get(), &reg))
-    goto cleanup;
-
-  {
-    // on macos, registry entries are UTF8 encoded
-    NS_ConvertUTF16toUTF8 profileName(aProfile);
-
-    if (NR_RegGetKey(reg, ROOTKEY_USERS, profileName.get(), &profile))
-      goto cleanup;
-  }
-
-  char profilePath[MAXPATHLEN];
-  if (NR_RegGetEntryString(reg, profile, "ProfileLocation", profilePath, MAXPATHLEN))
-    goto cleanup;
-
-  mSourceProfile = do_CreateInstance("@mozilla.org/file/local;1");
-  if (!mSourceProfile) goto cleanup;
-
-  {
-    // the string is UTF8 encoded, which forces us to do some strange string-do
-    rv = mSourceProfile->InitWithPath(NS_ConvertUTF8toUTF16(profilePath));
-  }
-
-  if (NS_FAILED(rv))
-    mSourceProfile = nsnull;
-
-cleanup:
-  if (reg)
-    NR_RegClose(reg);
-  NR_ShutdownRegistry();
-}
-#else
-
-#endif
-
-NS_IMETHODIMP
-nsDogbertProfileMigrator::GetMigrateData(const PRUnichar* aProfile, 
-                                         PRBool aReplace,
-                                         PRUint16* aResult)
-{
-  *aResult = 0;
-  if (!mSourceProfile) {
-    GetSourceProfile(aProfile);
-    if (!mSourceProfile)
-      return NS_ERROR_FILE_NOT_FOUND;
-  }
-
-  MigrationData data[] = { { ToNewUnicode(PREF_FILE_NAME_IN_4x),
-                             nsIBrowserProfileMigrator::SETTINGS,
-                             PR_TRUE },
-                           { ToNewUnicode(COOKIES_FILE_NAME_IN_4x),
-                             nsIBrowserProfileMigrator::COOKIES,
-                             PR_FALSE },
-                           { ToNewUnicode(BOOKMARKS_FILE_NAME_IN_4x),
-                             nsIBrowserProfileMigrator::BOOKMARKS,
-                             PR_FALSE } };
-                                                                  
-  // Frees file name strings allocated above.
-  GetMigrateDataFromArray(data, sizeof(data)/sizeof(MigrationData), 
-                          aReplace, mSourceProfile, aResult);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsDogbertProfileMigrator::GetSourceExists(PRBool* aResult)
-{
-  nsCOMPtr<nsISupportsArray> profiles;
-  GetSourceProfiles(getter_AddRefs(profiles));
-
-  if (profiles) { 
-    PRUint32 count;
-    profiles->Count(&count);
-    *aResult = count > 0;
-  }
-  else
-    *aResult = PR_FALSE;
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsDogbertProfileMigrator::GetSourceHasMultipleProfiles(PRBool* aResult)
-{
-  nsCOMPtr<nsISupportsArray> profiles;
-  GetSourceProfiles(getter_AddRefs(profiles));
-
-  if (profiles) {
-    PRUint32 count;
-    profiles->Count(&count);
-    *aResult = count > 1;
-  }
-  else
-    *aResult = PR_FALSE;
-
-  return NS_OK;
-}
-
-#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MACOSX)
-NS_IMETHODIMP
-nsDogbertProfileMigrator::GetSourceProfiles(nsISupportsArray** aResult)
-{
-  if (!mProfiles) {
-    nsresult rv;
-
-    mProfiles = do_CreateInstance(NS_SUPPORTSARRAY_CONTRACTID, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    nsCOMPtr<nsIFile> regFile;
-    rv = NS_GetSpecialDirectory(OLDREG_DIR, getter_AddRefs(regFile));
-    NS_ENSURE_SUCCESS(rv, rv);
-    regFile->AppendNative(NS_LITERAL_CSTRING(OLDREG_NAME));
-  
-    nsCAutoString path;
-    rv = regFile->GetNativePath(path);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    if (NR_StartupRegistry())
-      return NS_ERROR_FAILURE;
-
-    HREG reg = nsnull;
-    REGENUM enumstate = 0;
-
-    if (NR_RegOpen(path.get(), &reg)) {
-      NR_ShutdownRegistry();
-      return NS_ERROR_FAILURE;
-    }
-
-    char profileName[MAXREGNAMELEN];
-    while (!NR_RegEnumSubkeys(reg, ROOTKEY_USERS, &enumstate,
-                              profileName, MAXREGNAMELEN, REGENUM_CHILDREN)) {
-      nsCOMPtr<nsISupportsString> nameString
-        (do_CreateInstance("@mozilla.org/supports-string;1"));
-      if (nameString) {
-        nameString->SetData(NS_ConvertUTF8toUTF16(profileName));
-        mProfiles->AppendElement(nameString);
-      }
-    }
-  }
-  
-  NS_IF_ADDREF(*aResult = mProfiles);
-  return NS_OK;
-}
-#else // XP_UNIX
-
-NS_IMETHODIMP
-nsDogbertProfileMigrator::GetSourceProfiles(nsISupportsArray** aResult)
-{
-  nsresult rv;
-  const char* profileDir  = PR_GetEnv(PROFILE_HOME_ENVIRONMENT_VARIABLE);
-
-  if (!profileDir) {
-    profileDir = PR_GetEnv(HOME_ENVIRONMENT_VARIABLE);
-  }
-  if (!profileDir) return NS_ERROR_FAILURE;
-
-  nsCAutoString profilePath(profileDir);
-  profilePath += "/.netscape";
-
-  nsCOMPtr<nsILocalFile> profileFile;
-  rv = NS_NewNativeLocalFile(profilePath, PR_TRUE, getter_AddRefs(profileFile));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  nsCOMPtr<nsIFile> prefFile;
-  rv = profileFile->Clone(getter_AddRefs(prefFile));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  prefFile->AppendNative(NS_LITERAL_CSTRING("preferences.js"));
-
-  PRBool exists;
-  rv = prefFile->Exists(&exists);
-  if (NS_FAILED(rv) || !exists) {
-    return NS_ERROR_FAILURE;
-  }
-
-  mSourceProfile = profileFile;
-
-  mProfiles = do_CreateInstance(NS_SUPPORTSARRAY_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  nsCOMPtr<nsISupportsString> nameString
-    (do_CreateInstance("@mozilla.org/supports-string;1"));
-  if (!nameString) return NS_ERROR_FAILURE;
-
-  nameString->SetData(NS_LITERAL_STRING("Netscape 4.x"));
-  mProfiles->AppendElement(nameString);
-  NS_ADDREF(*aResult = mProfiles);
-  return NS_OK;
-}
-
-void
-nsDogbertProfileMigrator::GetSourceProfile(const PRUnichar* aProfile)
-{
-  // if GetSourceProfiles didn't do its magic, we're screwed
-}
-#endif // GetSourceProfiles
-
-NS_IMETHODIMP
-nsDogbertProfileMigrator::GetSourceHomePageURL(nsACString& aResult)
-{
-  aResult.Truncate();
-  return NS_OK;
-}
-///////////////////////////////////////////////////////////////////////////////
-// nsDogbertProfileMigrator
-#define F(a) nsDogbertProfileMigrator::a
-
-static 
-nsDogbertProfileMigrator::PrefTransform gTransforms[] = {
-  // Simple Copy Prefs
-  { "browser.anchor_color",           0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "browser.visited_color",          0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "browser.startup.homepage",       0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "network.cookie.cookieBehavior",  0, F(GetInt),      F(SetInt),    PR_FALSE, { -1 } },
-  { "network.cookie.warnAboutCookies",0, F(GetBool),     F(SetBool),   PR_FALSE, { -1 } },
-  { "javascript.enabled",             0, F(GetBool),     F(SetBool),   PR_FALSE, { -1 } },
-  { "network.proxy.type",             0, F(GetInt),      F(SetInt),    PR_FALSE, { -1 } },
-  { "network.proxy.no_proxies_on",    0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "network.proxy.autoconfig_url",   0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "network.proxy.ftp",              0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "network.proxy.ftp_port",         0, F(GetInt),      F(SetInt),    PR_FALSE, { -1 } },
-  { "network.proxy.http",             0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "network.proxy.http_port",        0, F(GetInt),      F(SetInt),    PR_FALSE, { -1 } },
-  { "network.proxy.ssl",              0, F(GetString),   F(SetString), PR_FALSE, { -1 } },
-  { "network.proxy.ssl_port",         0, F(GetInt),      F(SetInt),    PR_FALSE, { -1 } },
-
-  // Prefs with Different Names
-  { "network.hosts.socks_server",           "network.proxy.socks",                F(GetString),   F(SetString),  PR_FALSE, { -1 } },
-  { "network.hosts.socks_serverport",       "network.proxy.socks_port",           F(GetInt),      F(SetInt),     PR_FALSE, { -1 } },
-  { "browser.background_color",             "browser.display.background_color",   F(GetString),   F(SetString),  PR_FALSE, { -1 } },
-  { "browser.foreground_color",             "browser.display.foreground_color",   F(GetString),   F(SetString),  PR_FALSE, { -1 } },
-  { "browser.wfe.use_windows_colors",       "browser.display.use_system_colors",  F(GetBool),     F(SetBool),    PR_FALSE, { -1 } },
-  { "browser.use_document_colors",          "browser.display.use_document_colors",F(GetBool),     F(SetBool),    PR_FALSE, { -1 } },
-  { "browser.use_document.fonts",           "browser.display.use_document_fonts", F(GetInt),      F(SetInt),     PR_FALSE, { -1 } },
-  { "browser.startup.page",                 "browser.startup.homepage",           F(GetHomepage), F(SetWStringFromASCII), PR_FALSE, { -1 } },
-  { "general.always_load_images",           "permissions.default.image",          F(GetImagePref),F(SetInt),     PR_FALSE, { -1 } },
-};
-
-nsresult
-nsDogbertProfileMigrator::TransformPreferences(const nsAString& aSourcePrefFileName,
-                                               const nsAString& aTargetPrefFileName)
-{
-  PrefTransform* transform;
-  PrefTransform* end = gTransforms + sizeof(gTransforms)/sizeof(PrefTransform);
-
-  // Load the source pref file
-  nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
-  psvc->ResetPrefs();
-
-  nsCOMPtr<nsIFile> sourcePrefsFile;
-  mSourceProfile->Clone(getter_AddRefs(sourcePrefsFile));
-  sourcePrefsFile->Append(aSourcePrefFileName);
-  psvc->ReadUserPrefs(sourcePrefsFile);
-
-  nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
-  for (transform = gTransforms; transform < end; ++transform)
-    transform->prefGetterFunc(transform, branch);
-
-  // Now that we have all the pref data in memory, load the target pref file,
-  // and write it back out
-  psvc->ResetPrefs();
-  for (transform = gTransforms; transform < end; ++transform)
-    transform->prefSetterFunc(transform, branch);
-
-  nsCOMPtr<nsIFile> targetPrefsFile;
-  mTargetProfile->Clone(getter_AddRefs(targetPrefsFile));
-  targetPrefsFile->Append(aTargetPrefFileName);
-  psvc->SavePrefFile(targetPrefsFile);
-
-  return NS_OK;
-}
-
-nsresult
-nsDogbertProfileMigrator::CopyPreferences(PRBool aReplace)
-{
-  nsresult rv = NS_OK;
-
-  if (!aReplace)
-    return rv;
-
-  // 1) Copy Preferences
-  TransformPreferences(PREF_FILE_NAME_IN_4x, PREF_FILE_NAME_IN_5x);
-
-  // 2) Copy Certficates
-  rv |= CopyFile(PSM_CERT7_DB,      PSM_CERT7_DB);
-  rv |= CopyFile(PSM_KEY3_DB,       PSM_KEY3_DB);
-  rv |= CopyFile(PSM_SECMODULE_DB,  PSM_SECMODULE_DB);
-
-  return rv;
-}
-
-nsresult 
-nsDogbertProfileMigrator::GetHomepage(void* aTransform, nsIPrefBranch* aBranch)
-{
-  PrefTransform* xform = (PrefTransform*)aTransform;
-  PRInt32 val;
-  nsresult rv = aBranch->GetIntPref(xform->sourcePrefName, &val);
-  if (NS_SUCCEEDED(rv) && val == 0) {
-    xform->stringValue = ToNewCString(NS_LITERAL_CSTRING("about:blank"));
-    if (!xform->stringValue)
-      rv = NS_ERROR_OUT_OF_MEMORY;
-    xform->prefHasValue = PR_TRUE;
-  }
-  return rv;
-}
-
-nsresult 
-nsDogbertProfileMigrator::GetImagePref(void* aTransform, nsIPrefBranch* aBranch)
-{
-  PrefTransform* xform = (PrefTransform*)aTransform;
-  PRBool loadImages;
-  nsresult rv = aBranch->GetBoolPref(xform->sourcePrefName, &loadImages);
-  if (NS_SUCCEEDED(rv)) {
-    xform->intValue = loadImages ? 1 : 2;
-    xform->prefHasValue = PR_TRUE;
-  }
-  return rv;
-}
-
-nsresult
-nsDogbertProfileMigrator::CopyCookies(PRBool aReplace)
-{
-  nsresult rv;
-  if (aReplace) {
-#ifdef NEED_TO_FIX_4X_COOKIES
-    rv = CopyFile(COOKIES_FILE_NAME_IN_4x, COOKIES_FILE_NAME_IN_5x);
-    if (NS_FAILED(rv)) return rv;
-
-    rv = FixDogbertCookies();
-#else
-    rv = CopyFile(COOKIES_FILE_NAME_IN_4x, COOKIES_FILE_NAME_IN_5x);
-#endif
-  }
-  else {
-    nsCOMPtr<nsICookieManager2> cookieManager(do_GetService(NS_COOKIEMANAGER_CONTRACTID));
-    if (!cookieManager)
-      return NS_ERROR_OUT_OF_MEMORY;
-
-    nsCOMPtr<nsIFile> dogbertCookiesFile;
-    mSourceProfile->Clone(getter_AddRefs(dogbertCookiesFile));
-    dogbertCookiesFile->Append(COOKIES_FILE_NAME_IN_4x);
-
-    rv = ImportNetscapeCookies(dogbertCookiesFile);
-  }
-  return rv;
-}
-
-#if NEED_TO_FIX_4X_COOKIES
-nsresult
-nsDogbertProfileMigrator::FixDogbertCookies()
-{
-  nsCOMPtr<nsIFile> dogbertCookiesFile;
-  mSourceProfile->Clone(getter_AddRefs(dogbertCookiesFile));
-  dogbertCookiesFile->Append(COOKIES_FILE_NAME_IN_4x);
-
-  nsCOMPtr<nsIInputStream> fileInputStream;
-  NS_NewLocalFileInputStream(getter_AddRefs(fileInputStream), dogbertCookiesFile);
-  if (!fileInputStream) return NS_ERROR_OUT_OF_MEMORY;
-
-  nsCOMPtr<nsIFile> firebirdCookiesFile;
-  mTargetProfile->Clone(getter_AddRefs(firebirdCookiesFile));
-  firebirdCookiesFile->Append(COOKIES_FILE_NAME_IN_5x);
-
-  nsCOMPtr<nsIOutputStream> fileOutputStream;
-  NS_NewLocalFileOutputStream(getter_AddRefs(fileOutputStream), firebirdCookiesFile);
-  if (!fileOutputStream) return NS_ERROR_OUT_OF_MEMORY;
-
-  nsCOMPtr<nsILineInputStream> lineInputStream(do_QueryInterface(fileInputStream));
-  nsCAutoString buffer, outBuffer;
-  PRBool moreData = PR_FALSE;
-  PRUint32 written = 0;
-  do {
-    nsresult rv = lineInputStream->ReadLine(buffer, &moreData);
-    if (NS_FAILED(rv)) return rv;
-    
-    if (!moreData)
-      break;
-
-    // skip line if it is a comment or null line
-    if (buffer.IsEmpty() || buffer.CharAt(0) == '#' ||
-        buffer.CharAt(0) == '\r' || buffer.CharAt(0) == '\n') {
-      fileOutputStream->Write(buffer.get(), buffer.Length(), &written);
-      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 = buffer.FindChar('\t', hostIndex)+1) == 0 ||
-        (pathIndex = buffer.FindChar('\t', isDomainIndex)+1) == 0 ||
-        (xxxIndex = buffer.FindChar('\t', pathIndex)+1) == 0 ||
-        (expiresIndex = buffer.FindChar('\t', xxxIndex)+1) == 0 ||
-        (nameIndex = buffer.FindChar('\t', expiresIndex)+1) == 0 ||
-        (cookieIndex = buffer.FindChar('\t', nameIndex)+1) == 0 )
-      continue;
-
-    // separate the expires field from the rest of the cookie line
-    const nsDependentCSubstring prefix = 
-      Substring(buffer, hostIndex, expiresIndex-hostIndex-1);
-    const nsDependentCSubstring expiresString =
-      Substring(buffer, expiresIndex, nameIndex-expiresIndex-1);
-    const nsDependentCSubstring suffix =
-      Substring(buffer, nameIndex, buffer.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('\t');
-    outBuffer.Append(dateString);
-    outBuffer.Append('\t');
-    outBuffer.Append(suffix);
-
-    fileOutputStream->Write(outBuffer.get(), outBuffer.Length(), &written);
-  }
-  while (1);
-  
-  return NS_OK;
-}
-
-#endif // NEED_TO_FIX_4X_COOKIES
-
-
-nsresult
-nsDogbertProfileMigrator::CopyBookmarks(PRBool aReplace)
-{
-  // If we're blowing away existing content, just copy the file, don't do fancy importing.
-  if (aReplace) {
-    nsresult rv = InitializeBookmarks(mTargetProfile);
-    NS_ENSURE_SUCCESS(rv, rv);
-    return MigrateDogbertBookmarks();
-  }
-
-  return ImportNetscapeBookmarks(BOOKMARKS_FILE_NAME_IN_4x, 
-                                 NS_LITERAL_STRING("sourceNameDogbert").get());
-}
-
-nsresult
-nsDogbertProfileMigrator::MigrateDogbertBookmarks()
-{
-  nsresult rv;
-
-  // Find out what the personal toolbar folder was called, this is stored in a pref
-  // in 4.x
-  nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
-  psvc->ResetPrefs();
-
-  nsCOMPtr<nsIFile> dogbertPrefsFile;
-  mSourceProfile->Clone(getter_AddRefs(dogbertPrefsFile));
-  dogbertPrefsFile->Append(PREF_FILE_NAME_IN_4x);
-  psvc->ReadUserPrefs(dogbertPrefsFile);
-
-  nsCString toolbarName;
-  nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
-  rv = branch->GetCharPref("custtoolbar.personal_toolbar_folder", getter_Copies(toolbarName));
-  // If the pref wasn't set in the user's 4.x preferences, there's no way we can "Fix" the
-  // file when importing it to set the personal toolbar folder correctly, so don't bother
-  // with the more involved file correction procedure and just copy the file over. 
-  if (NS_FAILED(rv))
-    return CopyFile(BOOKMARKS_FILE_NAME_IN_4x, BOOKMARKS_FILE_NAME_IN_5x);
-
-  // Now read the 4.x bookmarks file, correcting the Personal Toolbar Folder line
-  // and writing to the new location.
-  nsCOMPtr<nsIFile> sourceBookmarksFile;
-  mSourceProfile->Clone(getter_AddRefs(sourceBookmarksFile));
-  sourceBookmarksFile->Append(BOOKMARKS_FILE_NAME_IN_4x);
-
-  nsCOMPtr<nsIFile> targetBookmarksFile;
-  mTargetProfile->Clone(getter_AddRefs(targetBookmarksFile));
-  targetBookmarksFile->Append(BOOKMARKS_FILE_NAME_IN_5x);
-
-  return AnnotatePersonalToolbarFolder(sourceBookmarksFile,
-                                       targetBookmarksFile, toolbarName.get());
-}
deleted file mode 100644
--- a/browser/components/migration/src/nsDogbertProfileMigrator.h
+++ /dev/null
@@ -1,89 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef dogbertprofilemigrator___h___
-#define dogbertprofilemigrator___h___
-
-#include "nsIBrowserProfileMigrator.h"
-#include "nsILocalFile.h"
-#include "nsIObserverService.h"
-#include "nsISupportsArray.h"
-#include "nsNetscapeProfileMigratorBase.h"
-#include "nsStringAPI.h"
-
-#ifdef XP_MACOSX
-#define NEED_TO_FIX_4X_COOKIES 1
-#define SECONDS_BETWEEN_1900_AND_1970 2208988800UL
-#endif /* XP_MACOSX */
-
-class nsIFile;
-
-class nsDogbertProfileMigrator : public nsNetscapeProfileMigratorBase, 
-                                 public nsIBrowserProfileMigrator
-{
-public:
-  NS_DECL_NSIBROWSERPROFILEMIGRATOR
-  NS_DECL_ISUPPORTS
-
-  nsDogbertProfileMigrator();
-  virtual ~nsDogbertProfileMigrator();
-
-public:
-  static nsresult GetHomepage(void* aTransform, nsIPrefBranch* aBranch);
-  static nsresult GetImagePref(void* aTransform, nsIPrefBranch* aBranch);
-
-protected:
-  nsresult CopyPreferences(PRBool aReplace);
-  nsresult TransformPreferences(const nsAString& aSourcePrefFileName,
-                                const nsAString& aTargetPrefFileName);
-  
-  nsresult CopyCookies(PRBool aReplace);
-#ifdef NEED_TO_FIX_4X_COOKIES
-  nsresult FixDogbertCookies();
-#endif
-
-  nsresult CopyBookmarks(PRBool aReplace);
-  nsresult MigrateDogbertBookmarks();
-
-  void     GetSourceProfile(const PRUnichar* aProfile);
-
-private:
-  nsCOMPtr<nsISupportsArray> mProfiles;
-  nsCOMPtr<nsIObserverService> mObserverService;
-};
- 
-#endif
deleted file mode 100644
--- a/browser/components/migration/src/nsICabProfileMigrator.cpp
+++ /dev/null
@@ -1,116 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsBrowserProfileMigratorUtils.h"
-#include "nsICabProfileMigrator.h"
-#include "nsIObserverService.h"
-#include "nsIProfileMigrator.h"
-#include "nsIServiceManager.h"
-#include "nsISupportsArray.h"
-#include "nsISupportsPrimitives.h"
-#include "nsServiceManagerUtils.h"
-
-///////////////////////////////////////////////////////////////////////////////
-// nsICabProfileMigrator
-
-NS_IMPL_ISUPPORTS1(nsICabProfileMigrator, nsIBrowserProfileMigrator)
-
-nsICabProfileMigrator::nsICabProfileMigrator()
-{
-  mObserverService = do_GetService("@mozilla.org/observer-service;1");
-}
-
-nsICabProfileMigrator::~nsICabProfileMigrator()
-{
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsIBrowserProfileMigrator
-
-NS_IMETHODIMP
-nsICabProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
-{
-  nsresult rv = NS_OK;
-
-  NOTIFY_OBSERVERS(MIGRATION_STARTED, nsnull);
-
-  NOTIFY_OBSERVERS(MIGRATION_ENDED, nsnull);
-
-  return rv;
-}
-
-NS_IMETHODIMP
-nsICabProfileMigrator::GetMigrateData(const PRUnichar* aProfile, 
-                                      PRBool aReplace,
-                                      PRUint16* aResult)
-{
-  *aResult = 0; // XXXben implement me
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsICabProfileMigrator::GetSourceExists(PRBool* aResult)
-{
-  *aResult = PR_FALSE; // XXXben implement me
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsICabProfileMigrator::GetSourceHasMultipleProfiles(PRBool* aResult)
-{
-  *aResult = PR_FALSE;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsICabProfileMigrator::GetSourceProfiles(nsISupportsArray** aResult)
-{
-  *aResult = nsnull;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsICabProfileMigrator::GetSourceHomePageURL(nsACString& aResult)
-{
-  aResult.Truncate();
-  return NS_OK;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsICabProfileMigrator
-
deleted file mode 100644
--- a/browser/components/migration/src/nsICabProfileMigrator.h
+++ /dev/null
@@ -1,61 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef icabprofilemigrator___h___
-#define icabprofilemigrator___h___
-
-#include "nsIBrowserProfileMigrator.h"
-#include "nsIObserverService.h"
-#include "nsISupportsArray.h"
-#include "nsStringAPI.h"
-
-class nsICabProfileMigrator : public nsIBrowserProfileMigrator
-{
-public:
-  NS_DECL_NSIBROWSERPROFILEMIGRATOR
-  NS_DECL_ISUPPORTS
-
-  nsICabProfileMigrator();
-  virtual ~nsICabProfileMigrator();
-
-protected:
-
-private:
-  nsCOMPtr<nsIObserverService> mObserverService;
-};
- 
-#endif
deleted file mode 100644
--- a/browser/components/migration/src/nsMacIEProfileMigrator.cpp
+++ /dev/null
@@ -1,259 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *  Benjamin Smedberg <benjamin@smedbergs.us>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsDirectoryServiceDefs.h"
-#include "nsBrowserProfileMigratorUtils.h"
-#include "nsMacIEProfileMigrator.h"
-#include "nsILocalFile.h"
-#include "nsIObserverService.h"
-#include "nsIProfileMigrator.h"
-#include "nsIServiceManager.h"
-#include "nsIStringBundle.h"
-#include "nsISupportsArray.h"
-#include "nsISupportsPrimitives.h"
-#include "nsServiceManagerUtils.h"
-#include "nsIProperties.h"
-#include <Carbon/Carbon.h>
-
-#define MACIE_BOOKMARKS_FILE_NAME NS_LITERAL_STRING("Favorites.html")
-#define MACIE_PREFERENCES_FOLDER_NAME NS_LITERAL_STRING("Explorer")
-#define MACIE_DEFAULT_HOMEPAGE_PREF  "\p4D534945„WWWHomePage"
-#define TEMP_BOOKMARKS_FILE_NAME NS_LITERAL_STRING("bookmarks_tmp.html")
-
-#define MIGRATION_BUNDLE "chrome://browser/locale/migration/migration.properties"
-
-///////////////////////////////////////////////////////////////////////////////
-// nsMacIEProfileMigrator
-
-NS_IMPL_ISUPPORTS1(nsMacIEProfileMigrator, nsIBrowserProfileMigrator)
-
-nsMacIEProfileMigrator::nsMacIEProfileMigrator()
-{
-  mObserverService = do_GetService("@mozilla.org/observer-service;1");
-}
-
-nsMacIEProfileMigrator::~nsMacIEProfileMigrator()
-{
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsIBrowserProfileMigrator
-
-NS_IMETHODIMP
-nsMacIEProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
-{
-  nsresult rv = NS_OK;
-
-  PRBool replace = aStartup ? PR_TRUE : PR_FALSE;
-
-  if (!mTargetProfile) { 
-    GetProfilePath(aStartup, mTargetProfile);
-    if (!mTargetProfile) return NS_ERROR_FAILURE;
-  }
-
-  if (!mSourceProfile) {
-    nsCOMPtr<nsIProperties> fileLocator =
-      do_GetService("@mozilla.org/file/directory_service;1", &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    fileLocator->Get(NS_OSX_USER_PREFERENCES_DIR,
-                     NS_GET_IID(nsILocalFile),
-                     getter_AddRefs(mSourceProfile));
-    mSourceProfile->Append(MACIE_PREFERENCES_FOLDER_NAME);
-  }
-
-  NOTIFY_OBSERVERS(MIGRATION_STARTED, nsnull);
-
-  COPY_DATA(CopyBookmarks, replace, nsIBrowserProfileMigrator::BOOKMARKS);
-
-  NOTIFY_OBSERVERS(MIGRATION_ENDED, nsnull);
-
-  return rv;
-}
-
-NS_IMETHODIMP
-nsMacIEProfileMigrator::GetMigrateData(const PRUnichar* aProfile, 
-                                       PRBool aReplace,
-                                       PRUint16* aResult)
-{
-  *aResult = 0;
-
-  if (!mSourceProfile) {
-    nsresult rv;
-    nsCOMPtr<nsIProperties> fileLocator =
-      do_GetService("@mozilla.org/file/directory_service;1", &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    fileLocator->Get(NS_OSX_USER_PREFERENCES_DIR,
-                     NS_GET_IID(nsILocalFile),
-                     getter_AddRefs(mSourceProfile));
-    mSourceProfile->Append(MACIE_PREFERENCES_FOLDER_NAME);
-  }
-
-  MigrationData data[] = { { ToNewUnicode(MACIE_BOOKMARKS_FILE_NAME),
-                             nsIBrowserProfileMigrator::BOOKMARKS,
-                             PR_FALSE } };
-
-  // Frees file name strings allocated above.
-  GetMigrateDataFromArray(data, sizeof(data)/sizeof(MigrationData), 
-                          aReplace, mSourceProfile, aResult);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMacIEProfileMigrator::GetSourceExists(PRBool* aResult)
-{
-  // Since the IE bookmarks file can sometimes be created by programs
-  // other than Internet Explorer, thus misleading, we must first
-  // check whether IE is even installed on this Mac.  We accomplish this by
-  // checking one of IEs stored preferences in the apple.internetconfig file.
-  PRBool prefExists = PR_FALSE;
-  OSErr err;
-  ICInstance icInstance;
-
-  err = ::ICStart(&icInstance, 'FRFX');
-  if (err == noErr) {
-    ICAttr attrs;
-    Str255 IEhomePageValue;
-    long size = kICFileSpecHeaderSize;
-    err = ::ICGetPref(icInstance, MACIE_DEFAULT_HOMEPAGE_PREF, &attrs,
-                      IEhomePageValue, &size);
-    if (err == noErr)
-      prefExists = PR_TRUE;
-
-    ::ICStop(icInstance);
-  }
-
-  if (!prefExists) {
-    *aResult = PR_FALSE;
-    return NS_OK;
-  }
-
-  PRUint16 data;
-  GetMigrateData(nsnull, PR_FALSE, &data);
-
-  *aResult = data != 0;
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMacIEProfileMigrator::GetSourceHasMultipleProfiles(PRBool* aResult)
-{
-  *aResult = PR_FALSE;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMacIEProfileMigrator::GetSourceProfiles(nsISupportsArray** aResult)
-{
-  *aResult = nsnull;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMacIEProfileMigrator::GetSourceHomePageURL(nsACString& aResult)
-{
-  aResult.Truncate();
-  return NS_OK;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsMacIEProfileMigrator
-
-nsresult
-nsMacIEProfileMigrator::CopyBookmarks(PRBool aReplace)
-{
-  nsresult rv;
-  nsCOMPtr<nsIFile> sourceFile;
-  mSourceProfile->Clone(getter_AddRefs(sourceFile));
-
-  sourceFile->Append(MACIE_BOOKMARKS_FILE_NAME);
-  PRBool exists = PR_FALSE;
-  sourceFile->Exists(&exists);
-  if (!exists)
-    return NS_OK;
-
-  // it's an import
-  if (!aReplace)
-    return ImportBookmarksHTML(sourceFile,
-                               PR_FALSE,
-                               PR_FALSE,
-                               NS_LITERAL_STRING("sourceNameIE").get());
-
-  // Initialize the default bookmarks
-  rv = InitializeBookmarks(mTargetProfile);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // If we're blowing away existing content, annotate the Personal Toolbar and
-  // then import the file. 
-  nsCOMPtr<nsIFile> tempFile;
-  mTargetProfile->Clone(getter_AddRefs(tempFile));
-  tempFile->Append(TEMP_BOOKMARKS_FILE_NAME);
-
-  // Look for the localized name of the IE Favorites Bar
-  nsCOMPtr<nsIStringBundleService> bundleService =
-    do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-  nsCOMPtr<nsIStringBundle> bundle;
-  rv = bundleService->CreateBundle(MIGRATION_BUNDLE, getter_AddRefs(bundle));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  nsString toolbarFolderNameMacIE;
-  rv = bundle->GetStringFromName(NS_LITERAL_STRING("toolbarFolderNameMacIE").get(),
-                                 getter_Copies(toolbarFolderNameMacIE));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // Now read the 4.x bookmarks file, correcting the Personal Toolbar Folder 
-  // line and writing to the temporary file.
-  rv = AnnotatePersonalToolbarFolder(sourceFile,
-                                     tempFile,
-                                     NS_ConvertUTF16toUTF8(toolbarFolderNameMacIE).get());
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // import the temp file
-  rv = ImportBookmarksHTML(tempFile,
-                           PR_TRUE,
-                           PR_FALSE,
-                           EmptyString().get());
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // remove the temp file
-  return tempFile->Remove(PR_FALSE);
-}
deleted file mode 100644
--- a/browser/components/migration/src/nsMacIEProfileMigrator.h
+++ /dev/null
@@ -1,66 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef macieprofilemigrator___h___
-#define macieprofilemigrator___h___
-
-#include "nsIBrowserProfileMigrator.h"
-#include "nsIObserverService.h"
-#include "nsISupportsArray.h"
-#include "nsStringAPI.h"
-
-class nsMacIEProfileMigrator : public nsIBrowserProfileMigrator
-{
-public:
-  NS_DECL_NSIBROWSERPROFILEMIGRATOR
-  NS_DECL_ISUPPORTS
-
-  nsMacIEProfileMigrator();
-  virtual ~nsMacIEProfileMigrator();
-
-protected:
-  nsresult CopyBookmarks(PRBool aReplace);
-
-protected:
-  nsCOMPtr<nsILocalFile> mSourceProfile;
-  nsCOMPtr<nsIFile> mTargetProfile;
-
-private:
-  nsCOMPtr<nsIObserverService> mObserverService;
-};
- 
-#endif
deleted file mode 100644
--- a/browser/components/migration/src/nsOmniWebProfileMigrator.cpp
+++ /dev/null
@@ -1,116 +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 The Browser Profile Migrator.
- *
- * The Initial Developer of the Original Code is Ben Goodger.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Ben Goodger <ben@bengoodger.com>
- *  Benjamin Smedberg <benjamin@smedbergs.us>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsBrowserProfileMigratorUtils.h"
-#include "nsOmniWebProfileMigrator.h"
-#include "nsIObserverService.h"
-#include "nsIProfileMigrator.h"
-#include "nsIServiceManager.h"
-#include "nsISupportsArray.h"
-#include "nsISupportsPrimitives.h"
-#include "nsServiceManagerUtils.h"
-
-///////////////////////////////////////////////////////////////////////////////
-// nsOmniWebProfileMigrator
-
-NS_IMPL_ISUPPORTS1(nsOmniWebProfileMigrator, nsIBrowserProfileMigrator)
-
-nsOmniWebProfileMigrator::nsOmniWebProfileMigrator()
-{
-  mObserverService = do_GetService("@mozilla.org/observer-service;1");
-}
-
-nsOmniWebProfileMigrator::~nsOmniWebProfileMigrator()
-{
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsIBrowserProfileMigrator
-
-NS_IMETHODIMP
-nsOmniWebProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile)
-{
-  nsresult rv = NS_OK;
-
-  NOTIFY_OBSERVERS(MIGRATION_STARTED, nsnull);
-
-  NOTIFY_OBSERVERS(MIGRATION_ENDED, nsnull);
-
-  return rv;
-}
-
-NS_IMETHODIMP
-nsOmniWebProfileMigrator::GetMigrateData(const PRUnichar* aProfile, 
-                                         PRBool aReplace,
-                                         PRUint16* aResult)
-{
-  *aResult = 0; // XXXben implement me
-  return NS_OK;
-}
-