diff --git a/Makefile.in b/Makefile.in
index 2a87a8abdfc..94b9a08f862 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -92,7 +92,10 @@ include backend.RecursiveMakeBackend.pp
default:: backend.RecursiveMakeBackend
-install_manifests := bin idl include public private sdk
+install_manifests := \
+ $(addprefix dist/,bin idl include public private sdk) \
+ _tests \
+ $(NULL)
install_manifest_depends = \
CLOBBER \
$(configure_dir)/configure \
@@ -110,7 +113,7 @@ endif
endif
.PHONY: install-manifests
-install-manifests: $(addprefix install-dist-,$(install_manifests))
+install-manifests: $(addprefix install-,$(install_manifests))
# process_install_manifest needs to be invoked with --no-remove when building
# js as standalone because automated builds are building nspr separately and
@@ -121,15 +124,17 @@ ifdef JS_STANDALONE
NO_REMOVE=1
endif
-.PHONY: $(addprefix install-dist-,$(install_manifests))
-$(addprefix install-dist-,$(install_manifests)): install-dist-%: $(install_manifest_depends)
+.PHONY: $(addprefix install-,$(install_manifests))
+$(addprefix install-,$(filter dist/%,$(install_manifests))): install-dist/%: $(install_manifest_depends)
$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$(DIST)/$* _build_manifests/install/dist_$*)
-.PHONY: install-tests
-install-manifests: install-tests
-install-tests: $(install_manifest_depends)
+install-_tests: $(install_manifest_depends)
$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )_tests _build_manifests/install/tests)
+# For compatibility
+.PHONY: install-tests
+install-tests: install-_tests
+
include $(topsrcdir)/build/moz-automation.mk
# _tests should be purged during cleaning. However, we don't want it purged
@@ -141,23 +146,25 @@ endif
# Windows PGO builds don't perform a clean before the 2nd pass. So, we want
# to preserve content for the 2nd pass on Windows. Everywhere else, we always
# process the install manifests as part of export.
+# For the binaries rule, not all the install manifests matter, so force only
+# the interesting ones to be done.
ifdef MOZ_PROFILE_USE
ifndef NO_PROFILE_GUIDED_OPTIMIZE
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
export:: install-manifests
binaries::
- @$(MAKE) install-manifests NO_REMOVE=1
+ @$(MAKE) install-manifests NO_REMOVE=1 install_manifests=dist/include
endif
endif
else # !MOZ_PROFILE_USE (normal build)
export:: install-manifests
binaries::
- @$(MAKE) install-manifests NO_REMOVE=1
+ @$(MAKE) install-manifests NO_REMOVE=1 install_manifests=dist/include
endif
# For historical reasons that are unknown, $(DIST)/sdk is always blown away
# with no regard for PGO passes. This decision could probably be revisited.
-export:: install-dist-sdk
+export:: install-dist/sdk
ifndef JS_STANDALONE
ifdef ENABLE_TESTS
diff --git a/accessible/base/SelectionManager.cpp b/accessible/base/SelectionManager.cpp
index d846e356bc8..1469390b166 100644
--- a/accessible/base/SelectionManager.cpp
+++ b/accessible/base/SelectionManager.cpp
@@ -154,6 +154,12 @@ SelectionManager::ProcessTextSelChangeEvent(AccEvent* aEvent)
return;
Selection* selection = caretCntr->DOMSelection();
+
+ // XXX Sometimes we can't get a selection for caretCntr, in that case assume
+ // event->mSel is correct.
+ if (!selection)
+ selection = event->mSel;
+
mCaretOffset = caretCntr->DOMPointToOffset(selection->GetFocusNode(),
selection->FocusOffset());
mAccWithCaret = caretCntr;
@@ -179,8 +185,7 @@ SelectionManager::NotifySelectionChanged(nsIDOMDocument* aDOMDocument,
logging::SelChange(aSelection, document, aReason);
#endif
- // Don't fire events until document is loaded.
- if (document && document->IsContentLoaded()) {
+ if (document) {
// Selection manager has longer lifetime than any document accessible,
// so that we are guaranteed that the notification is processed before
// the selection manager is destroyed.
diff --git a/accessible/base/TreeWalker.cpp b/accessible/base/TreeWalker.cpp
index 8e97e38c7a6..4ac1ee27b5f 100644
--- a/accessible/base/TreeWalker.cpp
+++ b/accessible/base/TreeWalker.cpp
@@ -12,36 +12,17 @@
#include "mozilla/dom/ChildIterator.h"
#include "mozilla/dom/Element.h"
+using namespace mozilla;
using namespace mozilla::a11y;
-////////////////////////////////////////////////////////////////////////////////
-// WalkState
-////////////////////////////////////////////////////////////////////////////////
-
-namespace mozilla {
-namespace a11y {
-
-struct WalkState
-{
- WalkState(nsIContent *aContent, uint32_t aFilter) :
- content(aContent), prevState(nullptr), iter(aContent, aFilter) {}
-
- nsCOMPtr
text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+ text text text text text text text text text text text text text text
+