Compare commits

..
56949 changed files with 4273512 additions and 7539443 deletions

No files matched your search

+22
View File
@@ -187,6 +187,28 @@ devtools/client/framework/test/code_ugly*
devtools/server/tests/unit/babel_and_browserify_script_with_source_map.js devtools/server/tests/unit/babel_and_browserify_script_with_source_map.js
devtools/server/tests/unit/setBreakpoint* devtools/server/tests/unit/setBreakpoint*
# mobile/android/ exclusions
mobile/android/tests/
# Uses `#filter substitution`
mobile/android/b2gdroid/app/b2gdroid.js
mobile/android/app/mobile.js
mobile/android/chrome/content/healthreport-prefs.js
# Uses `#expand`
mobile/android/chrome/content/about.js
# Not much JS to lint and non-standard at that
mobile/android/installer/
mobile/android/locales/
# Non-standard `(catch ex if ...)`
mobile/android/chrome/content/browser.js
mobile/android/components/Snippets.js
# Bug 1178739: Ignore this file as a quick fix for "Illegal yield expression"
mobile/android/modules/HomeProvider.jsm
# services/ exclusions # services/ exclusions
# Uses `#filter substitution` # Uses `#filter substitution`
+3
View File
@@ -91,6 +91,9 @@ GPATH
# Git clone directory for updating web-platform-tests # Git clone directory for updating web-platform-tests
testing/web-platform/sync/ testing/web-platform/sync/
# Android Gradle artifacts.
mobile/android/gradle/.gradle
# XCode project cruft # XCode project cruft
embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/project.xcworkspace/xcuserdata embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/project.xcworkspace/xcuserdata
embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/xcuserdata embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/xcuserdata
+5
View File
@@ -36,6 +36,11 @@ def FlagsForFile(filename):
flag_list = shlex.split(out.getvalue()) flag_list = shlex.split(out.getvalue())
# This flag is added by Fennec for android build and causes ycmd to fail to parse the file.
# Removing this flag is a workaround until ycmd starts to handle this flag properly.
# https://github.com/Valloric/YouCompleteMe/issues/1490
final_flags = [x for x in flag_list if not x.startswith('-march=armv')]
return { return {
'flags': final_flags, 'flags': final_flags,
'do_cache': True 'do_cache': True
+1 -1
View File
@@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please # changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more. # don't change CLOBBER for WebIDL changes any more.
Clobber for Issue #3027 Clobber for CSS flow-root implementation
+54 -15
View File
@@ -14,7 +14,7 @@ endif
export TOPLEVEL_BUILD := 1 export TOPLEVEL_BUILD := 1
default:: default::
BACKEND_ONCE_STAMP := backend.once.stamp
ifndef TEST_MOZBUILD ifndef TEST_MOZBUILD
ifdef MOZ_BUILD_APP ifdef MOZ_BUILD_APP
include $(wildcard $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk) include $(wildcard $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk)
@@ -46,7 +46,7 @@ ifndef TEST_MOZBUILD
ifndef MOZ_PROFILE_USE ifndef MOZ_PROFILE_USE
# We need to explicitly put BUILD_BACKEND_FILES here otherwise the rule in # We need to explicitly put BUILD_BACKEND_FILES here otherwise the rule in
# rules.mk doesn't run early enough. # rules.mk doesn't run early enough.
$(TIERS) binaries:: CLOBBER $(configure_dir)/configure config.status $(BACKEND_ONCE_STAMP) $(TIERS) binaries:: CLOBBER $(configure_dir)/configure config.status $(BUILD_BACKEND_FILES)
# While our mozbuild backend has some kind of crazy install_manfests junk to # While our mozbuild backend has some kind of crazy install_manfests junk to
# try and make this not have to happen, we actually want dist/bin to be # try and make this not have to happen, we actually want dist/bin to be
@@ -100,11 +100,7 @@ config.status js/src/config.status:
ifndef TEST_MOZBUILD ifndef TEST_MOZBUILD
.PHONY: backend .PHONY: backend
backend: $(BACKEND_ONCE_STAMP) backend: $(BUILD_BACKEND_FILES)
# Create a per-invocation stamp so backend regenerates only once
$(BACKEND_ONCE_STAMP):
@echo "Stamping backend regeneration."
@$(TOUCH) $@
# A traditional rule would look like this: # A traditional rule would look like this:
# backend.%: # backend.%:
@@ -126,7 +122,7 @@ $(subst .,%,$(BUILD_BACKEND_FILES)):
@echo 'Build configuration changed. Regenerating backend.' @echo 'Build configuration changed. Regenerating backend.'
$(PYTHON) config.status $(PYTHON) config.status
Makefile: $(BACKEND_ONCE_STAMP) Makefile: $(BUILD_BACKEND_FILES)
@$(TOUCH) $@ @$(TOUCH) $@
define build_backend_rule define build_backend_rule
@@ -141,10 +137,16 @@ default:: $(BUILD_BACKEND_FILES)
endif endif
install_manifests := \ install_manifests := \
$(addprefix dist/,branding bin idl include public private sdk xpi-stage) \ $(addprefix dist/,branding idl include public private sdk xpi-stage) \
_tests \ _tests \
$(NULL) $(NULL)
# Skip the dist/bin install manifest when using the hybrid
# FasterMake/RecursiveMake backend. This is a hack until bug 1241744 moves
# xpidl handling to FasterMake in that case, mechanically making the dist/bin
# install manifest non-existent (non-existent manifests being skipped)
ifeq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
install_manifests += dist/bin
endif
install_manifest_depends = \ install_manifest_depends = \
CLOBBER \ CLOBBER \
$(configure_dir)/configure \ $(configure_dir)/configure \
@@ -164,9 +166,45 @@ endif
.PHONY: install-manifests .PHONY: install-manifests
install-manifests: $(addprefix install-,$(install_manifests)) install-manifests: $(addprefix install-,$(install_manifests))
.PHONY: $(addprefix install-,$(install_manifests)) # If we're using the hybrid FasterMake/RecursiveMake backend, we want
# to recurse in the faster/ directory in parallel of install manifests.
# But dist/idl needs to happen before (cf. dependencies in
# config/faster/rules.mk)
ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
install-manifests: faster
.PHONY: faster
faster: install-dist/idl
$(MAKE) -C faster FASTER_RECURSIVE_MAKE=1
endif
.PHONY: tup
tup:
$(call BUILDSTATUS,TIERS make tup)
$(call BUILDSTATUS,TIER_START make)
$(MAKE) install-manifests buildid.h source-repo.h
$(call BUILDSTATUS,TIER_FINISH make)
$(call BUILDSTATUS,TIER_START tup)
@$(TUP) $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),,--verbose)
$(call BUILDSTATUS,TIER_FINISH tup)
# process_install_manifest needs to be invoked with --no-remove when building
# js as standalone because automated builds are building nspr separately and
# that would remove the resulting files.
# Eventually, a standalone js build would just be able to build nspr itself,
# removing the need for the former.
ifdef JS_STANDALONE
NO_REMOVE=1
endif
.PHONY: $(addprefix install-,$(subst /,_,$(install_manifests)))
$(addprefix install-,$(install_manifests)): install-%: $(install_manifest_depends) $(addprefix install-,$(install_manifests)): install-%: $(install_manifest_depends)
$(addprefix $(call py_action,process_install_manifest,--track install_$(subst /,_,$*).track $*) ,$(wildcard _build_manifests/install/$(subst /,_,$*))) ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
@# If we're using the hybrid FasterMake/RecursiveMake backend, we want
@# to ensure the FasterMake end doesn't have install manifests for the
@# same directory, because that would blow up
$(if $(wildcard _build_manifests/install/$(subst /,_,$*)),$(if $(wildcard faster/install_$(subst /,_,$*)*),$(error FasterMake and RecursiveMake ends of the hybrid build system want to handle $*)))
endif
$(addprefix $(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$*) ,$(wildcard _build_manifests/install/$(subst /,_,$*)))
# Dummy wrapper rule to allow the faster backend to piggy back # Dummy wrapper rule to allow the faster backend to piggy back
$(addprefix install-,$(subst /,_,$(filter dist/%,$(install_manifests)))): install-dist_%: install-dist/% ; $(addprefix install-,$(subst /,_,$(filter dist/%,$(install_manifests)))): install-dist_%: install-dist/% ;
@@ -179,9 +217,10 @@ install-tests: install-test-files
.PHONY: run-tests-deps .PHONY: run-tests-deps
run-tests-deps: $(install_manifest_depends) run-tests-deps: $(install_manifest_depends)
# Force --no-remove, because $objdir/_tests is handled by multiple manifests.
.PHONY: install-test-files .PHONY: install-test-files
install-test-files: install-test-files:
$(call py_action,process_install_manifest,--track install__test_files.track _tests _build_manifests/install/_test_files) $(call py_action,process_install_manifest,--no-remove _tests _build_manifests/install/_test_files)
include $(topsrcdir)/build/moz-automation.mk include $(topsrcdir)/build/moz-automation.mk
@@ -201,13 +240,13 @@ ifndef NO_PROFILE_GUIDED_OPTIMIZE
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_) ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
recurse_pre-export:: install-manifests recurse_pre-export:: install-manifests
binaries:: binaries::
@$(MAKE) install-manifests install_manifests=dist/include @$(MAKE) install-manifests NO_REMOVE=1 install_manifests=dist/include
endif endif
endif endif
else # !MOZ_PROFILE_USE (normal build) else # !MOZ_PROFILE_USE (normal build)
recurse_pre-export:: install-manifests recurse_pre-export:: install-manifests
binaries:: binaries::
@$(MAKE) install-manifests install_manifests=dist/include @$(MAKE) install-manifests NO_REMOVE=1 install_manifests=dist/include
endif endif
# For historical reasons that are unknown, $(DIST)/sdk is always blown away # For historical reasons that are unknown, $(DIST)/sdk is always blown away
+5 -12
View File
@@ -9,6 +9,8 @@ selective cherry-picking of directly-applicable patches, this repository has its
own development and holds the base for a maintained platform to be used by XUL own development and holds the base for a maintained platform to be used by XUL
applications. applications.
For a list of active projects making use of the Unified XUL Platform, checkout http://thereisonlyxul.org/.
## Additional documentation ## Additional documentation
Additional documentation relevant to this source code can be found in the `/docs` Additional documentation relevant to this source code can be found in the `/docs`
@@ -19,16 +21,9 @@ If you are interested in the development and building side of things, some
information will be available on the [Pale Moon developer site](http://developer.palemoon.org). information will be available on the [Pale Moon developer site](http://developer.palemoon.org).
You are also always welcome to get in touch with our community on the [Pale Moon forum](https://forum.palemoon.org/). You are also always welcome to get in touch with our community on the [Pale Moon forum](https://forum.palemoon.org/).
### Code search
While our repo has basic code searching capabilities (via `git grep`), you are strongly
encouraged to instead use the dedicated code search and cross-referencing site:
[https://xref.palemoon.org/](https://xref.palemoon.org/)
This repo and a copy of the front-end are amalgamated in the `goanna-central` index.
### A note about trademarks and branding ### A note about trademarks and branding
Although this repository is primarily licensed under Mozilla Public License v2.0, the Although this repository is licensed under Mozilla Public License v2.0, the
trademarks and brands contained herein remain the property of their respective trademarks and brands contained herein remain the property of their respective
owners. For more details, please see the notifications in the respective directories. owners. For more details, please see the notifications in the respective directories.
@@ -40,7 +35,5 @@ If you fork this repository to perform your own work on it, please consider offe
improvement patches upstream to its origin to mutually improve the platform and build improvement patches upstream to its origin to mutually improve the platform and build
a future for XUL. a future for XUL.
## Looking for Pale Moon? ## Looking for Pale Moon and Basilisk?
As of [`Issue #969`](https://repo.palemoon.org/MoonchildProductions/UXP/issues/969), release version `28.9.0`, As of [`Issue #969`](https://repo.palemoon.org/MoonchildProductions/UXP/issues/969), release versions `28.9.0` and `2020.03.04` respectively, they have been split off into their own dedicated repositories located at [`MoonchildProductions/Pale-Moon`](https://repo.palemoon.org/MoonchildProductions/Pale-Moon) and [`MoonchildProductions/Basilisk`](https://repo.palemoon.org/MoonchildProductions/Basilisk).
applications have been split off into their own dedicated (front-end) repositories, with Pale Moon located at
[`MoonchildProductions/Pale-Moon`](https://repo.palemoon.org/MoonchildProductions/Pale-Moon).
+3 -2
View File
@@ -15,14 +15,14 @@ What should be considered vulnerabilities or security hazards by default:
Generally not security vulnerabilities: Generally not security vulnerabilities:
- Null dereferencing crashes; - Null dereferencing crashes;
- Malware extensions (but please do report those on the forum in the add-ons board!); - Malware extensions (but please do report those on the forum in the extensions board!);
- Denial-of-service (AKA "evil trap sites") - Denial-of-service (AKA "evil trap sites")
- Browser hangs - Browser hangs
- Issues with non-standard manual configuration (either at build time or by manipulating about:config directly) - Issues with non-standard manual configuration (either at build time or by manipulating about:config directly)
## Reporting a Vulnerability ## Reporting a Vulnerability
If you find an issue in UXP, or the applications building on it, that could impact the security or safety of users please **do not** If you find an issue in UXP or the applications it builds on that could impact the security or safety of users please **do not**
make an issue on Gitea about it. Gitea does not support restricted viewability for security sensitive bugs. make an issue on Gitea about it. Gitea does not support restricted viewability for security sensitive bugs.
If you want to report a security-sensitive issue then please go to the [forum](https://forum.palemoon.org) and report the issue If you want to report a security-sensitive issue then please go to the [forum](https://forum.palemoon.org) and report the issue
@@ -33,3 +33,4 @@ except the recipient (not even moderators!).
You will be informed via private message if the vulnerability report is accepted or declined, with reasoning. You will be informed via private message if the vulnerability report is accepted or declined, with reasoning.
Security updates occur regularly and are given priority over most other development tasks. In general, they can be solved Security updates occur regularly and are given priority over most other development tasks. In general, they can be solved
relatively quickly and will be included in the next point release (third digit if not rolled into a more major one). relatively quickly and will be included in the next point release (third digit if not rolled into a more major one).
-8
View File
@@ -1,8 +0,0 @@
TRADEMARK NOTICE
================
The name "Goanna" and visual representations (logo) have not been
registered by the Copyright owners as a trademark in any jurisdiction.
However, because Goanna has been distributed and maintained world-wide,
continually since 2015, the Copyright owners claim "common-law trademark
protection" in any jurisdiction where common-law trademark is recognized.
+15 -65
View File
@@ -6,7 +6,7 @@
#include "Platform.h" #include "Platform.h"
#include "nsIAccessibleEvent.h" #include "nsIAccessibleEvent.h"
#include "nsIGSettingsService.h" #include "nsIGConfService.h"
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsMai.h" #include "nsMai.h"
#include "AtkSocketAccessible.h" #include "AtkSocketAccessible.h"
@@ -18,6 +18,10 @@
#endif #endif
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if (MOZ_WIDGET_GTK == 3)
extern "C" __attribute__((weak,visibility("default"))) int atk_bridge_adaptor_init(int*, char **[]);
#endif
using namespace mozilla; using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;
@@ -29,20 +33,12 @@ extern "C" {
typedef GType (* AtkGetTypeType) (void); typedef GType (* AtkGetTypeType) (void);
typedef void (*GnomeAccessibilityInit) (void); typedef void (*GnomeAccessibilityInit) (void);
typedef void (*GnomeAccessibilityShutdown) (void); typedef void (*GnomeAccessibilityShutdown) (void);
#if (MOZ_WIDGET_GTK == 3)
typedef int (*AtkBridgeAdaptorInit) (int*, char***);
#endif
} }
static PRLibrary* sATKLib = nullptr; static PRLibrary* sATKLib = nullptr;
static const char sATKLibName[] = "libatk-1.0.so.0"; static const char sATKLibName[] = "libatk-1.0.so.0";
static const char sATKHyperlinkImplGetTypeSymbol[] = static const char sATKHyperlinkImplGetTypeSymbol[] =
"atk_hyperlink_impl_get_type"; "atk_hyperlink_impl_get_type";
#if (MOZ_WIDGET_GTK == 3)
static PRLibrary* sAtkBridgeAdaptorLib = nullptr;
static const char sAtkBridgeAdaptorLibName[] = "libatk-bridge-2.0.so.0";
static const char sAtkBridgeAdaptorInitSymbol[] = "atk_bridge_adaptor_init";
#endif
gboolean toplevel_event_watcher(GSignalInvocationHint*, guint, const GValue*, gboolean toplevel_event_watcher(GSignalInvocationHint*, guint, const GValue*,
gpointer); gpointer);
@@ -131,38 +127,6 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
return NS_OK; return NS_OK;
} }
#if (MOZ_WIDGET_GTK == 3)
static bool
InitAtkBridgeAdaptor()
{
AtkBridgeAdaptorInit initBridge =
reinterpret_cast<AtkBridgeAdaptorInit>(
PR_FindFunctionSymbolAndLibrary(sAtkBridgeAdaptorInitSymbol,
&sAtkBridgeAdaptorLib));
if (!initBridge) {
sAtkBridgeAdaptorLib = PR_LoadLibrary(sAtkBridgeAdaptorLibName);
if (sAtkBridgeAdaptorLib) {
initBridge =
reinterpret_cast<AtkBridgeAdaptorInit>(
PR_FindFunctionSymbol(sAtkBridgeAdaptorLib,
sAtkBridgeAdaptorInitSymbol));
if (!initBridge) {
PR_UnloadLibrary(sAtkBridgeAdaptorLib);
sAtkBridgeAdaptorLib = nullptr;
}
}
}
if (!initBridge) {
return false;
}
initBridge(nullptr, nullptr);
return true;
}
#endif
void void
a11y::PlatformInit() a11y::PlatformInit()
{ {
@@ -217,7 +181,9 @@ a11y::PlatformInit()
// Init atk-bridge now // Init atk-bridge now
PR_SetEnv("NO_AT_BRIDGE=0"); PR_SetEnv("NO_AT_BRIDGE=0");
#if (MOZ_WIDGET_GTK == 3) #if (MOZ_WIDGET_GTK == 3)
if (!InitAtkBridgeAdaptor()) if (atk_bridge_adaptor_init) {
atk_bridge_adaptor_init(nullptr, nullptr);
} else
#endif #endif
{ {
nsresult rv = LoadGtkModule(sAtkBridge); nsresult rv = LoadGtkModule(sAtkBridge);
@@ -262,13 +228,6 @@ a11y::PlatformShutdown()
sAtkBridge.init = nullptr; sAtkBridge.init = nullptr;
sAtkBridge.shutdown = nullptr; sAtkBridge.shutdown = nullptr;
} }
#if (MOZ_WIDGET_GTK == 3)
if (sAtkBridgeAdaptorLib) {
// Do not shutdown/unload atk-bridge; an exit function registered by
// the bridge will take care of it.
sAtkBridgeAdaptorLib = nullptr;
}
#endif
#if (MOZ_WIDGET_GTK == 2) #if (MOZ_WIDGET_GTK == 2)
if (sGail.lib) { if (sGail.lib) {
// Do not shutdown gail because // Do not shutdown gail because
@@ -401,22 +360,13 @@ dbus_done:
return sShouldEnable; return sShouldEnable;
#endif #endif
// check GSettings //check gconf-2 setting
#define GSETINGS_A11Y_INTERFACE "org.gnome.desktop.interface" #define GCONF_A11Y_KEY "/desktop/gnome/interface/accessibility"
#define GSETINGS_A11Y_KEY "toolkit-accessibility" nsresult rv = NS_OK;
nsCOMPtr<nsIGSettingsService> gsettings = nsCOMPtr<nsIGConfService> gconf =
do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); do_GetService(NS_GCONFSERVICE_CONTRACTID, &rv);
nsCOMPtr<nsIGSettingsCollection> a11y_settings; if (NS_SUCCEEDED(rv) && gconf)
gconf->GetBool(NS_LITERAL_CSTRING(GCONF_A11Y_KEY), &sShouldEnable);
if (gsettings) {
gsettings->GetCollectionForSchema(NS_LITERAL_CSTRING(GSETINGS_A11Y_INTERFACE),
getter_AddRefs(a11y_settings));
if (a11y_settings) {
a11y_settings->GetBoolean(NS_LITERAL_CSTRING(GSETINGS_A11Y_KEY),
&sShouldEnable);
}
}
return sShouldEnable; return sShouldEnable;
} }
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -5,7 +5,9 @@
#include "AccIterator.h" #include "AccIterator.h"
#include "AccGroupInfo.h" #include "AccGroupInfo.h"
#ifdef MOZ_XUL
#include "XULTreeAccessible.h" #include "XULTreeAccessible.h"
#endif
#include "mozilla/dom/HTMLLabelElement.h" #include "mozilla/dom/HTMLLabelElement.h"
+1 -1
View File
@@ -55,7 +55,7 @@ private:
{ {
explicit IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr); explicit IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr);
RefPtr<Accessible> mParent; Accessible* mParent;
int32_t mIndex; int32_t mIndex;
IteratorState* mParentState; IteratorState* mParentState;
}; };
+2
View File
@@ -341,6 +341,8 @@ LogRequest(nsIRequest* aRequest)
printf("targeted; "); printf("targeted; ");
if (loadFlags & nsIChannel::LOAD_CALL_CONTENT_SNIFFERS) if (loadFlags & nsIChannel::LOAD_CALL_CONTENT_SNIFFERS)
printf("call content sniffers; "); printf("call content sniffers; ");
if (loadFlags & nsIChannel::LOAD_CLASSIFY_URI)
printf("classify uri; ");
} else { } else {
printf(" no request"); printf(" no request");
} }
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+1 -1
View File
@@ -13,6 +13,7 @@
#include "mozilla/dom/TabChild.h" #include "mozilla/dom/TabChild.h"
#include "mozilla/dom/Element.h" #include "mozilla/dom/Element.h"
#include "mozilla/Telemetry.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;
@@ -276,7 +277,6 @@ NotificationController::DropMutationEvent(AccTreeMutationEvent* aEvent)
MOZ_ASSERT(hideEvent); MOZ_ASSERT(hideEvent);
if (hideEvent->NeedsShutdown()) { if (hideEvent->NeedsShutdown()) {
mDocument->UncacheChildrenInSubtree(aEvent->GetAccessible());
mDocument->ShutdownChildrenInSubtree(aEvent->GetAccessible()); mDocument->ShutdownChildrenInSubtree(aEvent->GetAccessible());
} }
} }
-4
View File
@@ -7,10 +7,6 @@
* ROLE(geckoRole, stringRole, atkRole, macRole, msaaRole, ia2Role, nameRule) * ROLE(geckoRole, stringRole, atkRole, macRole, msaaRole, ia2Role, nameRule)
*/ */
#ifndef NSAccessibilityCellRole
#define NSAccessibilityCellRole NSAccessibilityUnknownRole
#endif
ROLE(NOTHING, ROLE(NOTHING,
"nothing", "nothing",
ATK_ROLE_UNKNOWN, ATK_ROLE_UNKNOWN,
+1 -1
View File
@@ -80,7 +80,7 @@ StyleInfo::TextIndent(nsAString& aValue)
} }
void void
StyleInfo::Margin(Side aSide, nsAString& aValue) StyleInfo::Margin(css::Side aSide, nsAString& aValue)
{ {
MOZ_ASSERT(mElement->GetPrimaryFrame(), " mElement->GetPrimaryFrame() needs to be valid pointer"); MOZ_ASSERT(mElement->GetPrimaryFrame(), " mElement->GetPrimaryFrame() needs to be valid pointer");
aValue.Truncate(); aValue.Truncate();
+26 -8
View File
@@ -18,6 +18,10 @@
#include "mozilla/AppUnits.h" #include "mozilla/AppUnits.h"
#include "mozilla/gfx/2D.h" #include "mozilla/gfx/2D.h"
#if defined(MOZ_WIDGET_GTK)
#include "gfxPlatformGtk.h" // xxx - for UseFcFontList
#endif
using namespace mozilla; using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;
@@ -649,14 +653,28 @@ TextAttrsMgr::FontWeightTextAttr::
if (font->IsSyntheticBold()) if (font->IsSyntheticBold())
return 700; return 700;
// On Windows, font->GetStyle()->weight will give the same weight as bool useFontEntryWeight = true;
// fontEntry->Weight(), the weight of the first font in the font group,
// which may not be the weight of the font face used to render the // Under Linux, when gfxPangoFontGroup code is used,
// characters. On Mac, font->GetStyle()->weight will just give the same // font->GetStyle()->weight will give the absolute weight requested of the
// number as getComputedStyle(). fontEntry->Weight() will give the weight // font face. The gfxPangoFontGroup code uses the gfxFontEntry constructor
// of the font face used. // which doesn't initialize the weight field.
gfxFontEntry *fontEntry = font->GetFontEntry(); #if defined(MOZ_WIDGET_GTK)
return fontEntry->Weight(); useFontEntryWeight = gfxPlatformGtk::UseFcFontList();
#endif
if (useFontEntryWeight) {
// On Windows, font->GetStyle()->weight will give the same weight as
// fontEntry->Weight(), the weight of the first font in the font group,
// which may not be the weight of the font face used to render the
// characters. On Mac, font->GetStyle()->weight will just give the same
// number as getComputedStyle(). fontEntry->Weight() will give the weight
// of the font face used.
gfxFontEntry *fontEntry = font->GetFontEntry();
return fontEntry->Weight();
} else {
return font->GetStyle()->weight;
}
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
+10 -12
View File
@@ -44,9 +44,7 @@
#ifdef XP_WIN #ifdef XP_WIN
#include "mozilla/a11y/Compatibility.h" #include "mozilla/a11y/Compatibility.h"
#include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentChild.h"
#ifdef MOZ_ENABLE_NPAPI
#include "HTMLWin32ObjectAccessible.h" #include "HTMLWin32ObjectAccessible.h"
#endif
#include "mozilla/StaticPtr.h" #include "mozilla/StaticPtr.h"
#endif #endif
@@ -57,10 +55,8 @@
#include "nsImageFrame.h" #include "nsImageFrame.h"
#include "nsIObserverService.h" #include "nsIObserverService.h"
#include "nsLayoutUtils.h" #include "nsLayoutUtils.h"
#ifdef MOZ_ENABLE_NPAPI
#include "nsPluginFrame.h" #include "nsPluginFrame.h"
#endif #include "nsSVGPathGeometryFrame.h"
#include "SVGGeometryFrame.h"
#include "nsTreeBodyFrame.h" #include "nsTreeBodyFrame.h"
#include "nsTreeColumns.h" #include "nsTreeColumns.h"
#include "nsTreeUtils.h" #include "nsTreeUtils.h"
@@ -72,6 +68,7 @@
#include "mozilla/Services.h" #include "mozilla/Services.h"
#include "nsDeckFrame.h" #include "nsDeckFrame.h"
#ifdef MOZ_XUL
#include "XULAlertAccessible.h" #include "XULAlertAccessible.h"
#include "XULColorPickerAccessible.h" #include "XULColorPickerAccessible.h"
#include "XULComboboxAccessible.h" #include "XULComboboxAccessible.h"
@@ -82,8 +79,9 @@
#include "XULSliderAccessible.h" #include "XULSliderAccessible.h"
#include "XULTabAccessible.h" #include "XULTabAccessible.h"
#include "XULTreeGridAccessibleWrap.h" #include "XULTreeGridAccessibleWrap.h"
#endif
#if (defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)) && defined(MOZ_ENABLE_NPAPI) #if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
#include "nsNPAPIPluginInstance.h" #include "nsNPAPIPluginInstance.h"
#endif #endif
@@ -435,7 +433,6 @@ private:
NS_IMPL_ISUPPORTS(PluginTimerCallBack, nsITimerCallback) NS_IMPL_ISUPPORTS(PluginTimerCallBack, nsITimerCallback)
#endif #endif
#ifdef MOZ_ENABLE_NPAPI
already_AddRefed<Accessible> already_AddRefed<Accessible>
nsAccessibilityService::CreatePluginAccessible(nsPluginFrame* aFrame, nsAccessibilityService::CreatePluginAccessible(nsPluginFrame* aFrame,
nsIContent* aContent, nsIContent* aContent,
@@ -498,7 +495,6 @@ nsAccessibilityService::CreatePluginAccessible(nsPluginFrame* aFrame,
return nullptr; return nullptr;
} }
#endif // MOZ_ENABLE_NPAPI
void void
nsAccessibilityService::DeckPanelSwitched(nsIPresShell* aPresShell, nsAccessibilityService::DeckPanelSwitched(nsIPresShell* aPresShell,
@@ -1165,8 +1161,8 @@ nsAccessibilityService::CreateAccessible(nsINode* aNode,
if (!newAcc) { if (!newAcc) {
if (content->IsSVGElement()) { if (content->IsSVGElement()) {
SVGGeometryFrame* geometryFrame = do_QueryFrame(frame); nsSVGPathGeometryFrame* pathGeometryFrame = do_QueryFrame(frame);
if (geometryFrame) { if (pathGeometryFrame) {
// A graphic elements: rect, circle, ellipse, line, path, polygon, // A graphic elements: rect, circle, ellipse, line, path, polygon,
// polyline and image. A 'use' and 'text' graphic elements require // polyline and image. A 'use' and 'text' graphic elements require
// special support. // special support.
@@ -1360,6 +1356,7 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
} }
RefPtr<Accessible> accessible; RefPtr<Accessible> accessible;
#ifdef MOZ_XUL
// XUL controls // XUL controls
if (role.EqualsLiteral("xul:alert")) { if (role.EqualsLiteral("xul:alert")) {
accessible = new XULAlertAccessible(aContent, aDoc); accessible = new XULAlertAccessible(aContent, aDoc);
@@ -1518,6 +1515,7 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
accessible = new XULToolbarButtonAccessible(aContent, aDoc); accessible = new XULToolbarButtonAccessible(aContent, aDoc);
} }
#endif // MOZ_XUL
return accessible.forget(); return accessible.forget();
} }
@@ -1644,13 +1642,11 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
case eOuterDocType: case eOuterDocType:
newAcc = new OuterDocAccessible(aContent, document); newAcc = new OuterDocAccessible(aContent, document);
break; break;
#ifdef MOZ_ENABLE_NPAPI
case ePluginType: { case ePluginType: {
nsPluginFrame* pluginFrame = do_QueryFrame(aFrame); nsPluginFrame* pluginFrame = do_QueryFrame(aFrame);
newAcc = CreatePluginAccessible(pluginFrame, aContent, aContext); newAcc = CreatePluginAccessible(pluginFrame, aContent, aContext);
break; break;
} }
#endif
case eTextLeafType: case eTextLeafType:
newAcc = new TextLeafAccessibleWrap(aContent, document); newAcc = new TextLeafAccessibleWrap(aContent, document);
break; break;
@@ -1743,6 +1739,7 @@ nsAccessibilityService::HasAccessible(nsIDOMNode* aDOMNode)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// nsAccessibilityService private (DON'T put methods here) // nsAccessibilityService private (DON'T put methods here)
#ifdef MOZ_XUL
already_AddRefed<Accessible> already_AddRefed<Accessible>
nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent, nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
DocAccessible* aDoc) DocAccessible* aDoc)
@@ -1772,6 +1769,7 @@ nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
new XULTreeGridAccessibleWrap(aContent, aDoc, treeFrame); new XULTreeGridAccessibleWrap(aContent, aDoc, treeFrame);
return accessible.forget(); return accessible.forget();
} }
#endif
nsAccessibilityService* nsAccessibilityService*
GetOrCreateAccService(uint32_t aNewConsumer) GetOrCreateAccService(uint32_t aNewConsumer)
+2 -4
View File
@@ -20,9 +20,7 @@
class nsImageFrame; class nsImageFrame;
class nsIArray; class nsIArray;
class nsIPersistentProperties; class nsIPersistentProperties;
#ifdef MOZ_ENABLE_NPAPI
class nsPluginFrame; class nsPluginFrame;
#endif
class nsITreeView; class nsITreeView;
namespace mozilla { namespace mozilla {
@@ -89,11 +87,9 @@ public:
Accessible* GetRootDocumentAccessible(nsIPresShell* aPresShell, Accessible* GetRootDocumentAccessible(nsIPresShell* aPresShell,
bool aCanCreate); bool aCanCreate);
#ifdef MOZ_ENABLE_NPAPI
already_AddRefed<Accessible> already_AddRefed<Accessible>
CreatePluginAccessible(nsPluginFrame* aFrame, nsIContent* aContent, CreatePluginAccessible(nsPluginFrame* aFrame, nsIContent* aContent,
Accessible* aContext); Accessible* aContext);
#endif
/** /**
* Adds/remove ATK root accessible for gtk+ native window to/from children * Adds/remove ATK root accessible for gtk+ native window to/from children
@@ -278,11 +274,13 @@ private:
CreateAccessibleByFrameType(nsIFrame* aFrame, nsIContent* aContent, CreateAccessibleByFrameType(nsIFrame* aFrame, nsIContent* aContent,
Accessible* aContext); Accessible* aContext);
#ifdef MOZ_XUL
/** /**
* Create accessible for XUL tree element. * Create accessible for XUL tree element.
*/ */
already_AddRefed<Accessible> already_AddRefed<Accessible>
CreateAccessibleForXULTree(nsIContent* aContent, DocAccessible* aDoc); CreateAccessibleForXULTree(nsIContent* aContent, DocAccessible* aDoc);
#endif
/** /**
* Reference for accessibility service instance. * Reference for accessibility service instance.
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+7 -3
View File
@@ -48,7 +48,9 @@
#include "mozilla/dom/DocumentType.h" #include "mozilla/dom/DocumentType.h"
#include "mozilla/dom/Element.h" #include "mozilla/dom/Element.h"
#ifdef MOZ_XUL
#include "nsIXULDocument.h" #include "nsIXULDocument.h"
#endif
using namespace mozilla; using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;
@@ -157,7 +159,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DocAccessible, Accessible)
tmp->mARIAOwnsHash.Clear(); tmp->mARIAOwnsHash.Clear();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DocAccessible) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DocAccessible)
NS_INTERFACE_MAP_ENTRY(nsIDocumentObserver) NS_INTERFACE_MAP_ENTRY(nsIDocumentObserver)
NS_INTERFACE_MAP_ENTRY(nsIMutationObserver) NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
@@ -208,9 +210,11 @@ DocAccessible::NativeRole()
return roles::CHROME_WINDOW; return roles::CHROME_WINDOW;
if (itemType == nsIDocShellTreeItem::typeContent) { if (itemType == nsIDocShellTreeItem::typeContent) {
#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode)); nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode));
if (xulDoc) if (xulDoc)
return roles::APPLICATION; return roles::APPLICATION;
#endif
return roles::DOCUMENT; return roles::DOCUMENT;
} }
} }
@@ -383,11 +387,13 @@ DocAccessible::URL(nsAString& aURL) const
void void
DocAccessible::DocType(nsAString& aType) const DocAccessible::DocType(nsAString& aType) const
{ {
#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode)); nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode));
if (xulDoc) { if (xulDoc) {
aType.AssignLiteral("window"); // doctype not implemented for XUL at time of writing - causes assertion aType.AssignLiteral("window"); // doctype not implemented for XUL at time of writing - causes assertion
return; return;
} }
#endif
dom::DocumentType* docType = mDocumentNode->GetDoctype(); dom::DocumentType* docType = mDocumentNode->GetDoctype();
if (docType) if (docType)
docType->GetPublicId(aType); docType->GetPublicId(aType);
@@ -1307,8 +1313,6 @@ DocAccessible::UnbindFromDocument(Accessible* aAccessible)
{ {
NS_ASSERTION(mAccessibleCache.GetWeak(aAccessible->UniqueID()), NS_ASSERTION(mAccessibleCache.GetWeak(aAccessible->UniqueID()),
"Unbinding the unbound accessible!"); "Unbinding the unbound accessible!");
MOZ_ASSERT(!mARIAOwnsHash.Contains(aAccessible),
"Container still lingering in mARIAOwnsHash");
// Fire focus event on accessible having DOM focus if active item was removed // Fire focus event on accessible having DOM focus if active item was removed
// from the tree. // from the tree.
+1 -1
View File
@@ -76,7 +76,7 @@ HyperTextAccessible::NativeState()
{ {
uint64_t states = AccessibleWrap::NativeState(); uint64_t states = AccessibleWrap::NativeState();
if (mContent->AsElement()->State().HasState(NS_EVENT_STATE_READWRITE)) { if (mContent->AsElement()->State().HasState(NS_EVENT_STATE_MOZ_READWRITE)) {
states |= states::EDITABLE; states |= states::EDITABLE;
} else if (mContent->IsHTMLElement(nsGkAtoms::article)) { } else if (mContent->IsHTMLElement(nsGkAtoms::article)) {
+31 -8
View File
@@ -19,7 +19,9 @@
#include "Relation.h" #include "Relation.h"
#include "Role.h" #include "Role.h"
#include "States.h" #include "States.h"
#ifdef MOZ_XUL
#include "XULTreeAccessible.h" #include "XULTreeAccessible.h"
#endif
#include "mozilla/dom/Element.h" #include "mozilla/dom/Element.h"
@@ -41,8 +43,10 @@
#include "nsFocusManager.h" #include "nsFocusManager.h"
#include "nsGlobalWindow.h" #include "nsGlobalWindow.h"
#ifdef MOZ_XUL
#include "nsIXULDocument.h" #include "nsIXULDocument.h"
#include "nsIXULWindow.h" #include "nsIXULWindow.h"
#endif
using namespace mozilla; using namespace mozilla;
using namespace mozilla::a11y; using namespace mozilla::a11y;
@@ -98,6 +102,7 @@ RootAccessible::NativeRole()
} }
// RootAccessible protected member // RootAccessible protected member
#ifdef MOZ_XUL
uint32_t uint32_t
RootAccessible::GetChromeFlags() RootAccessible::GetChromeFlags()
{ {
@@ -117,6 +122,7 @@ RootAccessible::GetChromeFlags()
xulWin->GetChromeFlags(&chromeFlags); xulWin->GetChromeFlags(&chromeFlags);
return chromeFlags; return chromeFlags;
} }
#endif
uint64_t uint64_t
RootAccessible::NativeState() RootAccessible::NativeState()
@@ -125,6 +131,7 @@ RootAccessible::NativeState()
if (state & states::DEFUNCT) if (state & states::DEFUNCT)
return state; return state;
#ifdef MOZ_XUL
uint32_t chromeFlags = GetChromeFlags(); uint32_t chromeFlags = GetChromeFlags();
if (chromeFlags & nsIWebBrowserChrome::CHROME_WINDOW_RESIZE) if (chromeFlags & nsIWebBrowserChrome::CHROME_WINDOW_RESIZE)
state |= states::SIZEABLE; state |= states::SIZEABLE;
@@ -135,6 +142,7 @@ RootAccessible::NativeState()
state |= states::MOVEABLE; state |= states::MOVEABLE;
if (chromeFlags & nsIWebBrowserChrome::CHROME_MODAL) if (chromeFlags & nsIWebBrowserChrome::CHROME_MODAL)
state |= states::MODAL; state |= states::MODAL;
#endif
nsFocusManager* fm = nsFocusManager::GetFocusManager(); nsFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm && fm->GetActiveWindow() == mDocumentNode->GetWindow()) if (fm && fm->GetActiveWindow() == mDocumentNode->GetWindow())
@@ -284,6 +292,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
if (!accessible) if (!accessible)
return; return;
#ifdef MOZ_XUL
XULTreeAccessible* treeAcc = accessible->AsXULTree(); XULTreeAccessible* treeAcc = accessible->AsXULTree();
if (treeAcc) { if (treeAcc) {
if (eventType.EqualsLiteral("TreeRowCountChanged")) { if (eventType.EqualsLiteral("TreeRowCountChanged")) {
@@ -296,6 +305,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
return; return;
} }
} }
#endif
if (eventType.EqualsLiteral("RadioStateChange")) { if (eventType.EqualsLiteral("RadioStateChange")) {
uint64_t state = accessible->State(); uint64_t state = accessible->State();
@@ -331,6 +341,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
} }
Accessible* treeItemAcc = nullptr; Accessible* treeItemAcc = nullptr;
#ifdef MOZ_XUL
// If it's a tree element, need the currently selected item. // If it's a tree element, need the currently selected item.
if (treeAcc) { if (treeAcc) {
treeItemAcc = accessible->CurrentItem(); treeItemAcc = accessible->CurrentItem();
@@ -374,22 +385,29 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
nsEventShell::FireEvent(selChangeEvent); nsEventShell::FireEvent(selChangeEvent);
return; return;
} }
} else if (eventType.EqualsLiteral("AlertActive")) { }
else
#endif
if (eventType.EqualsLiteral("AlertActive")) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_ALERT, accessible); nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_ALERT, accessible);
} else if (eventType.EqualsLiteral("popupshown")) { }
else if (eventType.EqualsLiteral("popupshown")) {
HandlePopupShownEvent(accessible); HandlePopupShownEvent(accessible);
} else if (eventType.EqualsLiteral("DOMMenuInactive")) { }
else if (eventType.EqualsLiteral("DOMMenuInactive")) {
if (accessible->Role() == roles::MENUPOPUP) { if (accessible->Role() == roles::MENUPOPUP) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END, nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
accessible); accessible);
} }
} else if (eventType.EqualsLiteral("DOMMenuItemActive")) { }
else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
FocusMgr()->ActiveItemChanged(accessible); FocusMgr()->ActiveItemChanged(accessible);
#ifdef A11Y_LOG #ifdef A11Y_LOG
if (logging::IsEnabled(logging::eFocus)) if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuItemActive", accessible); logging::ActiveItemChangeCausedBy("DOMMenuItemActive", accessible);
#endif #endif
} else if (eventType.EqualsLiteral("DOMMenuItemInactive")) { }
else if (eventType.EqualsLiteral("DOMMenuItemInactive")) {
// Process DOMMenuItemInactive event for autocomplete only because this is // Process DOMMenuItemInactive event for autocomplete only because this is
// unique widget that may acquire focus from autocomplete popup while popup // unique widget that may acquire focus from autocomplete popup while popup
// stays open and has no active item. In case of XUL tree autocomplete // stays open and has no active item. In case of XUL tree autocomplete
@@ -403,7 +421,8 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
logging::ActiveItemChangeCausedBy("DOMMenuItemInactive", accessible); logging::ActiveItemChangeCausedBy("DOMMenuItemInactive", accessible);
#endif #endif
} }
} else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input }
else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_START, nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_START,
accessible, eFromUserInput); accessible, eFromUserInput);
@@ -421,7 +440,8 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
logging::ActiveItemChangeCausedBy("DOMMenuBarActive", accessible); logging::ActiveItemChangeCausedBy("DOMMenuBarActive", accessible);
#endif #endif
} }
} else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input }
else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_END, nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_END,
accessible, eFromUserInput); accessible, eFromUserInput);
@@ -430,7 +450,8 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
if (logging::IsEnabled(logging::eFocus)) if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuBarInactive", accessible); logging::ActiveItemChangeCausedBy("DOMMenuBarInactive", accessible);
#endif #endif
} else if (accessible->NeedsDOMUIEvent() && }
else if (accessible->NeedsDOMUIEvent() &&
eventType.EqualsLiteral("ValueChange")) { eventType.EqualsLiteral("ValueChange")) {
uint32_t event = accessible->HasNumericValue() uint32_t event = accessible->HasNumericValue()
? nsIAccessibleEvent::EVENT_VALUE_CHANGE ? nsIAccessibleEvent::EVENT_VALUE_CHANGE
@@ -629,6 +650,7 @@ RootAccessible::HandlePopupHidingEvent(nsINode* aPopupNode)
} }
} }
#ifdef MOZ_XUL
void void
RootAccessible::HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent, RootAccessible::HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible) XULTreeAccessible* aAccessible)
@@ -692,6 +714,7 @@ RootAccessible::HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
aAccessible->TreeViewInvalidated(startRow, endRow, startCol, endCol); aAccessible->TreeViewInvalidated(startRow, endRow, startCol, endCol);
} }
#endif
ProxyAccessible* ProxyAccessible*
RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const
+7 -5
View File
@@ -70,12 +70,14 @@ protected:
*/ */
void HandlePopupHidingEvent(nsINode* aNode); void HandlePopupHidingEvent(nsINode* aNode);
void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent, #ifdef MOZ_XUL
XULTreeAccessible* aAccessible); void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent, XULTreeAccessible* aAccessible);
XULTreeAccessible* aAccessible); void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible);
uint32_t GetChromeFlags(); uint32_t GetChromeFlags();
#endif
}; };
inline RootAccessible* inline RootAccessible*
+1 -2
View File
@@ -486,14 +486,13 @@ DocAccessibleParent::SetCOMProxy(const RefPtr<IAccessible>& aCOMProxy)
IAccessibleHolder holder(Move(ptr)); IAccessibleHolder holder(Move(ptr));
Unused << SendParentCOMProxy(holder); Unused << SendParentCOMProxy(holder);
} }
#ifdef MOZ_ENABLE_NPAPI
bool bool
DocAccessibleParent::RecvGetWindowedPluginIAccessible( DocAccessibleParent::RecvGetWindowedPluginIAccessible(
const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy) const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy)
{ {
return false; return false;
} }
#endif
#endif // defined(XP_WIN) #endif // defined(XP_WIN)
+3 -4
View File
@@ -143,11 +143,10 @@ public:
#if defined(XP_WIN) #if defined(XP_WIN)
void SetCOMProxy(const RefPtr<IAccessible>& aCOMProxy); void SetCOMProxy(const RefPtr<IAccessible>& aCOMProxy);
#ifdef MOZ_ENABLE_NPAPI
virtual bool RecvGetWindowedPluginIAccessible( virtual bool RecvGetWindowedPluginIAccessible(
const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy) override; const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy) override;
#endif // MOZ_ENABLE_NPAPI #endif
#endif // XP_WIN
private: private:
@@ -177,7 +176,7 @@ private:
uint32_t AddSubtree(ProxyAccessible* aParent, uint32_t AddSubtree(ProxyAccessible* aParent,
const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx, const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx,
uint32_t aIdxInParent); uint32_t aIdxInParent);
[[nodiscard]] bool CheckDocTree() const; MOZ_MUST_USE bool CheckDocTree() const;
xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy); xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
nsTArray<DocAccessibleParent*> mChildDocs; nsTArray<DocAccessibleParent*> mChildDocs;
-2
View File
@@ -61,10 +61,8 @@ parent:
*/ */
async BindChildDoc(PDocAccessible aChildDoc, uint64_t aID); async BindChildDoc(PDocAccessible aChildDoc, uint64_t aID);
#ifdef MOZ_ENABLE_NPAPI
sync GetWindowedPluginIAccessible(WindowsHandle aHwnd) sync GetWindowedPluginIAccessible(WindowsHandle aHwnd)
returns (IAccessibleHolder aPluginCOMProxy); returns (IAccessibleHolder aPluginCOMProxy);
#endif
child: child:
async ParentCOMProxy(IAccessibleHolder aParentCOMProxy); async ParentCOMProxy(IAccessibleHolder aParentCOMProxy);
+1 -1
View File
@@ -8,7 +8,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
# With --disable-accessibility, we need to compile PDocAccessible.ipdl (which # With --disable-accessibility, we need to compile PDocAccessible.ipdl (which
# also depends on COMPtrTypes.h), but not the C++. # also depends on COMPtrTypes.h), but not the C++.
PREPROCESSED_IPDL_SOURCES += ['PDocAccessible.ipdl'] IPDL_SOURCES += ['PDocAccessible.ipdl']
EXPORTS.mozilla.a11y += ['COMPtrTypes.h'] EXPORTS.mozilla.a11y += ['COMPtrTypes.h']
if CONFIG['ACCESSIBILITY']: if CONFIG['ACCESSIBILITY']:
+28 -7
View File
@@ -64,7 +64,9 @@ this.AccessFu = { // jshint ignore:line
if (this._enabled) { if (this._enabled) {
this._disable(); this._disable();
} }
if (Utils.win.navigator.mozSettings) { if (Utils.MozBuildApp === 'mobile/android') {
Services.obs.removeObserver(this, 'Accessibility:Settings');
} else if (Utils.win.navigator.mozSettings) {
Utils.win.navigator.mozSettings.removeObserver( Utils.win.navigator.mozSettings.removeObserver(
SCREENREADER_SETTING, this.handleEvent); SCREENREADER_SETTING, this.handleEvent);
} }
@@ -340,9 +342,9 @@ this.AccessFu = { // jshint ignore:line
case 'remote-browser-shown': case 'remote-browser-shown':
case 'inprocess-browser-shown': case 'inprocess-browser-shown':
{ {
// Ignore notifications that aren't from a Browser // Ignore notifications that aren't from a BrowserOrApp
let frameLoader = aSubject.QueryInterface(Ci.nsIFrameLoader); let frameLoader = aSubject.QueryInterface(Ci.nsIFrameLoader);
if (!frameLoader.ownerIsMozBrowserFrame) { if (!frameLoader.ownerIsMozBrowserOrAppFrame) {
return; return;
} }
this._handleMessageManager(frameLoader.messageManager); this._handleMessageManager(frameLoader.messageManager);
@@ -583,7 +585,11 @@ var Output = {
get androidBridge() { get androidBridge() {
delete this.androidBridge; delete this.androidBridge;
this.androidBridge = null; if (Utils.MozBuildApp === 'mobile/android') {
this.androidBridge = Services.androidBridge;
} else {
this.androidBridge = null;
}
return this.androidBridge; return this.androidBridge;
}, },
@@ -809,6 +815,12 @@ var Input = {
target.blur(); target.blur();
} }
} }
if (Utils.MozBuildApp == 'mobile/android') {
// Return focus to native Android browser chrome.
Services.androidBridge.handleGeckoMessage(
{ type: 'ToggleChrome:Focus' });
}
break; break;
case aEvent.DOM_VK_RETURN: case aEvent.DOM_VK_RETURN:
if (this.editState.editing) { if (this.editState.editing) {
@@ -825,9 +837,18 @@ var Input = {
}, },
moveToPoint: function moveToPoint(aRule, aX, aY) { moveToPoint: function moveToPoint(aRule, aX, aY) {
let win = Utils.win; // XXX: Bug 1013408 - There is no alignment between the chrome window's
Utils.winUtils.sendMouseEvent('mousemove', // viewport size and the content viewport size in Android. This makes
aX - win.mozInnerScreenX, aY - win.mozInnerScreenY, 0, 0, 0); // sending mouse events beyond its bounds impossible.
if (Utils.MozBuildApp === 'mobile/android') {
let mm = Utils.getMessageManager(Utils.CurrentBrowser);
mm.sendAsyncMessage('AccessFu:MoveToPoint',
{rule: aRule, x: aX, y: aY, origin: 'top'});
} else {
let win = Utils.win;
Utils.winUtils.sendMouseEvent('mousemove',
aX - win.mozInnerScreenX, aY - win.mozInnerScreenY, 0, 0, 0);
}
}, },
moveCursor: function moveCursor(aAction, aRule, aInputType, aAdjustRange) { moveCursor: function moveCursor(aAction, aRule, aInputType, aAdjustRange) {
+3 -1
View File
@@ -76,6 +76,8 @@ const EDGE = 0.1;
const TIMEOUT_MULTIPLIER = 1; const TIMEOUT_MULTIPLIER = 1;
// A single pointer down/up sequence periodically precedes the tripple swipe // A single pointer down/up sequence periodically precedes the tripple swipe
// gesture on Android. This delay acounts for that. // gesture on Android. This delay acounts for that.
const IS_ANDROID = Utils.MozBuildApp === 'mobile/android' &&
Utils.AndroidSdkVersion >= 14;
/** /**
* A point object containing distance travelled data. * A point object containing distance travelled data.
@@ -204,7 +206,7 @@ this.GestureTracker = { // jshint ignore:line
if (aDetail.type !== 'pointerdown') { if (aDetail.type !== 'pointerdown') {
return; return;
} }
let GestureConstructor = aGesture || Tap; let GestureConstructor = aGesture || (IS_ANDROID ? DoubleTap : Tap);
this._create(GestureConstructor); this._create(GestureConstructor);
this._update(aDetail, aTimeStamp); this._update(aDetail, aTimeStamp);
}, },
+1 -1
View File
@@ -786,7 +786,7 @@ this.UtteranceGenerator = { // jshint ignore:line
// This is because we expose the checked information on the node itself. // This is because we expose the checked information on the node itself.
// XXX: this means the checked state is always appended to the end, // XXX: this means the checked state is always appended to the end,
// regardless of the utterance ordering preference. // regardless of the utterance ordering preference.
if (Utils.MozBuildApp === 'browser' && if ((Utils.AndroidSdkVersion < 16 || Utils.MozBuildApp === 'browser') &&
aState.contains(States.CHECKABLE)) { aState.contains(States.CHECKABLE)) {
let checked = aState.contains(States.CHECKED); let checked = aState.contains(States.CHECKED);
let statetr; let statetr;
+12
View File
@@ -39,6 +39,13 @@ var PointerRelay = { // jshint ignore:line
delete this._eventsOfInterest; delete this._eventsOfInterest;
switch (Utils.widgetToolkit) { switch (Utils.widgetToolkit) {
case 'android':
this._eventsOfInterest = {
'touchstart' : true,
'touchmove' : true,
'touchend' : true };
break;
default: default:
// Desktop. // Desktop.
this._eventsOfInterest = { this._eventsOfInterest = {
@@ -103,6 +110,11 @@ var PointerRelay = { // jshint ignore:line
target: aEvent.target target: aEvent.target
}]; }];
if (Utils.widgetToolkit === 'android' &&
changedTouches.length === 1 && changedTouches[0].identifier === 1) {
return;
}
if (changedTouches.length === 1 && if (changedTouches.length === 1 &&
changedTouches[0].identifier === SYNTH_ID) { changedTouches[0].identifier === SYNTH_ID) {
return; return;
+30 -17
View File
@@ -257,8 +257,11 @@ AndroidPresenter.prototype.pivotChanged =
let androidEvents = []; let androidEvents = [];
let isExploreByTouch = (aReason == Ci.nsIAccessiblePivot.REASON_POINT); let isExploreByTouch = (aReason == Ci.nsIAccessiblePivot.REASON_POINT &&
let focusEventType = this.ANDROID_VIEW_ACCESSIBILITY_FOCUSED; Utils.AndroidSdkVersion >= 14);
let focusEventType = (Utils.AndroidSdkVersion >= 16) ?
this.ANDROID_VIEW_ACCESSIBILITY_FOCUSED :
this.ANDROID_VIEW_FOCUSED;
if (isExploreByTouch) { if (isExploreByTouch) {
// This isn't really used by TalkBack so this is a half-hearted attempt // This isn't really used by TalkBack so this is a half-hearted attempt
@@ -267,21 +270,25 @@ AndroidPresenter.prototype.pivotChanged =
} }
let brailleOutput = {}; let brailleOutput = {};
if (!this._braillePresenter) { if (Utils.AndroidSdkVersion >= 16) {
this._braillePresenter = new BraillePresenter(); if (!this._braillePresenter) {
this._braillePresenter = new BraillePresenter();
}
brailleOutput = this._braillePresenter.pivotChanged(aContext, aReason).
details;
} }
brailleOutput = this._braillePresenter.pivotChanged(aContext, aReason).
details;
if (aReason === Ci.nsIAccessiblePivot.REASON_TEXT) { if (aReason === Ci.nsIAccessiblePivot.REASON_TEXT) {
let adjustedText = aContext.textAndAdjustedOffsets; if (Utils.AndroidSdkVersion >= 16) {
let adjustedText = aContext.textAndAdjustedOffsets;
androidEvents.push({ androidEvents.push({
eventType: this.ANDROID_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY, eventType: this.ANDROID_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY,
text: [adjustedText.text], text: [adjustedText.text],
fromIndex: adjustedText.startOffset, fromIndex: adjustedText.startOffset,
toIndex: adjustedText.endOffset toIndex: adjustedText.endOffset
}); });
}
} else { } else {
let state = Utils.getState(aContext.accessible); let state = Utils.getState(aContext.accessible);
androidEvents.push({eventType: (isExploreByTouch) ? androidEvents.push({eventType: (isExploreByTouch) ?
@@ -364,7 +371,7 @@ AndroidPresenter.prototype.textSelectionChanged =
aOldEnd, aIsFromUserInput) { aOldEnd, aIsFromUserInput) {
let androidEvents = []; let androidEvents = [];
if (!aIsFromUserInput) { if (Utils.AndroidSdkVersion >= 14 && !aIsFromUserInput) {
if (!this._braillePresenter) { if (!this._braillePresenter) {
this._braillePresenter = new BraillePresenter(); this._braillePresenter = new BraillePresenter();
} }
@@ -381,7 +388,7 @@ AndroidPresenter.prototype.textSelectionChanged =
}); });
} }
if (aIsFromUserInput) { if (Utils.AndroidSdkVersion >= 16 && aIsFromUserInput) {
let [from, to] = aOldStart < aStart ? let [from, to] = aOldStart < aStart ?
[aOldStart, aStart] : [aStart, aOldStart]; [aOldStart, aStart] : [aStart, aOldStart];
androidEvents.push({ androidEvents.push({
@@ -400,6 +407,10 @@ AndroidPresenter.prototype.textSelectionChanged =
AndroidPresenter.prototype.viewportChanged = AndroidPresenter.prototype.viewportChanged =
function AndroidPresenter_viewportChanged(aWindow, aCurrentContext) { function AndroidPresenter_viewportChanged(aWindow, aCurrentContext) {
if (Utils.AndroidSdkVersion < 14) {
return null;
}
let events = [{ let events = [{
eventType: this.ANDROID_VIEW_SCROLLED, eventType: this.ANDROID_VIEW_SCROLLED,
text: [], text: [],
@@ -409,7 +420,7 @@ AndroidPresenter.prototype.viewportChanged =
maxScrollY: aWindow.scrollMaxY maxScrollY: aWindow.scrollMaxY
}]; }];
if (aCurrentContext) { if (Utils.AndroidSdkVersion >= 16 && aCurrentContext) {
let currentAcc = aCurrentContext.accessibleForBounds; let currentAcc = aCurrentContext.accessibleForBounds;
if (Utils.isAliveAndVisible(currentAcc)) { if (Utils.isAliveAndVisible(currentAcc)) {
events.push({ events.push({
@@ -436,7 +447,8 @@ AndroidPresenter.prototype.announce =
return { return {
type: this.type, type: this.type,
details: [{ details: [{
eventType: this.ANDROID_ANNOUNCEMENT, eventType: (Utils.AndroidSdkVersion >= 16) ?
this.ANDROID_ANNOUNCEMENT : this.ANDROID_VIEW_TEXT_CHANGED,
text: [localizedAnnouncement], text: [localizedAnnouncement],
addedCount: localizedAnnouncement.length, addedCount: localizedAnnouncement.length,
removedCount: 0, removedCount: 0,
@@ -668,6 +680,7 @@ this.Presentation = { // jshint ignore:line
get presenters() { get presenters() {
delete this.presenters; delete this.presenters;
let presenterMap = { let presenterMap = {
'mobile/android': [VisualPresenter, AndroidPresenter],
'b2g': [VisualPresenter, B2GPresenter], 'b2g': [VisualPresenter, B2GPresenter],
'browser': [VisualPresenter, B2GPresenter, AndroidPresenter] 'browser': [VisualPresenter, B2GPresenter, AndroidPresenter]
}; };
+28 -1
View File
@@ -33,7 +33,9 @@ this.Utils = { // jshint ignore:line
_buildAppMap: { _buildAppMap: {
'{3c2e2abc-06d4-11e1-ac3b-374f68613e61}': 'b2g', '{3c2e2abc-06d4-11e1-ac3b-374f68613e61}': 'b2g',
'{d1bfe7d9-c01e-4237-998b-7b5f960a4314}': 'graphene', '{d1bfe7d9-c01e-4237-998b-7b5f960a4314}': 'graphene',
'{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser' '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser',
'{aa3c5121-dab2-40e2-81ca-7ea25febc110}': 'mobile/android',
'{a23983c0-fd0e-11dc-95ff-0800200c9a66}': 'mobile/xul'
}, },
init: function Utils_init(aWindow) { init: function Utils_init(aWindow) {
@@ -109,13 +111,35 @@ this.Utils = { // jshint ignore:line
return this._ScriptName; return this._ScriptName;
}, },
get AndroidSdkVersion() {
if (!this._AndroidSdkVersion) {
if (Services.appinfo.OS == 'Android') {
this._AndroidSdkVersion = Services.sysinfo.getPropertyAsInt32(
'version');
} else {
// Most useful in desktop debugging.
this._AndroidSdkVersion = 16;
}
}
return this._AndroidSdkVersion;
},
set AndroidSdkVersion(value) {
// When we want to mimic another version.
this._AndroidSdkVersion = value;
},
get BrowserApp() { get BrowserApp() {
if (!this.win) { if (!this.win) {
return null; return null;
} }
switch (this.MozBuildApp) { switch (this.MozBuildApp) {
case 'mobile/android':
return this.win.BrowserApp;
case 'browser': case 'browser':
return this.win.gBrowser; return this.win.gBrowser;
case 'b2g':
return this.win.shell;
default: default:
return null; return null;
} }
@@ -125,6 +149,9 @@ this.Utils = { // jshint ignore:line
if (!this.BrowserApp) { if (!this.BrowserApp) {
return null; return null;
} }
if (this.MozBuildApp == 'b2g') {
return this.BrowserApp.contentBrowser;
}
return this.BrowserApp.selectedBrowser; return this.BrowserApp.selectedBrowser;
}, },
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-2
View File
@@ -295,7 +295,6 @@ enum CheckboxValue {
@implementation mozPaneAccessible @implementation mozPaneAccessible
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
- (NSUInteger)accessibilityArrayAttributeCount:(NSString*)attribute - (NSUInteger)accessibilityArrayAttributeCount:(NSString*)attribute
{ {
AccessibleWrap* accWrap = [self getGeckoAccessible]; AccessibleWrap* accWrap = [self getGeckoAccessible];
@@ -314,7 +313,6 @@ enum CheckboxValue {
return [super accessibilityArrayAttributeCount:attribute]; return [super accessibilityArrayAttributeCount:attribute];
} }
#endif
- (NSArray*)children - (NSArray*)children
{ {
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+6 -34
View File
@@ -1,4 +1,6 @@
/* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -47,24 +49,6 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
return nativeArray; return nativeArray;
} }
// Convert to an object without @ syntax
static inline id
ConvertToId(NSInteger val)
{
return [NSString stringWithFormat:@"%i", val];
}
// Missing from SDK 10.5
#if !defined(MAC_OS_X_VERSION_10_6) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6)
#define __IntToNSString(x) ([NSString stringWithFormat:@"%i", x])
#define NSAccessibilityRowIndexRangeAttribute @"AXRowIndexRange"
#define NSAccessibilityColumnIndexRangeAttribute @"AXColumnIndexRange"
#define NSAccessibilityRowHeaderUIElementsAttribute @"AXRowHeaderUIElements"
#define NSAccessibilityColumnHeaderUIElementsAttribute @"AXColumnHeaderUIElements"
#define NSAccessibilityRowCountAttribute @"AXRowCount"
#define NSAccessibilityColumnCountAttribute @"AXColumnCount"
#endif
@implementation mozTablePartAccessible @implementation mozTablePartAccessible
- (BOOL)isLayoutTablePart; - (BOOL)isLayoutTablePart;
{ {
@@ -101,14 +85,10 @@ ConvertToId(NSInteger val)
{ {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL; NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames]; NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames];
if ([self isLayoutTablePart]) { if ([self isLayoutTablePart]) {
return additionalAttributes; return additionalAttributes;
} }
#else
NSArray* additionalAttributes = [[NSArray alloc] init];
#endif
static NSArray* tableAttrs = nil; static NSArray* tableAttrs = nil;
if (!tableAttrs) { if (!tableAttrs) {
@@ -130,9 +110,9 @@ ConvertToId(NSInteger val)
if (AccessibleWrap* accWrap = [self getGeckoAccessible]) { if (AccessibleWrap* accWrap = [self getGeckoAccessible]) {
TableAccessible* table = accWrap->AsTable(); TableAccessible* table = accWrap->AsTable();
if ([attribute isEqualToString:NSAccessibilityRowCountAttribute]) if ([attribute isEqualToString:NSAccessibilityRowCountAttribute])
return ConvertToId(table->RowCount()); return @(table->RowCount());
if ([attribute isEqualToString:NSAccessibilityColumnCountAttribute]) if ([attribute isEqualToString:NSAccessibilityColumnCountAttribute])
return ConvertToId(table->ColCount()); return @(table->ColCount());
if ([attribute isEqualToString:NSAccessibilityRowsAttribute]) { if ([attribute isEqualToString:NSAccessibilityRowsAttribute]) {
// Create a new array with the list of table rows. // Create a new array with the list of table rows.
NSMutableArray* nativeArray = [[NSMutableArray alloc] init]; NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
@@ -149,9 +129,9 @@ ConvertToId(NSInteger val)
} }
} else if (ProxyAccessible* proxy = [self getProxyAccessible]) { } else if (ProxyAccessible* proxy = [self getProxyAccessible]) {
if ([attribute isEqualToString:NSAccessibilityRowCountAttribute]) if ([attribute isEqualToString:NSAccessibilityRowCountAttribute])
return ConvertToId(proxy->TableRowCount()); return @(proxy->TableRowCount());
if ([attribute isEqualToString:NSAccessibilityColumnCountAttribute]) if ([attribute isEqualToString:NSAccessibilityColumnCountAttribute])
return ConvertToId(proxy->TableColumnCount()); return @(proxy->TableColumnCount());
if ([attribute isEqualToString:NSAccessibilityRowsAttribute]) { if ([attribute isEqualToString:NSAccessibilityRowsAttribute]) {
// Create a new array with the list of table rows. // Create a new array with the list of table rows.
NSMutableArray* nativeArray = [[NSMutableArray alloc] init]; NSMutableArray* nativeArray = [[NSMutableArray alloc] init];
@@ -177,14 +157,10 @@ ConvertToId(NSInteger val)
{ {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL; NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames]; NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames];
if ([self isLayoutTablePart]) { if ([self isLayoutTablePart]) {
return additionalAttributes; return additionalAttributes;
} }
#else
NSArray* additionalAttributes = [[NSArray alloc] init];
#endif
static NSArray* tableRowAttrs = nil; static NSArray* tableRowAttrs = nil;
if (!tableRowAttrs) { if (!tableRowAttrs) {
@@ -240,14 +216,10 @@ ConvertToId(NSInteger val)
{ {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL; NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames]; NSArray* additionalAttributes = [super additionalAccessibilityAttributeNames];
if ([self isLayoutTablePart]) { if ([self isLayoutTablePart]) {
return additionalAttributes; return additionalAttributes;
} }
#else
NSArray* additionalAttributes = [[NSArray alloc] init];
#endif
static NSArray* tableCellAttrs = nil; static NSArray* tableCellAttrs = nil;
if (!tableCellAttrs) { if (!tableCellAttrs) {
+4 -2
View File
@@ -21,10 +21,12 @@ DIRS += [ 'aom',
'interfaces', 'interfaces',
'ipc', 'ipc',
'jsat', 'jsat',
'xpcom', 'xpcom'
'xul'
] ]
if CONFIG['MOZ_XUL']:
DIRS += ['xul']
TEST_DIRS += ['tests/mochitest'] TEST_DIRS += ['tests/mochitest']
BROWSER_CHROME_MANIFESTS += [ BROWSER_CHROME_MANIFESTS += [
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -67,7 +67,7 @@
* Change scrollbar styles from hidden to auto. That makes us to create an * Change scrollbar styles from hidden to auto. That makes us to create an
* accessible for scroll area. * accessible for scroll area.
*/ */
function changeScrollStyles(aContainerID, aScrollAreaID) function changeScrollbarStyles(aContainerID, aScrollAreaID)
{ {
this.container = getAccessible(aContainerID); this.container = getAccessible(aContainerID);
this.scrollAreaNode = getNode(aScrollAreaID); this.scrollAreaNode = getNode(aScrollAreaID);
@@ -77,7 +77,7 @@
new invokerChecker(EVENT_REORDER, this.container) new invokerChecker(EVENT_REORDER, this.container)
]; ];
this.invoke = function changeScrollStyles_invoke() this.invoke = function changeScrollbarStyles_invoke()
{ {
var accTree = var accTree =
{ SECTION: [] }; { SECTION: [] };
@@ -86,7 +86,7 @@
this.scrollAreaNode.style.overflow = "auto"; this.scrollAreaNode.style.overflow = "auto";
} }
this.finalCheck = function changeScrollStyles_finalCheck() this.finalCheck = function changeScrollbarStyles_finalCheck()
{ {
var accTree = var accTree =
{ SECTION: [ // container { SECTION: [ // container
@@ -95,7 +95,7 @@
testAccessibleTree(this.container, accTree); testAccessibleTree(this.container, accTree);
} }
this.getID = function changeScrollStyles_getID() this.getID = function changeScrollbarStyles_getID()
{ {
return "change scrollbar styles " + prettyName(aScrollAreaID); return "change scrollbar styles " + prettyName(aScrollAreaID);
} }
@@ -114,7 +114,7 @@
gQueue = new eventQueue(); gQueue = new eventQueue();
gQueue.push(new changeScrollRange("container", "scrollarea")); gQueue.push(new changeScrollRange("container", "scrollarea"));
gQueue.push(new changeScrollStyles("container2", "scrollarea2")); gQueue.push(new changeScrollbarStyles("container2", "scrollarea2"));
gQueue.invoke(); // Will call SimpleTest.finish(); gQueue.invoke(); // Will call SimpleTest.finish();
} }
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2 -2
View File
@@ -173,7 +173,7 @@ public: // construction, destruction
/** /**
* Find an accessible by the given child ID in cached documents. * Find an accessible by the given child ID in cached documents.
*/ */
[[nodiscard]] already_AddRefed<IAccessible> MOZ_MUST_USE already_AddRefed<IAccessible>
GetIAccessibleFor(const VARIANT& aVarChild, bool* aIsDefunct); GetIAccessibleFor(const VARIANT& aVarChild, bool* aIsDefunct);
virtual void GetNativeInterface(void **aOutAccessible) override; virtual void GetNativeInterface(void **aOutAccessible) override;
@@ -198,7 +198,7 @@ protected:
/** /**
* Find a remote accessible by the given child ID. * Find a remote accessible by the given child ID.
*/ */
[[nodiscard]] already_AddRefed<IAccessible> MOZ_MUST_USE already_AddRefed<IAccessible>
GetRemoteIAccessibleFor(const VARIANT& aVarChild); GetRemoteIAccessibleFor(const VARIANT& aVarChild);
/** /**
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+13
View File
@@ -35,6 +35,19 @@ a11y::PlatformInit()
nsWinUtils::MaybeStartWindowEmulation(); nsWinUtils::MaybeStartWindowEmulation();
ia2AccessibleText::InitTextChangeData(); ia2AccessibleText::InitTextChangeData();
if (BrowserTabsRemoteAutostart()) {
mscom::InterceptorLog::Init();
UniquePtr<RegisteredProxy> regProxy(
mscom::RegisterProxy(L"ia2marshal.dll"));
gRegProxy = regProxy.release();
UniquePtr<RegisteredProxy> regAccTlb(
mscom::RegisterTypelib(L"oleacc.dll",
RegistrationFlags::eUseSystemDirectory));
gRegAccTlb = regAccTlb.release();
UniquePtr<RegisteredProxy> regMiscTlb(
mscom::RegisterTypelib(L"Accessible.tlb"));
gRegMiscTlb = regMiscTlb.release();
}
} }
void void
+5 -7
View File
@@ -23,6 +23,7 @@ SOURCES += [
'DocAccessibleWrap.cpp', 'DocAccessibleWrap.cpp',
'EnumVariant.cpp', 'EnumVariant.cpp',
'HTMLTableAccessibleWrap.cpp', 'HTMLTableAccessibleWrap.cpp',
'HTMLWin32ObjectAccessible.cpp',
'HyperTextAccessibleWrap.cpp', 'HyperTextAccessibleWrap.cpp',
'ImageAccessibleWrap.cpp', 'ImageAccessibleWrap.cpp',
'IUnknownImpl.cpp', 'IUnknownImpl.cpp',
@@ -32,18 +33,15 @@ SOURCES += [
'RootAccessibleWrap.cpp', 'RootAccessibleWrap.cpp',
'ServiceProvider.cpp', 'ServiceProvider.cpp',
'TextLeafAccessibleWrap.cpp', 'TextLeafAccessibleWrap.cpp',
'XULListboxAccessibleWrap.cpp',
'XULMenuAccessibleWrap.cpp',
'XULTreeGridAccessibleWrap.cpp',
] ]
if CONFIG['MOZ_ENABLE_NPAPI']: if CONFIG['MOZ_XUL']:
SOURCES += [ SOURCES += [
'HTMLWin32ObjectAccessible.cpp', 'XULListboxAccessibleWrap.cpp',
'XULMenuAccessibleWrap.cpp',
'XULTreeGridAccessibleWrap.cpp',
] ]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'/accessible/base', '/accessible/base',
'/accessible/generic', '/accessible/generic',
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+2
View File
@@ -1,4 +1,6 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
*/
/* This Source Code Form is subject to the terms of the Mozilla Public /* 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 * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+9 -9
View File
@@ -40,7 +40,7 @@ def loadEventIDL(parser, includePath, eventname):
class Configuration: class Configuration:
def __init__(self, filename): def __init__(self, filename):
config = {} config = {}
exec(compile(open(filename, "rb").read(), filename, 'exec'), config) execfile(filename, config)
self.simple_events = config.get('simple_events', []) self.simple_events = config.get('simple_events', [])
def firstCap(str): def firstCap(str):
@@ -64,7 +64,7 @@ def print_header_file(fd, conf, incdirs):
for e in conf.simple_events: for e in conf.simple_events:
idl, idl_path = loadEventIDL(p, incdirs, e) idl, idl_path = loadEventIDL(p, incdirs, e)
idl_paths.add(idl_path) idl_paths.add(idl_path)
for iface in [p for p in idl.productions if p.kind == "interface"]: for iface in filter(lambda p: p.kind == "interface", idl.productions):
classname = ("xpcAcc%s" % e) classname = ("xpcAcc%s" % e)
baseinterfaces = interfaces(iface) baseinterfaces = interfaces(iface)
@@ -73,7 +73,7 @@ def print_header_file(fd, conf, incdirs):
fd.write("public:\n") fd.write("public:\n")
attributes = allAttributes(iface) attributes = allAttributes(iface)
args = list(map(writeAttributeParams, attributes)) args = map(writeAttributeParams, attributes)
fd.write(" %s(%s) :\n" % (classname, ", ".join(args))) fd.write(" %s(%s) :\n" % (classname, ", ".join(args)))
initializers = [] initializers = []
@@ -83,7 +83,7 @@ def print_header_file(fd, conf, incdirs):
fd.write(" NS_DECL_CYCLE_COLLECTING_ISUPPORTS\n") fd.write(" NS_DECL_CYCLE_COLLECTING_ISUPPORTS\n")
fd.write(" NS_DECL_CYCLE_COLLECTION_CLASS(%s)\n" % (classname)) fd.write(" NS_DECL_CYCLE_COLLECTION_CLASS(%s)\n" % (classname))
for iface in [i for i in baseinterfaces if i.name != "nsISupports"]: for iface in filter(lambda i: i.name != "nsISupports", baseinterfaces):
fd.write(" NS_DECL_%s\n" % iface.name.upper()) fd.write(" NS_DECL_%s\n" % iface.name.upper())
fd.write("\nprivate:\n") fd.write("\nprivate:\n")
@@ -97,13 +97,13 @@ def print_header_file(fd, conf, incdirs):
return idl_paths return idl_paths
def interfaceAttributeTypes(idl): def interfaceAttributeTypes(idl):
ifaces = [p for p in idl.productions if p.kind == "interface"] ifaces = filter(lambda p: p.kind == "interface", idl.productions)
attributes = [] attributes = []
for i in ifaces: for i in ifaces:
ifaceAttributes = allAttributes(i) ifaceAttributes = allAttributes(i)
attributes.extend(ifaceAttributes) attributes.extend(ifaceAttributes)
ifaceAttrs = [a for a in attributes if a.realtype.nativeType("in").endswith("*")] ifaceAttrs = filter(lambda a: a.realtype.nativeType("in").endswith("*"), attributes)
return [a.realtype.nativeType("in").strip(" *") for a in ifaceAttrs] return map(lambda a: a.realtype.nativeType("in").strip(" *"), ifaceAttrs)
def print_cpp(idl, fd, conf, eventname): def print_cpp(idl, fd, conf, eventname):
for p in idl.productions: for p in idl.productions:
@@ -186,7 +186,7 @@ def interfaces(iface):
def allAttributes(iface): def allAttributes(iface):
attributes = [] attributes = []
for i in interfaces(iface): for i in interfaces(iface):
attrs = [m for m in i.members if isinstance(m, xpidl.Attribute)] attrs = filter(lambda m: isinstance(m, xpidl.Attribute), i.members)
attributes.extend(attrs) attributes.extend(attrs)
return attributes return attributes
@@ -194,7 +194,7 @@ def allAttributes(iface):
def write_cpp(eventname, iface, fd): def write_cpp(eventname, iface, fd):
classname = "xpcAcc%s" % eventname classname = "xpcAcc%s" % eventname
attributes = allAttributes(iface) attributes = allAttributes(iface)
ccattributes = [m for m in attributes if m.realtype.nativeType('in').endswith('*')] ccattributes = filter(lambda m: m.realtype.nativeType('in').endswith('*'), attributes)
fd.write("NS_IMPL_CYCLE_COLLECTION(%s" % classname) fd.write("NS_IMPL_CYCLE_COLLECTION(%s" % classname)
for c in ccattributes: for c in ccattributes:
fd.write(", m%s" % firstCap(c.name)) fd.write(", m%s" % firstCap(c.name))
+1 -1
View File
@@ -30,7 +30,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(xpcAccessibleDocument,
tmp->mCache.Clear(); tmp->mCache.Clear();
NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(xpcAccessibleDocument) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(xpcAccessibleDocument)
NS_INTERFACE_MAP_ENTRY(nsIAccessibleDocument) NS_INTERFACE_MAP_ENTRY(nsIAccessibleDocument)
NS_INTERFACE_MAP_END_INHERITING(xpcAccessibleHyperText) NS_INTERFACE_MAP_END_INHERITING(xpcAccessibleHyperText)
+8 -5
View File
@@ -73,7 +73,7 @@ XULTreeAccessible::~XULTreeAccessible()
NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeAccessible, Accessible, NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeAccessible, Accessible,
mTree, mAccessibleCache) mTree, mAccessibleCache)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(XULTreeAccessible) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XULTreeAccessible)
NS_INTERFACE_MAP_END_INHERITING(Accessible) NS_INTERFACE_MAP_END_INHERITING(Accessible)
NS_IMPL_ADDREF_INHERITED(XULTreeAccessible, Accessible) NS_IMPL_ADDREF_INHERITED(XULTreeAccessible, Accessible)
@@ -709,9 +709,12 @@ XULTreeItemAccessibleBase::~XULTreeItemAccessibleBase()
NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessibleBase, Accessible, NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessibleBase, Accessible,
mTree) mTree)
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessibleBase, NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessibleBase)
Accessible, NS_INTERFACE_TABLE_INHERITED(XULTreeItemAccessibleBase,
XULTreeItemAccessibleBase) XULTreeItemAccessibleBase)
NS_INTERFACE_TABLE_TAIL_INHERITING(Accessible)
NS_IMPL_ADDREF_INHERITED(XULTreeItemAccessibleBase, Accessible)
NS_IMPL_RELEASE_INHERITED(XULTreeItemAccessibleBase, Accessible)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// XULTreeItemAccessibleBase: Accessible // XULTreeItemAccessibleBase: Accessible
@@ -1081,7 +1084,7 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessible,
XULTreeItemAccessibleBase, XULTreeItemAccessibleBase,
mColumn) mColumn)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(XULTreeItemAccessible) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XULTreeItemAccessible)
NS_INTERFACE_MAP_END_INHERITING(XULTreeItemAccessibleBase) NS_INTERFACE_MAP_END_INHERITING(XULTreeItemAccessibleBase)
NS_IMPL_ADDREF_INHERITED(XULTreeItemAccessible, XULTreeItemAccessibleBase) NS_IMPL_ADDREF_INHERITED(XULTreeItemAccessible, XULTreeItemAccessibleBase)
NS_IMPL_RELEASE_INHERITED(XULTreeItemAccessible, XULTreeItemAccessibleBase) NS_IMPL_RELEASE_INHERITED(XULTreeItemAccessible, XULTreeItemAccessibleBase)
+2 -2
View File
@@ -263,7 +263,7 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeGridRowAccessible,
XULTreeItemAccessibleBase, XULTreeItemAccessibleBase,
mAccessibleCache) mAccessibleCache)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(XULTreeGridRowAccessible) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XULTreeGridRowAccessible)
NS_INTERFACE_MAP_END_INHERITING(XULTreeItemAccessibleBase) NS_INTERFACE_MAP_END_INHERITING(XULTreeItemAccessibleBase)
NS_IMPL_ADDREF_INHERITED(XULTreeGridRowAccessible, NS_IMPL_ADDREF_INHERITED(XULTreeGridRowAccessible,
@@ -447,7 +447,7 @@ XULTreeGridCellAccessible::~XULTreeGridCellAccessible()
NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeGridCellAccessible, LeafAccessible, NS_IMPL_CYCLE_COLLECTION_INHERITED(XULTreeGridCellAccessible, LeafAccessible,
mTree, mColumn) mTree, mColumn)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(XULTreeGridCellAccessible) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XULTreeGridCellAccessible)
NS_INTERFACE_MAP_END_INHERITING(LeafAccessible) NS_INTERFACE_MAP_END_INHERITING(LeafAccessible)
NS_IMPL_ADDREF_INHERITED(XULTreeGridCellAccessible, LeafAccessible) NS_IMPL_ADDREF_INHERITED(XULTreeGridCellAccessible, LeafAccessible)
NS_IMPL_RELEASE_INHERITED(XULTreeGridCellAccessible, LeafAccessible) NS_IMPL_RELEASE_INHERITED(XULTreeGridCellAccessible, LeafAccessible)
Vendored
+2
View File
@@ -21,10 +21,12 @@ builtin(include, build/autoconf/frameptr.m4)dnl
builtin(include, build/autoconf/compiler-opts.m4)dnl builtin(include, build/autoconf/compiler-opts.m4)dnl
builtin(include, build/autoconf/expandlibs.m4)dnl builtin(include, build/autoconf/expandlibs.m4)dnl
builtin(include, build/autoconf/arch.m4)dnl builtin(include, build/autoconf/arch.m4)dnl
builtin(include, build/autoconf/android.m4)dnl
builtin(include, build/autoconf/zlib.m4)dnl builtin(include, build/autoconf/zlib.m4)dnl
builtin(include, build/autoconf/icu.m4)dnl builtin(include, build/autoconf/icu.m4)dnl
builtin(include, build/autoconf/clang-plugin.m4)dnl builtin(include, build/autoconf/clang-plugin.m4)dnl
builtin(include, build/autoconf/alloc.m4)dnl builtin(include, build/autoconf/alloc.m4)dnl
builtin(include, build/autoconf/ios.m4)dnl
builtin(include, build/autoconf/sanitize.m4)dnl builtin(include, build/autoconf/sanitize.m4)dnl
MOZ_PROG_CHECKMSYS() MOZ_PROG_CHECKMSYS()
+129
View File
@@ -0,0 +1,129 @@
import java.util.regex.Pattern
allprojects {
// Expose the per-object-directory configuration to all projects.
ext {
mozconfig = gradle.mozconfig
topsrcdir = gradle.mozconfig.topsrcdir
topobjdir = gradle.mozconfig.topobjdir
}
repositories {
if (gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY) {
maven {
url gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY
}
}
}
}
buildDir "${topobjdir}/gradle/build"
buildscript {
repositories {
if (gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY) {
maven {
url gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORY
}
}
// For android-sdk-manager SNAPSHOT releases.
maven {
url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath('com.stanfy.spoon:spoon-gradle-plugin:1.0.4') {
// Without these, we get errors linting.
exclude module: 'guava'
}
// Provided in tree.
classpath 'com.jakewharton.sdkmanager:gradle-plugin:1.5.0-SNAPSHOT'
}
}
task generateCodeAndResources(type:Exec) {
workingDir "${topobjdir}"
commandLine mozconfig.substs.GMAKE
args '-C'
args "${topobjdir}/mobile/android/base"
args 'gradle-targets'
// Only show the output if something went wrong.
ignoreExitValue = true
standardOutput = new ByteArrayOutputStream()
errorOutput = standardOutput
doLast {
if (execResult.exitValue != 0) {
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${execResult.exitValue}:\n\n${standardOutput.toString()}")
}
}
}
// Skip unit test for all build variants, unless if it was specifically requested by user.
// The enabled property for the unit test tasks is reset based on the command line task names just before the task execution.
// I bet there is a easier/cleaner way to do this, but this gets the job done for now.
Pattern pattern = Pattern.compile('.*test(.+UnitTest)?.*')
boolean startTasksIncludeTest = gradle.startParameter.taskNames.any {
taskName ->
taskName.matches(pattern)
}
gradle.taskGraph.beforeTask {
Task task ->
if (task.name.matches(pattern)) {
task.enabled = startTasksIncludeTest
}
}
afterEvaluate {
subprojects {
if (!hasProperty('android')) {
return
}
android.applicationVariants.all {
preBuild.dependsOn rootProject.generateCodeAndResources
}
android.libraryVariants.all {
preBuild.dependsOn rootProject.generateCodeAndResources
}
}
}
apply plugin: 'idea'
idea {
project {
languageLevel = '1.7'
}
module {
// Object directories take a huge amount of time for IntelliJ to index.
// Exclude them. Convention is that object directories start with obj.
// IntelliJ is clever and will not exclude the parts of the object
// directory that are referenced, if there are any. In practice,
// indexing the entirety of the tree is taking too long, so exclude all
// but mobile/.
def topsrcdirURI = file(topsrcdir).toURI()
excludeDirs += files(file(topsrcdir)
.listFiles({it.isDirectory()} as FileFilter)
.collect({topsrcdirURI.relativize(it.toURI()).toString()}) // Relative paths.
.findAll({!it.equals('mobile/')}))
// If topobjdir is below topsrcdir, hide only some portions of that tree.
def topobjdirURI = file(topobjdir).toURI()
if (!topsrcdirURI.relativize(topobjdirURI).isAbsolute()) {
excludeDirs -= file(topobjdir)
excludeDirs += files(file(topobjdir).listFiles())
excludeDirs -= file("${topobjdir}/gradle")
}
if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
excludeDirs += file("${topsrcdir}/mobile/android/thirdparty/com/adjust")
}
}
}
task wrapper(type: Wrapper) {
}
@@ -0,0 +1,54 @@
/* 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/. */
package org.mozilla.gecko.annotationProcessors;
/**
* Object holding annotation data. Used by GeneratableElementIterator.
*/
public class AnnotationInfo {
public enum ExceptionMode {
ABORT,
NSRESULT,
IGNORE;
String nativeValue() {
return "mozilla::jni::ExceptionMode::" + name();
}
}
public enum CallingThread {
GECKO,
UI,
ANY;
String nativeValue() {
return "mozilla::jni::CallingThread::" + name();
}
}
public enum DispatchTarget {
GECKO,
PROXY,
CURRENT;
String nativeValue() {
return "mozilla::jni::DispatchTarget::" + name();
}
}
public final String wrapperName;
public final ExceptionMode exceptionMode;
public final CallingThread callingThread;
public final DispatchTarget dispatchTarget;
public AnnotationInfo(String wrapperName, ExceptionMode exceptionMode,
CallingThread callingThread, DispatchTarget dispatchTarget) {
this.wrapperName = wrapperName;
this.exceptionMode = exceptionMode;
this.callingThread = callingThread;
this.dispatchTarget = dispatchTarget;
}
}
@@ -0,0 +1,175 @@
/* 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/. */
package org.mozilla.gecko.annotationProcessors;
import org.mozilla.gecko.annotationProcessors.classloader.AnnotatableEntity;
import org.mozilla.gecko.annotationProcessors.classloader.ClassWithOptions;
import org.mozilla.gecko.annotationProcessors.classloader.IterableJarLoadingURLClassLoader;
import org.mozilla.gecko.annotationProcessors.utils.GeneratableElementIterator;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
public class AnnotationProcessor {
public static final String GENERATED_COMMENT =
"// GENERATED CODE\n" +
"// Generated by the Java program at /build/annotationProcessors at compile time\n" +
"// from annotations on Java methods. To update, change the annotations on the\n" +
"// corresponding Java methods and rerun the build. Manually updating this file\n" +
"// will cause your build to fail.\n" +
"\n";
private static final StringBuilder headerFile = new StringBuilder(GENERATED_COMMENT);
private static final StringBuilder implementationFile = new StringBuilder(GENERATED_COMMENT);
private static final StringBuilder nativesFile = new StringBuilder(GENERATED_COMMENT);
public static void main(String[] args) {
// We expect a list of jars on the commandline. If missing, whinge about it.
if (args.length <= 2) {
System.err.println("Usage: java AnnotationProcessor outprefix jarfiles ...");
System.exit(1);
}
final String OUTPUT_PREFIX = args[0];
final String SOURCE_FILE = OUTPUT_PREFIX + "JNIWrappers.cpp";
final String HEADER_FILE = OUTPUT_PREFIX + "JNIWrappers.h";
final String NATIVES_FILE = OUTPUT_PREFIX + "JNINatives.h";
System.out.println("Processing annotations...");
// We want to produce the same output as last time as often as possible. Ordering of
// generated statements, therefore, needs to be consistent.
final String[] jars = Arrays.copyOfRange(args, 1, args.length);
Arrays.sort(jars);
// Start the clock!
long s = System.currentTimeMillis();
// Get an iterator over the classes in the jar files given...
Iterator<ClassWithOptions> jarClassIterator = IterableJarLoadingURLClassLoader.getIteratorOverJars(jars);
headerFile.append(
"#ifndef " + getHeaderGuardName(HEADER_FILE) + "\n" +
"#define " + getHeaderGuardName(HEADER_FILE) + "\n" +
"\n" +
"#include \"mozilla/jni/Refs.h\"\n" +
"\n" +
"namespace mozilla {\n" +
"namespace java {\n" +
"\n");
implementationFile.append(
"#include \"" + HEADER_FILE + "\"\n" +
"#include \"mozilla/jni/Accessors.h\"\n" +
"\n" +
"namespace mozilla {\n" +
"namespace java {\n" +
"\n");
nativesFile.append(
"#ifndef " + getHeaderGuardName(NATIVES_FILE) + "\n" +
"#define " + getHeaderGuardName(NATIVES_FILE) + "\n" +
"\n" +
"#include \"" + HEADER_FILE + "\"\n" +
"#include \"mozilla/jni/Natives.h\"\n" +
"\n" +
"namespace mozilla {\n" +
"namespace java {\n" +
"\n");
while (jarClassIterator.hasNext()) {
generateClass(jarClassIterator.next());
}
implementationFile.append(
"} /* java */\n" +
"} /* mozilla */\n");
headerFile.append(
"} /* java */\n" +
"} /* mozilla */\n" +
"#endif // " + getHeaderGuardName(HEADER_FILE) + "\n");
nativesFile.append(
"} /* java */\n" +
"} /* mozilla */\n" +
"#endif // " + getHeaderGuardName(NATIVES_FILE) + "\n");
writeOutputFile(SOURCE_FILE, implementationFile);
writeOutputFile(HEADER_FILE, headerFile);
writeOutputFile(NATIVES_FILE, nativesFile);
long e = System.currentTimeMillis();
System.out.println("Annotation processing complete in " + (e - s) + "ms");
}
private static void generateClass(final ClassWithOptions annotatedClass) {
// Get an iterator over the appropriately generated methods of this class
final GeneratableElementIterator methodIterator
= new GeneratableElementIterator(annotatedClass);
final ClassWithOptions[] innerClasses = methodIterator.getInnerClasses();
if (!methodIterator.hasNext() && innerClasses.length == 0) {
return;
}
final CodeGenerator generatorInstance = new CodeGenerator(annotatedClass);
generatorInstance.generateClasses(innerClasses);
// Iterate all annotated members in this class..
while (methodIterator.hasNext()) {
AnnotatableEntity aElementTuple = methodIterator.next();
switch (aElementTuple.mEntityType) {
case METHOD:
generatorInstance.generateMethod(aElementTuple);
break;
case NATIVE:
generatorInstance.generateNative(aElementTuple);
break;
case FIELD:
generatorInstance.generateField(aElementTuple);
break;
case CONSTRUCTOR:
generatorInstance.generateConstructor(aElementTuple);
break;
}
}
headerFile.append(generatorInstance.getHeaderFileContents());
implementationFile.append(generatorInstance.getWrapperFileContents());
nativesFile.append(generatorInstance.getNativesFileContents());
for (ClassWithOptions innerClass : innerClasses) {
generateClass(innerClass);
}
}
private static String getHeaderGuardName(final String name) {
return name.replaceAll("\\W", "_");
}
private static void writeOutputFile(final String name,
final StringBuilder content) {
FileOutputStream outStream = null;
try {
outStream = new FileOutputStream(name);
outStream.write(content.toString().getBytes());
} catch (IOException e) {
System.err.println("Unable to write " + name + ". Perhaps a permissions issue?");
e.printStackTrace(System.err);
} finally {
if (outStream != null) {
try {
outStream.close();
} catch (IOException e) {
System.err.println("Unable to close outStream due to "+e);
e.printStackTrace(System.err);
}
}
}
}
}
Loaded 100 of 56949 files, more files were not shown because too many files have changed in this diff. Show more