Skip to content

Commit

Permalink
Sync embedlite API's with new APZC, need better sync and merge into e…
Browse files Browse the repository at this point in the history
…mbedlite_29 branch

Merge commit 'dcea739f1565d630c32e166fb17cc440d6e4640b' into embedlite_upgrade

Conflicts:
	configure.in
	content/media/gstreamer/GStreamerReader.cpp
	gfx/layers/Compositor.h
	gfx/thebes/gfxQtPlatform.cpp
	gfx/thebes/gfxQtPlatform.h
	toolkit/xre/nsQAppInstance.cpp
	widget/qt/nsWindow.cpp
  • Loading branch information
tmeshkova committed Feb 12, 2014
2 parents dadf832 + dcea739 commit e961fb6
Show file tree
Hide file tree
Showing 2,558 changed files with 43,915 additions and 52,770 deletions.
6 changes: 3 additions & 3 deletions .clang-format-ignore
@@ -1,3 +1,3 @@
\mfbt/
\js/
\media/
^mfbt/.*
^js/.*
^media/.*
2 changes: 1 addition & 1 deletion CLOBBER
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Bug 924839 - Touching ICU's configure scripts in this bug doesn't work without a clobber. This is filed as bug 966038.
Recent Android build system changes from bug 961339 and bug 946083 seem to be needs-clobbery.
71 changes: 28 additions & 43 deletions Makefile.in
Expand Up @@ -23,22 +23,14 @@ endif

include $(topsrcdir)/config/config.mk

ifndef LIBXUL_SDK
ifdef COMPILE_ENVIRONMENT
ifndef BUILDING_JS
BUILD_JS = 1
endif
endif
endif

GARBAGE_DIRS += dist _javagen _profile staticlib
DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
config/autoconf.mk \
mozilla-config.h \
netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
.mozconfig.mk

ifdef BUILDING_JS
ifdef JS_STANDALONE
configure_dir = $(topsrcdir)/js/src
else
configure_dir = $(topsrcdir)
Expand All @@ -48,12 +40,12 @@ ifndef MOZ_PROFILE_USE
# We need to explicitly put backend.RecursiveMakeBackend here
# otherwise the rule in rules.mk doesn't run early enough.
libs binaries export tools:: CLOBBER $(configure_dir)/configure config.status backend.RecursiveMakeBackend
ifdef BUILD_JS
libs binaries export tools:: js-config-status
ifndef JS_STANDALONE
libs binaries export tools:: $(topsrcdir)/js/src/configure js/src/config.status
endif
endif

ifdef BUILDING_JS
ifdef JS_STANDALONE
.PHONY: CLOBBER
CLOBBER:
else
Expand All @@ -64,17 +56,21 @@ CLOBBER: $(topsrcdir)/CLOBBER
@exit 1
endif

$(configure_dir)/configure: $(configure_dir)/configure.in
@echo 'STOP! configure.in has changed, and your configure is out of date.'
$(topsrcdir)/configure: $(topsrcdir)/configure.in
$(topsrcdir)/js/src/configure: $(topsrcdir)/js/src/configure.in
$(topsrcdir)/configure $(topsrcdir)/js/src/configure:
@echo 'STOP! $^ has changed, and your configure is out of date.'
@echo 'Please rerun autoconf and re-configure your build directory.'
@echo 'To ignore this message, touch "configure" in the source directory,'
@echo 'To ignore this message, touch "$@",'
@echo 'but your build might not succeed.'
@exit 1

config.status: $(configure_dir)/configure
@echo 'STOP! configure has changed and needs to be run in this build directory.'
@echo 'Please rerun configure.'
@echo 'To ignore this message, touch "config.status" in the build directory,'
js/src/config.status: $(topsrcdir)/js/src/configure
config.status js/src/config.status:
@echo 'STOP! $^ has changed and needs to be run again.'
@echo 'Please rerun it.'
@echo 'To ignore this message, touch "$(CURDIR)/$@",'
@echo 'but your build might not succeed.'
@exit 1

Expand All @@ -96,12 +92,6 @@ include backend.RecursiveMakeBackend.pp

default:: backend.RecursiveMakeBackend

ifdef BUILD_JS
.PHONY: js-config-status
js-config-status:
$(call SUBMAKE,backend.RecursiveMakeBackend,js/src,1)
endif

install_manifests := bin idl include public private sdk
install_manifest_depends = \
CLOBBER \
Expand All @@ -110,33 +100,33 @@ install_manifest_depends = \
backend.RecursiveMakeBackend \
$(NULL)

ifdef BUILD_JS
install_manifest_depends += js-config-status
ifndef JS_STANDALONE
install_manifest_depends += \
$(topsrcdir)/js/src/configure \
js/src/config.status \
$(NULL)
endif

