Merge backout.
authorMs2ger <ms2ger@gmail.com>
Sun, 19 May 2013 20:26:58 +0200
changeset 144716 90b73c3533fd7ba250803977b718885aa03a20ac
parent 144715 9f2fa4839e9860362963f977b09a2621b64e0dd2 (current diff)
parent 144714 370a2c56b7934ceb7fd6c978c6d0500fa01d5d48 (diff)
child 144717 19ca5b29e91ba03cf226eedc6763c742f7b36fb6
push id368
push userbbajaj@mozilla.com
push dateMon, 09 Sep 2013 22:57:58 +0000
treeherdermozilla-release@5a4f47ae1217 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone24.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 backout.
accessible/build/Makefile.in
accessible/build/moz.build
accessible/build/nsAccessibilityFactory.cpp
accessible/defs.mk
accessible/public/Makefile.in
accessible/public/nsIAccessibleCursorable.idl
addon-sdk/test/Makefile.in
b2g/app/BootAnimation.cpp
b2g/app/BootAnimation.h
browser/components/dirprovider/tests/Makefile.in
browser/components/downloads/test/Makefile.in
browser/components/migration/tests/Makefile.in
browser/components/places/tests/Makefile.in
browser/extensions/pdfjs/content/web/images/toolbarButton-fullscreen.png
browser/metro/theme/images/closetab-tab.png
browser/metro/theme/images/closetab-tabselected.png
browser/metro/theme/images/tab-selection-left.png
browser/metro/theme/images/tab-selection-right.png
caps/idl/Makefile.in
caps/include/Makefile.in
chrome/test/Makefile.in
content/base/public/Makefile.in
content/canvas/public/Makefile.in
content/events/public/Makefile.in
content/html/content/public/Makefile.in
content/mathml/defs.mk
content/media/webaudio/test/test_audioBufferSourceNode.html
content/media/webspeech/Makefile.in
content/smil/defs.mk
content/svg/defs.mk
content/test/Makefile.in
content/xml/document/public/Makefile.in
content/xslt/defs.mk
content/xslt/public/Makefile.in
content/xul/document/public/Makefile.in
docshell/shistory/public/Makefile.in
dom/base/NavigatorPropertyHelper.js
dom/base/NavigatorPropertyHelper.manifest
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/base/nsIDOMDOMError.idl
dom/interfaces/apps/Makefile.in
dom/interfaces/base/Makefile.in
dom/interfaces/canvas/Makefile.in
dom/interfaces/contacts/Makefile.in
dom/interfaces/core/Makefile.in
dom/interfaces/css/Makefile.in
dom/interfaces/events/Makefile.in
dom/interfaces/events/nsIDOMStyleSheetAddedEvent.idl
dom/interfaces/events/nsIDOMStyleSheetRemovedEvent.idl
dom/interfaces/geolocation/Makefile.in
dom/interfaces/html/Makefile.in
dom/interfaces/json/Makefile.in
dom/interfaces/notification/Makefile.in
dom/interfaces/offline/Makefile.in
dom/interfaces/permission/Makefile.in
dom/interfaces/range/Makefile.in
dom/interfaces/settings/Makefile.in
dom/interfaces/sidebar/Makefile.in
dom/interfaces/storage/Makefile.in
dom/interfaces/stylesheets/Makefile.in
dom/interfaces/traversal/Makefile.in
dom/interfaces/xbl/Makefile.in
dom/interfaces/xul/Makefile.in
dom/media/nsIDOMRTCPeerConnection.idl
dom/media/tests/crashtests/837421.html
dom/mms/Makefile.in
dom/mobilemessage/Makefile.in
dom/payment/tests/Makefile.in
dom/plugins/test/Makefile.in
dom/push/Makefile.in
dom/tests/Makefile.in
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/RTCIceServer.webidl
editor/defs.mk
editor/idl/Makefile.in
editor/public/Makefile.in
editor/txmgr/public/Makefile.in
editor/txtsvc/public/Makefile.in
embedding/Makefile.in
embedding/components/webbrowserpersist/public/Makefile.in
embedding/components/windowwatcher/public/Makefile.in
embedding/defs.mk
extensions/spellcheck/hunspell/Makefile.in
gfx/angle/.gitignore
gfx/angle/angle-build-dedupe-preproc-files.patch
gfx/angle/angle-cross-compilation.patch
gfx/angle/angle-r1638.patch
gfx/angle/extensions/ANGLE_multiple_render_targets.txt
gfx/angle/src/compiler/ArrayBoundsClamper.cpp
gfx/angle/src/compiler/ArrayBoundsClamper.h
gfx/angle/src/compiler/ossource_nspr.cpp
gfx/angle/src/compiler/preprocessor/Diagnostics.h
gfx/angle/src/compiler/preprocessor/DirectiveHandler.h
gfx/angle/src/compiler/preprocessor/PreprocessorDiagnostics.cpp
gfx/angle/src/compiler/preprocessor/PreprocessorDirectiveHandler.cpp
gfx/thebes/Makefile.in
gfx/thebes/gfxFont.cpp
gfx/thebes/gfxFont.h
gfx/thebes/gfxGraphiteShaper.cpp
gfx/thebes/gfxHarfBuzzShaper.cpp
image/defs.mk
image/public/Makefile.in
image/test/Makefile.in
intl/chardet/public/Makefile.in
intl/hyphenation/public/Makefile.in
intl/locale/idl/Makefile.in
intl/locale/public/Makefile.in
intl/locale/tests/Makefile.in
intl/lwbrk/public/Makefile.in
intl/strres/public/Makefile.in
intl/strres/tests/Makefile.in
intl/uconv/idl/Makefile.in
intl/uconv/public/Makefile.in
intl/unicharutil/idl/Makefile.in
intl/unicharutil/public/Makefile.in
ipc/defs.mk
js/ipc/tests/Makefile.in
js/src/builtin/ParallelArrayCommonOps.js
js/src/jsnuminlines.h
js/src/methodjit/BaseAssembler.h
js/src/methodjit/BaseCompiler.h
js/src/methodjit/CodeGenIncludes.h
js/src/methodjit/Compiler.cpp
js/src/methodjit/Compiler.h
js/src/methodjit/FastArithmetic.cpp
js/src/methodjit/FastBuiltins.cpp
js/src/methodjit/FastOps.cpp
js/src/methodjit/FrameEntry.h
js/src/methodjit/FrameState-inl.h
js/src/methodjit/FrameState.cpp
js/src/methodjit/FrameState.h
js/src/methodjit/ICChecker.h
js/src/methodjit/ICLabels.h
js/src/methodjit/ICRepatcher.h
js/src/methodjit/ImmutableSync.cpp
js/src/methodjit/ImmutableSync.h
js/src/methodjit/InlineFrameAssembler.h
js/src/methodjit/InvokeHelpers.cpp
js/src/methodjit/Logging.cpp
js/src/methodjit/Logging.h
js/src/methodjit/LoopState.cpp
js/src/methodjit/LoopState.h
js/src/methodjit/MachineRegs.h
js/src/methodjit/MethodJIT.cpp
js/src/methodjit/MethodJIT.h
js/src/methodjit/MonoIC.cpp
js/src/methodjit/MonoIC.h
js/src/methodjit/NunboxAssembler.h
js/src/methodjit/PolyIC.cpp
js/src/methodjit/PolyIC.h
js/src/methodjit/PunboxAssembler.h
js/src/methodjit/RematInfo.h
js/src/methodjit/Retcon.cpp
js/src/methodjit/Retcon.h
js/src/methodjit/StubCalls-inl.h
js/src/methodjit/StubCalls.cpp
js/src/methodjit/StubCalls.h
js/src/methodjit/StubCompiler.cpp
js/src/methodjit/StubCompiler.h
js/src/methodjit/TrampolineCompiler.cpp
js/src/methodjit/TrampolineCompiler.h
js/src/methodjit/TrampolineMIPS.cpp
js/src/methodjit/TrampolineMasmX64.asm
js/src/methodjit/TrampolineMingwX64.s
js/src/methodjit/TrampolineSUNWX64.s
js/src/methodjit/TrampolineSUNWX86.s
js/src/methodjit/TrampolineSparc.s
js/src/methodjit/TypedArrayIC.h
js/src/tests/js1_8_5/regress/regress-595365-2.js
js/xpconnect/idl/Makefile.in
js/xpconnect/public/Makefile.in
layout/mathml/defs.mk
layout/mathml/nsMathMLmactionFrame.cpp
layout/mathml/nsMathMLmactionFrame.h
layout/reftests/forms/input-file-width-clip-1.html
layout/reftests/forms/input-file-width-clip-ref.html
layout/style/nsCSSKeywordList.h
layout/style/nsCSSParser.cpp
layout/style/nsCSSPropList.h
layout/style/nsCSSProps.cpp
layout/style/nsCSSProps.h
layout/style/nsCSSRules.h
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/nsRuleNode.cpp
layout/style/nsStyleSet.h
layout/style/nsStyleUtil.cpp
layout/style/nsStyleUtil.h
layout/style/test/Makefile.in
layout/svg/defs.mk
layout/tools/layout-debug/tests/Makefile.in
layout/xul/base/public/Makefile.in
media/libcubeb/include/Makefile.in
media/libnestegg/include/Makefile.in
media/libogg/include/ogg/Makefile.in
media/libtheora/include/theora/Makefile.in
media/libtremor/include/tremor/Makefile.in
media/libvorbis/include/vorbis/Makefile.in
media/webrtc/defs.mk
mobile/android/base/fennec-ids-generator.py
mobile/android/base/resources/xml-v11/preferences_datareporting.xml
mobile/android/base/tests/README.rst
modules/libjar/test/Makefile.in
modules/libjar/zipwriter/test/Makefile.in
modules/libpref/public/Makefile.in
modules/libpref/src/init/all.js
modules/libpref/test/Makefile.in
parser/Makefile.in
parser/expat/Makefile.in
parser/htmlparser/defs.mk
parser/htmlparser/public/Makefile.in
parser/xml/test/Makefile.in
profile/dirserviceprovider/public/Makefile.in
rdf/base/idl/Makefile.in
rdf/base/public/Makefile.in
rdf/datasource/public/Makefile.in
rdf/defs.mk
rdf/tests/Makefile.in
rdf/util/public/Makefile.in
security/manager/boot/public/Makefile.in
security/manager/pki/public/Makefile.in
security/manager/ssl/public/Makefile.in
security/manager/ssl/tests/Makefile.in
services/common/tests/Makefile.in
services/crypto/component/tests/Makefile.in
services/crypto/tests/Makefile.in
services/datareporting/tests/Makefile.in
services/healthreport/tests/Makefile.in
services/metrics/tests/Makefile.in
services/sync/tests/Makefile.in
storage/defs.mk
storage/public/Makefile.in
testing/marionette/client/marionette/automation.conf
testing/marionette/client/marionette/automator.py
testing/marionette/client/marionette/gitutils.py
testing/marionette/client/marionette/test_debugger.py
testing/marionette/client/marionette/test_protocol.py
testing/marionette/client/marionette/testserver.py
testing/xpcshell/example/Makefile.in
toolkit/components/autocomplete/tests/Makefile.in
toolkit/components/captivedetect/test/Makefile.in
toolkit/components/commandlines/test/Makefile.in
toolkit/components/contentprefs/tests/Makefile.in
toolkit/components/downloads/test/Makefile.in
toolkit/components/jsdownloads/test/Makefile.in
toolkit/components/mediasniffer/test/Makefile.in
toolkit/components/osfile/tests/Makefile.in
toolkit/components/search/tests/Makefile.in
toolkit/components/telemetry/tests/Makefile.in
toolkit/components/urlformatter/tests/Makefile.in
toolkit/content/DeferredTask.jsm
toolkit/content/Deprecated.jsm
toolkit/content/Dict.jsm
toolkit/content/Geometry.jsm
toolkit/content/InlineSpellChecker.jsm
toolkit/content/LightweightThemeConsumer.jsm
toolkit/content/PageMenu.jsm
toolkit/content/PopupNotifications.jsm
toolkit/content/PrivateBrowsingUtils.jsm
toolkit/content/PropertyListUtils.jsm
toolkit/content/Services.jsm
toolkit/content/Task.jsm
toolkit/content/Troubleshoot.jsm
toolkit/content/UpdateChannel.jsm
toolkit/content/WindowDraggingUtils.jsm
toolkit/content/debug.js
toolkit/content/tests/Makefile.in
toolkit/content/tests/browser/browser_DeferredTask.js
toolkit/content/tests/browser/browser_Deprecated.js
toolkit/content/tests/browser/browser_Geometry.js
toolkit/content/tests/browser/browser_InlineSpellChecker.js
toolkit/content/tests/browser/browser_Services.js
toolkit/content/tests/browser/browser_Troubleshoot.js
toolkit/content/tests/unit/propertyLists/bug710259_propertyListBinary.plist
toolkit/content/tests/unit/propertyLists/bug710259_propertyListXML.plist
toolkit/content/tests/unit/test_dict.js
toolkit/content/tests/unit/test_propertyListsUtils.js
toolkit/content/tests/unit/test_task.js
toolkit/devtools/debugger/tests/Makefile.in
toolkit/devtools/sourcemap/tests/Makefile.in
toolkit/forgetaboutsite/test/Makefile.in
toolkit/identity/tests/Makefile.in
toolkit/modules/tests/Makefile.in
toolkit/mozapps/shared/CertUtils.jsm
toolkit/mozapps/shared/FileUtils.jsm
toolkit/mozapps/shared/Makefile.in
toolkit/mozapps/shared/moz.build
toolkit/mozapps/shared/test/chrome/Makefile.in
toolkit/mozapps/shared/test/chrome/moz.build
toolkit/mozapps/shared/test/chrome/test_bug544442_checkCert.xul
toolkit/mozapps/shared/test/unit/test_FileUtils.js
toolkit/mozapps/shared/test/unit/test_readCertPrefs.js
toolkit/mozapps/shared/test/unit/xpcshell.ini
toolkit/mozapps/update/test_timermanager/Makefile.in
view/public/Makefile.in
widget/Makefile.in
widget/gonk/HWComposer.cpp
widget/gonk/HWComposer.h
xpcom/reflect/xptcall/public/Makefile.in
xpcom/typelib/xpt/public/Makefile.in
xpfe/appshell/public/Makefile.in
--- a/.hgtags
+++ b/.hgtags
@@ -87,8 +87,9 @@ 9697eadafa13b4e9233b39aaeecfeac79503cb54
 9697eadafa13b4e9233b39aaeecfeac79503cb54 FIREFOX_AURORA_16_BASE
 6fdf9985acfe6f939da584b2559464ab22264fe7 FIREFOX_AURORA_16_BASE
 fd72dbbd692012224145be1bf13df1d7675fd277 FIREFOX_AURORA_17_BASE
 2704e441363fe2a48e992dfac694482dfd82664a FIREFOX_AURORA_18_BASE
 cf8750abee06cde395c659f8ecd8ae019d7512e3 FIREFOX_AURORA_19_BASE
 5bb309998e7050c9ee80b0147de1e473f008e221 FIREFOX_AURORA_20_BASE
 cc37417e2c284aed960f98ffa479de4ccdd5c7c3 FIREFOX_AURORA_21_BASE
 1c070ab0f9db59f13423b9c1db60419f7a9098f9 FIREFOX_AURORA_22_BASE
+d7ce9089999719d5186595d160f25123a4e63e39 FIREFOX_AURORA_23_BASE
--- a/CLOBBER
+++ b/CLOBBER
@@ -12,9 +12,12 @@
 #          O               O
 #          |               |
 #          O <-- Clobber   O  <-- Clobber
 #
 # Note: The description below will be part of the error message shown to users.
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
-Bug 866093 - Change in .gyp file for Android builds.
+Bug 872338 - Needs a clobber at least on Windows due to bug 873809
+
+Alternative to clobber is to run ./config.status from the objdir and to
+touch the CLOBBER file in the objdir.
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,16 +12,18 @@ ifndef .PYMAKE
 ifeq (,$(MAKE_VERSION))
 $(error GNU Make is required)
 endif
 ifeq (,$(filter-out 3.78 3.79,$(MAKE_VERSION)))
 $(error GNU Make 3.80 or higher is required)
 endif
 endif
 
+export TOPLEVEL_BUILD := 1
+
 include $(DEPTH)/config/autoconf.mk
 
 default::
 
 ifdef COMPILE_ENVIRONMENT
 include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
 endif
 
@@ -31,17 +33,17 @@ include $(topsrcdir)/config/config.mk
 GARBAGE_DIRS += dist _javagen _profile _tests staticlib
 DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
    config/autoconf.mk \
    unallmakefiles mozilla-config.h \
    netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
    $(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
 
 ifndef MOZ_PROFILE_USE
-default alldep all:: CLOBBER $(topsrcdir)/configure config.status
+default alldep all:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend.built
 	$(RM) -r $(DIST)/sdk
 	$(RM) -r $(DIST)/include
 	$(RM) -r $(DIST)/private
 	$(RM) -r $(DIST)/public
 	$(RM) -r $(DIST)/bin
 	$(RM) -r _tests
 endif
 
@@ -66,16 +68,28 @@ config.status: $(topsrcdir)/configure
 	@exit 1
 
 # Build pseudo-external modules first when export is explicitly called
 export::
 	$(RM) -r $(DIST)/sdk
 	$(MAKE) -C config export
 	$(MAKE) tier_nspr
 
+backend.RecursiveMakeBackend.built:
+	@echo "Updating build backend because of moz.build changes."
+	@$(PYTHON) ./config.status
+
+ifdef .PYMAKE
+includedeps backend.RecursiveMakeBackend.built.pp
+else
+include backend.RecursiveMakeBackend.built.pp
+endif
+
+export MOZBUILD_BACKEND_CHECKED=1
+
 ifdef ENABLE_TESTS
 # Additional makefile targets to call automated test suites
 include $(topsrcdir)/testing/testsuite-targets.mk
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 distclean::
deleted file mode 100644
--- a/accessible/build/Makefile.in
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir	= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-LIBRARY_NAME	= accessibility
-EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsAccessibilityModule
-LIBXUL_LIBRARY	= 1
-
-CPPSRCS		= nsAccessibilityFactory.cpp
-
-LOCAL_INCLUDES	= -I$(srcdir)/../src
-
-SHARED_LIBRARY_LIBS = \
-  ../src/base/$(LIB_PREFIX)accessibility_base_s.$(LIB_SUFFIX) \
-  ../src/generic/$(LIB_PREFIX)accessibility_generic_s.$(LIB_SUFFIX) \
-  ../src/html/$(LIB_PREFIX)accessibility_html_s.$(LIB_SUFFIX) \
-  ../src/xpcom/$(LIB_PREFIX)accessibility_xpcom_s.$(LIB_SUFFIX) \
-  $(NULL)
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-SHARED_LIBRARY_LIBS += \
-  ../src/windows/msaa/$(LIB_PREFIX)accessibility_toolkit_msaa_s.$(LIB_SUFFIX) \
-  ../src/windows/ia2/$(LIB_PREFIX)accessibility_toolkit_ia2_s.$(LIB_SUFFIX) \
-  ../src/windows/sdn/$(LIB_PREFIX)accessibility_toolkit_sdn_s.$(LIB_SUFFIX) \
-  ../src/windows/uia/$(LIB_PREFIX)accessibility_toolkit_uia_s.$(LIB_SUFFIX) \
-  $(NULL)
-else
-SHARED_LIBRARY_LIBS += \
-  ../src/$(LIB_PREFIX)accessibility_toolkit_s.$(LIB_SUFFIX) \
-  $(NULL)
-endif
-
-ifdef MOZ_XUL
-SHARED_LIBRARY_LIBS += ../src/xul/$(LIB_PREFIX)accessibility_xul_s.$(LIB_SUFFIX)
-endif
-
-include $(topsrcdir)/config/rules.mk
-
deleted file mode 100644
--- a/accessible/build/moz.build
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-MODULE = 'accessibility'
-
deleted file mode 100644
--- a/accessible/build/nsAccessibilityFactory.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsCOMPtr.h"
-#include "mozilla/ModuleUtils.h"
-
-#include "nsIServiceManager.h"
-#include "nsIComponentManager.h"
-#include "nsIAccessibilityService.h"
-#include "nsIAccessibleRetrieval.h"
-#include "nscore.h"
-
-static nsresult
-NS_ConstructAccessibilityService(nsISupports *aOuter, REFNSIID aIID, void **aResult)
-{
-    nsresult rv;
-    NS_ASSERTION(aOuter == nullptr, "no aggregation");
-    nsIAccessibilityService* accessibility;
-    rv = NS_GetAccessibilityService(&accessibility);
-    if (NS_FAILED(rv)) {
-        NS_ERROR("Unable to construct accessibility service");
-        return rv;
-    }
-    rv = accessibility->QueryInterface(aIID, aResult);
-    NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
-    NS_RELEASE(accessibility);
-    return rv;
-}
-
-NS_DEFINE_NAMED_CID(NS_ACCESSIBILITY_SERVICE_CID);
-
-static const mozilla::Module::CIDEntry kA11yCIDs[] = {
-    { &kNS_ACCESSIBILITY_SERVICE_CID, false, nullptr, NS_ConstructAccessibilityService },
-    { nullptr }
-};
-
-static const mozilla::Module::ContractIDEntry kA11yContracts[] = {
-    { "@mozilla.org/accessibilityService;1", &kNS_ACCESSIBILITY_SERVICE_CID },
-    { "@mozilla.org/accessibleRetrieval;1", &kNS_ACCESSIBILITY_SERVICE_CID },
-    { nullptr }
-};
-
-static const mozilla::Module kA11yModule = {
-    mozilla::Module::kVersion,
-    kA11yCIDs,
-    kA11yContracts
-};
-
-NSMODULE_DEFN(nsAccessibilityModule) = &kA11yModule;
-
-
deleted file mode 100644
--- a/accessible/defs.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-ifeq ($(OS_TARGET),WINNT)
-NO_PROFILE_GUIDED_OPTIMIZE := 1 # Don't PGO
-endif
--- a/accessible/moz.build
+++ b/accessible/moz.build
@@ -1,11 +1,11 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-DIRS += ['public', 'src', 'build']
+DIRS += ['public', 'src']
 TEST_DIRS += ['tests']
 
 MODULE = 'accessibility'
 
deleted file mode 100644
--- a/accessible/public/Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH   = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH   = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-
-include $(topsrcdir)/config/rules.mk
-
--- a/accessible/public/ia2/Makefile.in
+++ b/accessible/public/ia2/Makefile.in
@@ -21,28 +21,32 @@ GARBAGE       += $(MIDL_GENERATED_FILES)
 FORCE_SHARED_LIB = 1
 
 SRCS_IN_OBJDIR   = 1
 
 # Please keep this list in sync with the moz.build file until the rest of this
 # Makefile is ported over.
 MIDL_INTERFACES = \
   Accessible2.idl \
+  Accessible2_2.idl \
   AccessibleAction.idl \
   AccessibleApplication.idl \
   AccessibleComponent.idl \
+  AccessibleDocument.idl \
   AccessibleEditableText.idl \
   AccessibleHyperlink.idl \
   AccessibleHypertext.idl \
+  AccessibleHypertext2.idl \
   AccessibleImage.idl \
   AccessibleRelation.idl \
   AccessibleTable.idl \
   AccessibleTable2.idl \
   AccessibleTableCell.idl \
   AccessibleText.idl \
+  AccessibleText2.idl \
   AccessibleValue.idl \
   $(NULL)
 
 # Please keep this list in sync with the moz.build file until the rest of this
 # Makefile is ported over.
 MIDL_ENUMS = \
   AccessibleEventId.idl \
   AccessibleRole.idl \
--- a/accessible/public/ia2/moz.build
+++ b/accessible/public/ia2/moz.build
@@ -5,35 +5,46 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'accessibility'
 
 # Please keep this list in sync with the Makefile.in until the rest of that file
 # is ported over.
 midl_interfaces = [
     'Accessible2',
+    'Accessible2_2',
     'AccessibleAction',
     'AccessibleApplication',
     'AccessibleComponent',
+    'AccessibleDocument',
     'AccessibleEditableText',
     'AccessibleHyperlink',
     'AccessibleHypertext',
+    'AccessibleHypertext2',
     'AccessibleImage',
     'AccessibleRelation',
     'AccessibleTable',
     'AccessibleTable2',
     'AccessibleTableCell',
     'AccessibleText',
+    'AccessibleText2',
     'AccessibleValue',
 ]
 
 # Please keep this list in sync with the Makefile.in until the rest of that file
 # is ported over.
 midl_enums = [
     'AccessibleEventId',
     'AccessibleRole',
     'AccessibleStates',
     'IA2CommonTypes',
 ]
 
-EXPORTS += [x + '.h' for x in midl_enums]
-EXPORTS += [x + '.h' for x in midl_interfaces]
-EXPORTS += [x + '_i.c' for x in midl_interfaces]
+headers = ['%s.h' % x for x in midl_enums]
+interfaces_h = ['%s.h' % x for x in midl_interfaces]
+interfaces_c = ['%s_i.c' % x for x in midl_interfaces]
+
+# The underscore throws off sorting and EXPORTS expects sorted lists.
+interfaces_c.sort()
+
+EXPORTS += headers
+EXPORTS += interfaces_h
+EXPORTS += interfaces_c
--- a/accessible/public/moz.build
+++ b/accessible/public/moz.build
@@ -6,17 +6,16 @@
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     DIRS += ['msaa', 'ia2']
 
 XPIDL_SOURCES += [
     'nsIAccessible.idl',
     'nsIAccessibleApplication.idl',
     'nsIAccessibleCaretMoveEvent.idl',
-    'nsIAccessibleCursorable.idl',
     'nsIAccessibleDocument.idl',
     'nsIAccessibleEditableText.idl',
     'nsIAccessibleEvent.idl',
     'nsIAccessibleHideEvent.idl',
     'nsIAccessibleHyperLink.idl',
     'nsIAccessibleHyperText.idl',
     'nsIAccessibleImage.idl',
     'nsIAccessiblePivot.idl',
deleted file mode 100644
--- a/accessible/public/nsIAccessibleCursorable.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIAccessiblePivot;
-
-/**
- * An interface implemented by an accessible object that has an associated
- * virtual cursor. Typically, a top-level application or content document.
- * A virtual cursor is an implementation of nsIAccessiblePivot that provides an
- * exclusive spot in the cursorable's subtree, this could be used to create a
- * pseudo-focus or caret browsing experience that is centered around the
- * accessibility API.
- */
-[scriptable, uuid(5452dea5-d235-496f-8757-3ca016ff49ff)]
-interface nsIAccessibleCursorable : nsISupports
-{
-  /**
-   * The virtual cursor pivot this object manages.
-   */
-  readonly attribute nsIAccessiblePivot virtualCursor;
-};
--- a/accessible/public/nsIAccessibleDocument.idl
+++ b/accessible/public/nsIAccessibleDocument.idl
@@ -1,32 +1,33 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIAccessible;
+interface nsIAccessiblePivot;
 interface nsIDOMDocument;
 interface nsIDOMNode;
 interface nsIDOMWindow;
 
 /**
  * An interface for in-process accessibility clients
  * that wish to retrieve information about a document.
  * When accessibility is turned on in Gecko,
  * there is an nsIAccessibleDocument for each document
  * whether it is XUL, HTML or whatever.
  * You can QueryInterface to nsIAccessibleDocument from the nsIAccessible for
  * the root node of a document. You can also get one from 
  * nsIAccessible::GetAccessibleDocument() or 
  * nsIAccessibleEvent::GetAccessibleDocument()
  */
-[scriptable, uuid(451242bd-8a0c-4198-ae88-c053609a4e5d)]
+[scriptable, uuid(fe5b3886-2b6a-491a-80cd-a3e6342c451d)]
 interface nsIAccessibleDocument : nsISupports
 {
   /**
    * The URL of the document
    */
   readonly attribute AString URL;
 
   /**
@@ -71,12 +72,17 @@ interface nsIAccessibleDocument : nsISup
   readonly attribute nsIAccessibleDocument parentDocument;
 
   /**
    * Return the count of child document accessibles.
    */
   readonly attribute unsigned long childDocumentCount;
 
   /**
+   * The virtual cursor pivot this document manages.
+   */
+  readonly attribute nsIAccessiblePivot virtualCursor;
+
+  /**
    * Return the child document accessible at the given index.
    */
   nsIAccessibleDocument getChildDocumentAt(in unsigned long index);
 };
--- a/accessible/src/atk/AccessibleWrap.cpp
+++ b/accessible/src/atk/AccessibleWrap.cpp
@@ -946,22 +946,16 @@ GetAccessibleWrap(AtkObject* aAtkObj)
 }
 
 nsresult
 AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
 {
   nsresult rv = Accessible::HandleAccEvent(aEvent);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return FirePlatformEvent(aEvent);
-}
-
-nsresult
-AccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
-{
     Accessible* accessible = aEvent->GetAccessible();
     NS_ENSURE_TRUE(accessible, NS_ERROR_FAILURE);
 
     uint32_t type = aEvent->GetEventType();
 
     AtkObject* atkObj = AccessibleWrap::GetAtkObject(accessible);
 
     // We don't create ATK objects for nsIAccessible plain text leaves,
--- a/accessible/src/atk/AccessibleWrap.h
+++ b/accessible/src/atk/AccessibleWrap.h
@@ -70,17 +70,16 @@ public:
 
   static const char * ReturnString(nsAString &aString) {
     static nsCString returnedString;
     returnedString = NS_ConvertUTF16toUTF8(aString);
     return returnedString.get();
   }
 
 protected:
-  virtual nsresult FirePlatformEvent(AccEvent* aEvent);
 
   nsresult FireAtkStateChangeEvent(AccEvent* aEvent, AtkObject *aObject);
   nsresult FireAtkTextChangedEvent(AccEvent* aEvent, AtkObject *aObject);
   nsresult FireAtkShowHideEvent(AccEvent* aEvent, AtkObject *aObject,
                                 bool aIsAdded);
 
   AtkObject *mAtkObject;
 
--- a/accessible/src/base/AccGroupInfo.cpp
+++ b/accessible/src/base/AccGroupInfo.cpp
@@ -105,62 +105,79 @@ AccGroupInfo::AccGroupInfo(Accessible* a
 
   if (mParent)
     return;
 
   roles::Role parentRole = parent->Role();
   if (IsConceptualParent(aRole, parentRole))
     mParent = parent;
 
-  // In the case of ARIA tree (not ARIA treegrid) a tree can be arranged by
-  // using ARIA groups to organize levels. In this case the parent of the tree
-  // item will be a group and the previous treeitem of that should be the tree
-  // item parent.
-  if (parentRole != roles::GROUPING || aRole != roles::OUTLINEITEM)
-    return;
-
-  Accessible* parentPrevSibling = parent->PrevSibling();
-  if (!parentPrevSibling)
+  // ARIA tree and list can be arranged by using ARIA groups to organize levels.
+  if (parentRole != roles::GROUPING)
     return;
 
-  roles::Role parentPrevSiblingRole = parentPrevSibling->Role();
-  if (parentPrevSiblingRole == roles::TEXT_LEAF) {
-    // XXX Sometimes an empty text accessible is in the hierarchy here,
-    // although the text does not appear to be rendered, GetRenderedText()
-    // says that it is so we need to skip past it to find the true
-    // previous sibling.
-    parentPrevSibling = parentPrevSibling->PrevSibling();
-    if (parentPrevSibling)
-      parentPrevSiblingRole = parentPrevSibling->Role();
+  // Way #1 for ARIA tree (not ARIA treegrid): previous sibling of a group is a
+  // parent. In other words the parent of the tree item will be a group and
+  // the previous tree item of the group is a conceptual parent of the tree
+  // item.
+  if (aRole == roles::OUTLINEITEM) {
+    Accessible* parentPrevSibling = parent->PrevSibling();
+    if (parentPrevSibling && parentPrevSibling->Role() == aRole) {
+      mParent = parentPrevSibling;
+      return;
+    }
   }
 
-  // Previous sibling of parent group is a tree item, this is the
-  // conceptual tree item parent.
-  if (parentPrevSiblingRole == roles::OUTLINEITEM)
-    mParent = parentPrevSibling;
+  // Way #2 for ARIA list and tree: group is a child of an item. In other words
+  // the parent of the item will be a group and containing item of the group is
+  // a conceptual parent of the item.
+  if (aRole == roles::LISTITEM || aRole == roles::OUTLINEITEM) {
+    Accessible* grandParent = parent->Parent();
+    if (grandParent && grandParent->Role() == aRole)
+      mParent = grandParent;
+  }
 }
 
 Accessible*
 AccGroupInfo::FirstItemOf(Accessible* aContainer)
 {
-  // ARIA trees can be arranged by ARIA groups, otherwise aria-level works.
+  // ARIA tree can be arranged by ARIA groups case #1 (previous sibling of a
+  // group is a parent) or by aria-level.
   a11y::role containerRole = aContainer->Role();
   Accessible* item = aContainer->NextSibling();
   if (item) {
     if (containerRole == roles::OUTLINEITEM && item->Role() == roles::GROUPING)
       item = item->FirstChild();
 
-    AccGroupInfo* itemGroupInfo = item->GetGroupInfo();
-    if (itemGroupInfo && itemGroupInfo->ConceptualParent() == aContainer)
-      return item;
+    if (item) {
+      AccGroupInfo* itemGroupInfo = item->GetGroupInfo();
+      if (itemGroupInfo && itemGroupInfo->ConceptualParent() == aContainer)
+        return item;
+    }
+  }
+
+  // ARIA list and tree can be arranged by ARIA groups case #2 (group is
+  // a child of an item).
+  item = aContainer->LastChild();
+  if (!item)
+    return nullptr;
+
+  if (item->Role() == roles::GROUPING &&
+      (containerRole == roles::LISTITEM || containerRole == roles::OUTLINEITEM)) {
+    item = item->FirstChild();
+    if (item) {
+      AccGroupInfo* itemGroupInfo = item->GetGroupInfo();
+      if (itemGroupInfo && itemGroupInfo->ConceptualParent() == aContainer)
+        return item;
+    }
   }
 
   // Otherwise it can be a direct child.
   item = aContainer->FirstChild();
-  if (item && IsConceptualParent(BaseRole(item->Role()), containerRole))
+  if (IsConceptualParent(BaseRole(item->Role()), containerRole))
     return item;
 
   return nullptr;
 }
 
 Accessible*
 AccGroupInfo::NextItemTo(Accessible* aItem)
 {
--- a/accessible/src/generic/Accessible.cpp
+++ b/accessible/src/generic/Accessible.cpp
@@ -625,16 +625,19 @@ Accessible::VisibilityState()
 
   nsIFrame* curFrame = frame;
   nsPoint framePos(0, 0);
   do {
     nsView* view = curFrame->GetView();
     if (view && view->GetVisibility() == nsViewVisibility_kHide)
       return states::INVISIBLE;
 
+    if (nsLayoutUtils::IsPopup(curFrame))
+      return 0;
+
     // Offscreen state for background tab content and invisible for not selected
     // deck panel.
     nsIFrame* parentFrame = curFrame->GetParent();
     nsDeckFrame* deckFrame = do_QueryFrame(parentFrame);
     if (deckFrame && deckFrame->GetSelectedBox() != curFrame) {
       if (deckFrame->GetContent()->IsXUL() &&
           deckFrame->GetContent()->Tag() == nsGkAtoms::tabpanels)
         return states::OFFSCREEN;
@@ -2016,17 +2019,18 @@ Accessible::RelationByType(uint32_t aTyp
     }
 
     case nsIAccessibleRelation::RELATION_NODE_CHILD_OF: {
       Relation rel(new RelatedAccIterator(Document(), mContent,
                                           nsGkAtoms::aria_owns));
 
       // This is an ARIA tree or treegrid that doesn't use owns, so we need to
       // get the parent the hard way.
-      if (mRoleMapEntry && (mRoleMapEntry->role == roles::OUTLINEITEM || 
+      if (mRoleMapEntry && (mRoleMapEntry->role == roles::OUTLINEITEM ||
+                            mRoleMapEntry->role == roles::LISTITEM ||
                             mRoleMapEntry->role == roles::ROW)) {
         rel.AppendTarget(GetGroupInfo()->ConceptualParent());
       }
 
       // If accessible is in its own Window, or is the root of a document,
       // then we should provide NODE_CHILD_OF relation so that MSAA clients
       // can easily get to true parent instead of getting to oleacc's
       // ROLE_WINDOW accessible which will prevent us from going up further
@@ -2047,18 +2051,20 @@ Accessible::RelationByType(uint32_t aTyp
 
     case nsIAccessibleRelation::RELATION_NODE_PARENT_OF: {
       Relation rel(new IDRefsIterator(mDoc, mContent, nsGkAtoms::aria_owns));
 
       // ARIA tree or treegrid can do the hierarchy by @aria-level, ARIA trees
       // also can be organized by groups.
       if (mRoleMapEntry &&
           (mRoleMapEntry->role == roles::OUTLINEITEM ||
+           mRoleMapEntry->role == roles::LISTITEM ||
            mRoleMapEntry->role == roles::ROW ||
            mRoleMapEntry->role == roles::OUTLINE ||
+           mRoleMapEntry->role == roles::LIST ||
            mRoleMapEntry->role == roles::TREE_TABLE)) {
         rel.AppendIter(new ItemIterator(this));
       }
 
       return rel;
     }
 
     case nsIAccessibleRelation::RELATION_CONTROLLED_BY:
@@ -3248,45 +3254,48 @@ Accessible::GetLevelInternal()
       if (parentRole == roles::OUTLINE)
         break;
       if (parentRole == roles::GROUPING)
         ++ level;
 
     }
 
   } else if (role == roles::LISTITEM) {
-    // Expose 'level' attribute on nested lists. We assume nested list is a last
-    // child of listitem of parent list. We don't handle the case when nested
-    // lists have more complex structure, for example when there are accessibles
-    // between parent listitem and nested list.
+    // Expose 'level' attribute on nested lists. We support two hierarchies:
+    // a) list -> listitem -> list -> listitem (nested list is a last child
+    //   of listitem of the parent list);
+    // b) list -> listitem -> group -> listitem (nested listitems are contained
+    //   by group that is a last child of the parent listitem).
 
     // Calculate 'level' attribute based on number of parent listitems.
     level = 0;
     Accessible* parent = this;
     while ((parent = parent->Parent())) {
       roles::Role parentRole = parent->Role();
 
       if (parentRole == roles::LISTITEM)
         ++ level;
-      else if (parentRole != roles::LIST)
+      else if (parentRole != roles::LIST && parentRole != roles::GROUPING)
         break;
-
     }
 
     if (level == 0) {
       // If this listitem is on top of nested lists then expose 'level'
       // attribute.
       parent = Parent();
       uint32_t siblingCount = parent->ChildCount();
       for (uint32_t siblingIdx = 0; siblingIdx < siblingCount; siblingIdx++) {
         Accessible* sibling = parent->GetChildAt(siblingIdx);
 
         Accessible* siblingChild = sibling->LastChild();
-        if (siblingChild && siblingChild->Role() == roles::LIST)
-          return 1;
+        if (siblingChild) {
+          roles::Role lastChildRole = siblingChild->Role();
+          if (lastChildRole == roles::LIST || lastChildRole == roles::GROUPING)
+            return 1;
+        }
       }
     } else {
       ++ level; // level is 1-index based
     }
   }
 
   return level;
 }
--- a/accessible/src/generic/Accessible.h
+++ b/accessible/src/generic/Accessible.h
@@ -876,26 +876,16 @@ protected:
    */
   uint32_t GetActionRule();
 
   /**
    * Return group info.
    */
   AccGroupInfo* GetGroupInfo();
 
-  /**
-   * Fires platform accessible event. It's notification method only. It does
-   * change nothing on Gecko side. Don't use it until you're sure what you do
-   * (see example in XUL tree accessible), use nsEventShell::FireEvent()
-   * instead. MUST be overridden in wrap classes.
-   *
-   * @param aEvent  the accessible event to fire.
-   */
-  virtual nsresult FirePlatformEvent(AccEvent* aEvent) = 0;
-
   // Data Members
   nsRefPtr<Accessible> mParent;
   nsTArray<nsRefPtr<Accessible> > mChildren;
   int32_t mIndexInParent;
 
   static const uint8_t kChildrenFlagsBits = 2;
   static const uint8_t kStateFlagsBits = 5;
   static const uint8_t kTypeBits = 6;
--- a/accessible/src/generic/DocAccessible.cpp
+++ b/accessible/src/generic/DocAccessible.cpp
@@ -125,18 +125,16 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DocAccessible)
   NS_INTERFACE_MAP_ENTRY(nsIAccessibleDocument)
   NS_INTERFACE_MAP_ENTRY(nsIDocumentObserver)
   NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsIAccessiblePivotObserver)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAccessibleDocument)
-  NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleCursorable,
-                                     (mDocFlags & eCursorable))
     foundInterface = 0;
 
   nsresult status;
   if (!foundInterface) {
     // HTML document accessible must inherit from HyperTextAccessible to get
     // support text interfaces. XUL document accessible doesn't need this.
     // However at some point we may push <body> to implement the interfaces and
     // return DocAccessible to inherit from AccessibleWrap.
@@ -472,29 +470,25 @@ DocAccessible::GetChildDocumentAt(uint32
 
   if (IsDefunct())
     return NS_OK;
 
   NS_IF_ADDREF(*aDocument = GetChildDocumentAt(aIndex));
   return *aDocument ? NS_OK : NS_ERROR_INVALID_ARG;
 }
 
-// nsIAccessibleVirtualCursor method
 NS_IMETHODIMP
 DocAccessible::GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor)
 {
   NS_ENSURE_ARG_POINTER(aVirtualCursor);
   *aVirtualCursor = nullptr;
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
-  if (!(mDocFlags & eCursorable))
-    return NS_OK;
-
   if (!mVirtualCursor) {
     mVirtualCursor = new nsAccessiblePivot(this);
     mVirtualCursor->AddObserver(this);
   }
 
   NS_ADDREF(*aVirtualCursor = mVirtualCursor);
   return NS_OK;
 }
@@ -1460,20 +1454,16 @@ DocAccessible::NotifyOfLoading(bool aIsR
 }
 
 void
 DocAccessible::DoInitialUpdate()
 {
   if (nsCoreUtils::IsTabDocument(mDocumentNode))
     mDocFlags |= eTabDocument;
 
-  // We provide a virtual cursor if this is a root doc or if it's a tab doc.
-  if (!mDocumentNode->GetParentDocument() || (mDocFlags & eTabDocument))
-    mDocFlags |= eCursorable;
-
   mLoadState |= eTreeConstructed;
 
   // The content element may be changed before the initial update and then we
   // miss the notification (since content tree change notifications are ignored
   // prior to initial update). Make sure the content element is valid.
   nsIContent* contentElm = nsCoreUtils::GetRoleContent(mDocumentNode);
   if (mContent != contentElm) {
     mContent = contentElm;
--- a/accessible/src/generic/DocAccessible.h
+++ b/accessible/src/generic/DocAccessible.h
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_a11y_DocAccessible_h__
 #define mozilla_a11y_DocAccessible_h__
 
-#include "nsIAccessibleCursorable.h"
 #include "nsIAccessibleDocument.h"
 #include "nsIAccessiblePivot.h"
 
 #include "AccEvent.h"
 #include "HyperTextAccessibleWrap.h"
 
 #include "nsClassHashtable.h"
 #include "nsDataHashtable.h"
@@ -40,28 +39,25 @@ template<class Class, class Arg>
 class TNotification;
 
 class DocAccessible : public HyperTextAccessibleWrap,
                       public nsIAccessibleDocument,
                       public nsIDocumentObserver,
                       public nsIObserver,
                       public nsIScrollPositionListener,
                       public nsSupportsWeakReference,
-                      public nsIAccessibleCursorable,
                       public nsIAccessiblePivotObserver
 {
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DocAccessible, Accessible)
 
   NS_DECL_NSIACCESSIBLEDOCUMENT
 
   NS_DECL_NSIOBSERVER
 
-  NS_DECL_NSIACCESSIBLECURSORABLE
-
   NS_DECL_NSIACCESSIBLEPIVOTOBSERVER
 
 public:
 
   DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
                 nsIPresShell* aPresShell);
   virtual ~DocAccessible();
 
@@ -487,21 +483,18 @@ protected:
 
   /**
    * State and property flags, kept by mDocFlags.
    */
   enum {
     // Whether scroll listeners were added.
     eScrollInitialized = 1 << 0,
 
-    // Whether we support nsIAccessibleCursorable.
-    eCursorable = 1 << 1,
-
     // Whether the document is a tab document.
-    eTabDocument = 1 << 2
+    eTabDocument = 1 << 1
   };
 
   /**
    * Cache of accessibles within this document accessible.
    */
   AccessibleHashtable mAccessibleCache;
   nsDataHashtable<nsPtrHashKey<const nsINode>, Accessible*>
     mNodeToAccessibleMap;
@@ -534,17 +527,17 @@ protected:
    * Keep the ARIA attribute old value that is initialized by
    * AttributeWillChange and used by AttributeChanged notifications.
    */
   nsIAtom* mARIAAttrOldValue;
 
   nsTArray<nsRefPtr<DocAccessible> > mChildDocuments;
 
   /**
-   * The virtual cursor of the document when it supports nsIAccessibleCursorable.
+   * The virtual cursor of the document.
    */
   nsRefPtr<nsAccessiblePivot> mVirtualCursor;
 
   /**
    * A storage class for pairing content with one of its relation attributes.
    */
   class AttrRelProvider
   {
--- a/accessible/src/generic/HyperTextAccessible.cpp
+++ b/accessible/src/generic/HyperTextAccessible.cpp
@@ -1009,42 +1009,34 @@ HyperTextAccessible::GetTextBeforeOffset
     return NS_ERROR_INVALID_ARG;
 
   switch (aBoundaryType) {
     case BOUNDARY_CHAR:
       GetCharAt(offset, eGetBefore, aText, aStartOffset, aEndOffset);
       return NS_OK;
 
     case BOUNDARY_WORD_START: {
-      if (offset == 0) { // no word before 0 offset
-        *aStartOffset = *aEndOffset = 0;
-        return NS_OK;
+      // If the offset is a word start (except text length offset) then move
+      // backward to find a start offset (end offset is the given offset).
+      // Otherwise move backward twice to find both start and end offsets.
+      if (offset == CharacterCount()) {
+        *aEndOffset = FindWordBoundary(offset, eDirPrevious, eStartWord);
+        *aStartOffset = FindWordBoundary(*aEndOffset, eDirPrevious, eStartWord);
+      } else {
+        *aStartOffset = FindWordBoundary(offset, eDirPrevious, eStartWord);
+        *aEndOffset = FindWordBoundary(*aStartOffset, eDirNext, eStartWord);
+        if (*aEndOffset != offset) {
+          *aEndOffset = *aStartOffset;
+          *aStartOffset = FindWordBoundary(*aEndOffset, eDirPrevious, eStartWord);
+        }
       }
-
-      // If the offset is a word start then move backward to find start offset
-      // (end offset is the given offset). Otherwise move backward twice to find
-      // both start and end offsets.
-      int32_t midOffset = FindWordBoundary(offset, eDirPrevious, eStartWord);
-      *aEndOffset = FindWordBoundary(midOffset, eDirNext, eStartWord);
-      if (*aEndOffset == offset) {
-        *aStartOffset = midOffset;
-        return GetText(*aStartOffset, *aEndOffset, aText);
-      }
-
-      *aStartOffset = FindWordBoundary(midOffset, eDirPrevious, eStartWord);
-      *aEndOffset = midOffset;
       return GetText(*aStartOffset, *aEndOffset, aText);
     }
 
     case BOUNDARY_WORD_END: {
-      if (offset == 0) { // no word before 0 offset
-        *aStartOffset = *aEndOffset = 0;
-        return NS_OK;
-      }
-
       // Move word backward twice to find start and end offsets.
       *aEndOffset = FindWordBoundary(offset, eDirPrevious, eEndWord);
       *aStartOffset = FindWordBoundary(*aEndOffset, eDirPrevious, eEndWord);
       return GetText(*aStartOffset, *aEndOffset, aText);
     }
 
     case BOUNDARY_LINE_START:
     case BOUNDARY_LINE_END:
@@ -1103,23 +1095,57 @@ NS_IMETHODIMP
 HyperTextAccessible::GetTextAfterOffset(int32_t aOffset,
                                         AccessibleTextBoundary aBoundaryType,
                                         int32_t* aStartOffset,
                                         int32_t* aEndOffset, nsAString& aText)
 {
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
-  if (aBoundaryType == BOUNDARY_CHAR) {
-    GetCharAt(aOffset, eGetAfter, aText, aStartOffset, aEndOffset);
-    return NS_OK;
+  int32_t offset = ConvertMagicOffset(aOffset);
+  if (offset < 0)
+    return NS_ERROR_INVALID_ARG;
+
+  switch (aBoundaryType) {
+    case BOUNDARY_CHAR:
+      GetCharAt(aOffset, eGetAfter, aText, aStartOffset, aEndOffset);
+      return NS_OK;
+
+    case BOUNDARY_WORD_START:
+      // Move word forward twice to find start and end offsets.
+      *aStartOffset = FindWordBoundary(offset, eDirNext, eStartWord);
+      *aEndOffset = FindWordBoundary(*aStartOffset, eDirNext, eStartWord);
+      return GetText(*aStartOffset, *aEndOffset, aText);
+
+    case BOUNDARY_WORD_END:
+      // If the offset is a word end (except 0 offset) then move forward to find
+      // end offset (start offset is the given offset). Otherwise move forward
+      // twice to find both start and end offsets.
+      if (offset == 0) {
+        *aStartOffset = FindWordBoundary(offset, eDirNext, eEndWord);
+        *aEndOffset = FindWordBoundary(*aStartOffset, eDirNext, eEndWord);
+      } else {
+        *aEndOffset = FindWordBoundary(offset, eDirNext, eEndWord);
+        *aStartOffset = FindWordBoundary(*aEndOffset, eDirPrevious, eEndWord);
+        if (*aStartOffset != offset) {
+          *aStartOffset = *aEndOffset;
+          *aEndOffset = FindWordBoundary(*aStartOffset, eDirNext, eEndWord);
+        }
+      }
+      return GetText(*aStartOffset, *aEndOffset, aText);
+
+    case BOUNDARY_LINE_START:
+    case BOUNDARY_LINE_END:
+    case BOUNDARY_ATTRIBUTE_RANGE:
+      return GetTextHelper(eGetAfter, aBoundaryType, aOffset,
+                           aStartOffset, aEndOffset, aText);
+
+    default:
+      return NS_ERROR_INVALID_ARG;
   }
-
-  return GetTextHelper(eGetAfter, aBoundaryType, aOffset,
-                       aStartOffset, aEndOffset, aText);
 }
 
 // nsIPersistentProperties
 // nsIAccessibleText::getTextAttributes(in boolean includeDefAttrs,
 //                                      in long offset,
 //                                      out long rangeStartOffset,
 //                                      out long rangeEndOffset);
 NS_IMETHODIMP
--- a/accessible/src/mac/AccessibleWrap.h
+++ b/accessible/src/mac/AccessibleWrap.h
@@ -68,18 +68,16 @@ public: // construction, destruction
    * Returns this accessible's all children, adhering to "flat" accessibles by 
    * not returning their children.
    */
   void GetUnignoredChildren(nsTArray<Accessible*>* aChildrenArray);
   Accessible* GetUnignoredParent() const;
 
 protected:
 
-  virtual nsresult FirePlatformEvent(AccEvent* aEvent);
-
   /**
    * Return true if the parent doesn't have children to expose to AT.
    */
   bool AncestorIsFlat();
 
   /**
    * Get the native object. Create it if needed.
    */
--- a/accessible/src/mac/AccessibleWrap.mm
+++ b/accessible/src/mac/AccessibleWrap.mm
@@ -134,26 +134,16 @@ AccessibleWrap::Shutdown ()
 nsresult
 AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   nsresult rv = Accessible::HandleAccEvent(aEvent);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return FirePlatformEvent(aEvent);
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
-}
-
-nsresult
-AccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
-
   uint32_t eventType = aEvent->GetEventType();
 
   // ignore everything but focus-changed, value-changed, caret and selection
   // events for now.
   if (eventType != nsIAccessibleEvent::EVENT_FOCUS &&
       eventType != nsIAccessibleEvent::EVENT_VALUE_CHANGE &&
       eventType != nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED &&
       eventType != nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED)
--- a/accessible/src/other/AccessibleWrap.h
+++ b/accessible/src/other/AccessibleWrap.h
@@ -16,20 +16,14 @@
 namespace mozilla {
 namespace a11y {
 
 class AccessibleWrap : public Accessible
 {
 public: // construction, destruction
   AccessibleWrap(nsIContent* aContent, DocAccessible* aDoc);
   virtual ~AccessibleWrap();
-
-  protected:
-    virtual nsresult FirePlatformEvent(AccEvent* aEvent)
-    {
-      return NS_OK;
-    }
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #endif
--- a/accessible/src/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/src/windows/msaa/AccessibleWrap.cpp
@@ -1500,25 +1500,16 @@ AccessibleWrap::GetNativeInterface(void 
 // Accessible
 
 nsresult
 AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
 {
   nsresult rv = Accessible::HandleAccEvent(aEvent);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return FirePlatformEvent(aEvent);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// AccessibleWrap
-
-nsresult
-AccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
-{
   // Don't fire native MSAA events or mess with the system caret
   // when running in metro mode. This confuses input focus tracking
   // in metro's UIA implementation.
   if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Metro) {
     return NS_OK;
   }
 
   uint32_t eventType = aEvent->GetEventType();
@@ -1578,16 +1569,19 @@ AccessibleWrap::FirePlatformEvent(AccEve
       accessible->Role() == roles::COMBOBOX_OPTION) {
       ::NotifyWinEvent(EVENT_OBJECT_FOCUS, hWnd, OBJID_CLIENT, childID);
     }
   }
 
   return NS_OK;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+// AccessibleWrap
+
 //------- Helper methods ---------
 
 int32_t
 AccessibleWrap::GetChildIDFor(Accessible* aAccessible)
 {
   // A child ID of the window is required, when we use NotifyWinEvent,
   // so that the 3rd party application can call back and get the IAccessible
   // the event occurred on.
--- a/accessible/src/windows/msaa/AccessibleWrap.h
+++ b/accessible/src/windows/msaa/AccessibleWrap.h
@@ -238,17 +238,16 @@ public: // construction, destruction
    */
   Accessible* GetXPAccessibleFor(const VARIANT& aVarChild);
 
   NS_IMETHOD GetNativeInterface(void **aOutAccessible);
 
   static IDispatch *NativeAccessible(nsIAccessible *aXPAccessible);
 
 protected:
-  virtual nsresult FirePlatformEvent(AccEvent* aEvent);
 
   /**
    * Creates ITypeInfo for LIBID_Accessibility if it's needed and returns it.
    */
   static ITypeInfo* GetTI(LCID lcid);
 
   static ITypeInfo* gTypeInfo;
 
--- a/accessible/tests/mochitest/attributes/test_obj_group.html
+++ b/accessible/tests/mochitest/attributes/test_obj_group.html
@@ -63,26 +63,35 @@
 
       //////////////////////////////////////////////////////////////////////////
       // ARIA list
       testGroupAttrs("li7", 1, 3);
       testGroupAttrs("li8", 2, 3);
       testGroupAttrs("li9", 3, 3);
 
       //////////////////////////////////////////////////////////////////////////
-      // ARIA list (nested lists)
+      // ARIA list (nested lists: list -> listitem -> list -> listitem)
       testGroupAttrs("li10", 1, 3, 1);
       testGroupAttrs("li11", 2, 3, 1);
       testGroupAttrs("li12", 3, 3, 1);
 
       testGroupAttrs("n_li10", 1, 3, 2);
       testGroupAttrs("n_li11", 2, 3, 2);
       testGroupAttrs("n_li12", 3, 3, 2);
 
       //////////////////////////////////////////////////////////////////////////
+      // ARIA list (nested lists: list -> listitem -> group -> listitem)
+      testGroupAttrs("lgt_li1", 1, 2, 1);
+      testGroupAttrs("lgt_li1_nli1", 1, 2, 2);
+      testGroupAttrs("lgt_li1_nli2", 2, 2, 2);
+      testGroupAttrs("lgt_li2", 2, 2, 1);
+      testGroupAttrs("lgt_li2_nli1", 1, 2, 2);
+      testGroupAttrs("lgt_li2_nli2", 2, 2, 2);
+
+      //////////////////////////////////////////////////////////////////////////
       // ARIA menu (menuitem, separator, menuitemradio and menuitemcheckbox)
       testGroupAttrs("menu_item1", 1, 2);
       testGroupAttrs("menu_item2", 2, 2);
       testGroupAttrs("menu_item1.1", 1, 2);
       testGroupAttrs("menu_item1.2", 2, 2);
       testGroupAttrs("menu_item1.3", 1, 3);
       testGroupAttrs("menu_item1.4", 2, 3);
       testGroupAttrs("menu_item1.5", 3, 3);
@@ -106,16 +115,34 @@
       testGroupAttrs("ti3", 2, 2, 2);
       testGroupAttrs("ti4", 2, 3, 1);
       testGroupAttrs("ti5", 1, 3, 2);
       testGroupAttrs("ti6", 2, 3, 2);
       testGroupAttrs("ti7", 3, 3, 2);
       testGroupAttrs("ti8", 3, 3, 1);
 
       //////////////////////////////////////////////////////////////////////////
+      // ARIA tree (tree -> treeitem -> group -> treeitem)
+      testGroupAttrs("tree2_ti1", 1, 2, 1);
+      testGroupAttrs("tree2_ti1a", 1, 2, 2);
+      testGroupAttrs("tree2_ti1b", 2, 2, 2);
+      testGroupAttrs("tree2_ti2", 2, 2, 1);
+      testGroupAttrs("tree2_ti2a", 1, 2, 2);
+      testGroupAttrs("tree2_ti2b", 2, 2, 2);
+
+      //////////////////////////////////////////////////////////////////////////
+      // ARIA tree (tree -> treeitem, group -> treeitem)
+      testGroupAttrs("tree3_ti1", 1, 2, 1);
+      testGroupAttrs("tree3_ti1a", 1, 2, 2);
+      testGroupAttrs("tree3_ti1b", 2, 2, 2);
+      testGroupAttrs("tree3_ti2", 2, 2, 1);
+      testGroupAttrs("tree3_ti2a", 1, 2, 2);
+      testGroupAttrs("tree3_ti2b", 2, 2, 2);
+
+      //////////////////////////////////////////////////////////////////////////
       // ARIA grid
       testGroupAttrs("grid_row1", 1, 2);
       testGroupAttrs("grid_cell1", 1, 2);
       testGroupAttrs("grid_cell2", 2, 2);
 
       testGroupAttrs("grid_row2", 2, 2);
       testGroupAttrs("grid_cell3", 1, 2);
       testGroupAttrs("grid_cell4", 2, 2);
@@ -159,16 +186,21 @@
 </head>
 <body>
 
   <a target="_blank"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=468418"
      title="Expose level for nested lists in HTML">
     Mozilla Bug 468418
   </a>
+  <a target="_blank"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=864224"
+     title="Support nested ARIA listitems structured by role='group'">
+    Bug 864224
+  </a>
 
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
   <select size="4">
     <option id="opt1">option1</option>
@@ -223,16 +255,31 @@
       <span role="list">
         <span role="listitem" id="n_li10">Oranges</span>
         <span role="listitem" id="n_li11">Apples</span>
         <span role="listitem" id="n_li12">Bananas</span>
       </span>
     </span>
   </span>
 
+  <div role="list">
+    <div role="listitem" id="lgt_li1">Item 1
+      <div role="group">
+        <div role="listitem" id="lgt_li1_nli1">Item 1A</div>
+        <div role="listitem" id="lgt_li1_nli2">Item 1B</div>
+      </div>
+    </div>
+    <div role="listitem" id="lgt_li2">Item 2
+      <div role="group">
+        <div role="listitem" id="lgt_li2_nli1">Item 2A</div>
+        <div role="listitem" id="lgt_li2_nli2">Item 2B</div>
+      </div>
+    </div>
+  </div>
+
   <ul role="menubar">
     <li role="menuitem" aria-haspopup="true" id="menu_item1">File
       <ul role="menu">
         <li role="menuitem" id="menu_item1.1">New</li>
         <li role="menuitem" id="menu_item1.2">Open…</li>
         <li role="separator">-----</li>
         <li role="menuitem" id="menu_item1.3">Item</li>
         <li role="menuitemradio" id="menu_item1.4">Radio</li>
@@ -278,16 +325,44 @@
     <tr role="presentation">
       <td role="treeitem" aria-level="2" id="ti7">Audi</td>
     </tr>
     <tr role="presentation">
       <td role="treeitem" aria-level="1" id="ti8">people</td>
     </tr>
   </table>
 
+  <ul role="tree">
+    <li role="treeitem" id="tree2_ti1">Item 1
+      <ul role="group">
+        <li role="treeitem" id="tree2_ti1a">Item 1A</li>
+        <li role="treeitem" id="tree2_ti1b">Item 1B</li>
+      </ul>
+    </li>
+    <li role="treeitem" id="tree2_ti2">Item 2
+      <ul role="group">
+        <li role="treeitem" id="tree2_ti2a">Item 2A</li>
+        <li role="treeitem" id="tree2_ti2b">Item 2B</li>
+      </ul>
+    </li>
+  </div>
+
+  <div role="tree">
+    <div role="treeitem" id="tree3_ti1">Item 1</div>
+    <div role="group">
+      <li role="treeitem" id="tree3_ti1a">Item 1A</li>
+      <li role="treeitem" id="tree3_ti1b">Item 1B</li>
+    </div>
+    <div role="treeitem" id="tree3_ti2">Item 2</div>
+    <div role="group">
+      <div role="treeitem" id="tree3_ti2a">Item 2A</div>
+      <div role="treeitem" id="tree3_ti2b">Item 2B</div>
+    </div>
+  </div>
+
   <table role="grid">
     <tr role="row" id="grid_row1">
       <td role="gridcell" id="grid_cell1">cell1</td>
       <td role="gridcell" id="grid_cell2">cell2</td>
     </tr>
     <tr role="row" id="grid_row2">
       <td role="gridcell" id="grid_cell3">cell3</td>
       <td role="gridcell" id="grid_cell4">cell4</td>
--- a/accessible/tests/mochitest/pivot/test_virtualcursor.html
+++ b/accessible/tests/mochitest/pivot/test_virtualcursor.html
@@ -21,37 +21,27 @@
   <script type="application/javascript" src="../layout.js"></script>
 
   <script type="application/javascript">
     var gBrowserWnd = null;
     var gQueue = null;
 
     function doTest()
     {
-      var rootAcc = getRootAccessible(browserWindow().document);
-      try {
-        rootAcc.QueryInterface(nsIAccessibleCursorable);
-      } catch (e) {
-        ok(false, "Root accessible does not support nsIAccessibleCursorable");
-      }
-      var doc = currentTabDocument();
-      var docAcc = getAccessible(doc, [nsIAccessibleDocument,
-                                       nsIAccessibleCursorable]);
+      var rootAcc = getAccessible(browserDocument(), [nsIAccessibleDocument]);
+      ok(rootAcc.virtualCursor,
+         "root document does not have virtualCursor");
 
-      // Test that embedded documents don't have their own virtual cursor.
+      var doc = currentTabDocument();
+      var docAcc = getAccessible(doc, [nsIAccessibleDocument]);
+
+      // Test that embedded documents have their own virtual cursor.
       is(docAcc.childDocumentCount, 1, "Expecting one child document");
-      var childDoc = docAcc.getChildDocumentAt(0);
-      var supportsVC = true;
-      try {
-        childDoc.QueryInterface(nsIAccessibleCursorable);
-      } catch (e) {
-        supportsVC = false;
-      }
-
-      ok(!supportsVC, "no nsIAccessibleCursorable support in child document");
+      ok(docAcc.getChildDocumentAt(0).virtualCursor,
+         "child document does not have virtualCursor");
 
       gQueue = new eventQueue();
 
       gQueue.onFinish = function onFinish()
       {
         closeBrowserWindow();
       }
 
--- a/accessible/tests/mochitest/relations/test_general.html
+++ b/accessible/tests/mochitest/relations/test_general.html
@@ -68,43 +68,60 @@
       testRelation("treeitem2", RELATION_NODE_CHILD_OF, "tree");
 
       // 'node child of' relation for outlineitem role
       testRelation("treeitem3", RELATION_NODE_CHILD_OF, "tree");
       testRelation("treeitem4", RELATION_NODE_CHILD_OF, "tree");
       testRelation("treeitem5", RELATION_NODE_CHILD_OF, "treeitem4");
       testRelation("treeitem6", RELATION_NODE_CHILD_OF, "tree");
       testRelation("treeitem7", RELATION_NODE_CHILD_OF, "treeitem6");
+      testRelation("tree2_ti1", RELATION_NODE_CHILD_OF, "tree2");
+      testRelation("tree2_ti1a", RELATION_NODE_CHILD_OF, "tree2_ti1");
+      testRelation("tree2_ti1b", RELATION_NODE_CHILD_OF, "tree2_ti1");
 
       // 'node child of' relation for row role of treegrid
       testRelation("treegridrow1", RELATION_NODE_CHILD_OF, "treegrid");
       testRelation("treegridrow2", RELATION_NODE_CHILD_OF, "treegrid");
       testRelation("treegridrow3", RELATION_NODE_CHILD_OF, "treegridrow2");
 
+      // 'node child of' relation for lists organized by groups
+      testRelation("listitem1", RELATION_NODE_CHILD_OF, "list");
+      testRelation("listitem1.1", RELATION_NODE_CHILD_OF, "listitem1");
+      testRelation("listitem1.2", RELATION_NODE_CHILD_OF, "listitem1");
+
       // 'node child of' relation for the document having window, returns
       // direct accessible parent (fixed in bug 419770).
       var iframeElmObj = {};
       var iframeAcc = getAccessible("iframe", null, iframeElmObj);
       var iframeDoc = iframeElmObj.value.contentDocument;
       var iframeDocAcc = getAccessible(iframeDoc);
       testRelation(iframeDocAcc, RELATION_NODE_CHILD_OF, iframeAcc);
 
       // 'node parent of' relation on ARIA tree and treegrid.
       testRelation("tree", RELATION_NODE_PARENT_OF,
                     ["treeitem1", "treeitem2", // aria-owns
                      "treeitem3", "treeitem4", "treeitem6"]); // children
       testRelation("treeitem4", RELATION_NODE_PARENT_OF,
                    "treeitem5"); // aria-level
       testRelation("treeitem6", RELATION_NODE_PARENT_OF,
                    "treeitem7"); // // group role
+      testRelation("tree2", RELATION_NODE_PARENT_OF, "tree2_ti1"); // group role
+      testRelation("tree2_ti1", RELATION_NODE_PARENT_OF,
+                   ["tree2_ti1a", "tree2_ti1b"]); // group role
 
       testRelation("treegridrow2", RELATION_NODE_PARENT_OF, "treegridrow3");
       testRelation("treegrid", RELATION_NODE_PARENT_OF,
                    ["treegridrow1", "treegridrow2"]);
 
+      // 'node parent of' relation on ARIA list structured by groups
+      testRelation("list", RELATION_NODE_PARENT_OF,
+                   "listitem1");
+      testRelation("listitem1", RELATION_NODE_PARENT_OF,
+                   [ "listitem1.1", "listitem1.2" ]);
+
       // aria-controls
       getAccessible("tab");
       todo(false,
            "Getting an accessible tab, otherwise relations for tabpanel aren't cached. Bug 606924 will fix that.");
       testRelation("tabpanel", RELATION_CONTROLLED_BY, "tab");
       testRelation("tab", RELATION_CONTROLLER_FOR, "tabpanel");
 
       // aria-controls, multiple relations
@@ -173,16 +190,21 @@
      title="Ignore implicit label association when it's associated explicitly">
     Bug 682790
   </a>
   <a target="_blank"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=687393"
      title="HTML select options gets relation from containing label">
     Bug 687393
   </a>
+  <a target="_blank"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=864224"
+     title="Support nested ARIA listitems structured by role='group'">
+    Bug 864224
+  </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
   <label id="label1_1" for="control1_1">label</label>
   <input id="control1_1">
 
@@ -248,28 +270,46 @@
     <div role="treeitem" id="treeitem4" aria-level="1">Green</div>
     <div role="treeitem" id="treeitem5" aria-level="2">Light green</div>
     <div role="treeitem" id="treeitem6" aria-level="1">Green2</div>
     <div role="group">
       <div role="treeitem" id="treeitem7">Super light green</div>
     </div>
   </div>
 
+  <ul role="tree" id="tree2">
+    <li role="treeitem" id="tree2_ti1">Item 1
+      <ul role="group">
+        <li role="treeitem" id="tree2_ti1a">Item 1A</li>
+        <li role="treeitem" id="tree2_ti1b">Item 1B</li>
+      </ul>
+    </li>
+  </ul>
+
   <div role="treegrid" id="treegrid">
     <div role="row" id="treegridrow1">
       <span role="gridcell">cell1</span><span role="gridcell">cell2</span>
     </div>
     <div role="row" id="treegridrow2" aria-level="1">
       <span role="gridcell">cell3</span><span role="gridcell">cell4</span>
     </div>
     <div role="row" id="treegridrow3" aria-level="2">
       <span role="gridcell">cell5</span><span role="gridcell">cell6</span>
     </div>
   </div>
 
+  <div role="list" id="list">
+    <div role="listitem" id="listitem1">Item 1
+      <div role="group">
+        <div role="listitem" id="listitem1.1">Item 1A</div>
+        <div role="listitem" id="listitem1.2">Item 1B</div>
+      </div>
+    </div>
+  </div>
+
   <iframe id="iframe"></iframe>
 
   <div id="tablist" role="tablist">
     <div id="tab" role="tab" aria-controls="tabpanel">tab</div>
   </div>
   <div id="tabpanel" role="tabpanel">tabpanel</div>
 
   <div id="lr1" aria-live="assertive">1</div>
--- a/accessible/tests/mochitest/states/test_visibility.xul
+++ b/accessible/tests/mochitest/states/test_visibility.xul
@@ -10,40 +10,105 @@
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
 
   <script type="application/javascript"
           src="../common.js" />
   <script type="application/javascript"
           src="../role.js" />
   <script type="application/javascript"
           src="../states.js" />
+  <script type="application/javascript"
+          src="../events.js" />
 
   <script type="application/javascript">
   <![CDATA[
+    function openMenu(aID, aSubID, aOffscreenSubID)
+    {
+      this.menuNode = getNode(aID);
+
+      this.eventSeq = [
+        new invokerChecker(EVENT_FOCUS, this.menuNode)
+      ];
+
+      this.invoke = function openMenu_invoke()
+      {
+        this.menuNode.open = true;
+      }
+
+      this.finalCheck = function openMenu_finalCheck()
+      {
+        testStates(aID, 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
+        testStates(aSubID, 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
+        if (aOffscreenSubID)
+          testStates(aOffscreenSubID, STATE_OFFSCREEN, 0, STATE_INVISIBLE);
+      }
+
+      this.getID = function openMenu_invoke()
+      {
+        return "open menu '" + aID + "' and test states";
+      }
+    }
+
+    function closeMenu(aID, aSubID, aSub2ID)
+    {
+      this.menuNode = getNode(aID);
+
+      this.eventSeq = [
+        new invokerChecker(EVENT_FOCUS, document)
+      ];
+
+      this.invoke = function openMenu_invoke()
+      {
+        this.menuNode.open = false;
+      }
+
+      this.finalCheck = function openMenu_finalCheck()
+      {
+        testStates(aID, 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
+        testStates(aSubID, STATE_INVISIBLE, 0, STATE_OFFSCREEN);
+        testStates(aSub2ID, STATE_INVISIBLE, 0, STATE_OFFSCREEN);
+      }
+
+      this.getID = function openMenu_invoke()
+      {
+        return "open menu and test states";
+      }
+    }
+
+    var gQueue = null;
     function doTest()
     {
       testStates("deck_pane2", 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
       testStates("tabs_pane1", 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
       testStates("tabs_pane2", STATE_OFFSCREEN, 0, STATE_INVISIBLE);
 
-      SimpleTest.finish();
+      gQueue = new eventQueue();
+      gQueue.push(new openMenu("mi_file1", "mi_file1.1"));
+      gQueue.push(new openMenu("mi_file1.2", "mi_file1.2.1", "mi_file1.2.4"));
+      gQueue.push(new closeMenu("mi_file1", "mi_file1.1", "mi_file1.2.1"));
+      gQueue.invoke(); // Will call SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   ]]>
   </script>
 
   <hbox flex="1" style="overflow: auto;">
     <body xmlns="http://www.w3.org/1999/xhtml">
      <a target="_blank"
          href="https://bugzilla.mozilla.org/show_bug.cgi?id=810260"
-         title=" xul:deck hidden pages shouldn't be offscreen">
+         title="xul:deck hidden pages shouldn't be offscreen">
         Mozilla Bug 810260
      </a>
+     <a target="_blank"
+         href="https://bugzilla.mozilla.org/show_bug.cgi?id=865591"
+         title="Visible menu item have offscreen state">
+        Mozilla Bug 865591
+     </a>
 
       <p id="display"></p>
       <div id="content" style="display: none">
       </div>
       <pre id="test">
       </pre>
     </body>
 
@@ -60,13 +125,28 @@
           <tab>tab2</tab>
         </tabs>
         <tabpanels>
           <description value="This is the first page" id="tabs_pane1"/>
           <button label="This is the second page" id="tabs_pane2"/>
         </tabpanels>
       </tabbox>
 
+      <menubar>
+        <menu label="File" id="mi_file1">
+          <menupopup>
+            <menuitem label="SubFile" id="mi_file1.1"/>
+            <menu label="SubFile2" id="mi_file1.2">
+              <menupopup style="max-height: 5em;">
+                <menuitem label="SubSubFile" id="mi_file1.2.1"/>
+                <menuitem label="SubSubFile2" id="mi_file1.2.2"/>
+                <menuitem label="SubSubFile3" id="mi_file1.2.3"/>
+                <menuitem label="SubSubFile4" id="mi_file1.2.4"/>
+              </menupopup>
+            </menu>
+          </menupopup>
+        </menu>
+      </menubar>
     </vbox>
   </hbox>
 
 </window>
 
--- a/accessible/tests/mochitest/text.js
+++ b/accessible/tests/mochitest/text.js
@@ -100,58 +100,42 @@ function testCharAtOffset(aIDs, aOffset,
     testTextHelper(IDs[i], aOffset, BOUNDARY_CHAR,
                    aChar, aStartOffset, aEndOffset,
                    kOk, kOk, kOk,
                    acc.getTextAtOffset, "getTextAtOffset ");
   }
 }
 
 /**
- * Test getTextAtOffset function over different elements
+ * Test getTextAtOffset function over different elements.
+ *
+ * @param aIDs            [in] ID or array of IDs
+ * @param aBoundaryType   [in] boundary type for text to be retrieved
+ * @param aTestList       [in] array of sets:
+ *                              offset1 and offset2 defining the offset range
+ *                              the text in the range
+ *                              start offset of the text in the range
+ *                              end offset of the text in the range
+ *
+ * or
  *
  * @param aOffset         [in] the offset to get the text at
  * @param aBoundaryType   [in] Boundary type for text to be retrieved
  * @param aText           [in] expected return text for getTextAtOffset
  * @param aStartOffset    [in] expected return start offset for getTextAtOffset
  * @param aEndOffset      [in] expected return end offset for getTextAtOffset
  * @param ...             [in] list of ids or list of tuples made of:
  *                              element identifier
  *                              kTodo or kOk for returned text
  *                              kTodo or kOk for returned start offset
  *                              kTodo or kOk for returned offset result
  */
-function testTextAtOffset(aOffset, aBoundaryType, aText,
-                          aStartOffset, aEndOffset)
+function testTextAtOffset()
 {
-  // List of IDs.
-  if (arguments[5] instanceof Array) {
-    var ids = arguments[5];
-    for (var i = 0; i < ids.length; i++) {
-      var acc = getAccessible(ids[i], nsIAccessibleText);
-      testTextHelper(ids[i], aOffset, aBoundaryType,
-                     aText, aStartOffset, aEndOffset,
-                     kOk, kOk, kOk,
-                     acc.getTextAtOffset, "getTextAtOffset ");
-    }
-
-    return;
-  }
-
-  for (var i = 5; i < arguments.length; i = i + 4) {
-    var ID = arguments[i];
-    var acc = getAccessible(ID, nsIAccessibleText);
-    var toDoFlag1 = arguments[i + 1];
-    var toDoFlag2 = arguments[i + 2];
-    var toDoFlag3 = arguments[i + 3];
-
-    testTextHelper(ID, aOffset, aBoundaryType,
-                   aText, aStartOffset, aEndOffset,
-                   toDoFlag1, toDoFlag2, toDoFlag3,
-                   acc.getTextAtOffset, "getTextAtOffset ");
-  }
+  testTextSuperHelper("getTextAtOffset", arguments);
 }
 
 /**
  * Test getTextAfterOffset for BOUNDARY_CHAR over different elements.
  *
  * @param aIDs          [in] the accessible identifier or array of accessible
  *                        identifiers
  * @param aOffset       [in] the offset to get a character after it
@@ -169,57 +153,41 @@ function testCharAfterOffset(aIDs, aOffs
                    kOk, kOk, kOk,
                    acc.getTextAfterOffset, "getTextAfterOffset ");
   }
 }
 
 /**
  * Test getTextAfterOffset function over different elements
  *
+ * @param aIDs            [in] ID or array of IDs
+ * @param aBoundaryType   [in] boundary type for text to be retrieved
+ * @param aTestList       [in] array of sets:
+ *                              offset1 and offset2 defining the offset range
+ *                              the text in the range
+ *                              start offset of the text in the range
+ *                              end offset of the text in the range
+ *
+ * or
+ *
  * @param aOffset         [in] the offset to get the text after
  * @param aBoundaryType   [in] Boundary type for text to be retrieved
  * @param aText           [in] expected return text for getTextAfterOffset
  * @param aStartOffset    [in] expected return start offset for getTextAfterOffset
  * @param aEndOffset      [in] expected return end offset for getTextAfterOffset
  * @param ...             [in] list of ids or list of tuples made of:
  *                              element identifier
  *                              kTodo or kOk for returned text
  *                              kTodo or kOk for returned start offset
  *                              kTodo or kOk for returned offset result
  */
 function testTextAfterOffset(aOffset, aBoundaryType,
                              aText, aStartOffset, aEndOffset)
 {
-  // List of IDs.
-  if (arguments[5] instanceof Array) {
-    var ids = arguments[5];
-    for (var i = 0; i < ids.length; i++) {
-      var acc = getAccessible(ids[i], nsIAccessibleText);
-      testTextHelper(ids[i], aOffset, aBoundaryType,
-                     aText, aStartOffset, aEndOffset,
-                     kOk, kOk, kOk,
-                     acc.getTextAfterOffset, "getTextAfterOffset ");
-    }
-
-    return;
-  }
-
-  // List of tuples.
-  for (var i = 5; i < arguments.length; i = i + 4) {
-    var ID = arguments[i];
-    var acc = getAccessible(ID, nsIAccessibleText);
-    var toDoFlag1 = arguments[i + 1];
-    var toDoFlag2 = arguments[i + 2];
-    var toDoFlag3 = arguments[i + 3];
-
-    testTextHelper(ID, aOffset, aBoundaryType,
-                   aText, aStartOffset, aEndOffset,
-                   toDoFlag1, toDoFlag2, toDoFlag3, 
-                   acc.getTextAfterOffset, "getTextAfterOffset ");
-  }
+  testTextSuperHelper("getTextAfterOffset", arguments);
 }
 
 /**
  * Test getTextBeforeOffset for BOUNDARY_CHAR over different elements.
  *
  * @param aIDs          [in] the accessible identifier or array of accessible
  *                        identifiers
  * @param aOffset       [in] the offset to get a character before it
@@ -237,56 +205,41 @@ function testCharBeforeOffset(aIDs, aOff
                    kOk, kOk, kOk,
                    acc.getTextBeforeOffset, "getTextBeforeOffset ");
   }
 }
 
 /**
  * Test getTextBeforeOffset function over different elements
  *
+ * @param aIDs            [in] ID or array of IDs
+ * @param aBoundaryType   [in] boundary type for text to be retrieved
+ * @param aTestList       [in] array of sets:
+ *                              offset1 and offset2 defining the offset range
+ *                              the text in the range
+ *                              start offset of the text in the range
+ *                              end offset of the text in the range
+ *
+ * or
+ *
  * @param aOffset         [in] the offset to get the text before
  * @param aBoundaryType   [in] Boundary type for text to be retrieved
  * @param aText           [in] expected return text for getTextBeforeOffset
  * @param aStartOffset    [in] expected return start offset for getTextBeforeOffset
  * @param aEndOffset      [in] expected return end offset for getTextBeforeOffset
  * @param ...             [in] list of ids or list of tuples made of:
  *                              element identifier
  *                              kTodo or kOk for returned text
  *                              kTodo or kOk for returned start offset
  *                              kTodo or kOk for returned offset result
  */
 function testTextBeforeOffset(aOffset, aBoundaryType,
                               aText, aStartOffset, aEndOffset)
 {
-  // List of IDs.
-  if (arguments[5] instanceof Array) {
-    var ids = arguments[5];
-    for (var i = 0; i < ids.length; i++) {
-      var acc = getAccessible(ids[i], nsIAccessibleText);
-      testTextHelper(ids[i], aOffset, aBoundaryType,
-                     aText, aStartOffset, aEndOffset,
-                     kOk, kOk, kOk,
-                     acc.getTextBeforeOffset, "getTextBeforeOffset ");
-    }
-
-    return;
-  }
-
-  for (var i = 5; i < arguments.length; i = i + 4) {
-    var ID = arguments[i];
-    var acc = getAccessible(ID, nsIAccessibleText);
-    var toDoFlag1 = arguments[i + 1];
-    var toDoFlag2 = arguments[i + 2];
-    var toDoFlag3 = arguments[i + 3];
-
-    testTextHelper(ID, aOffset, aBoundaryType,
-                   aText, aStartOffset, aEndOffset,
-                   toDoFlag1, toDoFlag2, toDoFlag3,
-                   acc.getTextBeforeOffset, "getTextBeforeOffset ");
-  }
+  testTextSuperHelper("getTextBeforeOffset", arguments);
 }
 
 /**
  * Test word count for an element.
  *
  * @param aElement   [in] element identifier
  * @param aCount     [in] Expected word count
  * @param aToDoFlag  [in] kTodo or kOk for returned text
@@ -497,16 +450,88 @@ function testTextGetSelection(aID, aStar
      aSelectionIndex + "'");
   is(endObj.value, aEndOffset, text + ": wrong end offset for index '" +
      aSelectionIndex + "'");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Private
 
+function testTextSuperHelper(aFuncName, aArgs)
+{
+  // List of tests.
+  if (aArgs[2] instanceof Array) {
+    var ids = (aArgs[0] instanceof Array) ? aArgs[0] : [ aArgs[0] ];
+    var boundaryType = aArgs[1];
+    var list = aArgs[2];
+    for (var i = 0; i < list.length; i++) {
+      var offset1 = list[i][0], offset2 = list[i][1];
+      var text = list[i][2], startOffset = list[i][3], endOffset = list[i][4];
+      var failureList = list[i][5];
+      for (var offset = offset1; offset <= offset2; offset++) {
+        for (var idIdx = 0; idIdx < ids.length; idIdx++) {
+          var id = ids[idIdx];
+
+          var flagOk1 = kOk, flagOk2 = kOk, flagOk3 = kOk;
+          if (failureList) {
+            for (var fIdx = 0; fIdx < failureList.length; fIdx++) {
+              if (offset == failureList[fIdx][0] && id == failureList[fIdx][1]) {
+                flagOk1 = failureList[fIdx][2];
+                flagOk2 = failureList[fIdx][3];
+                flagOk3 = failureList[fIdx][4];
+                break;
+              }
+            }
+          }
+
+          var acc = getAccessible(id, nsIAccessibleText);
+          testTextHelper(id, offset, boundaryType,
+                         text, startOffset, endOffset,
+                         flagOk1, flagOk2, flagOk3,
+                         acc[aFuncName], aFuncName + " ");
+        }
+      }
+    }
+    return;
+  }
+
+  // Test at single offset. List of IDs.
+  var offset = aArgs[0];
+  var boundaryType = aArgs[1];
+  var text = aArgs[2];
+  var startOffset = aArgs[3];
+  var endOffset = aArgs[4];
+  if (aArgs[5] instanceof Array) {
+    var ids = aArgs[5];
+    for (var i = 0; i < ids.length; i++) {
+      var acc = getAccessible(ids[i], nsIAccessibleText);
+      testTextHelper(ids[i], offset, boundaryType,
+                     text, startOffset, endOffset,
+                     kOk, kOk, kOk,
+                     acc[aFuncName], aFuncName + " ");
+    }
+
+    return;
+  }
+
+  // Each ID is tested separately.
+  for (var i = 5; i < aArgs.length; i = i + 4) {
+    var ID = aArgs[i];
+    var acc = getAccessible(ID, nsIAccessibleText);
+    var toDoFlag1 = aArgs[i + 1];
+    var toDoFlag2 = aArgs[i + 2];
+    var toDoFlag3 = aArgs[i + 3];
+
+    testTextHelper(ID, offset, boundaryType,
+                   text, startOffset, endOffset,
+                   toDoFlag1, toDoFlag2, toDoFlag3,
+                   acc[aFuncName], aFuncName + " ");
+  }
+}
+
 function testTextHelper(aID, aOffset, aBoundaryType,
                         aText, aStartOffset, aEndOffset,
                         aToDoFlag1, aToDoFlag2, aToDoFlag3,
                         aTextFunc, aTextFuncName)
 {
   var exceptionFlag = aToDoFlag1 == undefined ||
                       aToDoFlag2 == undefined ||
                       aToDoFlag3 == undefined;
--- a/accessible/tests/mochitest/text/Makefile.in
+++ b/accessible/tests/mochitest/text/Makefile.in
@@ -17,12 +17,13 @@ MOCHITEST_A11Y_FILES = \
 		test_doc.html \
 		test_hypertext.html \
 		test_label.xul \
 		test_multiline.html \
 		test_passwords.html \
 		test_selection.html \
 		test_singleline.html \
 		test_whitespaces.html \
+		test_wordboundary.html \
 		test_words.html \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/accessible/tests/mochitest/text/test_multiline.html
+++ b/accessible/tests/mochitest/text/test_multiline.html
@@ -53,60 +53,30 @@
       testTextAfterOffset(8, BOUNDARY_CHAR, "t", 9, 10,
                           "div", kOk, kOk, kOk,
                           "divbr", kOk, kOk, kOk,
                           "editable", kOk, kOk, kOk,
                           "editablebr", kOk, kOk, kOk,
                           "textarea", kOk, kOk, kOk);
 
       // BOUNDARY_WORD_START
-      testTextAfterOffset(0, BOUNDARY_WORD_START, "two ", 9, 13,
-                          "div", kTodo, kTodo, kTodo,
-                          "divbr", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "editablebr", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
+      testTextAfterOffset(0, BOUNDARY_WORD_START, "two ", 9, 13, IDs);
       testTextAfterOffset(8, BOUNDARY_WORD_START, "two ", 9, 13,
-                          "div", kTodo, kTodo, kTodo,
-                          "divbr", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kTodo,
-                          "editablebr", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(9, BOUNDARY_WORD_START, "words\n", 13, 19,
-                          "div", kTodo, kTodo, kTodo,
+                          "div", kOk, kOk, kOk,
                           "divbr", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
+                          "editable", kOk, kOk, kOk,
                           "editablebr", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
+                          "textarea", kOk, kOk, kOk);
+      testTextAfterOffset(9, BOUNDARY_WORD_START, "words\n", 13, 19, IDs);
 
       // BOUNDARY_WORD_END
-      testTextAfterOffset(0, BOUNDARY_WORD_END, "\n\ntwo", 7, 12,
-                          "div", kTodo, kTodo, kTodo,
-                          "divbr", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "editablebr", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(6, BOUNDARY_WORD_END, "\n\ntwo", 7, 12,
-                          "div", kTodo, kTodo, kTodo,
-                          "divbr", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "editablebr", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(7, BOUNDARY_WORD_END, "\n\ntwo", 7, 12,
-                          "div", kOk, kOk, kOk,
-                          "divbr", kOk, kOk, kOk,
-                          "editable", kOk, kOk, kOk,
-                          "editablebr", kOk, kOk, kOk,
-                          "textarea", kOk, kOk, kOk);
-      testTextAfterOffset(8, BOUNDARY_WORD_END, " words", 12, 18,
-                          "div", kTodo, kTodo, kTodo,
-                          "divbr", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "editablebr", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
+      testTextAfterOffset(0, BOUNDARY_WORD_END, "\n\ntwo", 7, 12, IDs);
+      testTextAfterOffset(6, BOUNDARY_WORD_END, "\n\ntwo", 7, 12, IDs);
+      testTextAfterOffset(7, BOUNDARY_WORD_END, "\n\ntwo", 7, 12, IDs);
+      testTextAfterOffset(8, BOUNDARY_WORD_END, " words", 12, 18, IDs);
 
       // BOUNDARY_LINE_START
       testTextAfterOffset(0, BOUNDARY_LINE_START, "\n", 8, 9,
                           "div", kTodo, kTodo, kTodo,
                           "divbr", kTodo, kTodo, kTodo,
                           "editable", kTodo, kTodo, kTodo,
                           "editablebr", kTodo, kTodo, kTodo,
                           "textarea", kTodo, kTodo, kTodo);
@@ -198,17 +168,17 @@
 
       // BOUNDARY_WORD_START
       testTextBeforeOffset(0, BOUNDARY_WORD_START, "", 0, 0, IDs);
       testTextBeforeOffset(7, BOUNDARY_WORD_START, "", 0, 0, IDs);
       testTextBeforeOffset(8, BOUNDARY_WORD_START, "", 0, 0, IDs);
       testTextBeforeOffset(9, BOUNDARY_WORD_START, "oneword\n\n", 0, 9, IDs);
       testTextBeforeOffset(13, BOUNDARY_WORD_START, "two ", 9, 13, IDs);
       testTextBeforeOffset(18, BOUNDARY_WORD_START, "two ", 9, 13, IDs);
-      testTextBeforeOffset(19, BOUNDARY_WORD_START, "words\n", 13, 19, IDs);
+      testTextBeforeOffset(19, BOUNDARY_WORD_START, "two ", 9, 13, IDs);
 
       // BOUNDARY_WORD_END
       testTextBeforeOffset(0, BOUNDARY_WORD_END, "", 0, 0, IDs);
       testTextBeforeOffset(7, BOUNDARY_WORD_END, "", 0, 0, IDs);
       testTextBeforeOffset(8, BOUNDARY_WORD_END, "oneword", 0, 7,
                            "div", kOk, kOk, kOk,
                            "divbr", kTodo, kOk, kTodo,
                            "editable", kOk, kOk, kOk,
--- a/accessible/tests/mochitest/text/test_singleline.html
+++ b/accessible/tests/mochitest/text/test_singleline.html
@@ -7,19 +7,19 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript"
           src="../common.js"></script>
   <script type="application/javascript"
           src="../text.js"></script>
   <script type="application/javascript">
     if (navigator.platform.startsWith("Mac")) {
-      SimpleTest.expectAssertions(0, 20);
+      SimpleTest.expectAssertions(0, 14);
     } else {
-      SimpleTest.expectAssertions(20);
+      SimpleTest.expectAssertions(14);
     }
 
     function doTest()
     {
       // __h__e__l__l__o__ __m__y__ __f__r__i__e__n__d__
       //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
 
       ////////////////////////////////////////////////////////////////////////
@@ -54,118 +54,38 @@
       // get an offset for?
       testTextAfterOffset(15, BOUNDARY_CHAR, "", 15, 15,
 			  "input", kOk, kTodo, kTodo,
 			  "div", kOk, kTodo, kTodo,
 			  "editable", kOk, kTodo, kTodo);
       testCharAfterOffset("textarea", 15, "", 16, 16);
 
       // BOUNDARY_WORD_START
-      testTextAfterOffset(0, BOUNDARY_WORD_START, "my ", 6, 9,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(1, BOUNDARY_WORD_START, "my ", 6, 9,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(5, BOUNDARY_WORD_START, "my ", 6, 9,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(6, BOUNDARY_WORD_START, "friend", 9, 15,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(7, BOUNDARY_WORD_START, "friend", 9, 15,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(8, BOUNDARY_WORD_START, "friend", 9, 15,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(9, BOUNDARY_WORD_START, "", 15, 15,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
-      testTextAfterOffset(11, BOUNDARY_WORD_START, "", 15, 15,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
-      testTextAfterOffset(14, BOUNDARY_WORD_START, "", 15, 15,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
-      testTextAfterOffset(15, BOUNDARY_WORD_START, "", 15, 15,
-                          "input", kOk, kOk, kOk,
-                          "div", kOk, kOk, kOk,
-                          "editable", kOk, kOk, kOk,
-                          "textarea", kTodo, kOk, kTodo);
+      testTextAfterOffset(0, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
+      testTextAfterOffset(1, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
+      testTextAfterOffset(5, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
+      testTextAfterOffset(6, BOUNDARY_WORD_START, "friend", 9, 15, IDs);
+      testTextAfterOffset(7, BOUNDARY_WORD_START, "friend", 9, 15, IDs);
+      testTextAfterOffset(8, BOUNDARY_WORD_START, "friend", 9, 15, IDs);
+      testTextAfterOffset(9, BOUNDARY_WORD_START, "", 15, 15, IDs);
+      testTextAfterOffset(11, BOUNDARY_WORD_START, "", 15, 15, IDs);
+      testTextAfterOffset(14, BOUNDARY_WORD_START, "", 15, 15, IDs);
+      testTextAfterOffset(15, BOUNDARY_WORD_START, "", 15, 15, IDs);
 
       // BOUNDARY_WORD_END
-      testTextAfterOffset(0, BOUNDARY_WORD_END, " my", 5, 8,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(1, BOUNDARY_WORD_END, " my", 5, 8,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(5, BOUNDARY_WORD_END, " my", 5, 8,
-                          "input", kOk, kOk, kOk,
-                          "div", kOk, kOk, kOk,
-                          "editable", kOk, kOk, kOk,
-                          "textarea", kOk, kOk, kOk);
-      testTextAfterOffset(6, BOUNDARY_WORD_END, " friend", 8, 15,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(7, BOUNDARY_WORD_END, " friend", 8, 15,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(8, BOUNDARY_WORD_END, " friend", 8, 15,
-                          "input", kOk, kOk, kOk,
-                          "div", kOk, kOk, kOk,
-                          "editable", kOk, kOk, kOk,
-                          "textarea", kOk, kOk, kOk);
-      testTextAfterOffset(9, BOUNDARY_WORD_END, "", 15, 15,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
-      testTextAfterOffset(11, BOUNDARY_WORD_END, "", 15, 15,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
-      testTextAfterOffset(14, BOUNDARY_WORD_END, "", 15, 15,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
-      testTextAfterOffset(15, BOUNDARY_WORD_END, "", 15, 15,
-                          "input", kOk, kOk, kOk,
-                          "div", kOk, kOk, kOk,
-                          "editable", kOk, kOk, kOk,
-                          "textarea", kTodo, kOk, kTodo);
+      testTextAfterOffset(0, BOUNDARY_WORD_END, " my", 5, 8, IDs);
+      testTextAfterOffset(1, BOUNDARY_WORD_END, " my", 5, 8, IDs);
+      testTextAfterOffset(5, BOUNDARY_WORD_END, " my", 5, 8, IDs);
+      testTextAfterOffset(6, BOUNDARY_WORD_END, " friend", 8, 15, IDs);
+      testTextAfterOffset(7, BOUNDARY_WORD_END, " friend", 8, 15, IDs);
+      testTextAfterOffset(8, BOUNDARY_WORD_END, " friend", 8, 15, IDs);
+      testTextAfterOffset(9, BOUNDARY_WORD_END, "", 15, 15, IDs);
+      testTextAfterOffset(11, BOUNDARY_WORD_END, "", 15, 15, IDs);
+      testTextAfterOffset(14, BOUNDARY_WORD_END, "", 15, 15, IDs);
+      testTextAfterOffset(15, BOUNDARY_WORD_END, "", 15, 15, IDs);
 
       // BOUNDARY_LINE_START
       testTextAfterOffset(0, BOUNDARY_LINE_START, "", 15, 15,
                           "input", kTodo, kTodo, kOk,
                           "div", kTodo, kTodo, kOk,
                           "editable", kTodo, kTodo, kOk,
                           "textarea", kTodo, kTodo, kTodo);
       testTextAfterOffset(1, BOUNDARY_LINE_START, "", 15, 15,
@@ -222,17 +142,21 @@
       testTextBeforeOffset(1, BOUNDARY_WORD_START, "", 0, 0, IDs);
       testTextBeforeOffset(5, BOUNDARY_WORD_START, "", 0, 0, IDs);
       testTextBeforeOffset(6, BOUNDARY_WORD_START, "hello ", 0, 6, IDs);
       testTextBeforeOffset(7, BOUNDARY_WORD_START, "hello ", 0, 6, IDs);
       testTextBeforeOffset(8, BOUNDARY_WORD_START, "hello ", 0, 6, IDs);
       testTextBeforeOffset(9, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
       testTextBeforeOffset(10, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
       testTextBeforeOffset(14, BOUNDARY_WORD_START, "my ", 6, 9, IDs);
-      testTextBeforeOffset(15, BOUNDARY_WORD_START, "friend", 9, 15, IDs);
+      testTextBeforeOffset(15, BOUNDARY_WORD_START, "my ", 6, 9,
+                           "input", kOk, kOk, kOk,
+                           "div", kOk, kOk, kOk,
+                           "editable", kOk, kOk, kOk,
+                           "textarea", kTodo, kTodo, kTodo);
 
       // BOUNDARY_WORD_END
       testTextBeforeOffset(0, BOUNDARY_WORD_END, "", 0, 0, IDs);
       testTextBeforeOffset(1, BOUNDARY_WORD_END, "", 0, 0, IDs);
       testTextBeforeOffset(5, BOUNDARY_WORD_END, "", 0, 0, IDs);
       testTextBeforeOffset(6, BOUNDARY_WORD_END, "hello", 0, 5, IDs);
       testTextBeforeOffset(7, BOUNDARY_WORD_END, "hello", 0, 5, IDs);
       testTextBeforeOffset(8, BOUNDARY_WORD_END, "hello", 0, 5, IDs);
--- a/accessible/tests/mochitest/text/test_whitespaces.html
+++ b/accessible/tests/mochitest/text/test_whitespaces.html
@@ -8,22 +8,16 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript"
           src="../common.js"></script>
 
   <script type="application/javascript"
           src="../text.js"></script>
   <script type="application/javascript">
-    if (navigator.platform.startsWith("Mac")) {
-      SimpleTest.expectAssertions(0, 3);
-    } else {
-      SimpleTest.expectAssertions(3);
-    }
-
     function doTest()
     {
       // __B__r__a__v__e__ __S__i__r__ __ __R__o__b__i__n__ __ __ __r__a__n
       //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21
 
       ////////////////////////////////////////////////////////////////////////
       // characterCount
 
@@ -55,138 +49,78 @@
       testCharAfterOffset(IDs, 9, " ", 10, 11);
       testCharAfterOffset(IDs, 10, "R", 11, 12);
       testCharAfterOffset(IDs, 15, " ", 16, 17);
       testCharAfterOffset(IDs, 16, " ", 17, 18);
       testCharAfterOffset(IDs, 17, " ", 18, 19);
       testCharAfterOffset(IDs, 18, "r", 19, 20);
 
       // BOUNDARY_WORD_START
-      testTextAfterOffset(0, BOUNDARY_WORD_START, "Sir  ", 6, 11,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(5, BOUNDARY_WORD_START, "Sir  ", 6, 11,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(6, BOUNDARY_WORD_START, "Robin   ", 11, 19,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(9, BOUNDARY_WORD_START, "Robin   ", 11, 19,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(10, BOUNDARY_WORD_START, "Robin   ", 11, 19,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
+      testTextAfterOffset(0, BOUNDARY_WORD_START, "Sir  ", 6, 11, IDs);
+      testTextAfterOffset(5, BOUNDARY_WORD_START, "Sir  ", 6, 11, IDs);
+      testTextAfterOffset(6, BOUNDARY_WORD_START, "Robin   ", 11, 19, IDs);
+      testTextAfterOffset(9, BOUNDARY_WORD_START, "Robin   ", 11, 19, IDs);
+      testTextAfterOffset(10, BOUNDARY_WORD_START, "Robin   ", 11, 19, IDs);
       testTextAfterOffset(11, BOUNDARY_WORD_START, "ran", 19, 22,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
+                          "input", kOk, kOk, kOk,
+                          "div", kOk, kOk, kOk,
+                          "editable", kOk, kOk, kOk,
+                          "textarea", kTodo, kOk, kTodo);
       testTextAfterOffset(16, BOUNDARY_WORD_START, "ran", 19, 22,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
+                          "input", kOk, kOk, kOk,
+                          "div", kOk, kOk, kOk,
+                          "editable", kOk, kOk, kOk,
+                          "textarea", kTodo, kOk, kTodo);
       testTextAfterOffset(18, BOUNDARY_WORD_START, "ran", 19, 22,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
+                          "input", kOk, kOk, kOk,
+                          "div", kOk, kOk, kOk,
+                          "editable", kOk, kOk, kOk,
+                          "textarea", kTodo, kOk, kTodo);
       testTextAfterOffset(19, BOUNDARY_WORD_START, "", 22, 22,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kTodo);
-
-      // BOUNDARY_WORD_END
-      testTextAfterOffset(0, BOUNDARY_WORD_END, " Sir", 5, 9,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(4, BOUNDARY_WORD_END, " Sir", 5, 9,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(5, BOUNDARY_WORD_END, " Sir", 5, 9,
                           "input", kOk, kOk, kOk,
                           "div", kOk, kOk, kOk,
                           "editable", kOk, kOk, kOk,
-                          "textarea", kOk, kOk, kOk);
-      testTextAfterOffset(6, BOUNDARY_WORD_END, "  Robin", 9, 16,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(8, BOUNDARY_WORD_END, "   Robin", 9, 16,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(9, BOUNDARY_WORD_END, "  Robin", 9, 16,
+                          "textarea", kOk, kTodo, kTodo);
+
+      // BOUNDARY_WORD_END
+      testTextAfterOffset(0, BOUNDARY_WORD_END, " Sir", 5, 9, IDs);
+      testTextAfterOffset(4, BOUNDARY_WORD_END, " Sir", 5, 9, IDs);
+      testTextAfterOffset(5, BOUNDARY_WORD_END, " Sir", 5, 9, IDs);
+      testTextAfterOffset(6, BOUNDARY_WORD_END, "  Robin", 9, 16, IDs);
+      testTextAfterOffset(8, BOUNDARY_WORD_END, "  Robin", 9, 16, IDs);
+      testTextAfterOffset(9, BOUNDARY_WORD_END, "  Robin", 9, 16, IDs);
+      testTextAfterOffset(10, BOUNDARY_WORD_END, "   ran", 16, 22, IDs);
+      testTextAfterOffset(11, BOUNDARY_WORD_END, "   ran", 16, 22, IDs);
+      testTextAfterOffset(15, BOUNDARY_WORD_END, "   ran", 16, 22, IDs);
+      testTextAfterOffset(16, BOUNDARY_WORD_END, "   ran", 16, 22, IDs);
+      testTextAfterOffset(17, BOUNDARY_WORD_END, "", 22, 22,
                           "input", kOk, kOk, kOk,
                           "div", kOk, kOk, kOk,
                           "editable", kOk, kOk, kOk,
-                          "textarea", kOk, kOk, kOk);
-      testTextAfterOffset(10, BOUNDARY_WORD_END, "   ran", 16, 22,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(11, BOUNDARY_WORD_END, "   ran", 16, 22,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(15, BOUNDARY_WORD_END, "   ran", 16, 22,
-                          "input", kTodo, kTodo, kTodo,
-                          "div", kTodo, kTodo, kTodo,
-                          "editable", kTodo, kTodo, kTodo,
-                          "textarea", kTodo, kTodo, kTodo);
-      testTextAfterOffset(16, BOUNDARY_WORD_END, "   ran", 16, 22,
+                          "textarea", kTodo, kOk, kTodo);
+      testTextAfterOffset(18, BOUNDARY_WORD_END, "", 22, 22,
                           "input", kOk, kOk, kOk,
                           "div", kOk, kOk, kOk,
                           "editable", kOk, kOk, kOk,
-                          "textarea", kOk, kOk, kOk);
-      testTextAfterOffset(17, BOUNDARY_WORD_END, "", 22, 22,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
-      testTextAfterOffset(18, BOUNDARY_WORD_END, "", 22, 22,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
+                          "textarea", kTodo, kOk, kTodo);
       testTextAfterOffset(19, BOUNDARY_WORD_END, "", 22, 22,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
+                          "input", kOk, kOk, kOk,
+                          "div", kOk, kOk, kOk,
+                          "editable", kOk, kOk, kOk,
+                          "textarea", kTodo, kOk, kTodo);
       testTextAfterOffset(21, BOUNDARY_WORD_END, "", 22, 22,
-                          "input", kTodo, kTodo, kOk,
-                          "div", kTodo, kTodo, kOk,
-                          "editable", kTodo, kTodo, kOk,
-                          "textarea", kTodo, kTodo, kOk);
+                          "input", kOk, kOk, kOk,
+                          "div", kOk, kOk, kOk,
+                          "editable", kOk, kOk, kOk,
+                          "textarea", kTodo, kOk, kTodo);
       testTextAfterOffset(22, BOUNDARY_WORD_END, "", 22, 22,
                           "input", kOk, kOk, kOk,
                           "div", kOk, kOk, kOk,
                           "editable", kOk, kOk, kOk,
-                          "textarea", kTodo, kOk, kTodo);
+                          "textarea", kOk, kTodo, kTodo);
 
       ////////////////////////////////////////////////////////////////////////
       // getTextBeforeOffset
 
       var IDs = [ "input", "div", "editable", "textarea" ];
 
       // BOUNDARY_CHAR
       testCharBeforeOffset(IDs, 0, "", 0, 0);
new file mode 100644
--- /dev/null
+++ b/accessible/tests/mochitest/text/test_wordboundary.html
@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Word boundary text tests</title>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript"
+          src="../common.js"></script>
+  <script type="application/javascript"
+          src="../text.js"></script>
+
+  <script type="application/javascript">
+    function doTest()
+    {
+      // "hello"
+      var ids = [ "i1", "d1", "e1" ];
+      testTextBeforeOffset(ids, BOUNDARY_WORD_START,
+                           [ [ 0, 5, "", 0, 0 ] ]);
+      testTextBeforeOffset(ids, BOUNDARY_WORD_END,
+                           [ [ 0, 5, "", 0, 0 ] ]);
+
+      testTextAtOffset(ids, BOUNDARY_WORD_START,
+                       [ [ 0, 5, "hello", 0, 5 ] ]);
+      testTextAtOffset(ids, BOUNDARY_WORD_END,
+                       [ [ 0, 5, "hello", 0, 5 ] ]);
+
+      testTextAfterOffset(ids, BOUNDARY_WORD_START,
+                          [ [ 0, 5, "", 5, 5 ] ]);
+      testTextAfterOffset(ids, BOUNDARY_WORD_END,
+                          [ [ 0, 5, "", 5, 5 ] ]);
+
+      // "hello "
+      var ids = [ "i2", "d2", "e2" ];
+      testTextBeforeOffset(ids, BOUNDARY_WORD_START,
+                           [ [ 0, 6, "", 0, 0 ] ]);
+      testTextBeforeOffset(ids, BOUNDARY_WORD_END,
+                           [ [ 0, 5, "", 0, 0 ],
+                             [ 6, 6, "hello", 0, 5,
+                               [ [6, "e2", kTodo, kOk, kTodo ] ]
+                             ]
+                           ]);
+
+      testTextAtOffset(ids, BOUNDARY_WORD_START,
+                       [ [ 0, 6, "hello ", 0, 6 ] ]);
+      testTextAtOffset(ids, BOUNDARY_WORD_END,
+                       [ [ 0, 4, "hello", 0, 5 ],
+                         [ 5, 6, " ", 5, 6,
+                           [ [ 5, "e2", kTodo, kTodo, kOk ],
+                             [ 6, "e2", kTodo, kTodo, kOk ] ]
+                         ]
+                       ]);
+
+      testTextAfterOffset(ids, BOUNDARY_WORD_START,
+                          [ [ 0, 6, "", 6, 6 ] ]);
+      testTextAfterOffset(ids, BOUNDARY_WORD_END,
+                          [ [ 0, 5, " ", 5, 6,
+                              [ [ 5, "e2", kTodo, kTodo, kOk ] ]
+                            ],
+                            [ 6, 6, "", 6, 6 ]
+                          ]);
+
+      // "hello all"
+      ids = [ "i6", "d6", "e6" ];
+      testTextAtOffset(ids, BOUNDARY_WORD_START,
+                       [ [ 0, 5, "hello ", 0, 6 ],
+                         [ 6, 9, "all", 6, 9 ] ]);
+      testTextAtOffset(ids, BOUNDARY_WORD_END,
+                       [ [ 0, 4, "hello", 0, 5 ],
+                         [ 5, 9, " all", 5, 9 ] ]);
+
+      // "hello my friend"
+      ids = [ "i7", "d7", "e7" ];
+      testTextAtOffset(ids, BOUNDARY_WORD_START,
+                       [ [ 0, 5, "hello ", 0, 6 ],
+                         [ 6, 8, "my ", 6, 9 ],
+                         [ 9, 15, "friend", 9, 15] ]);
+      testTextAtOffset(ids, BOUNDARY_WORD_END,
+                       [ [ 0, 4, "hello", 0, 5 ],
+                         [ 5, 7, " my", 5, 8 ],
+                         [ 8, 15, " friend", 8, 15] ]);
+
+      SimpleTest.finish();
+    }
+
+    SimpleTest.waitForExplicitFinish();
+    addA11yLoadEvent(doTest);
+  </script>
+</head>
+<body>
+
+  <p id="display"></p>
+  <div id="content" style="display: none"></div>
+  <pre id="test">
+  </pre>
+
+  <input id="i1" value="hello"/>
+  <div id="d1">hello</div>
+  <div id="e1" contenteditable="true">hello</div>
+
+  <input id="i2" value="hello "/>
+  <pre><div id="d2">hello </div></pre>
+  <div id="e2" contenteditable="true">hello </div>
+
+  <input id="i6" value="hello all"/>
+  <div id="d6">hello all</div>
+  <div id="e6" contenteditable="true">hello all</div>
+
+  <input id="i7" value="hello my friend"/>
+  <div id="d7">hello my friend</div>
+  <div id="e7" contenteditable="true">hello my friend</div>
+
+</body>
+</html>
deleted file mode 100644
--- a/addon-sdk/test/Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH            = @DEPTH@
-topsrcdir        = @top_srcdir@
-srcdir           = @srcdir@
-VPATH            = @srcdir@
-relativesrcdir   = @relativesrcdir@
-
-DISABLED_XPCSHELL_TESTS = unit
-
-include $(DEPTH)/config/autoconf.mk
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/b2g/app/BootAnimation.cpp
+++ /dev/null
@@ -1,628 +0,0 @@
-/* Copyright 2012 Mozilla Foundation and Mozilla contributors
- *
- * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <algorithm>
-#include <endian.h>
-#include <fcntl.h>
-#include <string>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <vector>
-#include "mozilla/FileUtils.h"
-#include "mozilla/NullPtr.h"
-#include "mozilla/Util.h"
-#include "png.h"
-
-#include "android/log.h"
-#include "ui/FramebufferNativeWindow.h"
-#include "hardware_legacy/power.h"
-#include "hardware/gralloc.h"
-
-#define LOG(args...)  __android_log_print(ANDROID_LOG_INFO, "Gonk" , ## args)
-#define LOGW(args...) __android_log_print(ANDROID_LOG_WARN, "Gonk", ## args)
-#define LOGE(args...) __android_log_print(ANDROID_LOG_ERROR, "Gonk", ## args)
-
-using namespace android;
-using namespace mozilla;
-using namespace std;
-
-static sp<FramebufferNativeWindow> gNativeWindow;
-static pthread_t sAnimationThread;
-static bool sRunAnimation;
-
-/* See http://www.pkware.com/documents/casestudies/APPNOTE.TXT */
-struct local_file_header {
-    uint32_t signature;
-    uint16_t min_version;
-    uint16_t general_flag;
-    uint16_t compression;
-    uint16_t lastmod_time;
-    uint16_t lastmod_date;
-    uint32_t crc32;
-    uint32_t compressed_size;
-    uint32_t uncompressed_size;
-    uint16_t filename_size;
-    uint16_t extra_field_size;
-    char     data[0];
-
-    uint32_t GetDataSize() const
-    {
-        return letoh32(uncompressed_size);
-    }
-
-    uint32_t GetSize() const
-    {
-        /* XXX account for data descriptor */
-        return sizeof(local_file_header) + letoh16(filename_size) +
-               letoh16(extra_field_size) + GetDataSize();
-    }
-
-    const char * GetData() const
-    {
-        return data + letoh16(filename_size) + letoh16(extra_field_size);
-    }
-} __attribute__((__packed__));
-
-struct data_descriptor {
-    uint32_t crc32;
-    uint32_t compressed_size;
-    uint32_t uncompressed_size;
-} __attribute__((__packed__));
-
-struct cdir_entry {
-    uint32_t signature;
-    uint16_t creator_version;
-    uint16_t min_version;
-    uint16_t general_flag;
-    uint16_t compression;
-    uint16_t lastmod_time;
-    uint16_t lastmod_date;
-    uint32_t crc32;
-    uint32_t compressed_size;
-    uint32_t uncompressed_size;
-    uint16_t filename_size;
-    uint16_t extra_field_size;
-    uint16_t file_comment_size;
-    uint16_t disk_num;
-    uint16_t internal_attr;
-    uint32_t external_attr;
-    uint32_t offset;
-    char     data[0];
-
-    uint32_t GetDataSize() const
-    {
-        return letoh32(compressed_size);
-    }
-
-    uint32_t GetSize() const
-    {
-        return sizeof(cdir_entry) + letoh16(filename_size) +
-               letoh16(extra_field_size) + letoh16(file_comment_size);
-    }
-
-    bool Valid() const
-    {
-        return signature == htole32(0x02014b50);
-    }
-} __attribute__((__packed__));
-
-struct cdir_end {
-    uint32_t signature;
-    uint16_t disk_num;
-    uint16_t cdir_disk;
-    uint16_t disk_entries;
-    uint16_t cdir_entries;
-    uint32_t cdir_size;
-    uint32_t cdir_offset;
-    uint16_t comment_size;
-    char     comment[0];
-
-    bool Valid() const
-    {
-        return signature == htole32(0x06054b50);
-    }
-} __attribute__((__packed__));
-
-/* We don't have access to libjar and the zip reader in android
- * doesn't quite fit what we want to do. */
-class ZipReader {
-    const char *mBuf;
-    const cdir_end *mEnd;
-    const char *mCdir_limit;
-    uint32_t mBuflen;
-
-public:
-    ZipReader() : mBuf(nullptr) {}
-    ~ZipReader() {
-        if (mBuf)
-            munmap((void *)mBuf, mBuflen);
-    }
-
-    bool OpenArchive(const char *path)
-    {
-        int fd;
-        do {
-            fd = open(path, O_RDONLY);
-        } while (fd == -1 && errno == EINTR);
-        if (fd == -1)
-            return false;
-
-        struct stat sb;
-        if (fstat(fd, &sb) == -1 || sb.st_size < sizeof(cdir_end)) {
-            close(fd);
-            return false;
-        }
-
-        mBuflen = sb.st_size;
-        mBuf = (char *)mmap(nullptr, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
-        close(fd);
-
-        if (!mBuf) {
-            return false;
-        }
-
-        madvise(mBuf, sb.st_size, MADV_SEQUENTIAL);
-
-        mEnd = (cdir_end *)(mBuf + mBuflen - sizeof(cdir_end));
-        while (!mEnd->Valid() &&
-               (char *)mEnd > mBuf) {
-            mEnd = (cdir_end *)((char *)mEnd - 1);
-        }
-
-        mCdir_limit = mBuf + letoh32(mEnd->cdir_offset) + letoh32(mEnd->cdir_size);
-
-        if (!mEnd->Valid() || mCdir_limit > (char *)mEnd) {
-            munmap((void *)mBuf, mBuflen);
-            mBuf = nullptr;
-            return false;
-        }
-
-        return true;
-    }
-
-    /* Pass null to get the first cdir entry */
-    const cdir_entry * GetNextEntry(const cdir_entry *prev)
-    {
-        const cdir_entry *entry;
-        if (prev)
-            entry = (cdir_entry *)((char *)prev + prev->GetSize());
-        else
-            entry = (cdir_entry *)(mBuf + letoh32(mEnd->cdir_offset));
-
-        if (((char *)entry + entry->GetSize()) > mCdir_limit ||
-            !entry->Valid())
-            return nullptr;
-        return entry;
-    }
-
-    string GetEntryName(const cdir_entry *entry)
-    {
-        uint16_t len = letoh16(entry->filename_size);
-
-        string name;
-        name.append(entry->data, len);
-        return name;
-    }
-
-    const local_file_header * GetLocalEntry(const cdir_entry *entry)
-    {
-        const local_file_header * data =
-            (local_file_header *)(mBuf + letoh32(entry->offset));
-        if (((char *)data + data->GetSize()) > (char *)mEnd)
-            return nullptr;
-        return data;
-    }
-};
-
-struct AnimationFrame {
-    char path[256];
-    char *buf;
-    const local_file_header *file;
-    uint32_t width;
-    uint32_t height;
-    uint16_t bytepp;
-
-    AnimationFrame() : buf(nullptr) {}
-    AnimationFrame(const AnimationFrame &frame) : buf(nullptr) {
-        strncpy(path, frame.path, sizeof(path));
-        file = frame.file;
-    }
-    ~AnimationFrame()
-    {
-        if (buf)
-            free(buf);
-    }
-
-    bool operator<(const AnimationFrame &other) const
-    {
-        return strcmp(path, other.path) < 0;
-    }
-
-    void ReadPngFrame(int outputFormat);
-};
-
-struct AnimationPart {
-    int32_t count;
-    int32_t pause;
-    char path[256];
-    vector<AnimationFrame> frames;
-};
-
-using namespace android;
-
-struct RawReadState {
-    const char *start;
-    uint32_t offset;
-    uint32_t length;
-};
-
-static void
-RawReader(png_structp png_ptr, png_bytep data, png_size_t length)
-{
-    RawReadState *state = (RawReadState *)png_get_io_ptr(png_ptr);
-    if (length > (state->length - state->offset))
-        png_err(png_ptr);
-
-    memcpy(data, state->start + state->offset, length);
-    state->offset += length;
-}
-
-static void
-TransformTo565(png_structp png_ptr, png_row_infop row_info, png_bytep data)
-{
-    uint16_t *outbuf = (uint16_t *)data;
-    uint8_t *inbuf = (uint8_t *)data;
-    for (int i = 0; i < row_info->rowbytes; i += 3) {
-        *outbuf++ = ((inbuf[i]     & 0xF8) << 8) |
-                    ((inbuf[i + 1] & 0xFC) << 3) |
-                    ((inbuf[i + 2]       ) >> 3);
-    }
-}
-
-void
-AnimationFrame::ReadPngFrame(int outputFormat)
-{
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-    static const png_byte unused_chunks[] =
-        { 98,  75,  71,  68, '\0',   /* bKGD */
-          99,  72,  82,  77, '\0',   /* cHRM */
-         104,  73,  83,  84, '\0',   /* hIST */
-         105,  67,  67,  80, '\0',   /* iCCP */
-         105,  84,  88, 116, '\0',   /* iTXt */
-         111,  70,  70, 115, '\0',   /* oFFs */
-         112,  67,  65,  76, '\0',   /* pCAL */
-         115,  67,  65,  76, '\0',   /* sCAL */
-         112,  72,  89, 115, '\0',   /* pHYs */
-         115,  66,  73,  84, '\0',   /* sBIT */
-         115,  80,  76,  84, '\0',   /* sPLT */
-         116,  69,  88, 116, '\0',   /* tEXt */
-         116,  73,  77,  69, '\0',   /* tIME */
-         122,  84,  88, 116, '\0'};  /* zTXt */
-    static const png_byte tRNS_chunk[] =
-        {116,  82,  78,  83, '\0'};  /* tRNS */
-#endif
-
-    png_structp pngread = png_create_read_struct(PNG_LIBPNG_VER_STRING,
-                                                 nullptr, nullptr, nullptr);
-
-    if (!pngread)
-        return;
-
-    png_infop pnginfo = png_create_info_struct(pngread);
-
-    if (!pnginfo) {
-        png_destroy_read_struct(&pngread, &pnginfo, nullptr);
-        return;
-    }
-
-    if (setjmp(png_jmpbuf(pngread))) {
-        // libpng reported an error and longjumped here.  Clean up and return.
-        png_destroy_read_struct(&pngread, &pnginfo, nullptr);
-        return;
-    }
-
-    RawReadState state;
-    state.start = file->GetData();
-    state.length = file->GetDataSize();
-    state.offset = 0;
-
-    png_set_read_fn(pngread, &state, RawReader);
-
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-    /* Ignore unused chunks */
-    png_set_keep_unknown_chunks(pngread, 1, unused_chunks,
-                               (int)sizeof(unused_chunks)/5);
-
-    /* Ignore the tRNS chunk if we only want opaque output */
-    if (outputFormat == HAL_PIXEL_FORMAT_RGB_888 ||
-        outputFormat == HAL_PIXEL_FORMAT_RGB_565) {
-        png_set_keep_unknown_chunks(pngread, 1, tRNS_chunk, 1);
-    }
-#endif
-
-    png_read_info(pngread, pnginfo);
-
-    width = png_get_image_width(pngread, pnginfo);
-    height = png_get_image_height(pngread, pnginfo);
-
-    switch (outputFormat) {
-    case HAL_PIXEL_FORMAT_BGRA_8888:
-        png_set_bgr(pngread);
-        // FALL THROUGH
-    case HAL_PIXEL_FORMAT_RGBA_8888:
-    case HAL_PIXEL_FORMAT_RGBX_8888:
-        bytepp = 4;
-        png_set_filler(pngread, 0xFF, PNG_FILLER_AFTER);
-        break;
-    case HAL_PIXEL_FORMAT_RGB_888:
-        bytepp = 3;
-        png_set_strip_alpha(pngread);
-        break;
-    default:
-        LOGW("Unknown pixel format %d. Assuming RGB 565.", outputFormat);
-        // FALL THROUGH
-    case HAL_PIXEL_FORMAT_RGB_565:
-        bytepp = 2;
-        png_set_strip_alpha(pngread);
-        png_set_read_user_transform_fn(pngread, TransformTo565);
-        break;
-    }
-
-    // An extra row is added to give libpng enough space when
-    // decoding 3/4 bytepp inputs for 2 bytepp output surfaces
-    buf = (char *)malloc(width * (height + 1) * bytepp);
-
-    vector<char *> rows(height + 1);
-    uint32_t stride = width * bytepp;
-    for (int i = 0; i < height; i++) {
-        rows[i] = buf + (stride * i);
-    }
-    rows[height] = nullptr;
-    png_set_strip_16(pngread);
-    png_set_palette_to_rgb(pngread);
-    png_set_gray_to_rgb(pngread);
-    png_read_image(pngread, (png_bytepp)&rows.front());
-    png_destroy_read_struct(&pngread, &pnginfo, nullptr);
-}
-
-static void *
-AnimationThread(void *)
-{
-    ZipReader reader;
-    if (!reader.OpenArchive("/system/media/bootanimation.zip")) {
-        LOGW("Could not open boot animation");
-        return nullptr;
-    }
-
-    const cdir_entry *entry = nullptr;
-    const local_file_header *file = nullptr;
-    while ((entry = reader.GetNextEntry(entry))) {
-        string name = reader.GetEntryName(entry);
-        if (!name.compare("desc.txt")) {
-            file = reader.GetLocalEntry(entry);
-            break;
-        }
-    }
-
-    if (!file) {
-        LOGW("Could not find desc.txt in boot animation");
-        return nullptr;
-    }
-
-    int format;
-    ANativeWindow *window = gNativeWindow.get();
-    window->query(window, NATIVE_WINDOW_FORMAT, &format);
-
-    hw_module_t const *module;
-    if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module)) {
-        LOGW("Could not get gralloc module");
-        return nullptr;
-    }
-    gralloc_module_t const *grmodule =
-        reinterpret_cast<gralloc_module_t const*>(module);
-
-    string descCopy;
-    descCopy.append(file->GetData(), entry->GetDataSize());
-    int32_t width, height, fps;
-    const char *line = descCopy.c_str();
-    const char *end;
-    bool headerRead = true;
-    vector<AnimationPart> parts;
-
-    /*
-     * bootanimation.zip
-     *
-     * This is the boot animation file format that Android uses.
-     * It's a zip file with a directories containing png frames
-     * and a desc.txt that describes how they should be played.
-     *
-     * desc.txt contains two types of lines
-     * 1. [width] [height] [fps]
-     *    There is one of these lines per bootanimation.
-     *    If the width and height are smaller than the screen,
-     *    the frames are centered on a black background.
-     *    XXX: Currently we stretch instead of centering the frame.
-     * 2. p [count] [pause] [path]
-     *    This describes one animation part.
-     *    Each animation part is played in sequence.
-     *    An animation part contains all the files/frames in the
-     *    directory specified in [path]
-     *    [count] indicates the number of times this part repeats.
-     *    [pause] indicates the number of frames that this part
-     *    should pause for after playing the full sequence but
-     *    before repeating.
-     */
-
-    do {
-        end = strstr(line, "\n");
-
-        AnimationPart part;
-        if (headerRead &&
-            sscanf(line, "%d %d %d", &width, &height, &fps) == 3) {
-            headerRead = false;
-        } else if (sscanf(line, "p %d %d %s",
-                          &part.count, &part.pause, part.path)) {
-            parts.push_back(part);
-        }
-    } while (end && *(line = end + 1));
-
-    for (uint32_t i = 0; i < parts.size(); i++) {
-        AnimationPart &part = parts[i];
-        entry = nullptr;
-        char search[256];
-        snprintf(search, sizeof(search), "%s/", part.path);
-        while ((entry = reader.GetNextEntry(entry))) {
-            string name = reader.GetEntryName(entry);
-            if (name.find(search) ||
-                !entry->GetDataSize() ||
-                name.length() >= 256)
-                continue;
-
-            part.frames.push_back();
-            AnimationFrame &frame = part.frames.back();
-            strcpy(frame.path, name.c_str());
-            frame.file = reader.GetLocalEntry(entry);
-        }
-
-        sort(part.frames.begin(), part.frames.end());
-    }
-
-    uint32_t frameDelayUs = 1000000 / fps;
-
-    for (uint32_t i = 0; i < parts.size(); i++) {
-        AnimationPart &part = parts[i];
-
-        uint32_t j = 0;
-        while (sRunAnimation && (!part.count || j++ < part.count)) {
-            for (uint32_t k = 0; k < part.frames.size(); k++) {
-                struct timeval tv1, tv2;
-                gettimeofday(&tv1, nullptr);
-                AnimationFrame &frame = part.frames[k];
-                if (!frame.buf) {
-                    frame.ReadPngFrame(format);
-                }
-
-                ANativeWindowBuffer *buf;
-                if (window->dequeueBuffer(window, &buf)) {
-                    LOGW("Failed to get an ANativeWindowBuffer");
-                    break;
-                }
-                if (window->lockBuffer(window, buf)) {
-                    LOGW("Failed to lock ANativeWindowBuffer");
-                    window->queueBuffer(window, buf);
-                    break;
-                }
-
-                void *vaddr;
-                if (grmodule->lock(grmodule, buf->handle,
-                                   GRALLOC_USAGE_SW_READ_NEVER |
-                                   GRALLOC_USAGE_SW_WRITE_OFTEN |
-                                   GRALLOC_USAGE_HW_FB,
-                                   0, 0, width, height, &vaddr)) {
-                    LOGW("Failed to lock buffer_handle_t");
-                    window->queueBuffer(window, buf);
-                    break;
-                }
-                memcpy(vaddr, frame.buf,
-                       frame.width * frame.height * frame.bytepp);
-                grmodule->unlock(grmodule, buf->handle);
-
-                gettimeofday(&tv2, nullptr);
-
-                timersub(&tv2, &tv1, &tv2);
-
-                if (tv2.tv_usec < frameDelayUs) {
-                    usleep(frameDelayUs - tv2.tv_usec);
-                } else {
-                    LOGW("Frame delay is %d us but decoding took %d us", frameDelayUs, tv2.tv_usec);
-                }
-
-                window->queueBuffer(window, buf);
-
-                if (part.count && j >= part.count) {
-                    free(frame.buf);
-                    frame.buf = nullptr;
-                }
-            }
-            usleep(frameDelayUs * part.pause);
-        }
-    }
-
-    return nullptr;
-}
-
-static int
-CancelBufferNoop(ANativeWindow* aWindow, android_native_buffer_t* aBuffer)
-{
-    return 0;
-}
-
-__attribute__ ((visibility ("default")))
-FramebufferNativeWindow*
-NativeWindow()
-{
-    if (gNativeWindow.get()) {
-        return gNativeWindow.get();
-    }
-
-    // Some gralloc HALs need this in order to open the
-    // framebuffer device after we restart with the screen off.
-    //
-    // NB: this *must* run BEFORE allocating the
-    // FramebufferNativeWindow.  Do not separate these two C++
-    // statements.
-    set_screen_state(1);
-
-    // For some devices, it takes a while for the framebuffer to become
-    // usable. So we wait until the framebuffer has woken up before we
-    // try to open it.
-    {
-        char buf;
-        int len = 0;
-        ScopedClose fd(open("/sys/power/wait_for_fb_wake", O_RDONLY, 0));
-        do {
-            len = read(fd.get(), &buf, 1);
-        } while (len < 0 && errno == EINTR);
-        if (len < 0) {
-            LOGE("BootAnimation: wait_for_fb_sleep failed errno: %d", errno);
-        }
-    }
-
-    // We (apparently) don't have a way to tell if allocating the
-    // fbs succeeded or failed.
-    gNativeWindow = new FramebufferNativeWindow();
-
-    // Bug 776742: FrambufferNativeWindow doesn't set the cancelBuffer
-    // function pointer, causing EGL to segfault when the window surface
-    // is destroyed (i.e. on process exit). This workaround stops us
-    // from hard crashing in that situation.
-    gNativeWindow->cancelBuffer = CancelBufferNoop;
-
-    sRunAnimation = true;
-    pthread_create(&sAnimationThread, nullptr, AnimationThread, nullptr);
-
-    return gNativeWindow.get();
-}
-
-
-__attribute__ ((visibility ("default")))
-void
-StopBootAnimation()
-{
-    if (sRunAnimation) {
-        sRunAnimation = false;
-        pthread_join(sAnimationThread, nullptr);
-    }
-}
deleted file mode 100644
--- a/b2g/app/BootAnimation.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef BOOTANIMATION_H
-#define BOOTANIMATION_H
-
-namespace android {
-class FramebufferNativeWindow;
-}
-
-/* This returns a FramebufferNativeWindow if one exists.
- * If not, one is created and the boot animation is started. */
-__attribute__ ((weak))
-android::FramebufferNativeWindow* NativeWindow();
-
-/* This stops the boot animation if it's still running. */
-__attribute__ ((weak))
-void StopBootAnimation();
-
-#endif /* BOOTANIMATION_H */
--- a/b2g/app/Makefile.in
+++ b/b2g/app/Makefile.in
@@ -17,27 +17,34 @@ ifdef ENABLE_MARIONETTE
 DEFINES += -DENABLE_MARIONETTE=1
 endif
 
 ifndef LIBXUL_SDK
 
 CPPSRCS = nsBrowserApp.cpp
 
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
-CPPSRCS += BootAnimation.cpp
 LIBS += \
   -lui \
+  -lEGL \
   -lhardware_legacy \
   -lhardware \
   -lcutils \
   $(DEPTH)/media/libpng/$(LIB_PREFIX)mozpng.$(LIB_SUFFIX) \
+  $(DEPTH)/widget/gonk/libdisplay/$(LIB_PREFIX)display.$(LIB_SUFFIX) \
   $(MOZ_ZLIB_LIBS) \
   $(NULL)
+ifeq (17,$(ANDROID_VERSION))
+LIBS += \
+  -lgui \
+  -lsuspend \
+  $(NULL)
+endif
 OS_LDFLAGS += -Wl,--export-dynamic
-LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/hardware/libhardware_legacy/include
+LOCAL_INCLUDES += -I$(topsrcdir)/widget/gonk/libdisplay
 endif
 
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
 LOCAL_INCLUDES += -I$(DEPTH)/build
 
 DEFINES += -DXPCOM_GLUE
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -380,46 +380,50 @@ pref("dom.ipc.browser_frames.oop_by_defa
 
 // Temporary permission hack for WebSMS
 pref("dom.sms.enabled", true);
 pref("dom.sms.strict7BitEncoding", false); // Disabled by default.
 pref("dom.sms.requestStatusReport", true); // Enabled by default.
 
 // Temporary permission hack for WebContacts
 pref("dom.mozContacts.enabled", true);
+pref("dom.navigator-property.disable.mozContacts", false);
+pref("dom.global-constructor.disable.mozContact", false);
 
 // WebAlarms
 pref("dom.mozAlarms.enabled", true);
 
 // SimplePush
 pref("services.push.enabled", true);
 // serverURL to be assigned by services team
 pref("services.push.serverURL", "");
 pref("services.push.userAgentID", "");
-// exponential back-off start is 5 seconds like in HTTP/1.1
+// Exponential back-off start is 5 seconds like in HTTP/1.1.
+// Maximum back-off is pingInterval.
 pref("services.push.retryBaseInterval", 5000);
-// WebSocket level ping transmit interval in seconds.
-pref("services.push.websocketPingInterval", 55);
-// exponential back-off end is 20 minutes
-pref("services.push.maxRetryInterval", 1200000);
+// Interval at which to ping PushServer to check connection status. In
+// milliseconds. If no reply is received within requestTimeout, the connection
+// is considered closed.
+pref("services.push.pingInterval", 1800000); // 30 minutes
 // How long before a DOMRequest errors as timeout
 pref("services.push.requestTimeout", 10000);
 // enable udp wakeup support
 pref("services.push.udp.wakeupEnabled", true);
 // port on which UDP server socket is bound
 pref("services.push.udp.port", 2442);
 
 // NetworkStats
 #ifdef MOZ_B2G_RIL
 pref("dom.mozNetworkStats.enabled", true);
 pref("ril.lastKnownMcc", "724");
 #endif
 
 // WebSettings
 pref("dom.mozSettings.enabled", true);
+pref("dom.navigator-property.disable.mozSettings", false);
 pref("dom.mozPermissionSettings.enabled", true);
 
 // controls if we want camera support
 pref("device.camera.enabled", true);
 pref("media.realtime_decoder.enabled", true);
 
 // TCPSocket
 pref("dom.mozTCPSocket.enabled", true);
@@ -584,17 +588,17 @@ pref("hal.processPriorityManager.gonk.FO
 pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.Nice", 0);
 
 pref("hal.processPriorityManager.gonk.FOREGROUND.OomScoreAdjust", 134);
 pref("hal.processPriorityManager.gonk.FOREGROUND.KillUnderMB", 6);
 pref("hal.processPriorityManager.gonk.FOREGROUND.Nice", 1);
 
 pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.OomScoreAdjust", 200);
 pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.KillUnderMB", 7);
-pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.Nice", 10);
+pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.Nice", 7);
 
 pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.OomScoreAdjust", 267);
 pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.KillUnderMB", 8);
 pref("hal.processPriorityManager.gonk.BACKGROUND_HOMESCREEN.Nice", 18);
 
 pref("hal.processPriorityManager.gonk.BACKGROUND.OomScoreAdjust", 400);
 pref("hal.processPriorityManager.gonk.BACKGROUND.KillUnderMB", 20);
 pref("hal.processPriorityManager.gonk.BACKGROUND.Nice", 18);
--- a/b2g/app/nsBrowserApp.cpp
+++ b/b2g/app/nsBrowserApp.cpp
@@ -25,17 +25,17 @@
 #ifdef XP_WIN
 // we want a wmain entry point
 #include "nsWindowsWMain.cpp"
 #define snprintf _snprintf
 #define strcasecmp _stricmp
 #endif
 
 #ifdef MOZ_WIDGET_GONK
-#include "BootAnimation.h"
+#include "GonkDisplay.h"
 #endif
 
 #include "BinaryPath.h"
 
 #include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL
 
 #ifdef MOZ_WIDGET_GONK
 # include <binder/ProcessState.h>
@@ -145,17 +145,17 @@ static int do_main(int argc, char* argv[
     }
     argv[2] = argv[0];
     argv += 2;
     argc -= 2;
   }
 
 #ifdef MOZ_WIDGET_GONK
   /* Called to start the boot animation */
-  (void) NativeWindow();
+  (void) mozilla::GetGonkDisplay();
 #endif
 
   if (appini) {
     nsXREAppData *appData;
     rv = XRE_CreateAppData(appini, &appData);
     if (NS_FAILED(rv)) {
       Output("Couldn't read application.ini");
       return 255;
--- a/b2g/chrome/content/forms.js
+++ b/b2g/chrome/content/forms.js
@@ -183,16 +183,17 @@ let FormAssistant = {
     addEventListener("focus", this, true, false);
     addEventListener("blur", this, true, false);
     addEventListener("resize", this, true, false);
     addEventListener("submit", this, true, false);
     addEventListener("pagehide", this, true, false);
     addEventListener("beforeunload", this, true, false);
     addEventListener("input", this, true, false);
     addEventListener("keydown", this, true, false);
+    addEventListener("keyup", this, true, false);
     addMessageListener("Forms:Select:Choice", this);
     addMessageListener("Forms:Input:Value", this);
     addMessageListener("Forms:Select:Blur", this);
     addMessageListener("Forms:SetSelectionRange", this);
   },
 
   ignoredInputTypes: new Set([
     'button', 'file', 'checkbox', 'radio', 'reset', 'submit', 'image'
@@ -256,16 +257,17 @@ let FormAssistant = {
   get documentEncoder() {
     return this._documentEncoder;
   },
 
   // Implements nsIEditorObserver get notification when the text content of
   // current input field has changed.
   EditAction: function fa_editAction() {
     if (this._editing) {
+      this._editing = false;
       return;
     }
     this.sendKeyboardState(this.focusedElement);
   },
 
   handleEvent: function fa_handleEvent(evt) {
     let target = evt.target;
 
@@ -354,22 +356,25 @@ let FormAssistant = {
         this.updateSelection();
         break;
 
       case "keydown":
         // Don't monitor the text change resulting from key event.
         this._editing = true;
 
         // We use 'setTimeout' to wait until the input element accomplishes the
-        // change in selection range or text content.
+        // change in selection range.
         content.setTimeout(function() {
           this.updateSelection();
-          this._editing = false;
         }.bind(this), 0);
         break;
+
+      case "keyup":
+        this._editing = false;
+        break;
     }
   },
 
   receiveMessage: function fa_receiveMessage(msg) {
     let target = this.focusedElement;
     if (!target) {
       return;
     }
--- a/b2g/chrome/content/runapp.js
+++ b/b2g/chrome/content/runapp.js
@@ -26,17 +26,19 @@ window.addEventListener('load', function
     return;
   }
 
   runAppObj = new AppRunner(appname);
   Services.obs.addObserver(runAppObj, 'browser-ui-startup-complete', false);
 });
 
 window.addEventListener('unload', function() {
-  Services.obs.removeObserver(runAppObj, 'browser-ui-startup-complete');
+  if (runAppObj) {
+    Services.obs.removeObserver(runAppObj, 'browser-ui-startup-complete');
+  }
 });
 
 function AppRunner(aName) {
   this._req = null;
   this._appName = aName;
 }
 AppRunner.prototype = {
   observe: function(aSubject, aTopic, aData) {
--- a/b2g/chrome/content/settings.js
+++ b/b2g/chrome/content/settings.js
@@ -256,16 +256,21 @@ SettingsListener.observe('devtools.debug
   }
 #endif
 });
 
 SettingsListener.observe('debug.log-animations.enabled', false, function(value) {
   Services.prefs.setBoolPref('layers.offmainthreadcomposition.log-animations', value);
 });
 
+// =================== Device Storage ====================
+SettingsListener.observe('device.storage.writable.name', false, function(value) {
+  Services.prefs.setBoolPref('device.storage.writable.name', value);
+});
+
 // =================== Privacy ====================
 SettingsListener.observe('privacy.donottrackheader.enabled', false, function(value) {
   Services.prefs.setBoolPref('privacy.donottrackheader.enabled', value);
 });
 
 // =================== Crash Reporting ====================
 SettingsListener.observe('app.reportCrashes', 'ask', function(value) {
   if (value == 'always') {
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -134,17 +134,17 @@ var shell = {
     // purge the queue.
     this.CrashSubmit.pruneSavedDumps();
 
     try {
       // Check if we should automatically submit this crash.
       if (Services.prefs.getBoolPref('app.reportCrashes')) {
         this.submitCrash(crashID);
       } else {
-        debugCrashReport('app.reportCrashes is disabled');
+        this.deleteCrash(crashID);
       }
     } catch (e) {
       debugCrashReport('Can\'t fetch app.reportCrashes. Exception: ' + e);
     }
 
     // We can get here if we're just submitting old pending crashes.
     // Check that there's a valid crashID so that we only notify the
     // user if a crash just happened and not when we OOM. Bug 829477
@@ -152,16 +152,23 @@ var shell = {
       this.sendChromeEvent({
         type: "handle-crash",
         crashID: crashID,
         chrome: isChrome
       });
     }
   },
 
+  deleteCrash: function shell_deleteCrash(aCrashID) {
+    if (aCrashID) {
+      debugCrashReport('Deleting pending crash: ' + aCrashID);
+      shell.CrashSubmit.delete(aCrashID);
+    }
+  },
+
   // this function submit the pending crashes.
   // make sure you are online.
   submitQueuedCrashes: function shell_submitQueuedCrashes() {
     // submit the pending queue.
     let pending = shell.CrashSubmit.pendingIDs();
     for (let crashid of pending) {
       debugCrashReport('Submitting crash: ' + crashid);
       shell.CrashSubmit.submit(crashid);
@@ -1091,17 +1098,21 @@ var CaptivePortalLoginHelper = {
   }
 }
 
 // Listen for crashes submitted through the crash reporter UI.
 window.addEventListener('ContentStart', function cr_onContentStart() {
   let content = shell.contentBrowser.contentWindow;
   content.addEventListener("mozContentEvent", function cr_onMozContentEvent(e) {
     if (e.detail.type == "submit-crash" && e.detail.crashID) {
+      debugCrashReport("submitting crash at user request ", e.detail.crashID);
       shell.submitCrash(e.detail.crashID);
+    } else if (e.detail.type == "delete-crash" && e.detail.crashID) {
+      debugCrashReport("deleting crash at user request ", e.detail.crashID);
+      shell.deleteCrash(e.detail.crashID);
     }
   });
 });
 
 window.addEventListener('ContentStart', function update_onContentStart() {
   let updatePrompt = Cc["@mozilla.org/updates/update-prompt;1"]
                        .createInstance(Ci.nsIUpdatePrompt);
   if (!updatePrompt) {
@@ -1193,8 +1204,24 @@ Services.obs.addObserver(function(aSubje
   let data = JSON.parse(aData);
   shell.sendChromeEvent({
     type: "activity-done",
     success: data.success,
     manifestURL: data.manifestURL,
     pageURL: data.pageURL
   });
 }, "activity-done", false);
+
+#ifdef MOZ_WIDGET_GONK
+// Devices don't have all the same partition size for /cache where we
+// store the http cache.
+(function setHTTPCacheSize() {
+  let path = Services.prefs.getCharPref("browser.cache.disk.parent_directory");
+  let volumeService = Cc["@mozilla.org/telephony/volume-service;1"]
+                        .getService(Ci.nsIVolumeService);
+
+  let stats = volumeService.createOrGetVolumeByPath(path).getStats();
+
+  // We must set the size in KB, and keep a bit of free space.
+  let size = Math.floor(stats.totalBytes / 1024) - 1024;
+  Services.prefs.setIntPref("browser.cache.disk.capacity", size);
+}) ()
+#endif
--- a/b2g/components/test/Makefile.in
+++ b/b2g/components/test/Makefile.in
@@ -8,11 +8,9 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 FAIL_ON_WARNINGS := 1
 
 include $(DEPTH)/config/autoconf.mk
 
-DISABLED_XPCSHELL_TESTS = unit
-
 include $(topsrcdir)/config/rules.mk
--- a/b2g/confvars.sh
+++ b/b2g/confvars.sh
@@ -1,16 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MOZ_APP_BASENAME=B2G
 MOZ_APP_VENDOR=Mozilla
 
-MOZ_APP_VERSION=23.0a1
+MOZ_APP_VERSION=24.0a1
 MOZ_APP_UA_NAME=Firefox
 
 MOZ_UA_OS_AGNOSTIC=1
 
 MOZ_B2G_VERSION=2.0.0.0-prerelease
 MOZ_B2G_OS_NAME=Boot2Gecko
 
 MOZ_BRANDING_DIRECTORY=b2g/branding/unofficial
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -347,18 +347,16 @@
 
 ; JavaScript components
 @BINPATH@/components/ConsoleAPI.manifest
 @BINPATH@/components/ConsoleAPI.js
 @BINPATH@/components/BrowserElementParent.manifest
 @BINPATH@/components/BrowserElementParent.js
 @BINPATH@/components/ContactManager.js
 @BINPATH@/components/ContactManager.manifest
-@BINPATH@/components/NavigatorPropertyHelper.js
-@BINPATH@/components/NavigatorPropertyHelper.manifest
 @BINPATH@/components/PermissionSettings.js
 @BINPATH@/components/PermissionSettings.manifest
 @BINPATH@/components/PermissionPromptService.js
 @BINPATH@/components/PermissionPromptService.manifest
 @BINPATH@/components/AlarmsManager.js
 @BINPATH@/components/AlarmsManager.manifest
 @BINPATH@/components/FeedProcessor.manifest
 @BINPATH@/components/FeedProcessor.js
--- a/b2g/test/emulator.manifest
+++ b/b2g/test/emulator.manifest
@@ -1,6 +1,6 @@
 [{
-"size": 659020310,
-"digest": "8201020a5214337cf19d43bb3fde8c4624d7a7a71f04a4522a34783194694fe5e66f8087acf6fe7080d7bf787b8311dd9ed8facfbac39198d0121f817b8eef32",
+"size": 677339898,
+"digest": "af1d883664bf4f02637060855d76026cceffd28a796ab3d65e16f1b0b6d1a8d5bb634388152ba63ecbfa2fbb1bd59317c0cfd508e163eaf950923b6b999369bc",
 "algorithm": "sha512",
 "filename": "emulator.zip"
 }]
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -574,21 +574,28 @@ pref("browser.xul.error_pages.expert_bad
 // Work Offline is best manually managed by the user.
 pref("network.manage-offline-status", false);
 
 // We want to make sure mail URLs are handled externally...
 pref("network.protocol-handler.external.mailto", true); // for mail
 pref("network.protocol-handler.external.news", true);   // for news
 pref("network.protocol-handler.external.snews", true);  // for secure news
 pref("network.protocol-handler.external.nntp", true);   // also news
+#ifdef XP_WIN
+pref("network.protocol-handler.external.ms-windows-store", true);
+#endif
+
 // ...without warning dialogs
 pref("network.protocol-handler.warn-external.mailto", false);
 pref("network.protocol-handler.warn-external.news", false);
 pref("network.protocol-handler.warn-external.snews", false);
 pref("network.protocol-handler.warn-external.nntp", false);
+#ifdef XP_WIN
+pref("network.protocol-handler.warn-external.ms-windows-store", false);
+#endif
 
 // By default, all protocol handlers are exposed.  This means that
 // the browser will respond to openURL commands for all URL types.
 // It will also try to open link clicks inside the browser before
 // failing over to the system handlers.
 pref("network.protocol-handler.expose-all", true);
 pref("network.protocol-handler.expose.mailto", false);
 pref("network.protocol-handler.expose.news", false);
@@ -1218,16 +1225,19 @@ pref("social.directories", "https://addo
 pref("social.remote-install.enabled", true);
 
 pref("social.sidebar.open", true);
 pref("social.sidebar.unload_timeout_ms", 10000);
 pref("social.toast-notifications.enabled", true);
 
 pref("dom.identity.enabled", false);
 
+// Turn on the CSP 1.0 parser for Content Security Policy headers
+pref("security.csp.speccompliant", true);
+
 // Block insecure active content on https pages
 pref("security.mixed_content.block_active_content", true);
 
 
 // Override the Gecko-default value of false for Firefox.
 pref("plain_text.wrap_long_lines", true);
 
 #ifndef RELEASE_BUILD
--- a/browser/base/content/browser-appmenu.inc
+++ b/browser/base/content/browser-appmenu.inc
@@ -214,17 +214,17 @@
                  label="&bookmarksMenu.label;"
                  command="Browser:ShowAllBookmarks">
           <menupopup id="appmenu_bookmarksPopup"
                      placespopup="true"
                      context="placesContext"
                      openInTabs="children"
                      oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
                      onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
-                     onpopupshowing="BookmarksMenuButton.onPopupShowing(event);
+                     onpopupshowing="BookmarkingUI.onPopupShowing(event);
                                      if (!this.parentNode._placesView)
                                        new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
                      tooltip="bhTooltip"
                      popupsinherittooltip="true">
             <menuitem id="appmenu_showAllBookmarks"
                       label="&showAllBookmarks2.label;"
                       command="Browser:ShowAllBookmarks"
                       context=""
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -616,18 +616,18 @@ HistoryMenu.prototype = {
       let otherTabsCount = undoItem.tabs.length - 1;
       let label = (otherTabsCount == 0) ? menuLabelStringSingleTab
                                         : PluralForm.get(otherTabsCount, menuLabelString);
       let menuLabel = label.replace("#1", undoItem.title)
                            .replace("#2", otherTabsCount);
       let m = document.createElement("menuitem");
       m.setAttribute("label", menuLabel);
       let selectedTab = undoItem.tabs[undoItem.selected - 1];
-      if (selectedTab.attributes.image) {
-        let iconURL = selectedTab.attributes.image;
+      if (selectedTab.image) {
+        let iconURL = selectedTab.image;
         // don't initiate a connection just to fetch a favicon (see bug 467828)
         if (/^https?:/.test(iconURL))
           iconURL = "moz-anno:favicon:" + iconURL;
         m.setAttribute("image", iconURL);
       }
       m.setAttribute("class", "menuitem-iconic bookmark-item menuitem-with-favicon");
       m.setAttribute("oncommand", "undoCloseWindow(" + i + ");");
 
@@ -1101,16 +1101,20 @@ let BookmarkingUI = {
       this.star.removeAttribute("starred");
     }
     else {
       this.star.removeAttribute("disabled");
     }
   },
 
   _updateToolbarStyle: function BUI__updateToolbarStyle() {
+    if (!this.button) {
+      return;
+    }
+
     let personalToolbar = document.getElementById("PersonalToolbar");
     let onPersonalToolbar = this.button.parentNode == personalToolbar ||
                             this.button.parentNode.parentNode == personalToolbar;
 
     if (onPersonalToolbar) {
       this.button.classList.add("bookmark-item");
       this.button.classList.remove("toolbarbutton-1");
     }
@@ -1174,17 +1178,17 @@ let BookmarkingUI = {
     // We can load about:blank before the actual page, but there is no point in handling that page.
     if (isBlankPageURL(this._uri.spec)) {
       return;
     }
 
     this._pendingStmt = PlacesUtils.asyncGetBookmarkIds(this._uri, function (aItemIds, aURI) {
       // Safety check that the bookmarked URI equals the tracked one.
       if (!aURI.equals(this._uri)) {
-        Components.utils.reportError("BookmarksMenuButton did not receive current URI");
+        Components.utils.reportError("BookmarkingUI did not receive current URI");
         return;
       }
 
       // It's possible that onItemAdded gets called before the async statement
       // calls back.  For such an edge case, retain all unique entries from both
       // arrays.
       this._itemIds = this._itemIds.filter(
         function (id) aItemIds.indexOf(id) == -1
@@ -1193,17 +1197,17 @@ let BookmarkingUI = {
       this._updateStar();
 
       // Start observing bookmarks if needed.
       if (!this._hasBookmarksObserver) {
         try {
           PlacesUtils.addLazyBookmarkObserver(this);
           this._hasBookmarksObserver = true;
         } catch(ex) {
-          Components.utils.reportError("BookmarksMenuButton failed adding a bookmarks observer: " + ex);
+          Components.utils.reportError("BookmarkingUI failed adding a bookmarks observer: " + ex);
         }
       }
 
       delete this._pendingStmt;
     }, this);
   },
 
   _updateStar: function BUI__updateStar() {
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -508,21 +508,21 @@ var gPluginHandler = {
       browser.missingPlugins = new Map();
 
     let pluginInfo = this._getPluginInfo(aPlugin);
     browser.missingPlugins.set(pluginInfo.mimetype, pluginInfo);
 
     // only show notification for small subset of plugins
     let mimetype = pluginInfo.mimetype.split(";")[0];
     if (!this.canInstallThisMimeType(mimetype))
-      return;
+      return false;
 
     let pluginIdentifier = this.nameForSupportedPlugin(mimetype);
     if (!pluginIdentifier)
-      return;
+      return false;
 
     let displayName = this.supportedPlugins.plugins[pluginIdentifier].displayName;
 
     // don't show several notifications
     let notification = PopupNotifications.getNotification("plugins-not-found", browser);
     if (notification)
       return true;
 
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4611,34 +4611,34 @@ var TabsInTitlebar = {
   _prefName: "browser.tabs.drawInTitlebar",
 
   _readPref: function () {
     this.allowedBy("pref",
                    Services.prefs.getBoolPref(this._prefName));
   },
 
   _update: function () {
+    function $(id) document.getElementById(id);
+    function rect(ele) ele.getBoundingClientRect();
+
     if (!this._initialized || window.fullScreen)
       return;
 
     let allowed = true;
     for (let something in this._disallowed) {
       allowed = false;
       break;
     }
 
     if (allowed == this.enabled)
       return;
 
-    function $(id) document.getElementById(id);
     let titlebar = $("titlebar");
 
     if (allowed) {
-      function rect(ele)   ele.getBoundingClientRect();
-
       let tabsToolbar       = $("TabsToolbar");
 
 #ifdef MENUBAR_CAN_AUTOHIDE
       let appmenuButtonBox  = $("appmenu-button-container");
       this._sizePlaceholder("appmenu-button", rect(appmenuButtonBox).width);
 #endif
       let captionButtonsBox = $("titlebar-buttonbox");
       this._sizePlaceholder("caption-buttons", rect(captionButtonsBox).width);
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -948,17 +948,16 @@
       <!-- This is a placeholder for the Downloads Indicator.  It is visible
            during the customization of the toolbar, in the palette, and before
            the Downloads Indicator overlay is loaded. -->
       <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                      oncommand="DownloadsIndicatorView.onCommand(event);"
                      ondrop="DownloadsIndicatorView.onDrop(event);"
                      ondragover="DownloadsIndicatorView.onDragOver(event);"
                      ondragenter="DownloadsIndicatorView.onDragOver(event);"
-                     ondragleave="DownloadsIndicatorView.onDragLeave(event);"
                      label="&downloads.label;"
                      tooltiptext="&downloads.tooltip;"/>
 
       <toolbarbutton id="history-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                      observes="viewHistorySidebar" label="&historyButton.label;"
                      tooltiptext="&historyButton.tooltip;"/>
 
       <toolbarbutton id="bookmarks-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -471,17 +471,17 @@ nsContextMenu.prototype = {
 
   initClickToPlayItems: function() {
     this.showItem("context-ctp-play", this.onCTPPlugin);
     this.showItem("context-ctp-hide", this.onCTPPlugin);
     this.showItem("context-sep-ctp", this.onCTPPlugin);
   },
 
   inspectNode: function CM_inspectNode() {
-    let {devtools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
+    let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
     let gBrowser = this.browser.ownerDocument.defaultView.gBrowser;
     let tt = devtools.TargetFactory.forTab(gBrowser.selectedTab);
     return gDevTools.showToolbox(tt, "inspector").then(function(toolbox) {
       let inspector = toolbox.getCurrentPanel();
       inspector.selection.setNode(this.target, "browser-context-menu");
     }.bind(this));
   },
 
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -59,16 +59,19 @@ endif
 # browser_drag.js is disabled, as it needs to be updated for the new behavior from bug 320638.
 
 # browser_bug321000.js is disabled because newline handling is shaky (bug 592528)
 
 _BROWSER_FILES = \
                  head.js \
                  browser_typeAheadFind.js \
                  browser_keywordSearch.js \
+                 browser_keywordSearch_postData.js \
+                 POSTSearchEngine.xml \
+                 print_postdata.sjs \
                  browser_alltabslistener.js \
                  browser_bug304198.js \
                  title_test.svg \
                  browser_bug329212.js \
                  browser_bug356571.js \
                  browser_bug380960.js \
                  browser_bug386835.js \
                  browser_bug405137.js \
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/POSTSearchEngine.xml
@@ -0,0 +1,6 @@
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
+  <ShortName>POST Search</ShortName>
+  <Url type="text/html" method="POST" template="http://mochi.test:8888/browser/browser/base/content/test/print_postdata.sjs">
+    <Param name="searchterms" value="{searchTerms}"/>
+  </Url>
+</OpenSearchDescription>
--- a/browser/base/content/test/browser_bug839103.js
+++ b/browser/base/content/test/browser_bug839103.js
@@ -1,23 +1,26 @@
 const gTestRoot = getRootDirectory(gTestPath);
 const gStyleSheet = "bug839103.css";
 
 var gTab = null;
+var needsInitialApplicableStateEvent = false;
+var needsInitialApplicableStateEventFor = null;
 
 function test() {
   waitForExplicitFinish();
   gBrowser.addEventListener("StyleSheetAdded", initialStylesheetAdded, true);
   gTab = gBrowser.selectedTab = gBrowser.addTab(gTestRoot + "test_bug839103.html");
   gTab.linkedBrowser.addEventListener("load", tabLoad, true);
 }
 
 function initialStylesheetAdded(evt) {
   gBrowser.removeEventListener("StyleSheetAdded", initialStylesheetAdded, true);
   ok(true, "received initial style sheet event");
+  is(evt.type, "StyleSheetAdded", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
   ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.documentSheet, "style sheet is a document sheet");
 }
 
 function tabLoad(evt) {
   gTab.linkedBrowser.removeEventListener(evt.type, tabLoad, true);
@@ -31,55 +34,126 @@ function unexpectedContentEvent(evt) {
 }
 
 // We've seen the original stylesheet in the document.
 // Now add a stylesheet on the fly and make sure we see it.
 function continueTest() {
   info("continuing test");
 
   let doc = gBrowser.contentDocument;
+  doc.styleSheetChangeEventsEnabled = true;
   doc.addEventListener("StyleSheetAdded", unexpectedContentEvent, false);
   doc.addEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
+  doc.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
   doc.defaultView.addEventListener("StyleSheetAdded", unexpectedContentEvent, false);
   doc.defaultView.addEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
+  doc.defaultView.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
   let link = doc.createElement('link');
   link.setAttribute('rel', 'stylesheet');
   link.setAttribute('type', 'text/css');
   link.setAttribute('href', gTestRoot + gStyleSheet);
   gLinkElement = link;
 
   gBrowser.addEventListener("StyleSheetAdded", dynamicStylesheetAdded, true);
+  gBrowser.addEventListener("StyleSheetApplicableStateChanged", dynamicStylesheetApplicableStateChanged, true);
   doc.body.appendChild(link);
 }
 
 function dynamicStylesheetAdded(evt) {
   gBrowser.removeEventListener("StyleSheetAdded", dynamicStylesheetAdded, true);
   ok(true, "received dynamic style sheet event");
+  is(evt.type, "StyleSheetAdded", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
   ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.documentSheet, "style sheet is a document sheet");
+}
+
+function dynamicStylesheetApplicableStateChanged(evt) {
+  gBrowser.removeEventListener("StyleSheetApplicableStateChanged", dynamicStylesheetApplicableStateChanged, true);
+  ok(true, "received dynamic style sheet applicable state change event");
+  is(evt.type, "StyleSheetApplicableStateChanged", "evt.type has expected value");
+  is(evt.target, gBrowser.contentDocument, "event targets correct document");
+  is(evt.stylesheet, gLinkElement.sheet, "evt.stylesheet has the right value");
+  is(evt.applicable, true, "evt.applicable has the right value");
+
+  gBrowser.addEventListener("StyleSheetApplicableStateChanged", dynamicStylesheetApplicableStateChangedToFalse, true);
+  gLinkElement.disabled = true;
+}
+
+function dynamicStylesheetApplicableStateChangedToFalse(evt) {
+  gBrowser.removeEventListener("StyleSheetApplicableStateChanged", dynamicStylesheetApplicableStateChangedToFalse, true);
+  is(evt.type, "StyleSheetApplicableStateChanged", "evt.type has expected value");
+  ok(true, "received dynamic style sheet applicable state change event after media=\"\" changed");
+  is(evt.target, gBrowser.contentDocument, "event targets correct document");
+  is(evt.stylesheet, gLinkElement.sheet, "evt.stylesheet has the right value");
+  is(evt.applicable, false, "evt.applicable has the right value");
 
   gBrowser.addEventListener("StyleSheetRemoved", dynamicStylesheetRemoved, true);
   gBrowser.contentDocument.body.removeChild(gLinkElement);
 }
 
 function dynamicStylesheetRemoved(evt) {
   gBrowser.removeEventListener("StyleSheetRemoved", dynamicStylesheetRemoved, true);
   ok(true, "received dynamic style sheet removal");
+  is(evt.type, "StyleSheetRemoved", "evt.type has expected value");
   is(evt.target, gBrowser.contentDocument, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
   ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.stylesheet.href.contains(gStyleSheet), "evt.stylesheet is the removed stylesheet");
+
+  gBrowser.addEventListener("StyleRuleAdded", styleRuleAdded, true);
+  gBrowser.contentDocument.querySelector("style").sheet.insertRule("*{color:black}", 0);
+}
+
+function styleRuleAdded(evt) {
+  gBrowser.removeEventListener("StyleRuleAdded", styleRuleAdded, true);
+  ok(true, "received style rule added event");
+  is(evt.type, "StyleRuleAdded", "evt.type has expected value");
+  is(evt.target, gBrowser.contentDocument, "event targets correct document");
+  ok(evt.stylesheet, "evt.stylesheet is defined");
+  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.rule, "evt.rule is defined");
+  is(evt.rule.cssText, "* { color: black; }", "evt.rule.cssText has expected value");
+
+  gBrowser.addEventListener("StyleRuleChanged", styleRuleChanged, true);
+  evt.rule.style.cssText = "color:green";
+}
+
+function styleRuleChanged(evt) {
+  gBrowser.removeEventListener("StyleRuleChanged", styleRuleChanged, true);
+  ok(true, "received style rule changed event");
+  is(evt.type, "StyleRuleChanged", "evt.type has expected value");
+  is(evt.target, gBrowser.contentDocument, "event targets correct document");
+  ok(evt.stylesheet, "evt.stylesheet is defined");
+  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.rule, "evt.rule is defined");
+  is(evt.rule.cssText, "* { color: green; }", "evt.rule.cssText has expected value");
+
+  gBrowser.addEventListener("StyleRuleRemoved", styleRuleRemoved, true);
+  evt.stylesheet.deleteRule(0);
+}
+
+function styleRuleRemoved(evt) {
+  gBrowser.removeEventListener("StyleRuleRemoved", styleRuleRemoved, true);
+  ok(true, "received style rule removed event");
+  is(evt.type, "StyleRuleRemoved", "evt.type has expected value");
+  is(evt.target, gBrowser.contentDocument, "event targets correct document");
+  ok(evt.stylesheet, "evt.stylesheet is defined");
+  ok(evt.stylesheet.toString().contains("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
+  ok(evt.rule, "evt.rule is defined");
+
   executeSoon(concludeTest);
 }
 
 function concludeTest() {
   let doc = gBrowser.contentDocument;
   doc.removeEventListener("StyleSheetAdded", unexpectedContentEvent, false);
   doc.removeEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
+  doc.removeEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
   doc.defaultView.removeEventListener("StyleSheetAdded", unexpectedContentEvent, false);
   doc.defaultView.removeEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
+  doc.defaultView.removeEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
   gBrowser.removeCurrentTab();
   gLinkElement = null;
   gTab = null;
   finish();
-}
\ No newline at end of file
+}
--- a/browser/base/content/test/browser_gestureSupport.js
+++ b/browser/base/content/test/browser_gestureSupport.js
@@ -157,18 +157,20 @@ function test_TestEventListeners()
   e("MozRotateGesture", SimpleGestureEvent.ROTATION_CLOCKWISE, 33.0, 0);
   
   // Tap and presstap gesture events
   test_clicks("MozTapGesture", 1);
   test_clicks("MozTapGesture", 2);
   test_clicks("MozTapGesture", 3);
   test_clicks("MozPressTapGesture", 1);
 
-  // simple delivery test for edgeui gesture
-  e("MozEdgeUIGesture", 0, 0, 0);
+  // simple delivery test for edgeui gestures
+  e("MozEdgeUIStarted", 0, 0, 0);
+  e("MozEdgeUICanceled", 0, 0, 0);
+  e("MozEdgeUICompleted", 0, 0, 0);
 
   // event.shiftKey
   let modifier = Components.interfaces.nsIDOMEvent.SHIFT_MASK;
   e("MozSwipeGesture", SimpleGestureEvent.DIRECTION_RIGHT, 0, modifier);
 
   // event.metaKey
   modifier = Components.interfaces.nsIDOMEvent.META_MASK;
   e("MozSwipeGesture", SimpleGestureEvent.DIRECTION_RIGHT, 0, modifier);
copy from browser/base/content/test/browser_keywordSearch.js
copy to browser/base/content/test/browser_keywordSearch_postData.js
--- a/browser/base/content/test/browser_keywordSearch.js
+++ b/browser/base/content/test/browser_keywordSearch_postData.js
@@ -2,85 +2,93 @@
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  **/
 
 var gTests = [
   {
     name: "normal search (search service)",
     testText: "test search",
-    searchURL: Services.search.defaultEngine.getSubmission("test search", null, "keyword").uri.spec
+    expectText: "test+search"
   },
   {
     name: "?-prefixed search (search service)",
     testText: "?   foo  ",
-    searchURL: Services.search.defaultEngine.getSubmission("foo", null, "keyword").uri.spec
+    expectText: "foo"
   }
 ];
 
 function test() {
   waitForExplicitFinish();
 
-  let windowObserver = {
-    observe: function(aSubject, aTopic, aData) {
-      if (aTopic == "domwindowopened") {
-        ok(false, "Alert window opened");
-        let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
-        win.addEventListener("load", function() {
-          win.removeEventListener("load", arguments.callee, false);
-          win.close();
-        }, false);
-        executeSoon(finish);
-      }
-    }
-  };
-
-  Services.ww.registerNotification(windowObserver);
-
   let tab = gBrowser.selectedTab = gBrowser.addTab();
 
-  let listener = {
-    onStateChange: function onLocationChange(webProgress, req, flags, status) {
-      // Only care about document starts
-      let docStart = Ci.nsIWebProgressListener.STATE_IS_DOCUMENT |
-                     Ci.nsIWebProgressListener.STATE_START;
-      if (!(flags & docStart))
-        return;
+  let searchObserver = function search_observer(aSubject, aTopic, aData) {
+    let engine = aSubject.QueryInterface(Ci.nsISearchEngine);
+    info("Observer: " + aData + " for " + engine.name);
+
+    if (aData != "engine-added")
+      return;
+
+    if (engine.name != "POST Search")
+      return;
 
-      info("received document start");
+    Services.search.defaultEngine = engine;
+
+    registerCleanupFunction(function () {
+      Services.search.removeEngine(engine);
+    });
 
-      ok(req instanceof Ci.nsIChannel, "req is a channel");
-      is(req.originalURI.spec, gCurrTest.searchURL, "search URL was loaded");
-      info("Actual URI: " + req.URI.spec);
+    // ready to execute the tests!
+    executeSoon(nextTest);
+  };
 
-      executeSoon(nextTest);
-    }
-  }
-  gBrowser.addProgressListener(listener);
+  Services.obs.addObserver(searchObserver, "browser-search-engine-modified", false);
 
   registerCleanupFunction(function () {
-    Services.ww.unregisterNotification(windowObserver);
+    gBrowser.removeTab(tab);
 
-    gBrowser.removeProgressListener(listener);
-    gBrowser.removeTab(tab);
+    Services.obs.removeObserver(searchObserver, "browser-search-engine-modified");
   });
 
-  nextTest();
+  Services.search.addEngine("http://test:80/browser/browser/base/content/test/POSTSearchEngine.xml",
+                            Ci.nsISearchEngine.DATA_XML, null, false);
 }
 
 var gCurrTest;
 function nextTest() {
   if (gTests.length) {
     gCurrTest = gTests.shift();
     doTest();
   } else {
     finish();
   }
 }
 
 function doTest() {
   info("Running test: " + gCurrTest.name);
 
+  waitForLoad(function () {
+    let loadedText = gBrowser.contentDocument.body.textContent;
+    ok(loadedText, "search page loaded");
+    let needle = "searchterms=" + gCurrTest.expectText;
+    is(loadedText, needle, "The query POST data should be returned in the response");
+    nextTest();
+  });
+
   // Simulate a user entering search terms
   gURLBar.value = gCurrTest.testText;
   gURLBar.focus();
   EventUtils.synthesizeKey("VK_RETURN", {});
 }
+
+
+function waitForLoad(cb) {
+  let browser = gBrowser.selectedBrowser;
+  browser.addEventListener("load", function listener() {
+    if (browser.currentURI.spec == "about:blank")
+      return;
+    info("Page loaded: " + browser.currentURI.spec);
+    browser.removeEventListener("load", listener, true);
+
+    cb();
+  }, true);
+}
copy from content/base/test/bug435425.sjs
copy to browser/base/content/test/print_postdata.sjs
--- a/content/base/test/bug435425.sjs
+++ b/browser/base/content/test/print_postdata.sjs
@@ -1,24 +1,22 @@
 const CC = Components.Constructor;
 const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
                              "nsIBinaryInputStream",
                              "setInputStream");
 
-function handleRequest(request, response)
-{
+function handleRequest(request, response) {
   response.setHeader("Content-Type", "text/plain", false);
   if (request.method == "GET") {
     response.write(request.queryString);
   } else {
     var body = new BinaryInputStream(request.bodyInputStream);
 
     var avail;
     var bytes = [];
 
     while ((avail = body.available()) > 0)
       Array.prototype.push.apply(bytes, body.readByteArray(avail));
 
     var data = String.fromCharCode.apply(null, bytes);
     response.bodyOutputStream.write(data, data.length);
   }
 }
-
--- a/browser/base/content/test/test_bug839103.html
+++ b/browser/base/content/test/test_bug839103.html
@@ -1,9 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
   <title>Document for Bug 839103</title>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <style></style>
 </head>
 <body>
 </body>
 </html>
deleted file mode 100644
--- a/browser/components/dirprovider/tests/Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH          = @DEPTH@
-topsrcdir      = @top_srcdir@
-srcdir         = @srcdir@
-VPATH          = @srcdir@
-relativesrcdir = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-DISABLED_XPCSHELL_TESTS = unit
-
-include $(topsrcdir)/config/rules.mk
--- a/browser/components/downloads/content/indicator.js
+++ b/browser/components/downloads/content/indicator.js
@@ -525,18 +525,16 @@ const DownloadsIndicatorView = {
     aEvent.stopPropagation();
   },
 
   onDragOver: function DIV_onDragOver(aEvent)
   {
     browserDragAndDrop.dragOver(aEvent);
   },
 
-  onDragExit: function () { },
-
   onDrop: function DIV_onDrop(aEvent)
   {
     let dt = aEvent.dataTransfer;
     // If dragged item is from our source, do not try to
     // redownload already downloaded file.
     if (dt.mozGetDataAt("application/x-moz-file", 0))
       return;
 
deleted file mode 100644
--- a/browser/components/downloads/test/Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-# Any copyright is dedicated to the Public Domain.
-# http://creativecommons.org/publicdomain/zero/1.0/
-
-DEPTH     = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-relativesrcdir = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-DISABLED_XPCSHELL_TESTS = unit
-
-include $(topsrcdir)/config/rules.mk
--- a/browser/components/feeds/test/Makefile.in
+++ b/browser/components/feeds/test/Makefile.in
@@ -5,19 +5,18 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DISABLED_XPCSHELL_TESTS	= unit
-
-MOCHITEST_FILES =	bug408328-data.xml \
+MOCHITEST_FILES = \
+		bug408328-data.xml \
 		bug368464-data.xml \
 		test_bug494328.html \
 		bug494328-data.xml \
 		test_bug589543.html \
 		bug589543-data.xml \
 		test_bug436801.html \
 		bug436801-data.xml \
 		test_registerHandler.html \
deleted file mode 100644
--- a/browser/components/migration/tests/Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this file,
-# You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH		  = @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		  = @srcdir@
-relativesrcdir = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-DISABLED_XPCSHELL_TESTS = unit
-
-include $(topsrcdir)/config/rules.mk
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -163,17 +163,17 @@ BrowserGlue.prototype = {
 
   // nsIObserver implementation 
   observe: function BG_observe(subject, topic, data) {
     switch (topic) {
       case "prefservice:after-app-defaults":
         this._onAppDefaults();
         break;
       case "final-ui-startup":
-        this._onProfileStartup();
+        this._finalUIStartup();
         break;
       case "browser-delayed-startup-finished":
         this._onFirstWindowLoaded();
         Services.obs.removeObserver(this, "browser-delayed-startup-finished");
         break;
       case "sessionstore-windows-restored":
         this._onWindowsRestored();
         break;
@@ -383,22 +383,23 @@ BrowserGlue.prototype = {
     os.removeObserver(this, "profile-before-change");
 #ifdef MOZ_SERVICES_HEALTHREPORT
     os.removeObserver(this, "keyword-search");
 #endif
   },
 
   _onAppDefaults: function BG__onAppDefaults() {
     // apply distribution customizations (prefs)
-    // other customizations are applied in _onProfileStartup()
+    // other customizations are applied in _finalUIStartup()
     this._distributionCustomizer.applyPrefDefaults();
   },
 
-  // profile startup handler (contains profile initialization routines)
-  _onProfileStartup: function BG__onProfileStartup() {
+  // runs on startup, before the first command line handler is invoked
+  // (i.e. before the first window is opened)
+  _finalUIStartup: function BG__finalUIStartup() {
     this._sanitizer.onStartup();
     // check if we're in safe mode
     if (Services.appinfo.inSafeMode) {
       Services.ww.openWindow(null, "chrome://browser/content/safeMode.xul", 
                              "_blank", "chrome,centerscreen,modal,resizable=no", null);
     }
 
     // apply distribution customizations
deleted file mode 100644
--- a/browser/components/places/tests/Makefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-relativesrcdir = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-DISABLED_XPCSHELL_TESTS = unit
-
-include $(topsrcdir)/config/rules.mk
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -142,17 +142,17 @@ var gPrivacyPane = {
   },
 
   /**
    * Obtain the tracking preference value and reflect it in the UI.
    */
   getTrackingPrefs: function PPP_getTrackingPrefs()
   {
     // XXX avoid using bindings that might not be attached, see bug 859982
-    let dntValue = Services.prefs.getBoolPref("privacy.donottrackheader.value"),
+    let dntValue = Services.prefs.getIntPref("privacy.donottrackheader.value"),
         dntEnabled = Services.prefs.getBoolPref("privacy.donottrackheader.enabled");
 
     // if DNT is enbaled, select the value from the selected radio
     // button, otherwise choose the "no preference" radio button
     if (dntEnabled)
       return dntValue;
 
     return document.getElementById("dntnopref").value;
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -243,20 +243,16 @@ Object.freeze(SessionStore);
 
 let SessionStoreInternal = {
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIDOMEventListener,
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference
   ]),
 
-  // xul:tab attributes to (re)store (extensions might want to hook in here);
-  // the favicon is always saved for the about:sessionrestore page
-  xulAttributes: {"image": true},
-
   // set default load state
   _loadState: STATE_STOPPED,
 
   // During the initial restore and setBrowserState calls tracks the number of
   // windows yet to be restored
   _restoreCount: -1,
 
   // whether a setBrowserState call is in progress
@@ -1295,17 +1291,17 @@ let SessionStoreInternal = {
     if (this._shouldSaveTabState(tabState)) {
       let tabTitle = aTab.label;
       let tabbrowser = aWindow.gBrowser;
       tabTitle = this._replaceLoadingTitle(tabTitle, tabbrowser, aTab);
 
       this._windows[aWindow.__SSi]._closedTabs.unshift({
         state: tabState,
         title: tabTitle,
-        image: aTab.getAttribute("image"),
+        image: tabbrowser.getIcon(aTab),
         pos: aTab._tPos
       });
       var length = this._windows[aWindow.__SSi]._closedTabs.length;
       if (length > this._max_tabs_undo)
         this._windows[aWindow.__SSi]._closedTabs.splice(this._max_tabs_undo, length - this._max_tabs_undo);
     }
   },
 
@@ -1691,21 +1687,19 @@ let SessionStoreInternal = {
       }
     }
 
     if (deleteFrom && deleteFrom[aKey])
       delete deleteFrom[aKey];
   },
 
   persistTabAttribute: function ssi_persistTabAttribute(aName) {
-    if (aName in this.xulAttributes)
-      return; // this attribute is already being tracked
-
-    this.xulAttributes[aName] = true;
-    this.saveStateDelayed();
+    if (TabAttributes.persist(aName)) {
+      this.saveStateDelayed();
+    }
   },
 
   /**
    * Restores the session state stored in _lastSessionState. This will attempt
    * to merge data into the current session. If a window was opened at startup
    * with pinned tab(s), then the remaining data from the previous session for
    * that window will be opened into that winddow. Otherwise new windows will
    * be opened.
@@ -1985,21 +1979,22 @@ let SessionStoreInternal = {
     for (let cap of gDocShellCapabilities(browser.docShell))
       if (!browser.docShell["allow" + cap])
         disallow.push(cap);
     if (disallow.length > 0)
       tabData.disallow = disallow.join(",");
     else if (tabData.disallow)
       delete tabData.disallow;
 
-    tabData.attributes = {};
-    for (let name in this.xulAttributes) {
-      if (aTab.hasAttribute(name))
-        tabData.attributes[name] = aTab.getAttribute(name);
-    }
+    // Save tab attributes.
+    tabData.attributes = TabAttributes.get(aTab);
+
+    // Store the tab icon.
+    let tabbrowser = aTab.ownerDocument.defaultView.gBrowser;
+    tabData.image = tabbrowser.getIcon(aTab);
 
     if (aTab.__SS_extdata)
       tabData.extData = aTab.__SS_extdata;
     else if (tabData.extData)
       delete tabData.extData;
 
     if (history && browser.docShell instanceof Ci.nsIDocShell) {
       let storageData = SessionStorage.serialize(browser.docShell, aFullData)
@@ -2978,18 +2973,20 @@ let SessionStoreInternal = {
       else
         tabbrowser.unpinTab(tab);
 
       if (tabData.hidden)
         tabbrowser.hideTab(tab);
       else
         tabbrowser.showTab(tab);
 
-      for (let name in tabData.attributes)
-        this.xulAttributes[name] = true;
+      if ("attributes" in tabData) {
+        // Ensure that we persist tab attributes restored from previous sessions.
+        Object.keys(tabData.attributes).forEach(a => TabAttributes.persist(a));
+      }
 
       // keep the data around to prevent dataloss in case
       // a tab gets closed before it's been properly restored
       RestoringTabsData.set(browser, tabData);
       browser.__SS_restoreState = TAB_STATE_NEEDS_RESTORE;
       browser.setAttribute("pending", "true");
       tab.setAttribute("pending", "true");
 
@@ -3102,20 +3099,25 @@ let SessionStoreInternal = {
                                                      aIdMap, aDocIdentMap), true);
     }
 
     // make sure to reset the capabilities and attributes, in case this tab gets reused
     let disallow = new Set(tabData.disallow && tabData.disallow.split(","));
     for (let cap of gDocShellCapabilities(browser.docShell))
       browser.docShell["allow" + cap] = !disallow.has(cap);
 
-    for (let name in this.xulAttributes)
-      tab.removeAttribute(name);
-    for (let name in tabData.attributes)
-      tab.setAttribute(name, tabData.attributes[name]);
+    // Restore tab attributes.
+    if ("attributes" in tabData) {
+      TabAttributes.set(tab, tabData.attributes);
+    }
+
+    // Restore the tab icon.
+    if ("image" in tabData) {
+      aWindow.gBrowser.setIcon(tab, tabData.image);
+    }
 
     if (tabData.storage && browser.docShell instanceof Ci.nsIDocShell)
       SessionStorage.deserialize(browser.docShell, tabData.storage);
 
     // notify the tabbrowser that the tab chrome has been restored
     var event = aWindow.document.createEvent("Events");
     event.initEvent("SSTabRestoring", true, false);
     tab.dispatchEvent(event);
@@ -4617,16 +4619,62 @@ let DyingWindowCache = {
     this._data.set(window, data);
   },
 
   remove: function (window) {
     this._data.delete(window);
   }
 };
 
+// A set of tab attributes to persist. We will read a given list of tab
+// attributes when collecting tab data and will re-set those attributes when
+// the given tab data is restored to a new tab.
+let TabAttributes = {
+  _attrs: new Set(),
+
+  // We never want to directly read or write those attributes.
+  // 'image' should not be accessed directly but handled by using the
+  //         gBrowser.getIcon()/setIcon() methods.
+  // 'pending' is used internal by sessionstore and managed accordingly.
+  _skipAttrs: new Set(["image", "pending"]),
+
+  persist: function (name) {
+    if (this._attrs.has(name) || this._skipAttrs.has(name)) {
+      return false;
+    }
+
+    this._attrs.add(name);
+    return true;
+  },
+
+  get: function (tab) {
+    let data = {};
+
+    for (let name of this._attrs) {
+      if (tab.hasAttribute(name)) {
+        data[name] = tab.getAttribute(name);
+      }
+    }
+
+    return data;
+  },
+
+  set: function (tab, data = {}) {
+    // Clear attributes.
+    for (let name of this._attrs) {
+      tab.removeAttribute(name);
+    }
+
+    // Set attributes.
+    for (let name in data) {
+      tab.setAttribute(name, data[name]);
+    }
+  }
+};
+
 // This is used to help meter the number of restoring tabs. This is the control
 // point for telling the next tab to restore. It gets attached to each gBrowser
 // via gBrowser.addTabsProgressListener
 let gRestoreTabsProgressListener = {
   onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     // Ignore state changes on browsers that we've already restored and state
     // changes that aren't applicable.
     if (aBrowser.__SS_restoreState &&
--- a/browser/components/sessionstore/test/Makefile.in
+++ b/browser/components/sessionstore/test/Makefile.in
@@ -10,22 +10,19 @@ relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 # browser_506482.js is disabled because of frequent failures (bug 538672)
 # browser_526613.js is disabled because of frequent failures (bug 534489)
 # browser_589246.js is disabled for leaking browser windows (bug 752467)
 # browser_580512.js is disabled for leaking browser windows (bug 752467)
 
-DISABLED_XPCSHELL_TESTS = \
-	unit \
-	$(NULL)
-
 MOCHITEST_BROWSER_FILES = \
 	head.js \
+	browser_attributes.js \
 	browser_capabilities.js \
 	browser_dying_cache.js \
 	browser_form_restore_events.js \
 	browser_form_restore_events_sample.html \
 	browser_formdata_format.js \
 	browser_formdata_format_sample.html \
 	browser_input.js \
 	browser_input_sample.html \
new file mode 100644
--- /dev/null
+++ b/browser/components/sessionstore/test/browser_attributes.js
@@ -0,0 +1,72 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+function test() {
+  TestRunner.run();
+}
+
+/**
+ * This test makes sure that we correctly preserve tab attributes when storing
+ * and restoring tabs. It also ensures that we skip special attributes like
+ * 'image' and 'pending' that need to be handled differently or internally.
+ */
+
+const PREF = "browser.sessionstore.restore_on_demand";
+
+function runTests() {
+  Services.prefs.setBoolPref(PREF, true)
+  registerCleanupFunction(() => Services.prefs.clearUserPref(PREF));
+
+  // Add a new tab with a nice icon.
+  let tab = gBrowser.addTab("about:robots");
+  yield whenBrowserLoaded(tab.linkedBrowser);
+
+  // Check that the tab has an 'image' attribute.
+  ok(tab.hasAttribute("image"), "tab.image exists");
+
+  // Make sure we do not persist 'image' attributes.
+  ss.persistTabAttribute("image");
+  let {attributes} = JSON.parse(ss.getTabState(tab));
+  ok(!("image" in attributes), "'image' attribute not saved");
+  ok(!("custom" in attributes), "'custom' attribute not saved");
+
+  // Test persisting a custom attribute.
+  tab.setAttribute("custom", "foobar");
+  ss.persistTabAttribute("custom");
+
+  let {attributes} = JSON.parse(ss.getTabState(tab));
+  is(attributes.custom, "foobar", "'custom' attribute is correct");
+
+  // Make sure we're backwards compatible and restore old 'image' attributes.
+  let state = {
+    entries: [{url: "about:mozilla"}],
+    attributes: {custom: "foobaz", image: gBrowser.getIcon(tab)}
+  };
+
+  // Prepare a pending tab waiting to be restored.
+  whenTabRestoring(tab);
+  yield ss.setTabState(tab, JSON.stringify(state));
+
+  ok(tab.hasAttribute("pending"), "tab is pending");
+  is(gBrowser.getIcon(tab), state.attributes.image, "tab has correct icon");
+
+  // Let the pending tab load.
+  gBrowser.selectedTab = tab;
+  yield whenBrowserLoaded(tab.linkedBrowser);
+
+  // Ensure no 'image' or 'pending' attributes are stored.
+  let {attributes} = JSON.parse(ss.getTabState(tab));
+  ok(!("image" in attributes), "'image' attribute not saved");
+  ok(!("pending" in attributes), "'pending' attribute not saved");
+  is(attributes.custom, "foobaz", "'custom' attribute is correct");
+
+  // Clean up.
+  gBrowser.removeTab(tab);
+}
+
+function whenTabRestoring(tab) {
+  tab.addEventListener("SSTabRestoring", function onRestoring() {
+    tab.removeEventListener("SSTabRestoring", onRestoring);
+    executeSoon(next);
+  });
+}
--- a/browser/components/shell/test/Makefile.in
+++ b/browser/components/shell/test/Makefile.in
@@ -5,16 +5,14 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DISABLED_XPCSHELL_TESTS	= unit
-
-
-MOCHITEST_BROWSER_FILES = browser_420786.js \
+MOCHITEST_BROWSER_FILES = \
+    browser_420786.js \
     browser_633221.js \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/tabview/test/browser_tabview_bug610242.js
+++ b/browser/components/tabview/test/browser_tabview_bug610242.js
@@ -22,17 +22,17 @@ function onTabViewWindowLoaded(win) {
   let group = new contentWindow.GroupItem([], { bounds: box });
   ok(group.isEmpty(), "This group is empty");
   contentWindow.UI.setActive(group);
   is(contentWindow.GroupItems.getActiveGroupItem(), group, "new group is active");
   
   // Create a bunch of tabs in the group
   let bg = {inBackground: true};
   let datatext = win.gBrowser.loadOneTab("data:text/plain,bug610242", bg);
-  let datahtml = win.gBrowser.loadOneTab("data:text/html,<blink>don't blink!</blink>", bg);
+  let datahtml = win.gBrowser.loadOneTab("data:text/html,<h1>hi!</h1>", bg);
   let mozilla  = win.gBrowser.loadOneTab("about:mozilla", bg);
   let synclog   = win.gBrowser.loadOneTab("about:sync-log", bg);
   let html     = win.gBrowser.loadOneTab("http://example.com", bg);
   let png      = win.gBrowser.loadOneTab("http://mochi.test:8888/browser/browser/base/content/test/moz.png", bg);
   let svg      = win.gBrowser.loadOneTab("http://mochi.test:8888/browser/browser/base/content/test/title_test.svg", bg);
   
   ok(!group.shouldStack(group._children.length), "Group should not stack.");
   
--- a/browser/config/version.txt
+++ b/browser/config/version.txt
@@ -1,1 +1,1 @@
-23.0a1
+24.0a1
--- a/browser/devtools/commandline/BuiltinCommands.jsm
+++ b/browser/devtools/commandline/BuiltinCommands.jsm
@@ -17,17 +17,17 @@ Cu.import("resource://gre/modules/common
 Cu.import("resource://gre/modules/osfile.jsm")
 
 Cu.import("resource://gre/modules/devtools/gcli.jsm");
 Cu.import("resource:///modules/devtools/shared/event-emitter.js");
 
 XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
                                   "resource:///modules/devtools/gDevTools.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "devtools",
-                                  "resource:///modules/devtools/gDevTools.jsm");
+                                  "resource://gre/modules/devtools/Loader.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "AppCacheUtils",
                                   "resource:///modules/devtools/AppCacheUtils.jsm");
 
 /* CmdAddon ---------------------------------------------------------------- */
 
 (function(module) {
   XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
                                     "resource://gre/modules/AddonManager.jsm");
@@ -1923,17 +1923,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 const { DebuggerServer } = Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {});
 
 /**
  * 'listen' command
  */
 gcli.addCommand({
   name: "listen",
   description: gcli.lookup("listenDesc"),
-  manual: gcli.lookup("listenManual"),
+  manual: gcli.lookupFormat("listenManual2", [BRAND_SHORT_NAME]),
   params: [
     {
       name: "port",
       type: "number",
       get defaultValue() {
         return Services.prefs.getIntPref("devtools.debugger.chrome-debugging-port");
       },
       description: gcli.lookup("listenPortDesc"),
new file mode 100644
--- /dev/null
+++ b/browser/devtools/commandline/gcli.jsm
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2012, Mozilla Foundation and contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+"use strict";
+
+this.EXPORTED_SYMBOLS = [ "gcli" ];
+Components.utils.import("resource://gre/modules/devtools/gcli.jsm");
--- a/browser/devtools/commandline/test/helpers.js
+++ b/browser/devtools/commandline/test/helpers.js
@@ -19,17 +19,17 @@
 
 this.EXPORTED_SYMBOLS = [ 'helpers' ];
 var helpers = {};
 this.helpers = helpers;
 let require = (Cu.import("resource://gre/modules/devtools/Require.jsm", {})).require;
 Components.utils.import("resource://gre/modules/devtools/gcli.jsm", {});
 
 let console = (Cu.import("resource://gre/modules/devtools/Console.jsm", {})).console;
-let TargetFactory = (Cu.import("resource:///modules/devtools/gDevTools.jsm", {})).devtools.TargetFactory;
+let TargetFactory = (Cu.import("resource://gre/modules/devtools/Loader.jsm", {})).devtools.TargetFactory;
 
 let Promise = (Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js", {})).Promise;
 let assert = { ok: ok, is: is, log: info };
 
 var util = require('util/util');
 
 var converters = require('gcli/converters');
 
--- a/browser/devtools/debugger/CmdDebugger.jsm
+++ b/browser/devtools/debugger/CmdDebugger.jsm
@@ -1,24 +1,27 @@
+/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+"use strict";
 
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+
 this.EXPORTED_SYMBOLS = [ ];
 
 Cu.import("resource://gre/modules/devtools/gcli.jsm");
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 
 XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
-                                  "resource:///modules/devtools/gDevTools.jsm");
+  "resource:///modules/devtools/gDevTools.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "console",
-                                  "resource://gre/modules/devtools/Console.jsm");
-
+  "resource://gre/modules/devtools/Console.jsm");
 
 /**
  * 'break' command
  */
 gcli.addCommand({
   name: "break",
   description: gcli.lookup("breakDesc"),
   manual: gcli.lookup("breakManual")
@@ -27,18 +30,18 @@ gcli.addCommand({
 /**
  * 'break list' command
  */
 gcli.addCommand({
   name: "break list",
   description: gcli.lookup("breaklistDesc"),
   returnType: "breakpoints",
   exec: function(args, context) {
-    let panel = getPanel(context, "jsdebugger", {ensure_opened: true});
-    return panel.then(function(dbg) {
+    let dbg = getPanel(context, "jsdebugger", { ensure_opened: true });
+    return dbg.then(function(dbg) {
       let breakpoints = [];
       for (let source in dbg.panelWin.DebuggerView.Sources) {
         for (let { attachment: breakpoint } in source) {
           breakpoints.push({
             url: source.value,
             label: source.label,
             lineNumber: breakpoint.lineNumber,
             lineText: breakpoint.lineText
@@ -101,18 +104,18 @@ var breakListHtml = "" +
       "    <td class='gcli-breakpoint-label'>${breakpoint.label}</td>" +
       "    <td class='gcli-breakpoint-lineText'>" +
       "      ${breakpoint.truncatedLineText}" +
       "    </td>" +
       "    <td>" +
       "      <span class='gcli-out-shortcut'" +
       "            data-command='break del ${breakpoint.index}'" +
       "            onclick='${onclick}'" +
-      "            ondblclick='${ondblclick}'" +
-      "          >" + gcli.lookup("breaklistOutRemove") + "</span>" +
+      "            ondblclick='${ondblclick}'>" +
+      "        " + gcli.lookup("breaklistOutRemove") + "</span>" +
       "    </td>" +
       "  </tr>" +
       " </tbody>" +
       "</table>" +
       "";
 
 var MAX_LINE_TEXT_LENGTH = 30;
 var MAX_LABEL_LENGTH = 20;
@@ -133,25 +136,21 @@ gcli.addCommand({
   name: "break add line",
   description: gcli.lookup("breakaddlineDesc"),
   params: [
     {
       name: "file",
       type: {
         name: "selection",
         data: function(args, context) {
-          let files = [];
           let dbg = getPanel(context, "jsdebugger");
           if (dbg) {
-            let sourcesView = dbg.panelWin.DebuggerView.Sources;
-            for (let item in sourcesView) {
-              files.push(item.value);
-            }
+            return dbg.panelWin.DebuggerView.Sources.values;
           }
-          return files;
+          return [];
         }
       },
       description: gcli.lookup("breakaddlineFileDesc")
     },
     {
       name: "line",
       type: { name: "number", min: 1, step: 10 },
       description: gcli.lookup("breakaddlineLineDesc")
@@ -160,61 +159,59 @@ gcli.addCommand({
   returnType: "string",
   exec: function(args, context) {
     args.type = "line";
 
     let dbg = getPanel(context, "jsdebugger");
     if (!dbg) {
       return gcli.lookup("debuggerStopped");
     }
-    var deferred = context.defer();
+
+    let deferred = context.defer();
     let position = { url: args.file, line: args.line };
     dbg.addBreakpoint(position, function(aBreakpoint, aError) {
       if (aError) {
         deferred.resolve(gcli.lookupFormat("breakaddFailed", [aError]));
         return;
       }
       deferred.resolve(gcli.lookup("breakaddAdded"));
     });
     return deferred.promise;
   }
 });
 
-
 /**
  * 'break del' command
  */
 gcli.addCommand({
   name: "break del",
   description: gcli.lookup("breakdelDesc"),
   params: [
     {
-      name: "breakid",
+      name: "breakIndex",
       type: {
         name: "number",
         min: 0,
         max: function(args, context) {
           let dbg = getPanel(context, "jsdebugger");
-          return dbg == null ?
-              null :
-              Object.keys(dbg.getAllBreakpoints()).length - 1;
+          return dbg == null ? 0 : Object.keys(dbg.getAllBreakpoints()).length - 1;
         },
       },
       description: gcli.lookup("breakdelBreakidDesc")
     }
   ],
   returnType: "string",
   exec: function(args, context) {
     let dbg = getPanel(context, "jsdebugger");
     if (!dbg) {
       return gcli.lookup("debuggerStopped");
     }
 
     let breakpoints = dbg.getAllBreakpoints();
-    let id = Object.keys(breakpoints)[args.breakid];
+    let id = Object.keys(breakpoints)[args.breakIndex];
     if (!id || !(id in breakpoints)) {
       return gcli.lookup("breakNotFound");
     }
 
     let deferred = context.defer();
     try {
       dbg.removeBreakpoint(breakpoints[id], function() {
         deferred.resolve(gcli.lookup("breakdelRemoved"));
@@ -239,29 +236,29 @@ gcli.addCommand({
 /**
  * 'dbg open' command
  */
 gcli.addCommand({
   name: "dbg open",
   description: gcli.lookup("dbgOpen"),
   params: [],
   exec: function(args, context) {
-    return gDevTools.showToolbox(context.environment.target, "jsdebugger").then(function() null);
+    return gDevTools.showToolbox(context.environment.target, "jsdebugger").then(() => null);
   }
 });
 
 /**
  * 'dbg close' command
  */
 gcli.addCommand({
   name: "dbg close",
   description: gcli.lookup("dbgClose"),
   params: [],
   exec: function(args, context) {
-    return gDevTools.closeToolbox(context.environment.target).then(function() null);
+    return gDevTools.closeToolbox(context.environment.target).then(() => null);
   }
 });
 
 /**
  * 'dbg interrupt' command
  */
 gcli.addCommand({
   name: "dbg interrupt",
@@ -383,16 +380,17 @@ gcli.addCommand({
   params: [],
   returnType: "dom",
   exec: function(args, context) {
     let dbg = getPanel(context, "jsdebugger");
     let doc = context.environment.chromeDocument;
     if (!dbg) {
       return gcli.lookup("debuggerClosed");
     }
+
     let sources = dbg._view.Sources.values;
     let div = createXHTMLElement(doc, "div");
     let ol = createXHTMLElement(doc, "ol");
     sources.forEach(function(src) {
       let li = createXHTMLElement(doc, "li");
       li.textContent = src;
       ol.appendChild(li);
     });
@@ -409,26 +407,24 @@ function createXHTMLElement(document, ta
   return document.createElementNS("http://www.w3.org/1999/xhtml", tagname);
 }
 
 /**
  * Helper to find the 'data-command' attribute and call some action on it.
  * @see |updateCommand()| and |executeCommand()|
  */
 function withCommand(element, action) {
-  var command = element.getAttribute("data-command");
+  let command = element.getAttribute("data-command");
   if (!command) {
-    command = element.querySelector("*[data-command]")
-      .getAttribute("data-command");
+    command = element.querySelector("*[data-command]").getAttribute("data-command");
   }
 
   if (command) {
     action(command);
-  }
-  else {
+  } else {
     console.warn("Missing data-command for " + util.findCssSelector(element));
   }
 }
 
 /**
  * Create a handler to update the requisition to contain the text held in the
  * first matching data-command attribute under the currentTarget of the event.
  * @param context Either a Requisition or an ExecutionContext or another object
@@ -457,23 +453,27 @@ function createExecuteHandler(context) {
       });
     });
   }
 }
 
 /**
  * A helper to go from a command context to a debugger panel
  */
-function getPanel(context, id, opts) {
+function getPanel(context, id, options = {}) {
   if (context == null) {
     return undefined;
   }
 
   let target = context.environment.target;
-  if (opts && opts.ensure_opened) {
+  if (options.ensure_opened) {
     return gDevTools.showToolbox(target, id).then(function(toolbox) {
       return toolbox.getPanel(id);
     });
   } else {
     let toolbox = gDevTools.getToolbox(target);
-    return toolbox && toolbox.getPanel(id);
+    if (toolbox) {
+      return toolbox.getPanel(id);
+    } else {
+      return undefined;
+    }
   }
 }
--- a/browser/devtools/debugger/DebuggerPanel.jsm
+++ b/browser/devtools/debugger/DebuggerPanel.jsm
@@ -13,17 +13,17 @@ Cu.import("resource://gre/modules/XPCOMU
 Cu.import("resource:///modules/devtools/shared/event-emitter.js");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
   "resource://gre/modules/commonjs/sdk/core/promise.js");
 
 XPCOMUtils.defineLazyModuleGetter(this, "DebuggerServer",
   "resource://gre/modules/devtools/dbg-server.jsm");
 
-function DebuggerPanel(iframeWindow, toolbox) {
+this.DebuggerPanel = function DebuggerPanel(iframeWindow, toolbox) {
   this.panelWin = iframeWindow;
   this._toolbox = toolbox;
 
   this._view = this.panelWin.DebuggerView;
   this._controller = this.panelWin.DebuggerController;
   this._controller._target = this.target;
   this._bkp = this._controller.Breakpoints;
 
@@ -80,10 +80,10 @@ DebuggerPanel.prototype = {
   },
 
   getBreakpoint: function() {
     return this._bkp.getBreakpoint.apply(this._bkp, arguments);
   },
 
   getAllBreakpoints: function() {
     return this._bkp.store;
-  },
+  }
 };
--- a/browser/devtools/debugger/DebuggerUI.jsm
+++ b/browser/devtools/debugger/DebuggerUI.jsm
@@ -34,34 +34,34 @@ this.DebuggerUI = function DebuggerUI(aW
   this.listenToTabs();
 };
 
 DebuggerUI.prototype = {
   /**
    * Update the status of tool's menuitems and buttons when
    * the user switches tabs.
    */
-  listenToTabs: function DUI_listenToTabs() {
+  listenToTabs: function() {
     let win = this.chromeWindow;
     let tabs = win.gBrowser.tabContainer;
 
     let bound_refreshCommand = this.refreshCommand.bind(this);
     tabs.addEventListener("TabSelect", bound_refreshCommand, true);
 
     win.addEventListener("unload", function onClose(aEvent) {
       win.removeEventListener("unload", onClose, false);
       tabs.removeEventListener("TabSelect", bound_refreshCommand, true);
     }, false);
   },
 
   /**
    * Called by the DebuggerPane to update the Debugger toggle switches with the
    * debugger state.
    */
-  refreshCommand: function DUI_refreshCommand() {
+  refreshCommand: function() {
     let scriptDebugger = this.getDebugger();
     let command = this.chromeWindow.document.getElementById("Tools:Debugger");
     let selectedTab = this.chromeWindow.gBrowser.selectedTab;
 
     if (scriptDebugger && scriptDebugger.ownerTab === selectedTab) {
       command.setAttribute("checked", "true");
     } else {
       command.setAttribute("checked", "false");
@@ -69,66 +69,66 @@ DebuggerUI.prototype = {
   },
 
   /**
    * Starts a debugger for the current tab, or stops it if already started.
    *
    * @return DebuggerPane | null
    *         The script debugger instance if it's started, null if stopped.
    */
-  toggleDebugger: function DUI_toggleDebugger() {
+  toggleDebugger: function() {
     let scriptDebugger = this.findDebugger();
     let selectedTab = this.chromeWindow.gBrowser.selectedTab;
 
     if (scriptDebugger) {
       scriptDebugger.close();
       return null;
     }
     return new DebuggerPane(this, selectedTab);
   },
 
   /**
    * Starts a remote debugger in a new window, or stops it if already started.
    *
    * @return RemoteDebuggerWindow | null
    *         The remote debugger instance if it's started, null if stopped.
    */
-  toggleRemoteDebugger: function DUI_toggleRemoteDebugger() {
+  toggleRemoteDebugger: function() {
     let remoteDebugger = this.getRemoteDebugger();
 
     if (remoteDebugger) {
       remoteDebugger.close();
       return null;
     }
     return new RemoteDebuggerWindow(this);
   },
 
   /**
    * Starts a chrome debugger in a new process, or stops it if already started.
    *
    * @return ChromeDebuggerProcess | null
    *         The chrome debugger instance if it's started, null if stopped.
    */
-  toggleChromeDebugger: function DUI_toggleChromeDebugger(aOnClose, aOnRun) {
+  toggleChromeDebugger: function(aOnClose, aOnRun) {
     let chromeDebugger = this.getChromeDebugger();
 
     if (chromeDebugger) {
       chromeDebugger.close();
       return null;
     }
     return new ChromeDebuggerProcess(this, aOnClose, aOnRun);
   },
 
   /**
    * Gets the current script debugger from any open window.
    *
    * @return DebuggerPane | null
    *         The script debugger instance if it exists, null otherwise.
    */
-  findDebugger: function DUI_findDebugger() {
+  findDebugger: function() {
     let enumerator = Services.wm.getEnumerator("navigator:browser");
     while (enumerator.hasMoreElements()) {
       let chromeWindow = enumerator.getNext().QueryInterface(Ci.nsIDOMWindow);
       let scriptDebugger = chromeWindow.DebuggerUI.getDebugger();
       if (scriptDebugger) {
         return scriptDebugger;
       }
     }
@@ -136,74 +136,74 @@ DebuggerUI.prototype = {
   },
 
   /**
    * Get the current script debugger.
    *
    * @return DebuggerPane | null
    *         The script debugger instance if it exists, null otherwise.
    */
-  getDebugger: function DUI_getDebugger() {
+  getDebugger: function() {
     return '_scriptDebugger' in this ? this._scriptDebugger : null;
   },
 
   /**
    * Get the remote debugger for the current chrome window.
    *
    * @return RemoteDebuggerWindow | null
    *         The remote debugger instance if it exists, null otherwise.
    */
-  getRemoteDebugger: function DUI_getRemoteDebugger() {
+  getRemoteDebugger: function() {
     return '_remoteDebugger' in this ? this._remoteDebugger : null;
   },
 
   /**
    * Get the chrome debugger for the current firefox instance.
    *
    * @return ChromeDebuggerProcess | null
    *         The chrome debugger instance if it exists, null otherwise.
    */
-  getChromeDebugger: function DUI_getChromeDebugger() {
+  getChromeDebugger: function() {
     return '_chromeDebugger' in this ? this._chromeDebugger : null;
   }
 };
 
 /**
  * Creates a pane that will host the debugger.
  *
  * @param DebuggerUI aDebuggerUI
  *        The parent instance creating the new debugger.
  * @param XULElement aTab
  *        The tab in which to create the debugger.
  */
-function DebuggerPane(aDebuggerUI, aTab) {
+this.DebuggerPane = function DebuggerPane(aDebuggerUI, aTab) {
   this.globalUI = aDebuggerUI;
   this._win = aDebuggerUI.chromeWindow;
   this._tab = aTab;
 
   this.close = this.close.bind(this);
   this._initServer();
   this._create();
 }
 
 DebuggerPane.prototype = {
   /**
    * Initializes the debugger server.
    */
-  _initServer: function DP__initServer() {
+  _initServer: function() {
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
       DebuggerServer.addBrowserActors();
     }
   },
 
   /**
    * Creates and initializes the widgets containing the debugger UI.
    */
-  _create: function DP__create() {
+  _create: function() {
     this.globalUI._scriptDebugger = this;
 
     let gBrowser = this._win.gBrowser;
     let ownerDocument = gBrowser.parentNode.ownerDocument;
 
     this._splitter = ownerDocument.createElement("splitter");
     this._splitter.setAttribute("class", "devtools-horizontal-splitter");
 
@@ -233,17 +233,17 @@ DebuggerPane.prototype = {
 
   /**
    * Closes the debugger, removing child nodes and event listeners.
    *
    * @param function aCloseCallback
    *        Clients can pass a close callback to be notified when
    *        the panel successfully closes.
    */
-  close: function DP_close(aCloseCallback) {
+  close: function(aCloseCallback) {
     if (!this.globalUI) {
       return;
     }
     delete this.globalUI._scriptDebugger;
 
     // This method is also used as an event handler, so only
     // use aCloseCallback if it's a function.
     if (typeof aCloseCallback == "function") {
@@ -300,29 +300,29 @@ DebuggerPane.prototype = {
 };
 
 /**
  * Creates a window that will host a remote debugger.
  *
  * @param DebuggerUI aDebuggerUI
  *        The parent instance creating the new debugger.
  */
-function RemoteDebuggerWindow(aDebuggerUI) {
+this.RemoteDebuggerWindow = function RemoteDebuggerWindow(aDebuggerUI) {
   this.globalUI = aDebuggerUI;
   this._win = aDebuggerUI.chromeWindow;
 
   this.close = this.close.bind(this);
   this._create();
 }
 
 RemoteDebuggerWindow.prototype = {
   /**
    * Creates and initializes the widgets containing the remote debugger UI.
    */
-  _create: function DP__create() {
+  _create: function() {
     this.globalUI._remoteDebugger = this;
 
     this._dbgwin = this.globalUI.chromeWindow.open(DBG_XUL,
       L10N.getStr("remoteDebuggerWindowTitle"), "chrome,dependent,resizable");
 
     let self = this;
 
     this._dbgwin.addEventListener("Debugger:Loaded", function dbgLoaded() {
@@ -338,17 +338,17 @@ RemoteDebuggerWindow.prototype = {
     }, true);
 
     this._dbgwin._remoteFlag = true;
   },
 
   /**
    * Closes the remote debugger, along with the parent window if necessary.
    */
-  close: function DP_close() {
+  close: function() {
     if (!this.globalUI) {
       return;
     }
     delete this.globalUI._remoteDebugger;
 
     this._dbgwin.removeEventListener("Debugger:Unloaded", this.close, true);
     this._dbgwin.close();
     this._dbgwin = null;
@@ -385,43 +385,43 @@ RemoteDebuggerWindow.prototype = {
  *
  * @param DebuggerUI aDebuggerUI
  *        The parent instance creating the new debugger.
  * @param function aOnClose
  *        Optional, a function called when the process exits.
  * @param function aOnRun
  *        Optional, a function called when the process starts running.
  */
-function ChromeDebuggerProcess(aDebuggerUI, aOnClose, aOnRun) {
+this.ChromeDebuggerProcess = function ChromeDebuggerProcess(aDebuggerUI, aOnClose, aOnRun) {
   this.globalUI = aDebuggerUI;
   this._win = aDebuggerUI.chromeWindow;
   this._closeCallback = aOnClose;
   this._runCallback = aOnRun;
 
   this._initServer();
   this._initProfile();
   this._create();
 }
 
 ChromeDebuggerProcess.prototype = {
   /**
    * Initializes the debugger server.
    */
-  _initServer: function RDP__initServer() {
+  _initServer: function() {
     if (!DebuggerServer.initialized) {
       DebuggerServer.init();
       DebuggerServer.addBrowserActors();
     }
     DebuggerServer.openListener(Prefs.chromeDebuggingPort);
   },
 
   /**
    * Initializes a profile for the remote debugger process.
    */
-  _initProfile: function RDP__initProfile() {
+  _initProfile: function() {
     let profileService = Cc["@mozilla.org/toolkit/profile-service;1"]
       .createInstance(Ci.nsIToolkitProfileService);
 
     let profileName;
     try {
       // Attempt to get the required chrome debugging profile name string.
       profileName = profileService.selectedProfile.name + CHROME_DEBUGGER_PROFILE_NAME;
     } catch (e) {
@@ -455,17 +455,17 @@ ChromeDebuggerProcess.prototype = {
     // Create a new chrome debugging profile.
     this._dbgProfile = profileService.createProfile(null, null, profileName);
     profileService.flush();
   },
 
   /**
    * Creates and initializes the profile & process for the remote debugger.
    */
-  _create: function RDP__create() {
+  _create: function() {
     this.globalUI._chromeDebugger = this;
 
     let file = Services.dirsvc.get("XREExeF", Ci.nsIFile);
 
     dumpn("Initializing chrome debugging process");
     let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
     process.init(file);
 
@@ -480,17 +480,17 @@ ChromeDebuggerProcess.prototype = {
     if (typeof this._runCallback == "function") {
       this._runCallback.call({}, this);
     }
   },
 
   /**
    * Closes the remote debugger, removing the profile and killing the process.
    */
-  close: function RDP_close() {
+  close: function() {
     dumpn("Closing chrome debugging process");
     if (!this.globalUI) {
       dumpn("globalUI is missing");
       return;
     }
     delete this.globalUI._chromeDebugger;
 
     if (this._dbgProcess.isRunning) {
@@ -515,17 +515,17 @@ ChromeDebuggerProcess.prototype = {
  */
 let L10N = {
   /**
    * L10N shortcut function.
    *
    * @param string aName
    * @return string
    */
-  getStr: function L10N_getStr(aName) {
+  getStr: function(aName) {
     return this.stringBundle.GetStringFromName(aName);
   }
 };
 
 XPCOMUtils.defineLazyGetter(L10N, "stringBundle", function() {
   return Services.strings.createBundle(DBG_STRINGS_URI);
 });
 
--- a/browser/devtools/debugger/debugger-controller.js
+++ b/browser/devtools/debugger/debugger-controller.js
@@ -1,18 +1,16 @@
 /* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
+const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 const DBG_STRINGS_URI = "chrome://browser/locale/devtools/debugger.properties";
 const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "self-hosted"];
 const NEW_SOURCE_DISPLAY_DELAY = 200; // ms
 const FETCH_SOURCE_RESPONSE_DELAY = 50; // ms
 const FRAME_STEP_CLEAR_DELAY = 100; // ms
 const CALL_STACK_PAGE_SIZE = 25; // frames
 
@@ -36,17 +34,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 /**
  * Object defining the debugger controller components.
  */
 let DebuggerController = {
   /**
    * Initializes the debugger controller.
    */
-  initialize: function DC_initialize() {
+  initialize: function() {
     dumpn("Initializing the DebuggerController");
 
     this.startupDebugger = this.startupDebugger.bind(this);
     this.shutdownDebugger = this.shutdownDebugger.bind(this);
     this._onTabNavigated = this._onTabNavigated.bind(this);
     this._onTabDetached = this._onTabDetached.bind(this);
 
     // Chrome debugging lives in a different process and needs to handle
@@ -58,17 +56,17 @@ let DebuggerController = {
   },
 
   /**
    * Initializes the view.
    *
    * @return object
    *         A promise that is resolved when the debugger finishes startup.
    */
-  startupDebugger: function DC_startupDebugger() {
+  startupDebugger: function() {
     if (this._isInitialized) {
       return this._startup.promise;
     }
     this._isInitialized = true;
     window.removeEventListener("DOMContentLoaded", this.startupDebugger, true);
 
     let deferred = this._startup = Promise.defer();
 
@@ -87,17 +85,17 @@ let DebuggerController = {
   },
 
   /**
    * Destroys the view and disconnects the debugger client from the server.
    *
    * @return object
    *         A promise that is resolved when the debugger finishes shutdown.
    */
-  shutdownDebugger: function DC__shutdownDebugger() {
+  shutdownDebugger: function() {
     if (this._isDestroyed) {
       return this._shutdown.promise;
     }
     this._isDestroyed = true;
     this._startup = null;
     window.removeEventListener("unload", this.shutdownDebugger, true);
 
     let deferred = this._shutdown = Promise.defer();
@@ -123,17 +121,17 @@ let DebuggerController = {
    * wiring event handlers as necessary.
    *
    * In case of a chrome debugger living in a different process, a socket
    * connection pipe is opened as well.
    *
    * @return object
    *         A promise that is resolved when the debugger finishes connecting.
    */
-  connect: function DC_connect() {
+  connect: function() {
     if (this._connection) {
       return this._connection.promise;
     }
 
     let deferred = this._connection = Promise.defer();
 
     if (!window._isChromeDebugger) {
       let target = this._target;
@@ -166,17 +164,17 @@ let DebuggerController = {
     });
 
     return deferred.promise;
   },
 
   /**
    * Disconnects the debugger client and removes event handlers as necessary.
    */
-  disconnect: function DC_disconnect() {
+  disconnect: function() {
     // Return early if the client didn't even have a chance to instantiate.
     if (!this.client) {
       return;
     }
 
     // When debugging local or a remote instance, the connection is closed by
     // the RemoteTarget.
     if (window._isChromeDebugger) {
@@ -193,17 +191,17 @@ let DebuggerController = {
   /**
    * Called for each location change in the debugged tab.
    *
    * @param string aType
    *        Packet type.
    * @param object aPacket
    *        Packet received from the server.
    */
-  _onTabNavigated: function DC__onTabNavigated(aType, aPacket) {
+  _onTabNavigated: function(aType, aPacket) {
     if (aType == "will-navigate") {
       DebuggerView._handleTabNavigation();
 
       // Discard all the old sources.
       DebuggerController.SourceScripts.clearCache();
       DebuggerController.Parser.clearCache();
       SourceUtils.clearCache();
       return;
@@ -212,31 +210,31 @@ let DebuggerController = {
     this.ThreadState._handleTabNavigation();
     this.StackFrames._handleTabNavigation();
     this.SourceScripts._handleTabNavigation();
   },
 
   /**
    * Called when the debugged tab is closed.
    */
-  _onTabDetached: function DC__onTabDetached() {
+  _onTabDetached: function() {
     this.shutdownDebugger();
   },
 
   /**
    * Sets up a debugging session.
    *
    * @param DebuggerClient aClient
    *        The debugger client.
    * @param string aThreadActor
    *        The remote protocol grip of the tab.
    * @param function aCallback
    *        A function to invoke once the client attached to the active thread.
    */
-  _startDebuggingTab: function DC__startDebuggingTab(aClient, aThreadActor, aCallback) {
+  _startDebuggingTab: function(aClient, aThreadActor, aCallback) {
     if (!aClient) {
       Cu.reportError("No client found!");
       return;
     }
     this.client = aClient;
 
     aClient.attachThread(aThreadActor, (aResponse, aThreadClient) => {
       if (!aThreadClient) {
@@ -254,33 +252,33 @@ let DebuggerController = {
         aCallback();
       }
     }, { useSourceMaps: Prefs.sourceMapsEnabled });
   },
 
   /**
    * Warn if resuming execution produced a wrongOrder error.
    */
-  _ensureResumptionOrder: function DC__ensureResumptionOrder(aResponse) {
+  _ensureResumptionOrder: function(aResponse) {
     if (aResponse.error == "wrongOrder") {
       DebuggerView.Toolbar.showResumeWarning(aResponse.lastPausedUrl);
     }
   },
 
   /**
    * Sets up a chrome debugging session.
    *
    * @param DebuggerClient aClient
    *        The debugger client.
    * @param object aChromeDebugger
    *        The remote protocol grip of the chrome debugger.
    * @param function aCallback
    *        A function to invoke once the client attached to the active thread.
    */
-  _startChromeDebugging: function DC__startChromeDebugging(aClient, aChromeDebugger, aCallback) {
+  _startChromeDebugging: function(aClient, aChromeDebugger, aCallback) {
     if (!aClient) {
       Cu.reportError("No client found!");
       return;
     }
     this.client = aClient;
 
     aClient.attachThread(aChromeDebugger, (aResponse, aThreadClient) => {
       if (!aThreadClient) {
@@ -299,17 +297,17 @@ let DebuggerController = {
       }
     }, { useSourceMaps: Prefs.sourceMapsEnabled });
   },
 
   /**
    * Detach and reattach to the thread actor with useSourceMaps true, blow
    * away old scripts and get sources again.
    */
-  reconfigureThread: function DC_reconfigureThread(aUseSourceMaps) {
+  reconfigureThread: function(aUseSourceMaps) {
     this.client.reconfigureThread(aUseSourceMaps, (aResponse) => {
       if (aResponse.error) {
         let msg = "Couldn't reconfigure thread: " + aResponse.message;
         Cu.reportError(msg);
         dumpn(msg);
         return;
       }
 
@@ -321,17 +319,17 @@ let DebuggerController = {
       this.activeThread._clearFrames();
       this.activeThread.fillFrames(CALL_STACK_PAGE_SIZE);
     });
   },
 
   /**
    * Attempts to quit the current process if allowed.
    */
-  _quitApp: function DC__quitApp() {
+  _quitApp: function() {
     let canceled = Cc["@mozilla.org/supports-PRBool;1"]
       .createInstance(Ci.nsISupportsPRBool);
 
     Services.obs.notifyObservers(canceled, "quit-application-requested", null);
 
     // Somebody canceled our quit request.
     if (canceled.data) {
       return;
@@ -357,51 +355,51 @@ function ThreadState() {
 }
 
 ThreadState.prototype = {
   get activeThread() DebuggerController.activeThread,
 
   /**
    * Connect to the current thread client.
    */
-  connect: function TS_connect() {
+  connect: function() {
     dumpn("ThreadState is connecting...");
     this.activeThread.addListener("paused", this._update);
     this.activeThread.addListener("resumed", this._update);
     this.activeThread.pauseOnExceptions(Prefs.pauseOnExceptions);
     this._handleTabNavigation();
   },
 
   /**
    * Disconnect from the client.
    */
-  disconnect: function TS_disconnect() {
+  disconnect: function() {
     if (!this.activeThread) {
       return;
     }
     dumpn("ThreadState is disconnecting...");
     this.activeThread.removeListener("paused", this._update);
     this.activeThread.removeListener("resumed", this._update);
   },
 
   /**
    * Handles any initialization on a tab navigation event issued by the client.
    */
-  _handleTabNavigation: function TS__handleTabNavigation() {
+  _handleTabNavigation: function() {
     if (!this.activeThread) {
       return;
     }
     dumpn("Handling tab navigation in the ThreadState");
     this._update();
   },
 
   /**
    * Update the UI after a thread state change.
    */
-  _update: function TS__update(aEvent) {
+  _update: function(aEvent) {
     DebuggerView.Toolbar.toggleResumeButtonState(this.activeThread.state);
 
     if (DebuggerController._target && (aEvent == "paused" || aEvent == "resumed")) {
       DebuggerController._target.emit("thread-" + aEvent);
     }
   }
 };
 
@@ -429,56 +427,56 @@ StackFrames.prototype = {
   currentWatchExpressions: null,
   currentBreakpointLocation: null,
   currentEvaluation: null,
   currentException: null,
 
   /**
    * Connect to the current thread client.
    */
-  connect: function SF_connect() {
+  connect: function() {
     dumpn("StackFrames is connecting...");
     this.activeThread.addListener("paused", this._onPaused);
     this.activeThread.addListener("resumed", this._onResumed);
     this.activeThread.addListener("framesadded", this._onFrames);
     this.activeThread.addListener("framescleared", this._onFramesCleared);
     this._handleTabNavigation();
   },
 
   /**
    * Disconnect from the client.
    */
-  disconnect: function SF_disconnect() {
+  disconnect: function() {
     if (!this.activeThread) {
       return;
     }
     dumpn("StackFrames is disconnecting...");
     this.activeThread.removeListener("paused", this._onPaused);
     this.activeThread.removeListener("resumed", this._onResumed);
     this.activeThread.removeListener("framesadded", this._onFrames);
     this.activeThread.removeListener("framescleared", this._onFramesCleared);
   },
 
   /**
    * Handles any initialization on a tab navigation event issued by the client.
    */
-  _handleTabNavigation: function SF__handleTabNavigation() {
+  _handleTabNavigation: function() {
     dumpn("Handling tab navigation in the StackFrames");
     // Nothing to do here yet.
   },
 
   /**
    * Handler for the thread client's paused notification.
    *
    * @param string aEvent
    *        The name of the notification ("paused" in this case).
    * @param object aPacket
    *        The response packet.
    */
-  _onPaused: function SF__onPaused(aEvent, aPacket) {
+  _onPaused: function(aEvent, aPacket) {
     switch (aPacket.why.type) {
       // If paused by a breakpoint, store the breakpoint location.
       case "breakpoint":
         this.currentBreakpointLocation = aPacket.frame.where;
         break;
       // If paused by a client evaluation, store the evaluated value.
       case "clientEvaluated":
         this.currentEvaluation = aPacket.why.frameFinished;
@@ -491,29 +489,29 @@ StackFrames.prototype = {
 
     this.activeThread.fillFrames(CALL_STACK_PAGE_SIZE);
     DebuggerView.editor.focus();
   },
 
   /**
    * Handler for the thread client's resumed notification.
    */
-  _onResumed: function SF__onResumed() {
+  _onResumed: function() {
     DebuggerView.editor.setDebugLocation(-1);
 
     // Prepare the watch expression evaluation string for the next pause.
     if (!this._isWatchExpressionsEvaluation) {
       this.currentWatchExpressions = this.syncedWatchExpressions;
     }
   },
 
   /**
    * Handler for the thread client's framesadded notification.
    */
-  _onFrames: function SF__onFrames() {
+  _onFrames: function() {
     // Ignore useless notifications.
     if (!this.activeThread.cachedFrames.length) {
       return;
     }
 
     // Conditional breakpoints are { breakpoint, expression } tuples. The
     // boolean evaluation of the expression decides if the active thread
     // automatically resumes execution or not.
@@ -586,33 +584,33 @@ StackFrames.prototype = {
     if (this.activeThread.moreFrames) {
       DebuggerView.StackFrames.dirty = true;
     }
   },
 
   /**
    * Handler for the thread client's framescleared notification.
    */
-  _onFramesCleared: function SF__onFramesCleared() {
+  _onFramesCleared: function() {
     this.currentFrame = null;
     this.currentWatchExpressions = null;
     this.currentBreakpointLocation = null;
     this.currentEvaluation = null;
     this.currentException = null;
     // After each frame step (in, over, out), framescleared is fired, which
     // forces the UI to be emptied and rebuilt on framesadded. Most of the times
     // this is not necessary, and will result in a brief redraw flicker.
     // To avoid it, invalidate the UI only after a short time if necessary.
     window.setTimeout(this._afterFramesCleared, FRAME_STEP_CLEAR_DELAY);
   },
 
   /**
    * Called soon after the thread client's framescleared notification.
    */
-  _afterFramesCleared: function SF__afterFramesCleared() {
+  _afterFramesCleared: function() {
     // Ignore useless notifications.
     if (this.activeThread.cachedFrames.length) {
       return;
     }
     DebuggerView.StackFrames.empty();
     DebuggerView.Sources.unhighlightBreakpoint();
     DebuggerView.WatchExpressions.toggleContents(true);
     DebuggerView.Variables.empty(0);
@@ -621,17 +619,17 @@ StackFrames.prototype = {
 
   /**
    * Marks the stack frame at the specified depth as selected and updates the
    * properties view with the stack frame's data.
    *
    * @param number aDepth
    *        The depth of the frame in the stack.
    */
-  selectFrame: function SF_selectFrame(aDepth) {
+  selectFrame: function(aDepth) {
     let frame = this.activeThread.cachedFrames[this.currentFrame = aDepth];
     if (!frame) {
       return;
     }
     let { environment, watchExpressionsEvaluation } = frame;
     let { url, line } = frame.where;
 
     // Check if the frame does not represent the evaluation of debuggee code.
@@ -699,17 +697,17 @@ StackFrames.prototype = {
    * Adds an 'onexpand' callback for a scope, lazily handling
    * the addition of new variables.
    *
    * @param Scope aScope
    *        The scope where the variables will be placed into.
    * @param object aEnv
    *        The scope's environment.
    */
-  _addScopeExpander: function SF__addScopeExpander(aScope, aEnv) {
+  _addScopeExpander: function(aScope, aEnv) {
     aScope._sourceEnvironment = aEnv;
 
     // It's a good idea to be prepared in case of an expansion.
     aScope.addEventListener("mouseover", this._fetchScopeVariables, false);
     // Make sure that variables are always available on expansion.
     aScope.onexpand = this._fetchScopeVariables;
   },
 
@@ -717,17 +715,17 @@ StackFrames.prototype = {
    * Adds an 'onexpand' callback for a variable, lazily handling
    * the addition of new properties.
    *
    * @param Variable aVar
    *        The variable where the properties will be placed into.
    * @param any aGrip
    *        The grip of the variable.
    */
-  _addVarExpander: function SF__addVarExpander(aVar, aGrip) {
+  _addVarExpander: function(aVar, aGrip) {
     // No need for expansion for primitive values.
     if (VariablesView.isPrimitive({ value: aGrip })) {
       return;
     }
     aVar._sourceGrip = aGrip;
 
     // Some variables are likely to contain a very large number of properties.
     // It's a good idea to be prepared in case of an expansion.
@@ -741,25 +739,25 @@ StackFrames.prototype = {
   /**
    * Adds the watch expressions evaluation results to a scope in the view.
    *
    * @param Scope aScope
    *        The scope where the watch expressions will be placed into.
    * @param object aExp
    *        The grip of the evaluation results.
    */
-  _fetchWatchExpressions: function SF__fetchWatchExpressions(aScope, aExp) {
+  _fetchWatchExpressions: function(aScope, aExp) {
     // Fetch the expressions only once.
     if (aScope._fetched) {
       return;
     }
     aScope._fetched = true;
 
     // Add nodes for every watch expression in scope.
-    this.activeThread.pauseGrip(aExp).getPrototypeAndProperties(function(aResponse) {
+    this.activeThread.pauseGrip(aExp).getPrototypeAndProperties((aResponse) => {
       let ownProperties = aResponse.ownProperties;
       let totalExpressions = DebuggerView.WatchExpressions.itemCount;
 
       for (let i = 0; i < totalExpressions; i++) {
         let name = DebuggerView.WatchExpressions.getExpression(i);
         let expVal = ownProperties[i].value;
         let expRef = aScope.addVar(name, ownProperties[i]);
         this._addVarExpander(expRef, expVal);
@@ -769,47 +767,47 @@ StackFrames.prototype = {
         expRef.delete = null;
         expRef.descriptorTooltip = true;
         expRef.separatorStr = L10N.getStr("variablesSeparatorLabel");
       }
 
       // Signal that watch expressions have been fetched.
       window.dispatchEvent(document, "Debugger:FetchedWatchExpressions");
       DebuggerView.Variables.commitHierarchy();
-    }.bind(this));
+    });
   },
 
   /**
    * Adds variables to a scope in the view. Triggered when a scope is
    * expanded or is hovered. It does not expand the scope.
    *
    * @param Scope aScope
    *        The scope where the variables will be placed into.
    */
-  _fetchScopeVariables: function SF__fetchScopeVariables(aScope) {
+  _fetchScopeVariables: function(aScope) {
     // Fetch the variables only once.
     if (aScope._fetched) {
       return;
     }
     aScope._fetched = true;
     let env = aScope._sourceEnvironment;
 
     switch (env.type) {
       case "with":
       case "object":
         // Add nodes for every variable in scope.
-        this.activeThread.pauseGrip(env.object).getPrototypeAndProperties(function(aResponse) {
+        this.activeThread.pauseGrip(env.object).getPrototypeAndProperties((aResponse) => {
           let { ownProperties, safeGetterValues } = aResponse;
           this._mergeSafeGetterValues(ownProperties, safeGetterValues);
           this._insertScopeVariables(ownProperties, aScope);
 
           // Signal that variables have been fetched.
           window.dispatchEvent(document, "Debugger:FetchedVariables");
           DebuggerView.Variables.commitHierarchy();
-        }.bind(this));
+        });
         break;
       case "block":
       case "function":
         // Add nodes for every argument and every other variable in scope.
         this._insertScopeArguments(env.bindings.arguments, aScope);
         this._insertScopeVariables(env.bindings.variables, aScope);
 
         // No need to signal that variables have been fetched, since
@@ -825,17 +823,17 @@ StackFrames.prototype = {
   /**
    * Add nodes for special frame references in the innermost scope.
    *
    * @param Scope aScope
    *        The scope where the references will be placed into.
    * @param object aFrame
    *        The frame to get some references from.
    */
-  _insertScopeFrameReferences: function SF__insertScopeFrameReferences(aScope, aFrame) {
+  _insertScopeFrameReferences: function(aScope, aFrame) {
     // Add any thrown exception.
     if (this.currentException) {
       let excRef = aScope.addVar("<exception>", { value: this.currentException });
       this._addVarExpander(excRef, this.currentException);
     }
     // Add "this".
     if (aFrame.this) {
       let thisRef = aScope.addVar("this", { value: aFrame.this });
@@ -846,17 +844,17 @@ StackFrames.prototype = {
   /**
    * Add nodes for every argument in scope.
    *
    * @param object aArguments
    *        The map of names to arguments, as specified in the protocol.
    * @param Scope aScope
    *        The scope where the nodes will be placed into.
    */
-  _insertScopeArguments: function SF__insertScopeArguments(aArguments, aScope) {
+  _insertScopeArguments: function(aArguments, aScope) {
     if (!aArguments) {
       return;
     }
     for (let argument of aArguments) {
       let name = Object.getOwnPropertyNames(argument)[0];
       let argRef = aScope.addVar(name, argument[name]);
       let argVal = argument[name].value;
       this._addVarExpander(argRef, argVal);
@@ -866,17 +864,17 @@ StackFrames.prototype = {
   /**
    * Add nodes for every variable in scope.
    *
    * @param object aVariables
    *        The map of names to variables, as specified in the protocol.
    * @param Scope aScope
    *        The scope where the nodes will be placed into.
    */
-  _insertScopeVariables: function SF__insertScopeVariables(aVariables, aScope) {
+  _insertScopeVariables: function(aVariables, aScope) {
     if (!aVariables) {
       return;
     }
     let variableNames = Object.keys(aVariables);
 
     // Sort all of the variables before adding them, if preferred.
     if (Prefs.variablesSortingEnabled) {
       variableNames.sort();
@@ -891,25 +889,25 @@ StackFrames.prototype = {
 
   /**
    * Adds properties to a variable in the view. Triggered when a variable is
    * expanded or certain variables are hovered. It does not expand the variable.
    *
    * @param Variable aVar
    *        The variable where the properties will be placed into.
    */
-  _fetchVarProperties: function SF__fetchVarProperties(aVar) {
+  _fetchVarProperties: function(aVar) {
     // Fetch the properties only once.
     if (aVar._fetched) {
       return;
     }
     aVar._fetched = true;
     let grip = aVar._sourceGrip;
 
-    this.activeThread.pauseGrip(grip).getPrototypeAndProperties(function(aResponse) {
+    this.activeThread.pauseGrip(grip).getPrototypeAndProperties((aResponse) => {
       let { ownProperties, prototype, safeGetterValues } = aResponse;
       let sortable = VariablesView.NON_SORTABLE_CLASSES.indexOf(grip.class) == -1;
 
       this._mergeSafeGetterValues(ownProperties, safeGetterValues);
 
       // Add all the variable properties.
       if (ownProperties) {
         aVar.addProperties(ownProperties, {
@@ -928,73 +926,71 @@ StackFrames.prototype = {
       }
 
       // Mark the variable as having retrieved all its properties.
       aVar._retrieved = true;
 
       // Signal that properties have been fetched.
       window.dispatchEvent(document, "Debugger:FetchedProperties");
       DebuggerView.Variables.commitHierarchy();
-    }.bind(this));
+    });
   },
 
   /**
    * Merge the safe getter values descriptors into the "own properties" object
    * that comes from a "prototypeAndProperties" response packet. This is needed
    * for Variables View.
    *
    * @private
    * @param object aOwnProperties
    *        The |ownProperties| object that will get the new safe getter values.
    * @param object aSafeGetterValues
    *        The |safeGetterValues| object.
    */
-  _mergeSafeGetterValues:
-  function SF__mergeSafeGetterValues(aOwnProperties, aSafeGetterValues) {
+  _mergeSafeGetterValues: function(aOwnProperties, aSafeGetterValues) {
     // Merge the safe getter values into one object such that we can use it
     // in VariablesView.
     for (let name of Object.keys(aSafeGetterValues)) {
       if (name in aOwnProperties) {
         aOwnProperties[name].getterValue = aSafeGetterValues[name].getterValue;
-        aOwnProperties[name].getterPrototypeLevel = aSafeGetterValues[name]
-                                                    .getterPrototypeLevel;
-      }
-      else {
+        aOwnProperties[name].getterPrototypeLevel =
+          aSafeGetterValues[name].getterPrototypeLevel;
+      } else {
         aOwnProperties[name] = aSafeGetterValues[name];
       }
     }
   },
 
   /**
    * Adds the specified stack frame to the list.
    *
    * @param object aFrame
    *        The new frame to add.
    */
-  _addFrame: function SF__addFrame(aFrame) {
+  _addFrame: function(aFrame) {
     let depth = aFrame.depth;
     let { url, line } = aFrame.where;
     let frameLocation = NetworkHelper.convertToUnicode(unescape(url));
     let frameTitle = StackFrameUtils.getFrameTitle(aFrame);
 
     DebuggerView.StackFrames.addFrame(frameTitle, frameLocation, line, depth);
   },
 
   /**
    * Loads more stack frames from the debugger server cache.
    */
-  addMoreFrames: function SF_addMoreFrames() {
+  addMoreFrames: function() {
     this.activeThread.fillFrames(
       this.activeThread.cachedFrames.length + CALL_STACK_PAGE_SIZE);
   },
 
   /**
    * Updates a list of watch expressions to evaluate on each pause.
    */
-  syncWatchExpressions: function SF_syncWatchExpressions() {
+  syncWatchExpressions: function() {
     let list = DebuggerView.WatchExpressions.getExpressions();
 
     // Sanity check all watch expressions before syncing them. To avoid
     // having the whole watch expressions array throw because of a single
     // faulty expression, simply convert it to a string describing the error.
     // There's no other information necessary to be offered in such cases.
     let sanitizedExpressions = list.map(function(str) {
       // Reflect.parse throws when it encounters a syntax error.
@@ -1035,17 +1031,17 @@ StackFrames.prototype = {
    * Evaluate an expression in the context of the selected frame. This is used
    * for modifying the value of variables or properties in scope.
    *
    * @param string aExpression
    *        The expression to evaluate.
    * @param number aFrame [optional]
    *        The frame depth used for evaluation.
    */
-  evaluate: function SF_evaluate(aExpression, aFrame = this.currentFrame || 0) {
+  evaluate: function(aExpression, aFrame = this.currentFrame || 0) {
     let frame = this.activeThread.cachedFrames[aFrame];
     this.activeThread.eval(frame.actor, aExpression);
   }
 };
 
 /**
  * Keeps the source script list up-to-date, using the thread client's
  * source script cache.
@@ -1063,63 +1059,63 @@ function SourceScripts() {
 SourceScripts.prototype = {
   get activeThread() DebuggerController.activeThread,
   get debuggerClient() DebuggerController.client,
   _newSourceTimeout: null,
 
   /**
    * Connect to the current thread client.
    */
-  connect: function SS_connect() {
+  connect: function() {
     dumpn("SourceScripts is connecting...");
     this.debuggerClient.addListener("newGlobal", this._onNewGlobal);
     this.debuggerClient.addListener("newSource", this._onNewSource);
     this._handleTabNavigation();
   },
 
   /**
    * Disconnect from the client.
    */
-  disconnect: function SS_disconnect() {
+  disconnect: function() {
     if (!this.activeThread) {
       return;
     }
     dumpn("SourceScripts is disconnecting...");
     window.clearTimeout(this._newSourceTimeout);
     this.debuggerClient.removeListener("newGlobal", this._onNewGlobal);
     this.debuggerClient.removeListener("newSource", this._onNewSource);
   },
 
   /**
    * Handles any initialization on a tab navigation event issued by the client.
    */
-  _handleTabNavigation: function SS__handleTabNavigation() {
+  _handleTabNavigation: function() {
     if (!this.activeThread) {
       return;
     }
     dumpn("Handling tab navigation in the SourceScripts");
     window.clearTimeout(this._newSourceTimeout);
 
     // Retrieve the list of script sources known to the server from before
     // the client was ready to handle "newSource" notifications.
     this.activeThread.getSources(this._onSourcesAdded);
   },
 
   /**
    * Handler for the debugger client's unsolicited newGlobal notification.
    */
-  _onNewGlobal: function SS__onNewGlobal(aNotification, aPacket) {
+  _onNewGlobal: function(aNotification, aPacket) {
     // TODO: bug 806775, update the globals list using aPacket.hostAnnotations
     // from bug 801084.
   },
 
   /**
    * Handler for the debugger client's unsolicited newSource notification.
    */
-  _onNewSource: function SS__onNewSource(aNotification, aPacket) {
+  _onNewSource: function(aNotification, aPacket) {
     // Ignore bogus scripts, e.g. generated from 'clientEvaluate' packets.
     if (NEW_SOURCE_IGNORED_URLS.indexOf(aPacket.source.url) != -1) {
       return;
     }
 
     // Add the source in the debugger view sources container.
     DebuggerView.Sources.addSource(aPacket.source, { staged: false });
 
@@ -1149,17 +1145,17 @@ SourceScripts.prototype = {
 
     // Signal that a new script has been added.
     window.dispatchEvent(document, "Debugger:AfterNewSource");
   },
 
   /**
    * Callback for the debugger's active thread getSources() method.
    */
-  _onSourcesAdded: function SS__onSourcesAdded(aResponse) {
+  _onSourcesAdded: function(aResponse) {
     if (aResponse.error) {
       Cu.reportError(new Error("Error getting sources: " + aResponse.message));
       return;
     }
 
     // Add all the sources in the debugger view sources container.
     for (let source of aResponse.sources) {
       // Ignore bogus scripts, e.g. generated from 'clientEvaluate' packets.
@@ -1198,17 +1194,17 @@ SourceScripts.prototype = {
    *
    * @param object aSource
    *        The source object coming from the active thread.
    * @param function aCallback
    *        Function called after the source text has been loaded.
    * @param function aTimeout
    *        Function called when the source text takes too long to fetch.
    */
-  getText: function SS_getText(aSource, aCallback, aTimeout) {
+  getText: function(aSource, aCallback, aTimeout) {
     // If already loaded, return the source text immediately.
     if (aSource.loaded) {
       aCallback(aSource);
       return;
     }
 
     // If the source text takes too long to fetch, invoke a timeout to
     // avoid blocking any operations.
@@ -1235,43 +1231,43 @@ SourceScripts.prototype = {
   },
 
   /**
    * Gets all the fetched sources.
    *
    * @return array
    *         An array containing [url, text] entries for the fetched sources.
    */
-  getCache: function SS_getCache() {
+  getCache: function() {
     let sources = [];
     for (let source of this._cache) {
       sources.push(source);
     }
     return sources.sort(([first], [second]) => first > second);
   },
 
   /**
    * Clears all the fetched sources from cache.
    */
-  clearCache: function SS_clearCache() {
+  clearCache: function() {
     this._cache.clear();
   },
 
   /**
    * Starts fetching all the sources, silently.
    *
    * @param array aUrls
    *        The urls for the sources to fetch.
    * @param object aCallbacks [optional]
    *        An object containing the callback functions to invoke:
    *          - onFetch: optional, called after each source is fetched
    *          - onTimeout: optional, called when a source takes too long to fetch
    *          - onFinished: called when all the sources are fetched
    */
-  fetchSources: function SS_fetchSources(aUrls, aCallbacks = {}) {
+  fetchSources: function(aUrls, aCallbacks = {}) {
     this._fetchQueue = new Set();
     this._fetchCallbacks = aCallbacks;
 
     // Add each new source which needs to be fetched in a queue.
     for (let url of aUrls) {
       if (!this._cache.has(url)) {
         this._fetchQueue.add(url);
       }
@@ -1292,17 +1288,17 @@ SourceScripts.prototype = {
   },
 
   /**
    * Called when a source has been fetched via fetchSources().
    *
    * @param object aSource
    *        The source object coming from the active thread.
    */
-  _onFetch: function SS__onFetch(aSource) {
+  _onFetch: function(aSource) {
     // Remember the source in a cache so we don't have to fetch it again.
     this._cache.set(aSource.url, aSource.text);
 
     // Fetch completed before timeout, remove the source from the fetch queue.
     this._fetchQueue.delete(aSource.url);
 
     // If this fetch was eventually completed at some point after a timeout,
     // don't call any subsequent event listeners.
@@ -1322,17 +1318,17 @@ SourceScripts.prototype = {
   },
 
   /**
    * Called when a source's text takes too long to fetch via fetchSources().
    *
    * @param object aSource
    *        The source object coming from the active thread.
    */
-  _onTimeout: function SS__onTimeout(aSource) {
+  _onTimeout: function(aSource) {
     // Remove the source from the fetch queue.
     this._fetchQueue.delete(aSource.url);
 
     // Invoke the source timeout callback if provided via fetchSources();
     if (this._fetchCallbacks.onTimeout) {
       this._fetchCallbacks.onTimeout(aSource);
     }
 
@@ -1340,17 +1336,17 @@ SourceScripts.prototype = {
     if (this._fetchQueue.size == 0) {
       this._onFinished();
     }
   },
 
   /**
    * Called when all the sources have been fetched.
    */
-  _onFinished: function SS__onFinished() {
+  _onFinished: function() {
     // Invoke the finish callback if provided via fetchSources();
     if (this._fetchCallbacks.onFinished) {
       this._fetchCallbacks.onFinished();
     }
   },
 
   _cache: null,
   _fetchQueue: null,
@@ -1393,106 +1389,106 @@ Breakpoints.prototype = {
    * This implementation relies on the fact that the source editor fires the
    * BREAKPOINT_CHANGE events synchronously.
    */
   _skipEditorBreakpointCallbacks: false,
 
   /**
    * Adds the source editor breakpoint handlers.
    */
-  initialize: function BP_initialize() {
+  initialize: function() {
     this.editor.addEventListener(
       SourceEditor.EVENTS.BREAKPOINT_CHANGE, this._onEditorBreakpointChange);
   },
 
   /**
    * Removes the source editor breakpoint handlers & all the added breakpoints.
    */
-  destroy: function BP_destroy() {
+  destroy: function() {
     this.editor.removeEventListener(
       SourceEditor.EVENTS.BREAKPOINT_CHANGE, this._onEditorBreakpointChange);
 
     for each (let breakpointClient in this.store) {
       this.removeBreakpoint(breakpointClient);
     }
   },
 
   /**
    * Event handler for breakpoint changes that happen in the editor. This
    * function syncs the breakpoints in the editor to those in the debugger.
    *
    * @param object aEvent
    *        The SourceEditor.EVENTS.BREAKPOINT_CHANGE event object.
    */
-  _onEditorBreakpointChange: function BP__onEditorBreakpointChange(aEvent) {
+  _onEditorBreakpointChange: function(aEvent) {
     if (this._skipEditorBreakpointCallbacks) {
       return;
     }
     this._skipEditorBreakpointCallbacks = true;
     aEvent.added.forEach(this._onEditorBreakpointAdd, this);
     aEvent.removed.forEach(this._onEditorBreakpointRemove, this);
     this._skipEditorBreakpointCallbacks = false;
   },
 
   /**
    * Event handler for new breakpoints that come from the editor.
    *
    * @param object aEditorBreakpoint
    *        The breakpoint object coming from the editor.
    */
-  _onEditorBreakpointAdd: function BP__onEditorBreakpointAdd(aEditorBreakpoint) {
+  _onEditorBreakpointAdd: function(aEditorBreakpoint) {
     let url = DebuggerView.Sources.selectedValue;
     let line = aEditorBreakpoint.line + 1;
 
-    this.addBreakpoint({ url: url, line: line }, function(aBreakpointClient) {
+    this.addBreakpoint({ url: url, line: line }, (aBreakpointClient) => {
       // If the breakpoint client has an "actualLocation" attached, then
       // the original requested placement for the breakpoint wasn't accepted.
       // In this case, we need to update the editor with the new location.
       if (aBreakpointClient.actualLocation) {
         this.editor.removeBreakpoint(line - 1);
         this.editor.addBreakpoint(aBreakpointClient.actualLocation.line - 1);
       }
-    }.bind(this));
+    });
   },
 
   /**
    * Event handler for breakpoints that are removed from the editor.
    *
    * @param object aEditorBreakpoint
    *        The breakpoint object that was removed from the editor.
    */
-  _onEditorBreakpointRemove: function BP__onEditorBreakpointRemove(aEditorBreakpoint) {
+  _onEditorBreakpointRemove: function(aEditorBreakpoint) {
     let url = DebuggerView.Sources.selectedValue;
     let line = aEditorBreakpoint.line + 1;
 
     this.removeBreakpoint(this.getBreakpoint(url, line));
   },
 
   /**
    * Update the breakpoints in the editor view. This function takes the list of
    * breakpoints in the debugger and adds them back into the editor view.
    * This is invoked when the selected script is changed.
    */
-  updateEditorBreakpoints: function BP_updateEditorBreakpoints() {
+  updateEditorBreakpoints: function() {
     for each (let breakpointClient in this.store) {
       if (DebuggerView.Sources.selectedValue == breakpointClient.location.url) {
         this._showBreakpoint(breakpointClient, {
           noPaneUpdate: true,
           noPaneHighlight: true
         });
       }
     }
   },
 
   /**
    * Update the breakpoints in the pane view. This function takes the list of
    * breakpoints in the debugger and adds them back into the breakpoints pane.
    * This is invoked when scripts are added.
    */
-  updatePaneBreakpoints: function BP_updatePaneBreakpoints() {
+  updatePaneBreakpoints: function() {
     for each (let breakpointClient in this.store) {
       if (DebuggerView.Sources.containsValue(breakpointClient.location.url)) {
         this._showBreakpoint(breakpointClient, {
           noEditorUpdate: true,
           noPaneHighlight: true
         });
       }
     }
@@ -1514,27 +1510,26 @@ Breakpoints.prototype = {
    * @param object aFlags [optional]
    *        An object containing some of the following boolean properties:
    *          - conditionalExpression: tells this breakpoint's conditional expression
    *          - openPopup: tells if the expression popup should be shown
    *          - noEditorUpdate: tells if you want to skip editor updates
    *          - noPaneUpdate: tells if you want to skip breakpoint pane updates
    *          - noPaneHighlight: tells if you don't want to highlight the breakpoint
    */
-  addBreakpoint:
-  function BP_addBreakpoint(aLocation, aCallback, aFlags = {}) {
+  addBreakpoint: function(aLocation, aCallback, aFlags = {}) {
     let breakpointClient = this.getBreakpoint(aLocation.url, aLocation.line);
 
     // If the breakpoint was already added, callback immediately.
     if (breakpointClient) {
       aCallback && aCallback(breakpointClient);
       return;
     }
 
-    this.activeThread.setBreakpoint(aLocation, function(aResponse, aBreakpointClient) {
+    this.activeThread.setBreakpoint(aLocation, (aResponse, aBreakpointClient) => {
       let { url, line } = aResponse.actualLocation || aLocation;
 
       // If the response contains a breakpoint that exists in the cache, prevent
       // it from being shown in the source editor at an incorrect position.
       if (this.getBreakpoint(url, line)) {
         this._hideBreakpoint(aBreakpointClient);
         return;
       }
@@ -1564,62 +1559,61 @@ Breakpoints.prototype = {
       // the sources pane without requiring fetching the source.
       aBreakpointClient.lineText = DebuggerView.getEditorLine(line - 1).trim();
 
       // Show the breakpoint in the editor and breakpoints pane.
       this._showBreakpoint(aBreakpointClient, aFlags);
 
       // We're done here.
       aCallback && aCallback(aBreakpointClient, aResponse.error);
-    }.bind(this));
+    });
   },
 
   /**
    * Remove a breakpoint.
    *
    * @param object aBreakpointClient
    *        The BreakpointActor client object to remove.
    * @param function aCallback [optional]
    *        Optional function to invoke once the breakpoint is removed. The
    *        callback is invoked with one argument
    *          - aBreakpointClient: the breakpoint location (url and line)
    * @param object aFlags [optional]
    *        @see DebuggerController.Breakpoints.addBreakpoint
    */
-  removeBreakpoint:
-  function BP_removeBreakpoint(aBreakpointClient, aCallback, aFlags = {}) {
+  removeBreakpoint: function(aBreakpointClient, aCallback, aFlags = {}) {
     let breakpointActor = (aBreakpointClient || {}).actor;
 
     // If the breakpoint was already removed, callback immediately.
     if (!this.store[breakpointActor]) {
       aCallback && aCallback(aBreakpointClient.location);
       return;
     }
 
-    aBreakpointClient.remove(function() {
+    aBreakpointClient.remove(() => {
       // Delete the breakpoint client from the store.
       delete this.store[breakpointActor];
 
       // Hide the breakpoint from the editor and breakpoints pane.
       this._hideBreakpoint(aBreakpointClient, aFlags);
 
       // We're done here.
       aCallback && aCallback(aBreakpointClient.location);
-    }.bind(this));
+    });
   },
 
   /**
    * Update the editor and breakpoints pane to show a specified breakpoint.
    *
    * @param object aBreakpointClient
    *        The BreakpointActor client object to show.
    * @param object aFlags [optional]
    *        @see DebuggerController.Breakpoints.addBreakpoint
    */
-  _showBreakpoint: function BP__showBreakpoint(aBreakpointClient, aFlags = {}) {
+  _showBreakpoint: function(aBreakpointClient, aFlags = {}) {
     let currentSourceUrl = DebuggerView.Sources.selectedValue;
     let { url, line } = aBreakpointClient.location;
 
     // Update the editor if required.
     if (!aFlags.noEditorUpdate) {
       if (url == currentSourceUrl) {
         this._skipEditorBreakpointCallbacks = true;
         this.editor.addBreakpoint(line - 1);
@@ -1645,17 +1639,17 @@ Breakpoints.prototype = {
   /**
    * Update the editor and breakpoints pane to hide a specified breakpoint.
    *
    * @param object aBreakpointClient
    *        The BreakpointActor client object to hide.
    * @param object aFlags [optional]
    *        @see DebuggerController.Breakpoints.addBreakpoint
    */
-  _hideBreakpoint: function BP__hideBreakpoint(aBreakpointClient, aFlags = {}) {
+  _hideBreakpoint: function(aBreakpointClient, aFlags = {}) {
     let currentSourceUrl = DebuggerView.Sources.selectedValue;
     let { url, line } = aBreakpointClient.location;
 
     // Update the editor if required.
     if (!aFlags.noEditorUpdate) {
       if (url == currentSourceUrl) {
         this._skipEditorBreakpointCallbacks = true;
         this.editor.removeBreakpoint(line - 1);
@@ -1673,17 +1667,17 @@ Breakpoints.prototype = {
    *
    * @param string aUrl
    *        The URL of where the breakpoint is.
    * @param number aLine
    *        The line number where the breakpoint is.
    * @return object
    *         The BreakpointActor object.
    */
-  getBreakpoint: function BP_getBreakpoint(aUrl, aLine) {
+  getBreakpoint: function(aUrl, aLine) {
     for each (let breakpointClient in this.store) {
       if (breakpointClient.location.url == aUrl &&
           breakpointClient.location.line == aLine) {
         return breakpointClient;
       }
     }
     return null;
   }
--- a/browser/devtools/debugger/debugger-panes.js
+++ b/browser/devtools/debugger/debugger-panes.js
@@ -28,17 +28,17 @@ function SourcesView() {
   this._onConditionalTextboxInput = this._onConditionalTextboxInput.bind(this);
   this._onConditionalTextboxKeyPress = this._onConditionalTextboxKeyPress.bind(this);
 }
 
 create({ constructor: SourcesView, proto: MenuContainer.prototype }, {
   /**
    * Initialization function, called when the debugger is started.
    */
-  initialize: function DVS_initialize() {
+  initialize: function() {
     dumpn("Initializing the SourcesView");
 
     this.node = new SideMenuWidget(document.getElementById("sources"));
     this.emptyText = L10N.getStr("noSourcesText");
     this.unavailableText = L10N.getStr("noMatchingSourcesText");
 
     this._commandset = document.getElementById("debuggerCommands");
     this._popupset = document.getElementById("debuggerPopupset");
@@ -59,17 +59,17 @@ create({ constructor: SourcesView, proto
 
     // Show an empty label by default.
     this.empty();
   },
 
   /**
    * Destruction function, called when the debugger is closed.
    */
-  destroy: function DVS_destroy() {
+  destroy: function() {
     dumpn("Destroying the SourcesView");
 
     window.removeEventListener("Debugger:EditorLoaded", this._onEditorLoad, false);
     window.removeEventListener("Debugger:EditorUnloaded", this._onEditorUnload, false);
     this.node.removeEventListener("mousedown", this._onSourceMouseDown, false);
     this.node.removeEventListener("select", this._onSourceSelect, false);
     this.node.removeEventListener("click", this._onSourceClick, false);
     this._cbPanel.removeEventListener("popupshowing", this._onConditionalPopupShowing, false);
@@ -97,17 +97,17 @@ create({ constructor: SourcesView, proto
    * Adds a source to this sources container.
    *
    * @param object aSource
    *        The source object coming from the active thread.
    * @param object aOptions [optional]
    *        Additional options for adding the source. Supported options:
    *        - forced: force the source to be immediately added
    */
-  addSource: function DVS_addSource(aSource, aOptions = {}) {
+  addSource: function(aSource, aOptions = {}) {
     let url = aSource.url;
     let label = SourceUtils.getSourceLabel(url.split(" -> ").pop());
     let group = SourceUtils.getSourceGroup(url.split(" -> ").pop());
 
     // Append a source item to this container.
     let sourceItem = this.push([label, url, group], {
       staged: aOptions.staged, /* stage the item to be appended later? */
       attachment: {
@@ -127,17 +127,17 @@ create({ constructor: SourcesView, proto
    *            The breakpoint's line number to be displayed.
    *          - string lineText
    *            The breakpoint's line text to be displayed.
    *          - string actor
    *            A breakpoint identifier specified by the debugger controller.
    *          - boolean openPopupFlag [optional]
    *            A flag specifying if the expression popup should be shown.
    */
-  addBreakpoint: function DVS_addBreakpoint(aOptions) {
+  addBreakpoint: function(aOptions) {
     let { sourceLocation: url, lineNumber: line } = aOptions;
 
     // Make sure we're not duplicating anything. If a breakpoint at the
     // specified source location and line number already exists, just enable it.
     if (this.getBreakpoint(url, line)) {
       this.enableBreakpoint(url, line, { id: aOptions.actor });
       return;
     }
@@ -175,17 +175,17 @@ create({ constructor: SourcesView, proto
   /**
    * Removes a breakpoint from this sources container.
    *
    * @param string aSourceLocation
    *        The breakpoint source location.
    * @param number aLineNumber
    *        The breakpoint line number.
    */
-  removeBreakpoint: function DVS_removeBreakpoint(aSourceLocation, aLineNumber) {
+  removeBreakpoint: function(aSourceLocation, aLineNumber) {
     // When a parent source item is removed, all the child breakpoint items are
     // also automagically removed.
     let sourceItem = this.getItemByValue(aSourceLocation);
     if (!sourceItem) {
       return;
     }
     let breakpointItem = this.getBreakpoint(aSourceLocation, aLineNumber);
     if (!breakpointItem) {
@@ -204,17 +204,17 @@ create({ constructor: SourcesView, proto
    *
    * @param string aSourceLocation
    *        The breakpoint source location.
    * @param number aLineNumber
    *        The breakpoint line number.
    * @return MenuItem
    *         The corresponding breakpoint item if found, null otherwise.
    */
-  getBreakpoint: function DVS_getBreakpoint(aSourceLocation, aLineNumber) {
+  getBreakpoint: function(aSourceLocation, aLineNumber) {
     let breakpointKey = this._getBreakpointKey(aSourceLocation, aLineNumber);
     return this._breakpointsCache.get(breakpointKey);
   },
 
   /**
    * Enables a breakpoint.
    *
    * @param string aSourceLocation
@@ -226,18 +226,17 @@ create({ constructor: SourcesView, proto
    *          - silent: pass true to not update the checkbox checked state;
    *                    this is usually necessary when the checked state will
    *                    be updated automatically (e.g: on a checkbox click).
    *          - callback: function to invoke once the breakpoint is enabled
    *          - id: a new id to be applied to the corresponding element node
    * @return boolean
    *         True if breakpoint existed and was enabled, false otherwise.
    */
-  enableBreakpoint:
-  function DVS_enableBreakpoint(aSourceLocation, aLineNumber, aOptions = {}) {
+  enableBreakpoint: function(aSourceLocation, aLineNumber, aOptions = {}) {
     let breakpointItem = this.getBreakpoint(aSourceLocation, aLineNumber);
     if (!breakpointItem) {
       return false;
     }
 
     // Set a new id to the corresponding breakpoint element if required.
     if (aOptions.id) {
       breakpointItem.attachment.view.container.id = "breakpoint-" + aOptions.id;
@@ -272,18 +271,17 @@ create({ constructor: SourcesView, proto
    *        Additional options or flags supported by this operation:
    *          - silent: pass true to not update the checkbox checked state;
    *                    this is usually necessary when the checked state will
    *                    be updated automatically (e.g: on a checkbox click).
    *          - callback: function to invoke once the breakpoint is disabled
    * @return boolean
    *         True if breakpoint existed and was disabled, false otherwise.
    */
-  disableBreakpoint:
-  function DVS_disableBreakpoint(aSourceLocation, aLineNumber, aOptions = {}) {
+  disableBreakpoint: function(aSourceLocation, aLineNumber, aOptions = {}) {
     let breakpointItem = this.getBreakpoint(aSourceLocation, aLineNumber);
     if (!breakpointItem) {
       return false;
     }
 
     // Update the checkbox state if necessary.
     if (!aOptions.silent) {
       breakpointItem.attachment.view.checkbox.removeAttribute("checked");
@@ -310,18 +308,17 @@ create({ constructor: SourcesView, proto
    *        The breakpoint source location.
    * @param number aLineNumber
    *        The breakpoint line number.
    * @param object aFlags [optional]
    *        An object containing some of the following boolean properties:
    *          - updateEditor: true if editor updates should be allowed
    *          - openPopup: true if the expression popup should be shown
    */
-  highlightBreakpoint:
-  function DVS_highlightBreakpoint(aSourceLocation, aLineNumber, aFlags = {}) {
+  highlightBreakpoint: function(aSourceLocation, aLineNumber, aFlags = {}) {
     let breakpointItem = this.getBreakpoint(aSourceLocation, aLineNumber);
     if (!breakpointItem) {
       return;
     }
 
     // Breakpoint is now selected.
     this._selectBreakpoint(breakpointItem);
 
@@ -337,17 +334,17 @@ create({ constructor: SourcesView, proto
     } else {
       this._hideConditionalPopup();
     }
   },
 
   /**
    * Unhighlights the current breakpoint in this sources container.
    */
-  unhighlightBreakpoint: function DVS_unhighlightBreakpoint() {
+  unhighlightBreakpoint: function() {
     this._unselectBreakpoint();
     this._hideConditionalPopup();
   },
 
   /**
    * Gets the currently selected breakpoint item.
    * @return object
    */
@@ -367,42 +364,42 @@ create({ constructor: SourcesView, proto
   },
 
   /**
    * Marks a breakpoint as selected in this sources container.
    *
    * @param MenuItem aItem
    *        The breakpoint item to select.
    */
-  _selectBreakpoint: function DVS__selectBreakpoint(aItem) {
+  _selectBreakpoint: function(aItem) {
     if (this._selectedBreakpoint == aItem) {
       return;
     }
     this._unselectBreakpoint();
     this._selectedBreakpoint = aItem;
     this._selectedBreakpoint.markSelected();
 
     // Ensure the currently selected breakpoint is visible.
     this.node.ensureElementIsVisible(aItem.target);
   },
 
   /**
    * Marks the current breakpoint as unselected in this sources container.
    */
-  _unselectBreakpoint: function DVS__unselectBreakpoint() {
+  _unselectBreakpoint: function() {
     if (this._selectedBreakpoint) {
       this._selectedBreakpoint.markDeselected();
       this._selectedBreakpoint = null;
     }
   },
 
   /**
    * Opens a conditional breakpoint's expression input popup.
    */
-  _openConditionalPopup: function DVS__openConditionalPopup() {
+  _openConditionalPopup: function() {
     let selectedBreakpoint = this.selectedBreakpoint;
     let selectedClient = this.selectedClient;
 
     if (selectedClient.conditionalExpression === undefined) {
       this._cbTextbox.value = selectedClient.conditionalExpression = "";
     } else {
       this._cbTextbox.value = selectedClient.conditionalExpression;
     }
@@ -412,17 +409,17 @@ create({ constructor: SourcesView, proto
       BREAKPOINT_CONDITIONAL_POPUP_POSITION,
       BREAKPOINT_CONDITIONAL_POPUP_OFFSET_X,
       BREAKPOINT_CONDITIONAL_POPUP_OFFSET_Y);
   },
 
   /**
    * Hides a conditional breakpoint's expression input popup.
    */
-  _hideConditionalPopup: function DVS__hideConditionalPopup() {
+  _hideConditionalPopup: function() {
     this._cbPanel.hidden = true;
     this._cbPanel.hidePopup();
   },
 
   /**
    * Customization function for creating a breakpoint item's UI.
    *
    * @param object aOptions
@@ -430,17 +427,17 @@ create({ constructor: SourcesView, proto
    *          - number lineNumber
    *            The line number specified by the debugger controller.
    *          - string lineText
    *            The line text to be displayed.
    * @return object
    *         An object containing the breakpoint container, checkbox,
    *         line number and line text nodes.
    */
-  _createBreakpointView: function DVS_createBreakpointView(aOptions) {
+  _createBreakpointView: function(aOptions) {
     let { lineNumber, lineText } = aOptions;
 
     let checkbox = document.createElement("checkbox");
     checkbox.setAttribute("checked", "true");
 
     let lineNumberNode = document.createElement("label");
     lineNumberNode.className = "plain dbg-breakpoint-line";
     lineNumberNode.setAttribute("value", lineNumber);
@@ -479,17 +476,17 @@ create({ constructor: SourcesView, proto
    *
    * @param aOptions
    *        Additional options or flags supported by this operation:
    *          - string actor
    *            A breakpoint identifier specified by the debugger controller.
    * @return object
    *         An object containing the breakpoint commandset and menu popup ids.
    */
-  _createContextMenu: function DVS__createContextMenu(aOptions) {
+  _createContextMenu: function(aOptions) {
     let commandsetId = "bp-cSet-" + aOptions.actor;
     let menupopupId = "bp-mPop-" + aOptions.actor;
 
     let commandset = document.createElement("commandset");
     let menupopup = document.createElement("menupopup");
     commandset.id = commandsetId;
     menupopup.id = menupopupId;
 
@@ -560,190 +557,190 @@ create({ constructor: SourcesView, proto
   },
 
   /**
    * Destroys the context menu for a breakpoint.
    *
    * @param object aContextMenu
    *        An object containing the breakpoint commandset and menu popup ids.
    */
-  _destroyContextMenu: function DVS__destroyContextMenu(aContextMenu) {
+  _destroyContextMenu: function(aContextMenu) {
     dumpn("Destroying context menu: " +
       aContextMenu.commandsetId + " & " + aContextMenu.menupopupId);
 
     let commandset = document.getElementById(aContextMenu.commandsetId);
     let menupopup = document.getElementById(aContextMenu.menupopupId);
     commandset.parentNode.removeChild(commandset);
     menupopup.parentNode.removeChild(menupopup);
   },
 
   /**
    * Function called each time a breakpoint item is removed.
    *
    * @param MenuItem aItem
    *        The corresponding menu item.
    */
-  _onBreakpointRemoved: function DVS__onBreakpointRemoved(aItem) {
+  _onBreakpointRemoved: function(aItem) {
     dumpn("Finalizing breakpoint item: " + aItem);
 
     let { sourceLocation: url, lineNumber: line, popup } = aItem.attachment;
     this._destroyContextMenu(popup);
     this._breakpointsCache.delete(this._getBreakpointKey(url, line));
   },
 
   /**
    * The load listener for the source editor.
    */
-  _onEditorLoad: function DVS__onEditorLoad({ detail: editor }) {
+  _onEditorLoad: function({ detail: editor }) {
     editor.addEventListener("Selection", this._onEditorSelection, false);
     editor.addEventListener("ContextMenu", this._onEditorContextMenu, false);
   },
 
   /**
    * The unload listener for the source editor.
    */
-  _onEditorUnload: function DVS__onEditorUnload({ detail: editor }) {
+  _onEditorUnload: function({ detail: editor }) {
     editor.removeEventListener("Selection", this._onEditorSelection, false);
     editor.removeEventListener("ContextMenu", this._onEditorContextMenu, false);
   },
 
   /**
    * The selection listener for the source editor.
    */
-  _onEditorSelection: function DVS__onEditorSelection(e) {
+  _onEditorSelection: function(e) {
     let { start, end } = e.newValue;
 
     let sourceLocation = this.selectedValue;
     let lineStart = DebuggerView.editor.getLineAtOffset(start) + 1;
     let lineEnd = DebuggerView.editor.getLineAtOffset(end) + 1;
 
     if (this.getBreakpoint(sourceLocation, lineStart) && lineStart == lineEnd) {
       this.highlightBreakpoint(sourceLocation, lineStart);
     } else {
       this.unhighlightBreakpoint();
     }
   },
 
   /**
    * The context menu listener for the source editor.
    */
-  _onEditorContextMenu: function DVS__onEditorContextMenu({ x, y }) {
+  _onEditorContextMenu: function({ x, y }) {
     let offset = DebuggerView.editor.getOffsetAtLocation(x, y);
     let line = DebuggerView.editor.getLineAtOffset(offset);
     this._editorContextMenuLineNumber = line;
   },
 
   /**
    * The mouse down listener for the sources container.
    */
-  _onSourceMouseDown: function DVS__onSourceMouseDown(e) {
+  _onSourceMouseDown: function(e) {
     let item = this.getItemForElement(e.target);
     if (item) {
       // The container is not empty and we clicked on an actual item.
       this.selectedItem = item;
     }
   },
 
   /**
    * The select listener for the sources container.
    */
-  _onSourceSelect: function DVS__onSourceSelect() {
+  _onSourceSelect: function() {
     if (!this.refresh()) {
       return;
     }
 
     let selectedSource = this.selectedItem.attachment.source;
     if (DebuggerView.editorSource != selectedSource) {
       DebuggerView.editorSource = selectedSource;
     }
   },
 
   /**
    * The click listener for the sources container.
    */
-  _onSourceClick: function DVS__onSourceClick() {
+  _onSourceClick: function() {
     // Use this container as a filtering target.
     DebuggerView.Filtering.target = this;
   },
 
   /**
    * The click listener for a breakpoint container.
    */
-  _onBreakpointClick: function DVS__onBreakpointClick(e) {
+  _onBreakpointClick: function(e) {
     let sourceItem = this.getItemForElement(e.target);
     let breakpointItem = this.getItemForElement.call(sourceItem, e.target);
     let { sourceLocation: url, lineNumber: line } = breakpointItem.attachment;
     let breakpointClient = DebuggerController.Breakpoints.getBreakpoint(url, line);
     let conditionalExpression = (breakpointClient || {}).conditionalExpression;
 
     this.highlightBreakpoint(url, line, {
       updateEditor: true,
       openPopup: conditionalExpression !== undefined && e.button == 0
     });
   },
 
   /**
    * The click listener for a breakpoint checkbox.
    */
-  _onBreakpointCheckboxClick: function DVS__onBreakpointCheckboxClick(e) {
+  _onBreakpointCheckboxClick: function(e) {
     let sourceItem = this.getItemForElement(e.target);
     let breakpointItem = this.getItemForElement.call(sourceItem, e.target);
     let { sourceLocation: url, lineNumber: line, disabled } = breakpointItem.attachment;
 
     this[disabled ? "enableBreakpoint" : "disableBreakpoint"](url, line, {
       silent: true
     });
 
     // Don't update the editor location (propagate into DVS__onBreakpointClick).
     e.preventDefault();
     e.stopPropagation();
   },
 
   /**
    * The popup showing listener for the breakpoints conditional expression panel.
    */
-  _onConditionalPopupShowing: function DVS__onConditionalPopupShowing() {
+  _onConditionalPopupShowing: function() {
     this._conditionalPopupVisible = true;
   },
 
   /**
    * The popup shown listener for the breakpoints conditional expression panel.
    */
-  _onConditionalPopupShown: function DVS__onConditionalPopupShown() {
+  _onConditionalPopupShown: function() {
     this._cbTextbox.focus();
     this._cbTextbox.select();
   },
 
   /**
    * The popup hiding listener for the breakpoints conditional expression panel.
    */
-  _onConditionalPopupHiding: function DVS__onConditionalPopupHiding() {
+  _onConditionalPopupHiding: function() {
     this._conditionalPopupVisible = false;
   },
 
   /**
    * The input listener for the breakpoints conditional expression textbox.
    */
-  _onConditionalTextboxInput: function DVS__onConditionalTextboxInput() {
+  _onConditionalTextboxInput: function() {
     this.selectedClient.conditionalExpression = this._cbTextbox.value;
   },
 
   /**
    * The keypress listener for the breakpoints conditional expression textbox.
    */
-  _onConditionalTextboxKeyPress: function DVS__onConditionalTextboxKeyPress(e) {
+  _onConditionalTextboxKeyPress: function(e) {
     if (e.keyCode == e.DOM_VK_RETURN || e.keyCode == e.DOM_VK_ENTER) {
       this._hideConditionalPopup();
     }
   },
 
   /**
    * Called when the add breakpoint key sequence was pressed.
    */
-  _onCmdAddBreakpoint: function BP__onCmdAddBreakpoint() {
+  _onCmdAddBreakpoint: function() {
     // If this command was executed via the context menu, add the breakpoint
     // on the currently hovered line in the source editor.
     if (this._editorContextMenuLineNumber >= 0) {
       DebuggerView.editor.setCaretPosition(this._editorContextMenuLineNumber);
     }
     // Avoid placing breakpoints incorrectly when using key shortcuts.
     this._editorContextMenuLineNumber = -1;
 
@@ -761,17 +758,17 @@ create({ constructor: SourcesView, proto
       let breakpointLocation = { url: url, line: line };
       DebuggerController.Breakpoints.addBreakpoint(breakpointLocation);
     }
   },
 
   /**
    * Called when the add conditional breakpoint key sequence was pressed.
    */
-  _onCmdAddConditionalBreakpoint: function BP__onCmdAddConditionalBreakpoint() {
+  _onCmdAddConditionalBreakpoint: function() {
     // If this command was executed via the context menu, add the breakpoint
     // on the currently hovered line in the source editor.
     if (this._editorContextMenuLineNumber >= 0) {
       DebuggerView.editor.setCaretPosition(this._editorContextMenuLineNumber);
     }
     // Avoid placing breakpoints incorrectly when using key shortcuts.
     this._editorContextMenuLineNumber = -1;
 
@@ -794,29 +791,29 @@ create({ constructor: SourcesView, proto
   },
 
   /**
    * Listener handling the "setConditional" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onSetConditional: function DVS__onSetConditional(aDetails) {
+  _onSetConditional: function(aDetails) {
     let { sourceLocation: url, lineNumber: line, actor } = aDetails;
     let breakpointItem = this.getBreakpoint(url, line);
     this.highlightBreakpoint(url, line, { openPopup: true });
   },
 
   /**
    * Listener handling the "enableSelf" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onEnableSelf: function DVS__onEnableSelf(aDetails) {
+  _onEnableSelf: function(aDetails) {
     let { sourceLocation: url, lineNumber: line, actor } = aDetails;
 
     if (this.enableBreakpoint(url, line)) {
       let prefix = "bp-cMenu-"; // "breakpoints context menu"
       let enableSelfId = prefix + "enableSelf-" + actor + "-menuitem";
       let disableSelfId = prefix + "disableSelf-" + actor + "-menuitem";
       document.getElementById(enableSelfId).setAttribute("hidden", "true");
       document.getElementById(disableSelfId).removeAttribute("hidden");
@@ -824,17 +821,17 @@ create({ constructor: SourcesView, proto
   },
 
   /**
    * Listener handling the "disableSelf" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onDisableSelf: function DVS__onDisableSelf(aDetails) {
+  _onDisableSelf: function(aDetails) {
     let { sourceLocation: url, lineNumber: line, actor } = aDetails;
 
     if (this.disableBreakpoint(url, line)) {
       let prefix = "bp-cMenu-"; // "breakpoints context menu"
       let enableSelfId = prefix + "enableSelf-" + actor + "-menuitem";
       let disableSelfId = prefix + "disableSelf-" + actor + "-menuitem";
       document.getElementById(enableSelfId).removeAttribute("hidden");
       document.getElementById(disableSelfId).setAttribute("hidden", "true");
@@ -842,110 +839,110 @@ create({ constructor: SourcesView, proto
   },
 
   /**
    * Listener handling the "deleteSelf" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onDeleteSelf: function DVS__onDeleteSelf(aDetails) {
+  _onDeleteSelf: function(aDetails) {
     let { sourceLocation: url, lineNumber: line } = aDetails;
     let breakpointClient = DebuggerController.Breakpoints.getBreakpoint(url, line);
 
     this.removeBreakpoint(url, line);
     DebuggerController.Breakpoints.removeBreakpoint(breakpointClient);
   },
 
   /**
    * Listener handling the "enableOthers" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onEnableOthers: function DVS__onEnableOthers(aDetails) {
+  _onEnableOthers: function(aDetails) {
     for (let [, item] of this._breakpointsCache) {
       if (item.attachment.actor != aDetails.actor) {
         this._onEnableSelf(item.attachment);
       }
     }
   },
 
   /**
    * Listener handling the "disableOthers" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onDisableOthers: function DVS__onDisableOthers(aDetails) {
+  _onDisableOthers: function(aDetails) {
     for (let [, item] of this._breakpointsCache) {
       if (item.attachment.actor != aDetails.actor) {
         this._onDisableSelf(item.attachment);
       }
     }
   },
 
   /**
    * Listener handling the "deleteOthers" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onDeleteOthers: function DVS__onDeleteOthers(aDetails) {
+  _onDeleteOthers: function(aDetails) {
     for (let [, item] of this._breakpointsCache) {
       if (item.attachment.actor != aDetails.actor) {
         this._onDeleteSelf(item.attachment);
       }
     }
   },
 
   /**
    * Listener handling the "enableAll" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onEnableAll: function DVS__onEnableAll(aDetails) {
+  _onEnableAll: function(aDetails) {
     this._onEnableOthers(aDetails);
     this._onEnableSelf(aDetails);
   },
 
   /**
    * Listener handling the "disableAll" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onDisableAll: function DVS__onDisableAll(aDetails) {
+  _onDisableAll: function(aDetails) {
     this._onDisableOthers(aDetails);
     this._onDisableSelf(aDetails);
   },
 
   /**
    * Listener handling the "deleteAll" menuitem command.
    *
    * @param object aDetails
    *        The breakpoint details (sourceLocation, lineNumber etc.).
    */
-  _onDeleteAll: function DVS__onDeleteAll(aDetails) {
+  _onDeleteAll: function(aDetails) {
     this._onDeleteOthers(aDetails);
     this._onDeleteSelf(aDetails);
   },
 
   /**
    * Gets an identifier for a breakpoint's details in the current cache.
    *
    * @param string aSourceLocation
    *        The breakpoint source location.
    * @param number aLineNumber
    *        The breakpoint line number.
    * @return string
    *         The breakpoint identifier.
    */
-  _getBreakpointKey: function DVS__getBreakpointKey(aSourceLocation, aLineNumber) {
+  _getBreakpointKey: function(aSourceLocation, aLineNumber) {
     return [aSourceLocation, aLineNumber].join();
   },
 
   _breakpointsCache: null,
   _commandset: null,
   _popupset: null,
   _cmPopup: null,
   _cbPanel: null,
@@ -962,30 +959,30 @@ let SourceUtils = {
   _labelsCache: new Map(), // Can't use WeakMaps because keys are strings.
   _groupsCache: new Map(),
 
   /**
    * Clears the labels cache, populated by methods like
    * SourceUtils.getSourceLabel or Source Utils.getSourceGroup.
    * This should be done every time the content location changes.
    */
-  clearCache: function SU_clearCache() {
+  clearCache: function() {
     this._labelsCache.clear();
     this._groupsCache.clear();
   },
 
   /**
    * Gets a unique, simplified label from a source url.
    *
    * @param string aUrl
    *        The source url.
    * @return string
    *         The simplified label.
    */
-  getSourceLabel: function SU_getSourceLabel(aUrl) {
+  getSourceLabel: function(aUrl) {
     let cachedLabel = this._labelsCache.get(aUrl);
     if (cachedLabel) {
       return cachedLabel;
     }
 
     let sourceLabel = this.trimUrl(aUrl);
     let unicodeLabel = NetworkHelper.convertToUnicode(unescape(sourceLabel));
     this._labelsCache.set(aUrl, unicodeLabel);
@@ -996,17 +993,17 @@ let SourceUtils = {
    * Gets as much information as possible about the hostname and directory paths
    * of an url to create a short url group identifier.
    *
    * @param string aUrl
    *        The source url.
    * @return string
    *         The simplified group.
    */
-  getSourceGroup: function SU_getSourceGroup(aUrl) {
+  getSourceGroup: function(aUrl) {
     let cachedGroup = this._groupsCache.get(aUrl);
     if (cachedGroup) {
       return cachedGroup;
     }
 
     try {
       // Use an nsIURL to parse all the url path parts.
       var uri = Services.io.newURI(aUrl, null, null).QueryInterface(Ci.nsIURL);
@@ -1049,17 +1046,17 @@ let SourceUtils = {
    *        The source url.
    * @param number aLength [optional]
    *        The expected source url length.
    * @param number aSection [optional]
    *        The section to trim. Supported values: "start", "center", "end"
    * @return string
    *         The shortened url.
    */
-  trimUrlLength: function SU_trimUrlLength(aUrl, aLength, aSection) {
+  trimUrlLength: function(aUrl, aLength, aSection) {
     aLength = aLength || SOURCE_URL_DEFAULT_MAX_LENGTH;
     aSection = aSection || "end";
 
     if (aUrl.length > aLength) {
       switch (aSection) {
         case "start":
           return L10N.ellipsis + aUrl.slice(-aLength);
           break;
@@ -1077,17 +1074,17 @@ let SourceUtils = {
   /**
    * Trims the query part or reference identifier of a url string, if necessary.
    *
    * @param string aUrl
    *        The source url.
    * @return string
    *         The shortened url.
    */
-  trimUrlQuery: function SU_trimUrlQuery(aUrl) {
+  trimUrlQuery: function(aUrl) {
     let length = aUrl.length;
     let q1 = aUrl.indexOf('?');
     let q2 = aUrl.indexOf('&');
     let q3 = aUrl.indexOf('#');
     let q = Math.min(q1 != -1 ? q1 : length,
                      q2 != -1 ? q2 : length,
                      q3 != -1 ? q3 : length);
 
@@ -1102,17 +1099,17 @@ let SourceUtils = {
    *        The source url.
    * @param string aLabel [optional]
    *        The resulting label at each step.
    * @param number aSeq [optional]
    *        The current iteration step.
    * @return string
    *         The resulting label at the final step.
    */
-  trimUrl: function SU_trimUrl(aUrl, aLabel, aSeq) {
+  trimUrl: function(aUrl, aLabel, aSeq) {
     if (!(aUrl instanceof Ci.nsIURL)) {
       try {
         // Use an nsIURL to parse all the url path parts.
         aUrl = Services.io.newURI(aUrl, null, null).QueryInterface(Ci.nsIURL);
       } catch (e) {
         // This doesn't look like a url, or nsIURL can't handle it.
         return aUrl;
       }
@@ -1199,44 +1196,44 @@ function WatchExpressionsView() {
   this._onBlur = this._onBlur.bind(this);
   this._onKeyPress = this._onKeyPress.bind(this);
 }
 
 create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
   /**
    * Initialization function, called when the debugger is started.
    */
-  initialize: function DVWE_initialize() {
+  initialize: function() {
     dumpn("Initializing the WatchExpressionsView");
 
     this.node = new ListWidget(document.getElementById("expressions"));
     this._variables = document.getElementById("variables");
 
     this.node.permaText = L10N.getStr("addWatchExpressionText");
     this.node.itemFactory = this._createItemView;
     this.node.setAttribute("context", "debuggerWatchExpressionsContextMenu");
     this.node.addEventListener("click", this._onClick, false);
   },
 
   /**
    * Destruction function, called when the debugger is closed.
    */
-  destroy: function DVWE_destroy() {
+  destroy: function() {
     dumpn("Destroying the WatchExpressionsView");
 
     this.node.removeEventListener("click", this._onClick, false);
   },
 
   /**
    * Adds a watch expression in this container.
    *
    * @param string aExpression [optional]
    *        An optional initial watch expression text.
    */
-  addExpression: function DVWE_addExpression(aExpression = "") {
+  addExpression: function(aExpression = "") {
     // Watch expressions are UI elements which benefit from visible panes.
     DebuggerView.showInstrumentsPane();
 
     // Append a watch expression item to this container.
     let expressionItem = this.push([, aExpression], {
       index: 0, /* specifies on which position should the item be appended */
       relaxed: true, /* this container should allow dupes & degenerates */
       attachment: {
@@ -1255,32 +1252,32 @@ create({ constructor: WatchExpressionsVi
   },
 
   /**
    * Removes the watch expression with the specified index from this container.
    *
    * @param number aIndex
    *        The index used to identify the watch expression.
    */
-  removeExpressionAt: function DVWE_removeExpressionAt(aIndex) {
+  removeExpressionAt: function(aIndex) {
     this.remove(this._cache[aIndex]);
     this._cache.splice(aIndex, 1);
   },
 
   /**
    * Changes the watch expression corresponding to the specified variable item.
    * This function is called whenever a watch expression's code is edited in
    * the variables view container.
    *
    * @param Variable aVar
    *        The variable representing the watch expression evaluation.
    * @param string aExpression
    *        The new watch expression text.
    */
-  switchExpression: function DVWE_switchExpression(aVar, aExpression) {
+  switchExpression: function(aVar, aExpression) {
     let expressionItem =
       [i for (i of this._cache) if (i.attachment.currentExpression == aVar.name)][0];
 
     // Remove the watch expression if it's going to be empty or a duplicate.
     if (!aExpression || this.getExpressions().indexOf(aExpression) != -1) {
       this.deleteExpression(aVar);
       return;
     }
@@ -1296,17 +1293,17 @@ create({ constructor: WatchExpressionsVi
   /**
    * Removes the watch expression corresponding to the specified variable item.
    * This function is called whenever a watch expression's value is edited in
    * the variables view container.
    *
    * @param Variable aVar
    *        The variable representing the watch expression evaluation.
    */
-  deleteExpression: function DVWE_deleteExpression(aVar) {
+  deleteExpression: function(aVar) {
     let expressionItem =
       [i for (i of this._cache) if (i.attachment.currentExpression == aVar.name)][0];
 
     // Remove the watch expression at its respective index.
     this.removeExpressionAt(this._cache.indexOf(expressionItem));
 
     // Synchronize with the controller's watch expressions store.
     DebuggerController.StackFrames.syncWatchExpressions();
@@ -1315,39 +1312,39 @@ create({ constructor: WatchExpressionsVi
   /**
    * Gets the watch expression code string for an item in this container.
    *
    * @param number aIndex
    *        The index used to identify the watch expression.
    * @return string
    *         The watch expression code string.
    */
-  getExpression: function DVWE_getExpression(aIndex) {
+  getExpression: function(aIndex) {
     return this._cache[aIndex].attachment.currentExpression;
   },
 
   /**
    * Gets the watch expressions code strings for all items in this container.
    *
    * @return array
    *         The watch expressions code strings.
    */
-  getExpressions: function DVWE_getExpressions() {
+  getExpressions: function() {
     return [item.attachment.currentExpression for (item of this._cache)];
   },
 
   /**
    * Customization function for creating an item's UI.
    *
    * @param nsIDOMNode aElementNode
    *        The element associated with the displayed item.
    * @param any aAttachment
    *        Some attached primitive/object.
    */
-  _createItemView: function DVWE__createItemView(aElementNode, aAttachment) {
+  _createItemView: function(aElementNode, aAttachment) {
     let arrowNode = document.createElement("box");
     arrowNode.className = "dbg-expression-arrow";
 
     let inputNode = document.createElement("textbox");
     inputNode.className = "plain dbg-expression-input";
     inputNode.setAttribute("value", aAttachment.initialExpression);
     inputNode.setAttribute("flex", "1");
 
@@ -1368,69 +1365,69 @@ create({ constructor: WatchExpressionsVi
     aAttachment.arrowNode = arrowNode;
     aAttachment.inputNode = inputNode;
     aAttachment.closeNode = closeNode;
   },
 
   /**
    * Called when the add watch expression key sequence was pressed.
    */
-  _onCmdAddExpression: function BP__onCmdAddExpression(aText) {
+  _onCmdAddExpression: function(aText) {
     // Only add a new expression if there's no pending input.
     if (this.getExpressions().indexOf("") == -1) {
       this.addExpression(aText || DebuggerView.editor.getSelectedText());
     }
   },
 
   /**
    * Called when the remove all watch expressions key sequence was pressed.
    */
-  _onCmdRemoveAllExpressions: function BP__onCmdRemoveAllExpressions() {
+  _onCmdRemoveAllExpressions: function() {
     // Empty the view of all the watch expressions and clear the cache.
     this.empty();
     this._cache.length = 0;
 
     // Synchronize with the controller's watch expressions store.
     DebuggerController.StackFrames.syncWatchExpressions();
   },
 
   /**
    * The click listener for this container.
    */
-  _onClick: function DVWE__onClick(e) {
+  _onClick: function(e) {
     if (e.button != 0) {
       // Only allow left-click to trigger this event.
       return;
     }
     let expressionItem = this.getItemForElement(e.target);
     if (!expressionItem) {
       // The container is empty or we didn't click on an actual item.
       this.addExpression();
     }
   },
 
   /**
    * The click listener for a watch expression's close button.
    */
-  _onClose: function DVWE__onClose(e) {
+  _onClose: function(e) {
     let expressionItem = this.getItemForElement(e.target);
     this.removeExpressionAt(this._cache.indexOf(expressionItem));
 
     // Synchronize with the controller's watch expressions store.
     DebuggerController.StackFrames.syncWatchExpressions();
 
     // Prevent clicking the expression element itself.
     e.preventDefault();
     e.stopPropagation();
   },
 
   /**
    * The blur listener for a watch expression's textbox.
    */
-  _onBlur: function DVWE__onBlur({ target: textbox }) {
+  _onBlur: function({ target: textbox }) {
     let expressionItem = this.getItemForElement(textbox);
     let oldExpression = expressionItem.attachment.currentExpression;
     let newExpression = textbox.value.trim();
 
     // Remove the watch expression if it's empty.
     if (!newExpression) {
       this.removeExpressionAt(this._cache.indexOf(expressionItem));
     }
@@ -1445,33 +1442,33 @@ create({ constructor: WatchExpressionsVi
 
     // Synchronize with the controller's watch expressions store.
     DebuggerController.StackFrames.syncWatchExpressions();
   },
 
   /**
    * The keypress listener for a watch expression's textbox.
    */
-  _onKeyPress: function DVWE__onKeyPress(e) {
+  _onKeyPress: function(e) {
     switch(e.keyCode) {
       case e.DOM_VK_RETURN:
       case e.DOM_VK_ENTER:
       case e.DOM_VK_ESCAPE:
         DebuggerView.editor.focus();
         return;
     }
   },
 
   /**
    * Gets an identifier for a new watch expression item in the current cache.
    * @return string
    */
   _generateId: (function() {
     let count = 0;
-    return function DVWE__generateId() {
+    return function() {
       return (++count) + "";
     };
   })(),
 
   _variables: null,
   _cache: null
 });
 
@@ -1489,31 +1486,31 @@ function GlobalSearchView() {
   this._onLineClick = this._onLineClick.bind(this);
   this._onMatchClick = this._onMatchClick.bind(this);
 }
 
 create({ constructor: GlobalSearchView, proto: MenuContainer.prototype }, {
   /**
    * Initialization function, called when the debugger is started.
    */
-  initialize: function DVGS_initialize() {
+  initialize: function() {
     dumpn("Initializing the GlobalSearchView");
 
     this.node = new ListWidget(document.getElementById("globalsearch"));
     this._splitter = document.querySelector("#globalsearch + .devtools-horizontal-splitter");
 
     this.node.emptyText = L10N.getStr("noMatchingStringsText");
     this.node.itemFactory = this._createItemView;
     this.node.addEventListener("scroll", this._onScroll, false);
   },
 
   /**
    * Destruction function, called when the debugger is closed.
    */
-  destroy: function DVGS_destroy() {
+  destroy: function() {
     dumpn("Destroying the GlobalSearchView");
 
     this.node.removeEventListener("scroll", this._onScroll, false);
   },
 
   /**
    * Gets the visibility state of the global search container.
    * @return boolean
@@ -1529,42 +1526,42 @@ create({ constructor: GlobalSearchView, 
   set hidden(aFlag) {
     this.node.setAttribute("hidden", aFlag);
     this._splitter.setAttribute("hidden", aFlag);
   },
 
   /**
    * Hides and removes all items from this search container.
    */
-  clearView: function DVGS_clearView() {
+  clearView: function() {
     this.hidden = true;
     this.empty();
     window.dispatchEvent(document, "Debugger:GlobalSearch:ViewCleared");
   },
 
   /**
    * Focuses the next found match in the source editor.
    */
-  focusNextMatch: function DVGS_focusNextMatch() {
+  focusNextMatch: function() {
     let totalLineResults = LineResults.size();
     if (!totalLineResults) {
       return;
     }
     if (++this._currentlyFocusedMatch >= totalLineResults) {
       this._currentlyFocusedMatch = 0;
     }
     this._onMatchClick({
       target: LineResults.getElementAtIndex(this._currentlyFocusedMatch)
     });
   },
 
   /**
    * Focuses the previously found match in the source editor.
    */
-  focusPrevMatch: function DVGS_focusPrevMatch() {
+  focusPrevMatch: function() {
     let totalLineResults = LineResults.size();
     if (!totalLineResults) {
       return;
     }
     if (--this._currentlyFocusedMatch < 0) {
       this._currentlyFocusedMatch = totalLineResults - 1;
     }
     this._onMatchClick({
@@ -1578,17 +1575,17 @@ create({ constructor: GlobalSearchView, 
   delayedSearch: true,
 
   /**
    * Schedules searching for a string in all of the sources.
    *
    * @param string aQuery
    *        The string to search for.
    */
-  scheduleSearch: function DVGS_scheduleSearch(aQuery) {
+  scheduleSearch: function(aQuery) {
     if (!this.delayedSearch) {
       this.performSearch(aQuery);
       return;
     }
     let delay = Math.max(GLOBAL_SEARCH_ACTION_MAX_DELAY / aQuery.length, 0);
 
     window.clearTimeout(this._searchTimeout);
     this._searchFunction = this._startSearch.bind(this, aQuery);
@@ -1596,41 +1593,41 @@ create({ constructor: GlobalSearchView, 
   },
 
   /**
    * Immediately searches for a string in all of the sources.
    *
    * @param string aQuery
    *        The string to search for.
    */
-  performSearch: function DVGS_performSearch(aQuery) {
+  performSearch: function(aQuery) {
     window.clearTimeout(this._searchTimeout);
     this._searchFunction = null;
     this._startSearch(aQuery);
   },
 
   /**
    * Starts searching for a string in all of the sources.
    *
    * @param string aQuery
    *        The string to search for.
    */
-  _startSearch: function DVGS__startSearch(aQuery) {
+  _startSearch: function(aQuery) {
     this._searchedToken = aQuery;
 
     DebuggerController.SourceScripts.fetchSources(DebuggerView.Sources.values, {
       onFinished: this._performGlobalSearch
     });
   },
 
   /**
    * Finds string matches in all the sources stored in the controller's cache,
    * and groups them by location and line number.
    */
-  _performGlobalSearch: function DVGS__performGlobalSearch() {
+  _performGlobalSearch: function() {
     // Get the currently searched token from the filtering input.
     let token = this._searchedToken;
 
     // Make sure we're actually searching for something.
     if (!token) {
       this.clearView();
       window.dispatchEvent(document, "Debugger:GlobalSearch:TokenEmpty");
       return;
@@ -1706,17 +1703,17 @@ create({ constructor: GlobalSearchView, 
   },
 
   /**
    * Creates global search results entries and adds them to this container.
    *
    * @param GlobalResults aGlobalResults
    *        An object containing all source results, grouped by source location.
    */
-  _createGlobalResultsUI: function DVGS__createGlobalResultsUI(aGlobalResults) {
+  _createGlobalResultsUI: function(aGlobalResults) {
     let i = 0;
 
     for (let [location, sourceResults] in aGlobalResults) {
       if (i++ == 0) {
         this._createSourceResultsUI(location, sourceResults, true);
       } else {
         // Dispatch subsequent document manipulation operations, to avoid
         // blocking the main thread when a large number of search results
@@ -1732,18 +1729,17 @@ create({ constructor: GlobalSearchView, 
    *
    * @param string aLocation
    *        The location of the source.
    * @param SourceResults aSourceResults
    *        An object containing all the matched lines for a specific source.
    * @param boolean aExpandFlag
    *        True to expand the source results.
    */
-  _createSourceResultsUI:
-  function DVGS__createSourceResultsUI(aLocation, aSourceResults, aExpandFlag) {
+  _createSourceResultsUI: function(aLocation, aSourceResults, aExpandFlag) {
     // Append a source results item to this container.
     let sourceResultsItem = this.push([aLocation, aSourceResults.matchCount], {
       index: -1, /* specifies on which position should the item be appended */
       relaxed: true, /* this container should allow dupes & degenerates */
       attachment: {
         sourceResults: aSourceResults,
         expandFlag: aExpandFlag
       }
@@ -1757,47 +1753,46 @@ create({ constructor: GlobalSearchView, 
    *        The element associated with the displayed item.
    * @param any aAttachment
    *        Some attached primitive/object.
    * @param string aLocation
    *        The source result's location.
    * @param string aMatchCount
    *        The source result's match count.
    */
-  _createItemView:
-  function DVGS__createItemView(aElementNode, aAttachment, aLocation, aMatchCount) {
+  _createItemView: function(aElementNode, aAttachment, aLocation, aMatchCount) {
     let { sourceResults, expandFlag } = aAttachment;
 
     sourceResults.createView(aElementNode, aLocation, aMatchCount, expandFlag, {
       onHeaderClick: this._onHeaderClick,
       onLineClick: this._onLineClick,
       onMatchClick: this._onMatchClick
     });
   },
 
   /**
    * The click listener for a results header.
    */
-  _onHeaderClick: function DVGS__onHeaderClick(e) {
+  _onHeaderClick: function(e) {
     let sourceResultsItem = SourceResults.getItemForElement(e.target);
     sourceResultsItem.instance.toggle(e);
   },
 
   /**
    * The click listener for a results line.
    */
-  _onLineClick: function DVGLS__onLineClick(e) {
+  _onLineClick: function(e) {
     let lineResultsItem = LineResults.getItemForElement(e.target);
     this._onMatchClick({ target: lineResultsItem.firstMatch });
   },
 
   /**
    * The click listener for a result match.
    */
-  _onMatchClick: function DVGLS__onMatchClick(e) {
+  _onMatchClick: function(e) {
     if (e instanceof Event) {
       e.preventDefault();
       e.stopPropagation();
     }
     let target = e.target;
     let sourceResultsItem = SourceResults.getItemForElement(target);
     let lineResultsItem = LineResults.getItemForElement(target);
 
@@ -1814,29 +1809,29 @@ create({ constructor: GlobalSearchView, 
     let offset = editor.getCaretOffset();
     let { start, length } = lineResultsItem.lineData.range;
     editor.setSelection(offset + start, offset + start + length);
   },
 
   /**
    * The scroll listener for the global search container.
    */
-  _onScroll: function DVGS__onScroll(e) {
+  _onScroll: function(e) {
     for (let item in this) {
       this._expandResultsIfNeeded(item.target);
     }
   },
 
   /**
    * Expands the source results it they are currently visible.
    *
    * @param nsIDOMNode aTarget
    *        The element associated with the displayed item.
    */
-  _expandResultsIfNeeded: function DVGS__expandResultsIfNeeded(aTarget) {
+  _expandResultsIfNeeded: function(aTarget) {
     let sourceResultsItem = SourceResults.getItemForElement(aTarget);
     if (sourceResultsItem.instance.toggled ||
         sourceResultsItem.instance.expanded) {
       return;
     }
     let { top, height } = aTarget.getBoundingClientRect();
     let { clientHeight } = this.node._parent;
 
@@ -1846,28 +1841,28 @@ create({ constructor: GlobalSearchView, 
   },
 
   /**
    * Scrolls a match into view if not already visible.
    *
    * @param nsIDOMNode aMatch
    *        The match to scroll into view.
    */
-  _scrollMatchIntoViewIfNeeded:  function DVGS__scrollMatchIntoViewIfNeeded(aMatch) {
+  _scrollMatchIntoViewIfNeeded: function(aMatch) {
     let boxObject = this.node._parent.boxObject.QueryInterface(Ci.nsIScrollBoxObject);
     boxObject.ensureElementIsVisible(aMatch);
   },
 
   /**
    * Starts a bounce animation for a match.
    *
    * @param nsIDOMNode aMatch
    *        The match to start a bounce animation for.
    */
-  _bounceMatch: function DVGS__bounceMatch(aMatch) {
+  _bounceMatch: function(aMatch) {
     Services.tm.currentThread.dispatch({ run: function() {
       aMatch.addEventListener("transitionend", function onEvent() {
         aMatch.removeEventListener("transitionend", onEvent);
         aMatch.removeAttribute("focused");
       });
       aMatch.setAttribute("focused", "");
     }}, 0);
     aMatch.setAttribute("focusing", "");
@@ -1895,17 +1890,17 @@ GlobalResults.prototype = {
   /**
    * Adds source results to this store.
    *
    * @param string aLocation
    *        The location of the source.
    * @param SourceResults aSourceResults
    *        An object containing all the matched lines for a specific source.
    */
-  add: function GR_add(aLocation, aSourceResults) {
+  add: function(aLocation, aSourceResults) {
     this._store.set(aLocation, aSourceResults);
   },
 
   /**
    * Gets the number of source results in this store.
    */
   get itemCount() this._store.size,
 
@@ -1925,45 +1920,45 @@ SourceResults.prototype = {
   /**
    * Adds line results to this store.
    *
    * @param number aLineNumber
    *        The line location in the source.
    * @param LineResults aLineResults
    *        An object containing all the matches for a specific line.
    */
-  add: function SR_add(aLineNumber, aLineResults) {
+  add: function(aLineNumber, aLineResults) {
     this._store.set(aLineNumber, aLineResults);
   },
 
   /**
    * The number of matches in this store. One line may have multiple matches.
    */
   matchCount: -1,
 
   /**
    * Expands the element, showing all the added details.
    */
-  expand: function SR_expand() {
+  expand: function() {
     this._target.resultsContainer.removeAttribute("hidden")
     this._target.arrow.setAttribute("open", "");
   },
 
   /**
    * Collapses the element, hiding all the added details.
    */
-  collapse: function SR_collapse() {
+  collapse: function() {
     this._target.resultsContainer.setAttribute("hidden", "true");
     this._target.arrow.removeAttribute("open");
   },
 
   /**
    * Toggles between the element collapse/expand state.
    */
-  toggle: function SR_toggle(e) {
+  toggle: function(e) {
     if (e instanceof Event) {
       this._userToggled = true;
     }
     this.expanded ^= 1;
   },
 
   /**
    * Relaxes the auto-expand rules to always show as many results as possible.
@@ -2007,18 +2002,17 @@ SourceResults.prototype = {
    *        The source result's match count.
    * @param boolean aExpandFlag
    *        True to expand the source results.
    * @param object aCallbacks
    *        An object containing all the necessary callback functions:
    *          - onHeaderClick
    *          - onMatchClick
    */
-  createView:
-  function SR_createView(aElementNode, aLocation, aMatchCount, aExpandFlag, aCallbacks) {
+  createView: function(aElementNode, aLocation, aMatchCount, aExpandFlag, aCallbacks) {
     this._target = aElementNode;
 
     let arrow = document.createElement("box");
     arrow.className = "arrow";
 
     let locationNode = document.createElement("label");
     locationNode.className = "plain dbg-results-header-location";
     locationNode.setAttribute("value", SourceUtils.trimUrlLength(aLocation));
@@ -2088,17 +2082,17 @@ LineResults.prototype = {
    *
    * @param string aString
    *        The text contents chunk in the line.
    * @param object aRange
    *        An object containing the { start, length } of the chunk.
    * @param boolean aMatchFlag
    *        True if the chunk is a matched string, false if just text content.
    */
-  add: function LC_add(aString, aRange, aMatchFlag) {
+  add: function(aString, aRange, aMatchFlag) {
     this._store.push({
       string: aString,
       range: aRange,
       match: !!aMatchFlag
     });
   },
 
   /**
@@ -2114,17 +2108,17 @@ LineResults.prototype = {
    *        The element associated with the displayed item.
    * @param number aLineNumber
    *        The line location in the source.
    * @param object aCallbacks
    *        An object containing all the necessary callback functions:
    *          - onMatchClick
    *          - onLineClick
    */
-  createView: function LR_createView(aContainer, aLineNumber, aCallbacks) {
+  createView: function(aContainer, aLineNumber, aCallbacks) {
     this._target = aContainer;
 
     let lineNumberNode = document.createElement("label");
     let lineContentsNode = document.createElement("hbox");
     let lineString = "";
     let lineLength = 0;
     let firstMatch = null;
 
@@ -2166,29 +2160,29 @@ LineResults.prototype = {
   },
 
   /**
    * Handles a match while creating the view.
    * @param number aLineNumber
    * @param nsIDOMNode aNode
    * @param object aMatchChunk
    */
-  _entangleMatch: function LR__entangleMatch(aLineNumber, aNode, aMatchChunk) {
+  _entangleMatch: function(aLineNumber, aNode, aMatchChunk) {
     LineResults._itemsByElement.set(aNode, {
       lineNumber: aLineNumber,
       lineData: aMatchChunk
     });
   },
 
   /**
    * Handles a line while creating the view.
    * @param nsIDOMNode aNode
    * @param nsIDOMNode aFirstMatch
    */
-  _entangleLine: function LR__entangleLine(aNode, aFirstMatch) {
+  _entangleLine: function(aNode, aFirstMatch) {
     LineResults._itemsByElement.set(aNode, {
       firstMatch: aFirstMatch,
       nonenumerable: true
     });
   },
 
   /**
    * An nsIDOMNode label with an ellipsis value.
@@ -2204,45 +2198,45 @@ LineResults.prototype = {
   _target: null
 };
 
 /**
  * A generator-iterator over the global, source or line results.
  */
 GlobalResults.prototype.__iterator__ =
 SourceResults.prototype.__iterator__ =
-LineResults.prototype.__iterator__ = function DVGS_iterator() {
+LineResults.prototype.__iterator__ = function() {
   for (let item of this._store) {
     yield item;
   }
 };
 
 /**
  * Gets the item associated with the specified element.
  *
  * @param nsIDOMNode aElement
  *        The element used to identify the item.
  * @return object
  *         The matched item, or null if nothing is found.
  */
 SourceResults.getItemForElement =
-LineResults.getItemForElement = function DVGS_getItemForElement(aElement) {
+LineResults.getItemForElement = function(aElement) {
   return MenuContainer.prototype.getItemForElement.call(this, aElement);
 };
 
 /**
  * Gets the element associated with a particular item at a specified index.
  *
  * @param number aIndex
  *        The index used to identify the item.
  * @return nsIDOMNode
  *         The matched element, or null if nothing is found.
  */
 SourceResults.getElementAtIndex =
-LineResults.getElementAtIndex = function DVGS_getElementAtIndex(aIndex) {
+LineResults.getElementAtIndex = function(aIndex) {
   for (let [element, item] of this._itemsByElement) {
     if (!item.nonenumerable && !aIndex--) {
       return element;
     }
   }
   return null;
 };
 
@@ -2250,17 +2244,17 @@ LineResults.getElementAtIndex = function
  * Gets the index of an item associated with the specified element.
  *
  * @param nsIDOMNode aElement
  *        The element to get the index for.
  * @return number
  *         The index of the matched element, or -1 if nothing is found.
  */
 SourceResults.indexOfElement =
-LineResults.indexOfElement = function DVGS_indexOFElement(aElement) {
+LineResults.indexOfElement = function(aElement) {
   let count = 0;
   for (let [element, item] of this._itemsByElement) {
     if (element == aElement) {
       return count;
     }
     if (!item.nonenumerable) {
       count++;
     }
@@ -2270,17 +2264,17 @@ LineResults.indexOfElement = function DV
 
 /**
  * Gets the number of cached items associated with a specified element.
  *
  * @return number
  *         The number of key/value pairs in the corresponding map.
  */
 SourceResults.size =
-LineResults.size = function DVGS_size() {
+LineResults.size = function() {
   let count = 0;
   for (let [, item] of this._itemsByElement) {
     if (!item.nonenumerable) {
       count++;
     }
   }
   return count;
 };
--- a/browser/devtools/debugger/debugger-toolbar.js
+++ b/browser/devtools/debugger/debugger-toolbar.js
@@ -18,17 +18,17 @@ function ToolbarView() {
   this._onStepInPressed = this._onStepInPressed.bind(this);
   this._onStepOutPressed = this._onStepOutPressed.bind(this);
 }
 
 ToolbarView.prototype = {
   /**
    * Initialization function, called when the debugger is started.
    */
-  initialize: function DVT_initialize() {
+  initialize: function() {
     dumpn("Initializing the ToolbarView");
 
     this._instrumentsPaneToggleButton = document.getElementById("instruments-pane-toggle");
     this._resumeOrderPanel = document.getElementById("resumption-order-panel");
     this._resumeButton = document.getElementById("resume");
     this._stepOverButton = document.getElementById("step-over");
     this._stepInButton = document.getElementById("step-in");
     this._stepOutButton = document.getElementById("step-out");
@@ -56,33 +56,33 @@ ToolbarView.prototype = {
 
     // TODO: bug 806775
     // this.toggleChromeGlobalsContainer(window._isChromeDebugger);
   },
 
   /**
    * Destruction function, called when the debugger is closed.
    */
-  destroy: function DVT_destroy() {
+  destroy: function() {
     dumpn("Destroying the ToolbarView");
 
     this._instrumentsPaneToggleButton.removeEventListener("mousedown", this._onTogglePanesPressed, false);
     this._resumeButton.removeEventListener("mousedown", this._onResumePressed, false);
     this._stepOverButton.removeEventListener("mousedown", this._onStepOverPressed, false);
     this._stepInButton.removeEventListener("mousedown", this._onStepInPressed, false);
     this._stepOutButton.removeEventListener("mousedown", this._onStepOutPressed, false);
   },
 
   /**
    * Sets the resume button state based on the debugger active thread.
    *
    * @param string aState
    *        Either "paused" or "attached".
    */
-  toggleResumeButtonState: function DVT_toggleResumeButtonState(aState) {
+  toggleResumeButtonState: function(aState) {
     // If we're paused, check and show a resume label on the button.
     if (aState == "paused") {
       this._resumeButton.setAttribute("checked", "true");
       this._resumeButton.setAttribute("tooltiptext", this._resumeTooltip);
     }
     // If we're attached, do the opposite.
     else if (aState == "attached") {
       this._resumeButton.removeAttribute("checked");
@@ -92,77 +92,77 @@ ToolbarView.prototype = {
 
   /**
    * Display a warning when trying to resume a debuggee while another is paused.
    * Debuggees must be unpaused in a Last-In-First-Out order.
    *
    * @param string aPausedUrl
    *        The URL of the last paused debuggee.
    */
-  showResumeWarning: function DVT_showResumeWarning(aPausedUrl) {
+  showResumeWarning: function(aPausedUrl) {
     let label = L10N.getFormatStr("resumptionOrderPanelTitle", [aPausedUrl]);
     document.getElementById("resumption-panel-desc").textContent = label;
     this._resumeOrderPanel.openPopup(this._resumeButton);
   },
 
   /**
    * Sets the chrome globals container hidden or visible. It's hidden by default.
    *
    * @param boolean aVisibleFlag
    *        Specifies the intended visibility.
    */
-  toggleChromeGlobalsContainer: function DVT_toggleChromeGlobalsContainer(aVisibleFlag) {
+  toggleChromeGlobalsContainer: function(aVisibleFlag) {
     this._chromeGlobals.setAttribute("hidden", !aVisibleFlag);
   },
 
   /**
    * Listener handling the toggle button click event.
    */
-  _onTogglePanesPressed: function DVT__onTogglePanesPressed() {
+  _onTogglePanesPressed: function() {
     DebuggerView.toggleInstrumentsPane({
       visible: DebuggerView.instrumentsPaneHidden,
       animated: true,
       delayed: true
     });
   },
 
   /**
    * Listener handling the pause/resume button click event.
    */
-  _onResumePressed: function DVT__onResumePressed() {
+  _onResumePressed: function() {
     if (DebuggerController.activeThread.paused) {
       let warn = DebuggerController._ensureResumptionOrder;
       DebuggerController.activeThread.resume(warn);
     } else {
       DebuggerController.activeThread.interrupt();
     }
   },
 
   /**
    * Listener handling the step over button click event.
    */
-  _onStepOverPressed: function DVT__onStepOverPressed() {
+  _onStepOverPressed: function() {
     if (DebuggerController.activeThread.paused) {
       DebuggerController.activeThread.stepOver();
     }
   },
 
   /**
    * Listener handling the step in button click event.
    */
-  _onStepInPressed: function DVT__onStepInPressed() {
+  _onStepInPressed: function() {
     if (DebuggerController.activeThread.paused) {
       DebuggerController.activeThread.stepIn();
     }
   },
 
   /**
    * Listener handling the step out button click event.
    */
-  _onStepOutPressed: function DVT__onStepOutPressed() {
+  _onStepOutPressed: function() {
     if (DebuggerController.activeThread.paused) {
       DebuggerController.activeThread.stepOut();
     }
   },
 
   _instrumentsPaneToggleButton: null,
   _resumeOrderPanel: null,
   _resumeButton: null,
@@ -189,17 +189,17 @@ function OptionsView() {
   this._toggleShowVariablesFilterBox = this._toggleShowVariablesFilterBox.bind(this);
   this._toggleShowOriginalSource = this._toggleShowOriginalSource.bind(this);
 }
 
 OptionsView.prototype = {
   /**
    * Initialization function, called when the debugger is started.
    */
-  initialize: function DVO_initialize() {
+  initialize: function() {
     dumpn("Initializing the OptionsView");
 
     this._button = document.getElementById("debugger-options");
     this._pauseOnExceptionsItem = document.getElementById("pause-on-exceptions");
     this._showPanesOnStartupItem = document.getElementById("show-panes-on-startup");
     this._showVariablesOnlyEnumItem = document.getElementById("show-vars-only-enum");
     this._showVariablesFilterBoxItem = document.getElementById("show-vars-filter-box");
     this._showOriginalSourceItem = document.getElementById("show-original-source");
@@ -209,71 +209,71 @@ OptionsView.prototype = {
     this._showVariablesOnlyEnumItem.setAttribute("checked", Prefs.variablesOnlyEnumVisible);
     this._showVariablesFilterBoxItem.setAttribute("checked", Prefs.variablesSearchboxVisible);
     this._showOriginalSourceItem.setAttribute("checked", Prefs.sourceMapsEnabled);
   },
 
   /**
    * Destruction function, called when the debugger is closed.
    */
-  destroy: function DVO_destroy() {
+  destroy: function() {
     dumpn("Destroying the OptionsView");
     // Nothing to do here yet.
   },
 
   /**
    * Listener handling the 'gear menu' popup showing event.
    */
-  _onPopupShowing: function DVO__onPopupShowing() {
+  _onPopupShowing: function() {
     this._button.setAttribute("open", "true");
   },
 
   /**
    * Listener handling the 'gear menu' popup hiding event.
    */
-  _onPopupHiding: function DVO__onPopupHiding() {
+  _onPopupHiding: function() {
     this._button.removeAttribute("open");
   },
 
   /**
    * Listener handling the 'pause on exceptions' menuitem command.
    */
-  _togglePauseOnExceptions: function DVO__togglePauseOnExceptions() {
+  _togglePauseOnExceptions: function() {
     DebuggerController.activeThread.pauseOnExceptions(Prefs.pauseOnExceptions =
       this._pauseOnExceptionsItem.getAttribute("checked") == "true");
   },
 
   /**
    * Listener handling the 'show panes on startup' menuitem command.
    */
-  _toggleShowPanesOnStartup: function DVO__toggleShowPanesOnStartup() {
+  _toggleShowPanesOnStartup: function() {
     Prefs.panesVisibleOnStartup =
       this._showPanesOnStartupItem.getAttribute("checked") == "true";
   },
 
   /**
    * Listener handling the 'show non-enumerables' menuitem command.
    */
-  _toggleShowVariablesOnlyEnum: function DVO__toggleShowVariablesOnlyEnum() {
+  _toggleShowVariablesOnlyEnum: function() {
     DebuggerView.Variables.onlyEnumVisible = Prefs.variablesOnlyEnumVisible =
       this._showVariablesOnlyEnumItem.getAttribute("checked") == "true";
   },
 
   /**
    * Listener handling the 'show variables searchbox' menuitem command.
    */
-  _toggleShowVariablesFilterBox: function DVO__toggleShowVariablesFilterBox() {
+  _toggleShowVariablesFilterBox: function() {
     DebuggerView.Variables.searchEnabled = Prefs.variablesSearchboxVisible =
       this._showVariablesFilterBoxItem.getAttribute("checked") == "true";
   },
 
   /**
    * Listener handling the 'show original source' menuitem command.
    */
-  _toggleShowOriginalSource: function DVO__toggleShowOriginalSource() {
+  _toggleShowOriginalSource: function() {
     let