.PHONY: install-manifests
install-manifests: $(addprefix install-dist-,$(install_manifests))

# process_install_manifest needs to be invoked with --no-remove when building
# js as standalone because automated builds are building nspr separately and
# that would remove the resulting files. It is also necessary when building
# js as part of gecko because that would remove the files exported from gecko.
# 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. But that won't likely happen before
# finishing to merge gecko and js build systems, removing the need for the
# latter.
ifdef BUILDING_JS
# removing the need for the former.
ifdef JS_STANDALONE
NO_REMOVE=1
endif

.PHONY: $(addprefix install-dist-,$(install_manifests))
$(addprefix install-dist-,$(install_manifests)): install-dist-%: $(install_manifest_depends)
$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$(DIST)/$* _build_manifests/install/dist_$* $(if $(BUILD_JS),js/src/_build_manifests/install/dist_$*))
$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )$(DIST)/$* _build_manifests/install/dist_$*)

.PHONY: install-tests
install-manifests: install-tests
install-tests: $(install_manifest_depends)
$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )_tests _build_manifests/install/tests $(if $(BUILD_JS),js/src/_build_manifests/install/tests))
$(call py_action,process_install_manifest,$(if $(NO_REMOVE),--no-remove )_tests _build_manifests/install/tests)


# _tests should be purged during cleaning. However, we don't want it purged
Expand Down Expand Up @@ -166,7 +156,7 @@ endif
# with no regard for PGO passes. This decision could probably be revisited.
export:: install-dist-sdk

ifndef BUILDING_JS
ifndef JS_STANDALONE
ifdef ENABLE_TESTS
# Additional makefile targets to call automated test suites
include $(topsrcdir)/testing/testsuite-targets.mk
Expand Down Expand Up @@ -210,7 +200,7 @@ endif

SYM_STORE_SOURCE_DIRS := $(topsrcdir)

ifndef BUILDING_JS
ifndef JS_STANDALONE
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk

ifdef MOZ_SYMBOLS_EXTRA_BUILDID
Expand Down Expand Up @@ -281,7 +271,7 @@ check::
@relcount=`find $(DIST)/bin -name '*.so' | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$relcount -gt 0; then echo 'FAILED: R_386_PC32 relocations detected in a shared library. Did you use a system header without adding it to config/system-headers?'; exit 1; else echo 'PASSED'; fi
endif

ifdef BUILDING_JS
ifdef JS_STANDALONE
# Delegate js-specific rules to js
check-%:
$(MAKE) -C js/src $@
Expand All @@ -294,10 +284,7 @@ source-package install:
.PHONY: config/export
config/export:

else

ifdef BUILD_JS
js/src/Makefile: subsrcdir := js/src
endif

ifdef MOZ_PSEUDO_DERECURSE
# Interdependencies for parallel export.
Expand All @@ -308,5 +295,3 @@ ifdef ENABLE_CLANG_PLUGIN
js/src/export config/export: build/clang-plugin/export
endif
endif
endif
endif
2 changes: 0 additions & 2 deletions accessible/public/ia2/Makefile.in
Expand Up @@ -2,8 +2,6 @@
# 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/.

DEFFILE = $(win_srcdir)/IA2Marshal.def

IA2DIR = $(topsrcdir)/other-licenses/ia2

GARBAGE += $(MIDL_GENERATED_FILES)
Expand Down
2 changes: 2 additions & 0 deletions accessible/public/ia2/moz.build
Expand Up @@ -9,3 +9,5 @@ LIBRARY_NAME = 'IA2Marshal'
FORCE_SHARED_LIB = True

DEFINES['REGISTER_PROXY_DLL'] = True

DEFFILE = SRCDIR + '/IA2Marshal.def'
2 changes: 0 additions & 2 deletions accessible/public/msaa/Makefile.in
Expand Up @@ -2,8 +2,6 @@
# 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/.

DEFFILE = $(win_srcdir)/AccessibleMarshal.def

GARBAGE += $(MIDL_GENERATED_FILES) done_gen dlldata.c

MIDL_GENERATED_FILES = \
Expand Down
2 changes: 2 additions & 0 deletions accessible/public/msaa/moz.build
Expand Up @@ -19,3 +19,5 @@ GENERATED_SOURCES += [
FORCE_SHARED_LIB = True

DEFINES['REGISTER_PROXY_DLL'] = True

DEFFILE = SRCDIR + '/AccessibleMarshal.def'
25 changes: 20 additions & 5 deletions accessible/src/atk/AccessibleWrap.cpp
Expand Up @@ -689,6 +689,9 @@ getRoleCB(AtkObject *aAtkObj)

#undef ROLE

if (aAtkObj->role == ATK_ROLE_LIST_BOX && !IsAtkVersionAtLeast(2, 1))
aAtkObj->role = ATK_ROLE_LIST;

return aAtkObj->role;
}

Expand Down Expand Up @@ -1126,6 +1129,12 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
return FireAtkShowHideEvent(aEvent, atkObj, true);

case nsIAccessibleEvent::EVENT_HIDE:
// XXX - Handle native dialog accessibles.
if (!accessible->IsRoot() && accessible->HasARIARole() &&
accessible->ARIARole() == roles::DIALOG) {
guint id = g_signal_lookup("deactivate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
}
return FireAtkShowHideEvent(aEvent, atkObj, false);

/*
Expand All @@ -1141,7 +1150,7 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
case nsIAccessibleEvent::EVENT_WINDOW_ACTIVATE:
{
accessible->AsRoot()->mActivated = true;
guint id = g_signal_lookup ("activate", MAI_TYPE_ATK_OBJECT);
guint id = g_signal_lookup("activate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);

// Always fire a current focus event after activation.
Expand All @@ -1151,30 +1160,36 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
case nsIAccessibleEvent::EVENT_WINDOW_DEACTIVATE:
{
accessible->AsRoot()->mActivated = false;
guint id = g_signal_lookup ("deactivate", MAI_TYPE_ATK_OBJECT);
guint id = g_signal_lookup("deactivate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;

case nsIAccessibleEvent::EVENT_WINDOW_MAXIMIZE:
{
guint id = g_signal_lookup ("maximize", MAI_TYPE_ATK_OBJECT);
guint id = g_signal_lookup("maximize", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;

case nsIAccessibleEvent::EVENT_WINDOW_MINIMIZE:
{
guint id = g_signal_lookup ("minimize", MAI_TYPE_ATK_OBJECT);
guint id = g_signal_lookup("minimize", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;

case nsIAccessibleEvent::EVENT_WINDOW_RESTORE:
{
guint id = g_signal_lookup ("restore", MAI_TYPE_ATK_OBJECT);
guint id = g_signal_lookup("restore", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
} break;

case nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE:
g_signal_emit_by_name (atkObj, "load_complete");
// XXX - Handle native dialog accessibles.
if (!accessible->IsRoot() && accessible->HasARIARole() &&
accessible->ARIARole() == roles::DIALOG) {
guint id = g_signal_lookup("activate", MAI_TYPE_ATK_OBJECT);
g_signal_emit(atkObj, id, 0);
}
break;

case nsIAccessibleEvent::EVENT_DOCUMENT_RELOAD:
Expand Down
15 changes: 14 additions & 1 deletion accessible/src/atk/Platform.cpp
Expand Up @@ -22,6 +22,8 @@
using namespace mozilla;
using namespace mozilla::a11y;

int atkMajorVersion = 1, atkMinorVersion = 12;

extern "C" {
typedef GType (* AtkGetTypeType) (void);
typedef void (*GnomeAccessibilityInit) (void);
Expand Down Expand Up @@ -144,6 +146,18 @@ a11y::PlatformInit()
AtkSocketAccessible::g_atk_socket_embed;
}

const char* (*atkGetVersion)() =
(const char* (*)()) PR_FindFunctionSymbol(sATKLib, "atk_get_version");
if (atkGetVersion) {
const char* version = atkGetVersion();
if (version) {
char* endPtr = nullptr;
atkMajorVersion = strtol(version, &endPtr, 10);
if (*endPtr == '.')
atkMinorVersion = strtol(endPtr + 1, &endPtr, 10);
}
}

// Load and initialize gail library.
nsresult rv = LoadGtkModule(sGail);
if (NS_SUCCEEDED(rv))
Expand Down Expand Up @@ -336,4 +350,3 @@ static const char sGconfAccessibilityKey[] =

return sShouldEnable;
}

12 changes: 12 additions & 0 deletions accessible/src/atk/nsMai.h
Expand Up @@ -30,4 +30,16 @@ GType mai_atk_object_get_type(void);
GType mai_util_get_type();
mozilla::a11y::AccessibleWrap* GetAccessibleWrap(AtkObject* aAtkObj);

extern int atkMajorVersion, atkMinorVersion;

/**
* Return true if the loaded version of libatk-1.0.so is at least
* aMajor.aMinor.0.
*/
static inline bool
IsAtkVersionAtLeast(int aMajor, int aMinor)
{
return aMajor < atkMajorVersion && aMinor < atkMinorVersion;
}

#endif /* __NS_MAI_H__ */

0 comments on commit e961fb6

Please sign in to comment.