mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-03 05:47:29 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
22356686f9
32 changed files with 241 additions and 260 deletions
1
aclocal.m4
vendored
1
aclocal.m4
vendored
|
|
@ -25,7 +25,6 @@ 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()
|
||||||
|
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
||||||
dnl This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
|
|
||||||
AC_DEFUN([MOZ_IOS_PATH_PROG],
|
|
||||||
[
|
|
||||||
changequote({,})
|
|
||||||
_prog_name=ifelse($2, {}, `echo $1 | tr "[:upper:]" "[:lower:]"`, $2)
|
|
||||||
changequote([,])
|
|
||||||
AC_CACHE_CHECK([for $_prog_name in iOS SDK],
|
|
||||||
ac_cv_ios_path_$1,
|
|
||||||
[
|
|
||||||
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
|
|
||||||
_res=$?
|
|
||||||
if test $_res -ne 0; then
|
|
||||||
AC_MSG_ERROR([Could not find '$_prog_name' in the iOS SDK])
|
|
||||||
fi
|
|
||||||
ac_cv_ios_path_$1=$_path
|
|
||||||
])
|
|
||||||
$1="${ac_cv_ios_path_$1}$3"
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([MOZ_IOS_SDK],
|
|
||||||
[
|
|
||||||
|
|
||||||
MOZ_ARG_WITH_STRING(ios-sdk,
|
|
||||||
[ --with-ios-sdk=TYPE
|
|
||||||
Type of iOS SDK to use (iphonesimulator, iphoneos)
|
|
||||||
and optionally version (like iphoneos8.2)],
|
|
||||||
ios_sdk=$withval)
|
|
||||||
|
|
||||||
MOZ_ARG_ENABLE_STRING(ios-target,
|
|
||||||
[ --enable-ios-target=VER (default=8.0)
|
|
||||||
Set the minimum iOS version needed at runtime],
|
|
||||||
[_IOS_TARGET=$enableval])
|
|
||||||
_IOS_TARGET_DEFAULT=8.0
|
|
||||||
|
|
||||||
case "$target" in
|
|
||||||
arm*-apple-darwin*)
|
|
||||||
if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then
|
|
||||||
ios_sdk=iphoneos
|
|
||||||
fi
|
|
||||||
case "$ios_sdk" in
|
|
||||||
iphoneos*)
|
|
||||||
ios_target_arg="-miphoneos-version-min"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'.])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*-apple-darwin*)
|
|
||||||
ios_target_arg="-mios-simulator-version-min"
|
|
||||||
case "$ios_sdk" in
|
|
||||||
# Empty SDK is okay, this might be an OS X desktop build.
|
|
||||||
""|iphonesimulator*)
|
|
||||||
;;
|
|
||||||
# Default to iphonesimulator
|
|
||||||
yes)
|
|
||||||
ios_sdk=iphonesimulator
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([Only 'iphonesimulator' SDKs are valid when targeting iOS simulator.])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
if test -n "$ios_sdk"; then
|
|
||||||
if test -z "$_IOS_TARGET"; then
|
|
||||||
_IOS_TARGET=$_IOS_TARGET_DEFAULT
|
|
||||||
ios_target_arg="${ios_target_arg}=${_IOS_TARGET}"
|
|
||||||
fi
|
|
||||||
# Ensure that xcrun knows where this SDK is.
|
|
||||||
ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null`
|
|
||||||
_ret=$?
|
|
||||||
if test $_ret -ne 0; then
|
|
||||||
AC_MSG_ERROR([iOS SDK '$ios_sdk' could not be found.])
|
|
||||||
fi
|
|
||||||
MOZ_IOS=1
|
|
||||||
export HOST_CC=clang
|
|
||||||
export HOST_CXX=clang++
|
|
||||||
# Add isysroot, arch, and ios target arguments
|
|
||||||
case "$target_cpu" in
|
|
||||||
arm*)
|
|
||||||
ARGS="-arch armv7"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Unfortunately simulator builds need this.
|
|
||||||
export CROSS_COMPILE=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg"
|
|
||||||
# Now find our tools
|
|
||||||
MOZ_IOS_PATH_PROG(CC, clang, $ARGS)
|
|
||||||
MOZ_IOS_PATH_PROG(CXX, clang++, $ARGS)
|
|
||||||
export CPP="$CC -E"
|
|
||||||
export LD="$CXX"
|
|
||||||
MOZ_IOS_PATH_PROG(AR)
|
|
||||||
MOZ_IOS_PATH_PROG(AS, as, $ARGS)
|
|
||||||
MOZ_IOS_PATH_PROG(OTOOL)
|
|
||||||
MOZ_IOS_PATH_PROG(STRIP)
|
|
||||||
export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST(MOZ_IOS)
|
|
||||||
])
|
|
||||||
|
|
@ -27,6 +27,9 @@ fi
|
||||||
if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then
|
if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then
|
||||||
GNU_AS=1
|
GNU_AS=1
|
||||||
fi
|
fi
|
||||||
|
if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c LLVM`" != "0"; then
|
||||||
|
GNU_AS=1
|
||||||
|
fi
|
||||||
rm -f conftest.out
|
rm -f conftest.out
|
||||||
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
|
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
|
||||||
GNU_LD=1
|
GNU_LD=1
|
||||||
|
|
|
||||||
|
|
@ -324,9 +324,6 @@ def split_triplet(triplet):
|
||||||
elif os.startswith('darwin'):
|
elif os.startswith('darwin'):
|
||||||
canonical_kernel = 'Darwin'
|
canonical_kernel = 'Darwin'
|
||||||
canonical_os = 'OSX'
|
canonical_os = 'OSX'
|
||||||
elif os.startswith('ios'):
|
|
||||||
canonical_kernel = 'Darwin'
|
|
||||||
canonical_os = 'iOS'
|
|
||||||
elif os.startswith('dragonfly'):
|
elif os.startswith('dragonfly'):
|
||||||
canonical_os = canonical_kernel = 'DragonFly'
|
canonical_os = canonical_kernel = 'DragonFly'
|
||||||
elif os.startswith('freebsd'):
|
elif os.startswith('freebsd'):
|
||||||
|
|
@ -458,10 +455,6 @@ add_old_configure_arg(host_for_old_configure)
|
||||||
@depends(host, target)
|
@depends(host, target)
|
||||||
def target_for_old_configure(host, target):
|
def target_for_old_configure(host, target):
|
||||||
target_alias = target.alias
|
target_alias = target.alias
|
||||||
# old-configure does plenty of tests against $target and $target_os
|
|
||||||
# and expects darwin for iOS, so make it happy.
|
|
||||||
if target.os == 'iOS':
|
|
||||||
target_alias = target_alias.replace('-ios', '-darwin')
|
|
||||||
return '--target=%s' % target_alias
|
return '--target=%s' % target_alias
|
||||||
|
|
||||||
add_old_configure_arg(target_for_old_configure)
|
add_old_configure_arg(target_for_old_configure)
|
||||||
|
|
|
||||||
2
config/external/ffi/moz.build
vendored
2
config/external/ffi/moz.build
vendored
|
|
@ -121,6 +121,8 @@ else:
|
||||||
DEFINES['SYMBOL_UNDERSCORE'] = True
|
DEFINES['SYMBOL_UNDERSCORE'] = True
|
||||||
else:
|
else:
|
||||||
ffi_srcs = ('ffi.c', 'darwin.S', 'ffi64.c', 'darwin64.S')
|
ffi_srcs = ('ffi.c', 'darwin.S', 'ffi64.c', 'darwin64.S')
|
||||||
|
elif CONFIG['FFI_TARGET'] == 'AARCH64_DARWIN':
|
||||||
|
ffi_srcs = ('sysv.S', 'ffi.c')
|
||||||
|
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'/js/src/ctypes/libffi/src/%s/%s' % (CONFIG['FFI_TARGET_DIR'], s)
|
'/js/src/ctypes/libffi/src/%s/%s' % (CONFIG['FFI_TARGET_DIR'], s)
|
||||||
|
|
|
||||||
|
|
@ -9519,6 +9519,7 @@ exports.CSS_PROPERTIES = {
|
||||||
"supports": [],
|
"supports": [],
|
||||||
"values": [
|
"values": [
|
||||||
"-moz-pre-space",
|
"-moz-pre-space",
|
||||||
|
"break-spaces",
|
||||||
"inherit",
|
"inherit",
|
||||||
"initial",
|
"initial",
|
||||||
"normal",
|
"normal",
|
||||||
|
|
|
||||||
|
|
@ -851,6 +851,7 @@ gfxTextRun::BreakAndMeasureText(uint32_t aStart, uint32_t aMaxLength,
|
||||||
bool *aUsedHyphenation,
|
bool *aUsedHyphenation,
|
||||||
uint32_t *aLastBreak,
|
uint32_t *aLastBreak,
|
||||||
bool aCanWordWrap,
|
bool aCanWordWrap,
|
||||||
|
bool aCanWhitespaceWrap,
|
||||||
gfxBreakPriority *aBreakPriority)
|
gfxBreakPriority *aBreakPriority)
|
||||||
{
|
{
|
||||||
aMaxLength = std::min(aMaxLength, GetLength() - aStart);
|
aMaxLength = std::min(aMaxLength, GetLength() - aStart);
|
||||||
|
|
@ -918,7 +919,15 @@ gfxTextRun::BreakAndMeasureText(uint32_t aStart, uint32_t aMaxLength,
|
||||||
aCanWordWrap && mCharacterGlyphs[i].IsClusterStart() &&
|
aCanWordWrap && mCharacterGlyphs[i].IsClusterStart() &&
|
||||||
*aBreakPriority <= gfxBreakPriority::eWordWrapBreak;
|
*aBreakPriority <= gfxBreakPriority::eWordWrapBreak;
|
||||||
|
|
||||||
if (atBreak || wordWrapping) {
|
bool whitespaceWrapping = false;
|
||||||
|
if (i > aStart) {
|
||||||
|
// The spec says the breaking opportunity is *after* whitespace.
|
||||||
|
auto const& g = mCharacterGlyphs[i - 1];
|
||||||
|
whitespaceWrapping = aCanWhitespaceWrap &&
|
||||||
|
(g.CharIsSpace() || g.CharIsTab() || g.CharIsNewline());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (atBreak || wordWrapping || whitespaceWrapping) {
|
||||||
gfxFloat hyphenatedAdvance = advance;
|
gfxFloat hyphenatedAdvance = advance;
|
||||||
if (atHyphenationBreak) {
|
if (atHyphenationBreak) {
|
||||||
hyphenatedAdvance += aProvider->GetHyphenWidth();
|
hyphenatedAdvance += aProvider->GetHyphenWidth();
|
||||||
|
|
@ -930,7 +939,8 @@ gfxTextRun::BreakAndMeasureText(uint32_t aStart, uint32_t aMaxLength,
|
||||||
lastBreakTrimmableChars = trimmableChars;
|
lastBreakTrimmableChars = trimmableChars;
|
||||||
lastBreakTrimmableAdvance = trimmableAdvance;
|
lastBreakTrimmableAdvance = trimmableAdvance;
|
||||||
lastBreakUsedHyphenation = atHyphenationBreak;
|
lastBreakUsedHyphenation = atHyphenationBreak;
|
||||||
*aBreakPriority = atBreak ? gfxBreakPriority::eNormalBreak
|
*aBreakPriority = (atBreak || whitespaceWrapping)
|
||||||
|
? gfxBreakPriority::eNormalBreak
|
||||||
: gfxBreakPriority::eWordWrapBreak;
|
: gfxBreakPriority::eWordWrapBreak;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -409,6 +409,7 @@ public:
|
||||||
bool *aUsedHyphenation,
|
bool *aUsedHyphenation,
|
||||||
uint32_t *aLastBreak,
|
uint32_t *aLastBreak,
|
||||||
bool aCanWordWrap,
|
bool aCanWordWrap,
|
||||||
|
bool aCanWhitespaceWrap,
|
||||||
gfxBreakPriority *aBreakPriority);
|
gfxBreakPriority *aBreakPriority);
|
||||||
|
|
||||||
// Utility getters
|
// Utility getters
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
|
||||||
// Include our platform specific implementation.
|
// Include our platform specific implementation.
|
||||||
#if defined(OS_WIN) && defined(ARCH_CPU_X86_FAMILY)
|
#if defined(OS_WIN) && defined(ARCH_CPU_X86_FAMILY)
|
||||||
#include "base/atomicops_internals_x86_msvc.h"
|
#include "base/atomicops_internals_x86_msvc.h"
|
||||||
#elif defined(OS_MACOSX) && defined(ARCH_CPU_X86_FAMILY)
|
#elif defined(OS_MACOSX) && (defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM64))
|
||||||
#include "base/atomicops_internals_x86_macosx.h"
|
#include "base/atomicops_internals_x86_macosx.h"
|
||||||
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
|
#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
|
||||||
#include "base/atomicops_internals_x86_gcc.h"
|
#include "base/atomicops_internals_x86_gcc.h"
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,12 @@ def ffi_target(target):
|
||||||
else:
|
else:
|
||||||
target_name = 'X86_WIN32'
|
target_name = 'X86_WIN32'
|
||||||
elif target.os == 'OSX':
|
elif target.os == 'OSX':
|
||||||
target_dir = 'x86'
|
if target.cpu == 'aarch64':
|
||||||
|
target_name = 'AARCH64_DARWIN'
|
||||||
|
target_dir = 'aarch64'
|
||||||
|
else:
|
||||||
target_name = 'X86_DARWIN'
|
target_name = 'X86_DARWIN'
|
||||||
|
target_dir = 'x86'
|
||||||
elif target.cpu == 'arm':
|
elif target.cpu == 'arm':
|
||||||
target_dir = 'arm'
|
target_dir = 'arm'
|
||||||
target_name = 'ARM'
|
target_name = 'ARM'
|
||||||
|
|
|
||||||
1
js/src/aclocal.m4
vendored
1
js/src/aclocal.m4
vendored
|
|
@ -25,7 +25,6 @@ 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/sanitize.m4)dnl
|
builtin(include, ../../build/autoconf/sanitize.m4)dnl
|
||||||
builtin(include, ../../build/autoconf/ios.m4)dnl
|
|
||||||
|
|
||||||
define([__MOZ_AC_INIT_PREPARE], defn([AC_INIT_PREPARE]))
|
define([__MOZ_AC_INIT_PREPARE], defn([AC_INIT_PREPARE]))
|
||||||
define([AC_INIT_PREPARE],
|
define([AC_INIT_PREPARE],
|
||||||
|
|
|
||||||
|
|
@ -370,6 +370,12 @@ struct macos_arm_context {
|
||||||
arm_neon_state_t float_;
|
arm_neon_state_t float_;
|
||||||
};
|
};
|
||||||
# define EMULATOR_CONTEXT macos_arm_context
|
# define EMULATOR_CONTEXT macos_arm_context
|
||||||
|
# elif defined(__aarch64__)
|
||||||
|
struct macos_aarch64_context {
|
||||||
|
arm_thread_state64_t thread;
|
||||||
|
arm_neon_state64_t float_;
|
||||||
|
};
|
||||||
|
# define EMULATOR_CONTEXT macos_aarch64_context
|
||||||
# else
|
# else
|
||||||
# error Unsupported architecture
|
# error Unsupported architecture
|
||||||
# endif
|
# endif
|
||||||
|
|
@ -887,7 +893,7 @@ ContextToPC(EMULATOR_CONTEXT* context)
|
||||||
static_assert(sizeof(context->thread.uts.ts32.__eip) == sizeof(void*),
|
static_assert(sizeof(context->thread.uts.ts32.__eip) == sizeof(void*),
|
||||||
"stored IP should be compile-time pointer-sized");
|
"stored IP should be compile-time pointer-sized");
|
||||||
return reinterpret_cast<uint8_t**>(&context->thread.uts.ts32.__eip);
|
return reinterpret_cast<uint8_t**>(&context->thread.uts.ts32.__eip);
|
||||||
# elif defined(JS_CPU_ARM)
|
# elif defined(JS_CPU_ARM) || defined(__aarch64__)
|
||||||
static_assert(sizeof(context->thread.__pc) == sizeof(void*),
|
static_assert(sizeof(context->thread.__pc) == sizeof(void*),
|
||||||
"stored IP should be compile-time pointer-sized");
|
"stored IP should be compile-time pointer-sized");
|
||||||
return reinterpret_cast<uint8_t**>(&context->thread.__pc);
|
return reinterpret_cast<uint8_t**>(&context->thread.__pc);
|
||||||
|
|
@ -948,6 +954,11 @@ HandleMachException(JSRuntime* rt, const ExceptionRequest& request)
|
||||||
unsigned int float_state_count = ARM_NEON_STATE_COUNT;
|
unsigned int float_state_count = ARM_NEON_STATE_COUNT;
|
||||||
int thread_state = ARM_THREAD_STATE;
|
int thread_state = ARM_THREAD_STATE;
|
||||||
int float_state = ARM_NEON_STATE;
|
int float_state = ARM_NEON_STATE;
|
||||||
|
# elif defined(__aarch64__)
|
||||||
|
unsigned int thread_state_count = ARM_THREAD_STATE64_COUNT;
|
||||||
|
unsigned int float_state_count = ARM_NEON_STATE64_COUNT;
|
||||||
|
int thread_state = ARM_THREAD_STATE64;
|
||||||
|
int float_state = ARM_NEON_STATE64;
|
||||||
# else
|
# else
|
||||||
# error Unsupported architecture
|
# error Unsupported architecture
|
||||||
# endif
|
# endif
|
||||||
|
|
|
||||||
|
|
@ -1988,35 +1988,31 @@ GetHyphenTextRun(const gfxTextRun* aTextRun, DrawTarget* aDrawTarget,
|
||||||
MakeHyphenTextRun(dt, aTextRun->GetAppUnitsPerDevUnit());
|
MakeHyphenTextRun(dt, aTextRun->GetAppUnitsPerDevUnit());
|
||||||
}
|
}
|
||||||
|
|
||||||
static_assert(NS_STYLE_WHITESPACE_NORMAL == 0, "Convention: NS_STYLE_WHITESPACE_NORMAL should be 0");
|
|
||||||
static_assert(NS_STYLE_WHITESPACE_PRE == 1, "Convention: NS_STYLE_WHITESPACE_PRE should be 1");
|
|
||||||
static_assert(NS_STYLE_WHITESPACE_NOWRAP == 2, "Convention: NS_STYLE_WHITESPACE_NOWRAP should be 2");
|
|
||||||
static_assert(NS_STYLE_WHITESPACE_PRE_WRAP == 3, "Convention: NS_STYLE_WHITESPACE_PRE_WRAP should be 3");
|
|
||||||
static_assert(NS_STYLE_WHITESPACE_PRE_LINE == 4, "Convention: NS_STYLE_WHITESPACE_PRE_LINE should be 4");
|
|
||||||
static_assert(NS_STYLE_WHITESPACE_PRE_SPACE == 5, "Convention: NS_STYLE_WHITESPACE_PRE_SPACE should be 5");
|
|
||||||
|
|
||||||
static nsTextFrameUtils::CompressionMode
|
static nsTextFrameUtils::CompressionMode
|
||||||
GetCSSWhitespaceToCompressionMode(nsTextFrame* aFrame,
|
GetCSSWhitespaceToCompressionMode(nsTextFrame* aFrame,
|
||||||
const nsStyleText* aStyleText)
|
const nsStyleText* aStyleText)
|
||||||
{
|
{
|
||||||
static const nsTextFrameUtils::CompressionMode sModes[] =
|
switch (aStyleText->mWhiteSpace) {
|
||||||
{
|
case NS_STYLE_WHITESPACE_NORMAL:
|
||||||
nsTextFrameUtils::COMPRESS_WHITESPACE_NEWLINE, // normal
|
case NS_STYLE_WHITESPACE_NOWRAP:
|
||||||
nsTextFrameUtils::COMPRESS_NONE, // pre
|
return nsTextFrameUtils::COMPRESS_WHITESPACE_NEWLINE;
|
||||||
nsTextFrameUtils::COMPRESS_WHITESPACE_NEWLINE, // nowrap
|
case NS_STYLE_WHITESPACE_PRE:
|
||||||
nsTextFrameUtils::COMPRESS_NONE, // pre-wrap
|
case NS_STYLE_WHITESPACE_PRE_WRAP:
|
||||||
nsTextFrameUtils::COMPRESS_WHITESPACE, // pre-line
|
case NS_STYLE_WHITESPACE_BREAK_SPACES:
|
||||||
nsTextFrameUtils::COMPRESS_NONE_TRANSFORM_TO_SPACE // -moz-pre-space
|
if (!aStyleText->NewlineIsSignificant(aFrame)) {
|
||||||
};
|
|
||||||
|
|
||||||
auto compression = sModes[aStyleText->mWhiteSpace];
|
|
||||||
if (compression == nsTextFrameUtils::COMPRESS_NONE &&
|
|
||||||
!aStyleText->NewlineIsSignificant(aFrame)) {
|
|
||||||
// If newline is set to be preserved, but then suppressed,
|
// If newline is set to be preserved, but then suppressed,
|
||||||
// transform newline to space.
|
// transform newline to space.
|
||||||
compression = nsTextFrameUtils::COMPRESS_NONE_TRANSFORM_TO_SPACE;
|
return nsTextFrameUtils::COMPRESS_NONE_TRANSFORM_TO_SPACE;
|
||||||
|
}
|
||||||
|
return nsTextFrameUtils::COMPRESS_NONE;
|
||||||
|
case NS_STYLE_WHITESPACE_PRE_SPACE:
|
||||||
|
return nsTextFrameUtils::COMPRESS_NONE_TRANSFORM_TO_SPACE;
|
||||||
|
case NS_STYLE_WHITESPACE_PRE_LINE:
|
||||||
|
return nsTextFrameUtils::COMPRESS_WHITESPACE;
|
||||||
|
default:
|
||||||
|
MOZ_ASSERT_UNREACHABLE("Unknown white-space value");
|
||||||
|
return nsTextFrameUtils::COMPRESS_WHITESPACE_NEWLINE;
|
||||||
}
|
}
|
||||||
return compression;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<gfxTextRun>
|
already_AddRefed<gfxTextRun>
|
||||||
|
|
@ -9206,8 +9202,10 @@ nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
|
||||||
}
|
}
|
||||||
bool canTrimTrailingWhitespace = !textStyle->WhiteSpaceIsSignificant() ||
|
bool canTrimTrailingWhitespace = !textStyle->WhiteSpaceIsSignificant() ||
|
||||||
(GetStateBits() & TEXT_IS_IN_TOKEN_MATHML);
|
(GetStateBits() & TEXT_IS_IN_TOKEN_MATHML);
|
||||||
|
bool isBreakSpaces = textStyle->mWhiteSpace == NS_STYLE_WHITESPACE_BREAK_SPACES;
|
||||||
// allow whitespace to overflow the container
|
// allow whitespace to overflow the container
|
||||||
bool whitespaceCanHang = textStyle->WhiteSpaceCanWrapStyle() &&
|
bool whitespaceCanHang = !isBreakSpaces &&
|
||||||
|
textStyle->WhiteSpaceCanWrapStyle() &&
|
||||||
textStyle->WhiteSpaceIsSignificant();
|
textStyle->WhiteSpaceIsSignificant();
|
||||||
gfxBreakPriority breakPriority = aLineLayout.LastOptionalBreakPriority();
|
gfxBreakPriority breakPriority = aLineLayout.LastOptionalBreakPriority();
|
||||||
gfxTextRun::SuppressBreak suppressBreak = gfxTextRun::eNoSuppressBreak;
|
gfxTextRun::SuppressBreak suppressBreak = gfxTextRun::eNoSuppressBreak;
|
||||||
|
|
@ -9227,7 +9225,9 @@ nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
|
||||||
&textMetrics, boundingBoxType,
|
&textMetrics, boundingBoxType,
|
||||||
aDrawTarget,
|
aDrawTarget,
|
||||||
&usedHyphenation, &transformedLastBreak,
|
&usedHyphenation, &transformedLastBreak,
|
||||||
textStyle->WordCanWrap(this), &breakPriority);
|
textStyle->WordCanWrap(this),
|
||||||
|
isBreakSpaces,
|
||||||
|
&breakPriority);
|
||||||
if (!length && !textMetrics.mAscent && !textMetrics.mDescent) {
|
if (!length && !textMetrics.mAscent && !textMetrics.mDescent) {
|
||||||
// If we're measuring a zero-length piece of text, update
|
// If we're measuring a zero-length piece of text, update
|
||||||
// the height manually.
|
// the height manually.
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ CSS_KEY(both, both)
|
||||||
CSS_KEY(bottom, bottom)
|
CSS_KEY(bottom, bottom)
|
||||||
CSS_KEY(bottom-outside, bottom_outside)
|
CSS_KEY(bottom-outside, bottom_outside)
|
||||||
CSS_KEY(break-all, break_all)
|
CSS_KEY(break-all, break_all)
|
||||||
|
CSS_KEY(break-spaces, break_spaces)
|
||||||
CSS_KEY(break-word, break_word)
|
CSS_KEY(break-word, break_word)
|
||||||
CSS_KEY(brightness, brightness)
|
CSS_KEY(brightness, brightness)
|
||||||
CSS_KEY(browser, browser)
|
CSS_KEY(browser, browser)
|
||||||
|
|
|
||||||
|
|
@ -2253,6 +2253,7 @@ const KTableEntry nsCSSProps::kWhitespaceKTable[] = {
|
||||||
{ eCSSKeyword_pre_wrap, NS_STYLE_WHITESPACE_PRE_WRAP },
|
{ eCSSKeyword_pre_wrap, NS_STYLE_WHITESPACE_PRE_WRAP },
|
||||||
{ eCSSKeyword_pre_line, NS_STYLE_WHITESPACE_PRE_LINE },
|
{ eCSSKeyword_pre_line, NS_STYLE_WHITESPACE_PRE_LINE },
|
||||||
{ eCSSKeyword__moz_pre_space, NS_STYLE_WHITESPACE_PRE_SPACE },
|
{ eCSSKeyword__moz_pre_space, NS_STYLE_WHITESPACE_PRE_SPACE },
|
||||||
|
{ eCSSKeyword_break_spaces, NS_STYLE_WHITESPACE_BREAK_SPACES },
|
||||||
{ eCSSKeyword_UNKNOWN, -1 }
|
{ eCSSKeyword_UNKNOWN, -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1001,6 +1001,7 @@ enum class StyleDisplay : uint8_t {
|
||||||
#define NS_STYLE_WHITESPACE_PRE_WRAP 3
|
#define NS_STYLE_WHITESPACE_PRE_WRAP 3
|
||||||
#define NS_STYLE_WHITESPACE_PRE_LINE 4
|
#define NS_STYLE_WHITESPACE_PRE_LINE 4
|
||||||
#define NS_STYLE_WHITESPACE_PRE_SPACE 5
|
#define NS_STYLE_WHITESPACE_PRE_SPACE 5
|
||||||
|
#define NS_STYLE_WHITESPACE_BREAK_SPACES 6
|
||||||
|
|
||||||
// See nsStyleText
|
// See nsStyleText
|
||||||
#define NS_STYLE_WORDBREAK_NORMAL 0
|
#define NS_STYLE_WORDBREAK_NORMAL 0
|
||||||
|
|
|
||||||
|
|
@ -2105,30 +2105,35 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText
|
||||||
bool WhiteSpaceIsSignificant() const {
|
bool WhiteSpaceIsSignificant() const {
|
||||||
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE ||
|
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
||||||
|
mWhiteSpace == NS_STYLE_WHITESPACE_BREAK_SPACES ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_SPACE;
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_SPACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NewlineIsSignificantStyle() const {
|
bool NewlineIsSignificantStyle() const {
|
||||||
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE ||
|
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
||||||
|
mWhiteSpace == NS_STYLE_WHITESPACE_BREAK_SPACES ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_LINE;
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WhiteSpaceOrNewlineIsSignificant() const {
|
bool WhiteSpaceOrNewlineIsSignificant() const {
|
||||||
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE ||
|
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
||||||
|
mWhiteSpace == NS_STYLE_WHITESPACE_BREAK_SPACES ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_LINE ||
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_LINE ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_SPACE;
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_SPACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TabIsSignificant() const {
|
bool TabIsSignificant() const {
|
||||||
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE ||
|
return mWhiteSpace == NS_STYLE_WHITESPACE_PRE ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP;
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
||||||
|
mWhiteSpace == NS_STYLE_WHITESPACE_BREAK_SPACES;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WhiteSpaceCanWrapStyle() const {
|
bool WhiteSpaceCanWrapStyle() const {
|
||||||
return mWhiteSpace == NS_STYLE_WHITESPACE_NORMAL ||
|
return mWhiteSpace == NS_STYLE_WHITESPACE_NORMAL ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_WRAP ||
|
||||||
|
mWhiteSpace == NS_STYLE_WHITESPACE_BREAK_SPACES ||
|
||||||
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_LINE;
|
mWhiteSpace == NS_STYLE_WHITESPACE_PRE_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4052,7 +4052,7 @@ var gCSSProperties = {
|
||||||
inherited: true,
|
inherited: true,
|
||||||
type: CSS_TYPE_LONGHAND,
|
type: CSS_TYPE_LONGHAND,
|
||||||
initial_values: [ "normal" ],
|
initial_values: [ "normal" ],
|
||||||
other_values: [ "pre", "nowrap", "pre-wrap", "pre-line", "-moz-pre-space" ],
|
other_values: [ "pre", "nowrap", "pre-wrap", "pre-line", "-moz-pre-space", "break-spaces" ],
|
||||||
invalid_values: []
|
invalid_values: []
|
||||||
},
|
},
|
||||||
"width": {
|
"width": {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
#undef HAVE_STACK_GROWING_UP
|
#undef HAVE_STACK_GROWING_UP
|
||||||
#define HAVE_DLL
|
#define HAVE_DLL
|
||||||
#if defined(__x86_64__) || TARGET_OS_IPHONE
|
#if defined(__x86_64__) || defined(__aarch64__)
|
||||||
#define USE_DLFCN
|
#define USE_DLFCN
|
||||||
#else
|
#else
|
||||||
#define USE_MACH_DYLD
|
#define USE_MACH_DYLD
|
||||||
|
|
|
||||||
|
|
@ -96,12 +96,6 @@ case "$target" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$target" in
|
|
||||||
*-apple-darwin*)
|
|
||||||
MOZ_IOS_SDK
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_SUBST(ANDROID_SOURCE)
|
AC_SUBST(ANDROID_SOURCE)
|
||||||
AC_SUBST(ANDROID_PACKAGE_NAME)
|
AC_SUBST(ANDROID_PACKAGE_NAME)
|
||||||
AC_SUBST(OBJCOPY)
|
AC_SUBST(OBJCOPY)
|
||||||
|
|
@ -787,27 +781,11 @@ case "$target" in
|
||||||
DLL_SUFFIX=".dylib"
|
DLL_SUFFIX=".dylib"
|
||||||
DSO_LDOPTS=''
|
DSO_LDOPTS=''
|
||||||
STRIP_FLAGS="$STRIP_FLAGS -x -S"
|
STRIP_FLAGS="$STRIP_FLAGS -x -S"
|
||||||
# Ensure that if we're targeting iOS an SDK was provided.
|
|
||||||
AC_CACHE_CHECK(for iOS target,
|
|
||||||
ac_cv_ios_target,
|
|
||||||
[AC_TRY_COMPILE([#include <TargetConditionals.h>
|
|
||||||
#if !(TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
|
||||||
#error not iOS
|
|
||||||
#endif],
|
|
||||||
[],
|
|
||||||
ac_cv_ios_target="yes",
|
|
||||||
ac_cv_ios_target="no")])
|
|
||||||
if test "$ac_cv_ios_target" = "yes" -a -z $MOZ_IOS; then
|
|
||||||
AC_MSG_ERROR([targeting iOS but not using an iOS SDK?])
|
|
||||||
fi
|
|
||||||
if test -n "$MOZ_IOS"; then
|
|
||||||
direct_nspr_config=1
|
|
||||||
else
|
|
||||||
# The ExceptionHandling framework is needed for Objective-C exception
|
# The ExceptionHandling framework is needed for Objective-C exception
|
||||||
# logging code in nsObjCExceptions.h. Currently we only use that in debug
|
# logging code in nsObjCExceptions.h. Currently we only use that in debug
|
||||||
# builds.
|
# builds.
|
||||||
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling";
|
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling";
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$lto_is_enabled" = "xyes"; then
|
if test "x$lto_is_enabled" = "xyes"; then
|
||||||
echo "Skipping -dead_strip because lto is enabled."
|
echo "Skipping -dead_strip because lto is enabled."
|
||||||
|
|
@ -2084,9 +2062,6 @@ MOZ_OFFICIAL_BRANDING=
|
||||||
MC_OFFICIAL=
|
MC_OFFICIAL=
|
||||||
MOZ_FEEDS=1
|
MOZ_FEEDS=1
|
||||||
MOZ_AUTH_EXTENSION=1
|
MOZ_AUTH_EXTENSION=1
|
||||||
if test "$MOZ_IOS"; then
|
|
||||||
MOZ_AUTH_EXTENSION=
|
|
||||||
fi
|
|
||||||
MOZ_RAW=
|
MOZ_RAW=
|
||||||
MOZ_AV1=
|
MOZ_AV1=
|
||||||
MOZ_VORBIS=
|
MOZ_VORBIS=
|
||||||
|
|
@ -3103,10 +3078,6 @@ MOZ_ARG_DISABLE_BOOL(negotiateauth,
|
||||||
MOZ_AUTH_EXTENSION=,
|
MOZ_AUTH_EXTENSION=,
|
||||||
MOZ_AUTH_EXTENSION=1 )
|
MOZ_AUTH_EXTENSION=1 )
|
||||||
|
|
||||||
if test -n "$MOZ_IOS" -a -n "$MOZ_AUTH_EXTENSION"; then
|
|
||||||
AC_MSG_ERROR([negotiateauth is not supported on iOS.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
dnl Pref extensions (autoconfig)
|
dnl Pref extensions (autoconfig)
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
|
|
@ -3337,9 +3308,7 @@ MOZ_ARG_ENABLE_BOOL(gamepad,
|
||||||
if test "$MOZ_GAMEPAD"; then
|
if test "$MOZ_GAMEPAD"; then
|
||||||
case "$OS_TARGET" in
|
case "$OS_TARGET" in
|
||||||
Darwin)
|
Darwin)
|
||||||
if test -z "$MOZ_IOS"; then
|
|
||||||
MOZ_GAMEPAD_BACKEND=cocoa
|
MOZ_GAMEPAD_BACKEND=cocoa
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
WINNT)
|
WINNT)
|
||||||
MOZ_GAMEPAD_BACKEND=windows
|
MOZ_GAMEPAD_BACKEND=windows
|
||||||
|
|
@ -3656,10 +3625,6 @@ dnl ========================================================
|
||||||
dnl Updater
|
dnl Updater
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
|
|
||||||
if test "$MOZ_IOS"; then
|
|
||||||
MOZ_UPDATER=
|
|
||||||
fi
|
|
||||||
|
|
||||||
MOZ_ARG_ENABLE_BOOL(updater,
|
MOZ_ARG_ENABLE_BOOL(updater,
|
||||||
[ --enable-updater Enable building of internal updater],
|
[ --enable-updater Enable building of internal updater],
|
||||||
MOZ_UPDATER=1,
|
MOZ_UPDATER=1,
|
||||||
|
|
@ -4863,9 +4828,7 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi,
|
||||||
if test "$MOZ_NECKO_WIFI"; then
|
if test "$MOZ_NECKO_WIFI"; then
|
||||||
case "$OS_TARGET" in
|
case "$OS_TARGET" in
|
||||||
Darwin)
|
Darwin)
|
||||||
if test -z "$MOZ_IOS"; then
|
|
||||||
NECKO_WIFI=1
|
NECKO_WIFI=1
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
DragonFly|FreeBSD|WINNT)
|
DragonFly|FreeBSD|WINNT)
|
||||||
NECKO_WIFI=1
|
NECKO_WIFI=1
|
||||||
|
|
|
||||||
|
|
@ -1345,6 +1345,9 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
|
||||||
"have Apple's development tools installed")
|
"have Apple's development tools installed")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
# Resign the executable, since install_name_tool invalidates the signature
|
||||||
|
call_subprocess(["codesign", "-s", "-", py_executable])
|
||||||
|
|
||||||
if not is_win:
|
if not is_win:
|
||||||
# Ensure that 'python', 'pythonX' and 'pythonX.Y' all exist
|
# Ensure that 'python', 'pythonX' and 'pythonX.Y' all exist
|
||||||
py_exe_version_major = 'python%s' % sys.version_info[0]
|
py_exe_version_major = 'python%s' % sys.version_info[0]
|
||||||
|
|
|
||||||
|
|
@ -611,6 +611,14 @@ function UpdateParser(aId, aUpdateKey, aUrl, aObserver) {
|
||||||
let requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, true);
|
let requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, true);
|
||||||
|
|
||||||
logger.debug("Requesting " + aUrl);
|
logger.debug("Requesting " + aUrl);
|
||||||
|
|
||||||
|
if (!aUrl) {
|
||||||
|
logger.warn("Request failed: empty update manifest URL");
|
||||||
|
this._doneAt = new Error("UP_emptyManifestURL");
|
||||||
|
this.notifyError(AddonUpdateChecker.ERROR_DOWNLOAD_ERROR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.request = new ServiceRequest();
|
this.request = new ServiceRequest();
|
||||||
this.request.open("GET", this.url, true);
|
this.request.open("GET", this.url, true);
|
||||||
|
|
|
||||||
|
|
@ -6135,6 +6135,15 @@ function UpdateChecker(aAddon, aListener, aReason, aAppVersion, aPlatformVersion
|
||||||
if ("onUpdateAvailable" in this.listener)
|
if ("onUpdateAvailable" in this.listener)
|
||||||
aReason |= UPDATE_TYPE_NEWVERSION;
|
aReason |= UPDATE_TYPE_NEWVERSION;
|
||||||
|
|
||||||
|
// Pass an empty string as the url and call checkForUpdates now if
|
||||||
|
// updateURL is empty. UpdateParser should detect this and fail early.
|
||||||
|
|
||||||
|
if (!updateURL) {
|
||||||
|
this._parser = AddonUpdateChecker.checkForUpdates(aAddon.id, aAddon.updateKey,
|
||||||
|
"", this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let url = escapeAddonURI(aAddon, updateURL, aReason, aAppVersion);
|
let url = escapeAddonURI(aAddon, updateURL, aReason, aAppVersion);
|
||||||
this._parser = AddonUpdateChecker.checkForUpdates(aAddon.id, aAddon.updateKey,
|
this._parser = AddonUpdateChecker.checkForUpdates(aAddon.id, aAddon.updateKey,
|
||||||
url, this);
|
url, this);
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,6 @@ class WidgetRenderingContext;
|
||||||
enter:(BOOL)aEnter
|
enter:(BOOL)aEnter
|
||||||
exitFrom:(mozilla::WidgetMouseEvent::ExitFrom)aExitFrom;
|
exitFrom:(mozilla::WidgetMouseEvent::ExitFrom)aExitFrom;
|
||||||
|
|
||||||
- (void)updateGLContext;
|
|
||||||
- (void)_surfaceNeedsUpdate:(NSNotification*)notification;
|
- (void)_surfaceNeedsUpdate:(NSNotification*)notification;
|
||||||
|
|
||||||
- (bool)preRender:(NSOpenGLContext *)aGLContext;
|
- (bool)preRender:(NSOpenGLContext *)aGLContext;
|
||||||
|
|
|
||||||
|
|
@ -3309,16 +3309,11 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||||
if (!mGLContext) {
|
if (!mGLContext) {
|
||||||
mGLContext = aGLContext;
|
mGLContext = aGLContext;
|
||||||
[mGLContext retain];
|
[mGLContext retain];
|
||||||
mNeedsGLUpdate = true;
|
mNeedsGLUpdate = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGLLockContext((CGLContextObj)[aGLContext CGLContextObj]);
|
CGLLockContext((CGLContextObj)[aGLContext CGLContextObj]);
|
||||||
|
|
||||||
if (mNeedsGLUpdate) {
|
|
||||||
[self updateGLContext];
|
|
||||||
mNeedsGLUpdate = NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
|
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
|
||||||
|
|
@ -3472,12 +3467,6 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)updateGLContext
|
|
||||||
{
|
|
||||||
[mGLContext setView:mPixelHostingView];
|
|
||||||
[mGLContext update];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)_surfaceNeedsUpdate:(NSNotification*)notification
|
- (void)_surfaceNeedsUpdate:(NSNotification*)notification
|
||||||
{
|
{
|
||||||
if (mGLContext) {
|
if (mGLContext) {
|
||||||
|
|
@ -3592,6 +3581,13 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||||
LayoutDeviceIntRegion region(geckoBounds);
|
LayoutDeviceIntRegion region(geckoBounds);
|
||||||
|
|
||||||
mGeckoChild->PaintWindow(region);
|
mGeckoChild->PaintWindow(region);
|
||||||
|
|
||||||
|
if (mNeedsGLUpdate) {
|
||||||
|
[mGLContext setView:mPixelHostingView];
|
||||||
|
[mGLContext update];
|
||||||
|
mNeedsGLUpdate = NO;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
||||||
'PoisonIOInterposerBase.cpp',
|
'PoisonIOInterposerBase.cpp',
|
||||||
'PoisonIOInterposerMac.cpp',
|
'PoisonIOInterposerMac.cpp',
|
||||||
]
|
]
|
||||||
|
if CONFIG["CPU_ARCH"] != "aarch64":
|
||||||
SOURCES += ['mach_override.c']
|
SOURCES += ['mach_override.c']
|
||||||
SOURCES['mach_override.c'].flags += ['-Wno-unused-function']
|
SOURCES['mach_override.c'].flags += ['-Wno-unused-function']
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,8 @@ static const uint32_t CPU_TYPE = CPU_TYPE_X86_64;
|
||||||
static const uint32_t CPU_TYPE = CPU_TYPE_POWERPC;
|
static const uint32_t CPU_TYPE = CPU_TYPE_POWERPC;
|
||||||
#elif defined(__ppc64__)
|
#elif defined(__ppc64__)
|
||||||
static const uint32_t CPU_TYPE = CPU_TYPE_POWERPC64;
|
static const uint32_t CPU_TYPE = CPU_TYPE_POWERPC64;
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
static const uint32_t CPU_TYPE = CPU_TYPE_ARM64;
|
||||||
#else
|
#else
|
||||||
#error Unsupported CPU type
|
#error Unsupported CPU type
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,11 @@ if CONFIG['OS_ARCH'] == 'Darwin':
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'xptcinvoke_asm_x86_64_unix.S',
|
'xptcinvoke_asm_x86_64_unix.S',
|
||||||
]
|
]
|
||||||
|
if CONFIG["CPU_ARCH"] == "aarch64":
|
||||||
|
SOURCES += [
|
||||||
|
"xptcinvoke_asm_aarch64.S",
|
||||||
|
"xptcstubs_asm_aarch64.S",
|
||||||
|
]
|
||||||
if '86' in CONFIG['OS_TEST'] and CONFIG['OS_TEST'] != 'x86_64':
|
if '86' in CONFIG['OS_TEST'] and CONFIG['OS_TEST'] != 'x86_64':
|
||||||
DEFINES['MOZ_NEED_LEADING_UNDERSCORE'] = True
|
DEFINES['MOZ_NEED_LEADING_UNDERSCORE'] = True
|
||||||
|
|
||||||
|
|
@ -105,9 +110,9 @@ if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD', 'OpenBSD'):
|
||||||
if CONFIG['OS_TEST'] == 'aarch64':
|
if CONFIG['OS_TEST'] == 'aarch64':
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'xptcinvoke_aarch64.cpp',
|
'xptcinvoke_aarch64.cpp',
|
||||||
'xptcinvoke_asm_aarch64.s',
|
'xptcinvoke_asm_aarch64.S',
|
||||||
'xptcstubs_aarch64.cpp',
|
'xptcstubs_aarch64.cpp',
|
||||||
'xptcstubs_asm_aarch64.s',
|
'xptcstubs_asm_aarch64.S',
|
||||||
]
|
]
|
||||||
if CONFIG['OS_TEST'] == 'm68k':
|
if CONFIG['OS_TEST'] == 'm68k':
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,36 @@
|
||||||
* 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/. */
|
||||||
|
|
||||||
.section ".text"
|
#ifdef __APPLE__
|
||||||
.globl _NS_InvokeByIndex
|
#define SYM(x) _ ## x
|
||||||
|
#else
|
||||||
|
#define SYM(x) x
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.text
|
||||||
|
.align 2
|
||||||
|
.globl SYM(_NS_InvokeByIndex)
|
||||||
|
#ifndef __APPLE__
|
||||||
.type _NS_InvokeByIndex,@function
|
.type _NS_InvokeByIndex,@function
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
* _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
|
||||||
* uint32_t paramCount, nsXPTCVariant* params)
|
* uint32_t paramCount, nsXPTCVariant* params)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_NS_InvokeByIndex:
|
SYM(_NS_InvokeByIndex):
|
||||||
|
.cfi_startproc
|
||||||
# set up frame
|
# set up frame
|
||||||
stp x29, x30, [sp,#-32]!
|
stp x29, x30, [sp,#-32]!
|
||||||
|
.cfi_adjust_cfa_offset 32
|
||||||
|
.cfi_rel_offset x29, 0
|
||||||
|
.cfi_rel_offset x30, 8
|
||||||
mov x29, sp
|
mov x29, sp
|
||||||
|
.cfi_def_cfa_register x29
|
||||||
stp x19, x20, [sp,#16]
|
stp x19, x20, [sp,#16]
|
||||||
|
.cfi_rel_offset x19, 16
|
||||||
|
.cfi_rel_offset x20, 24
|
||||||
|
|
||||||
# save methodIndex across function calls
|
# save methodIndex across function calls
|
||||||
mov w20, w1
|
mov w20, w1
|
||||||
|
|
@ -37,7 +53,7 @@ _NS_InvokeByIndex:
|
||||||
|
|
||||||
# start of stack area passed to invoke_copy_to_stack
|
# start of stack area passed to invoke_copy_to_stack
|
||||||
mov x0, sp
|
mov x0, sp
|
||||||
bl invoke_copy_to_stack
|
bl SYM(invoke_copy_to_stack)
|
||||||
|
|
||||||
# load arguments passed in r0-r7
|
# load arguments passed in r0-r7
|
||||||
ldp x6, x7, [sp, #48]
|
ldp x6, x7, [sp, #48]
|
||||||
|
|
@ -58,10 +74,19 @@ _NS_InvokeByIndex:
|
||||||
blr x16
|
blr x16
|
||||||
|
|
||||||
add sp, sp, w19, uxth #3
|
add sp, sp, w19, uxth #3
|
||||||
|
.cfi_def_cfa_register sp
|
||||||
ldp x19, x20, [sp,#16]
|
ldp x19, x20, [sp,#16]
|
||||||
|
.cfi_restore x19
|
||||||
|
.cfi_restore x20
|
||||||
ldp x29, x30, [sp],#32
|
ldp x29, x30, [sp],#32
|
||||||
|
.cfi_adjust_cfa_offset -32
|
||||||
|
.cfi_restore x29
|
||||||
|
.cfi_restore x30
|
||||||
ret
|
ret
|
||||||
|
.cfi_endproc
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
.size _NS_InvokeByIndex, . - _NS_InvokeByIndex
|
.size _NS_InvokeByIndex, . - _NS_InvokeByIndex
|
||||||
|
|
||||||
|
.section .note.GNU-stack, "", @progbits
|
||||||
|
#endif
|
||||||
|
|
@ -10,6 +10,19 @@
|
||||||
#error "Only little endian compatibility was tested"
|
#error "Only little endian compatibility was tested"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
template<typename T> void
|
||||||
|
get_value_and_advance(T* aOutValue, void*& aStack) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
const size_t aligned_size = sizeof(T);
|
||||||
|
#else
|
||||||
|
const size_t aligned_size = 8;
|
||||||
|
#endif
|
||||||
|
// Ensure the pointer is aligned for the type
|
||||||
|
uintptr_t addr = (reinterpret_cast<uintptr_t>(aStack) + aligned_size - 1) & ~(aligned_size - 1);
|
||||||
|
memcpy(aOutValue, reinterpret_cast<void*>(addr), sizeof(T));
|
||||||
|
aStack = reinterpret_cast<void*>(addr + aligned_size);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is for AArch64 ABI
|
* This is for AArch64 ABI
|
||||||
*
|
*
|
||||||
|
|
@ -17,8 +30,8 @@
|
||||||
* the "fp" registers are stored in fprData. Each array has 8 regs
|
* the "fp" registers are stored in fprData. Each array has 8 regs
|
||||||
* but first reg in gprData is a placeholder for 'self'.
|
* but first reg in gprData is a placeholder for 'self'.
|
||||||
*/
|
*/
|
||||||
extern "C" nsresult
|
extern "C" nsresult ATTRIBUTE_USED
|
||||||
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, void* args,
|
||||||
uint64_t *gprData, double *fprData)
|
uint64_t *gprData, double *fprData)
|
||||||
{
|
{
|
||||||
#define PARAM_BUFFER_COUNT 16
|
#define PARAM_BUFFER_COUNT 16
|
||||||
|
|
@ -28,7 +41,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
|
||||||
nsXPTCMiniVariant* dispatchParams = NULL;
|
nsXPTCMiniVariant* dispatchParams = NULL;
|
||||||
const nsXPTMethodInfo* info;
|
const nsXPTMethodInfo* info;
|
||||||
nsresult result = NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
NS_ASSERTION(self,"no self");
|
NS_ASSERTION(self,"no self");
|
||||||
|
|
||||||
|
|
@ -45,7 +57,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
}
|
}
|
||||||
NS_ASSERTION(dispatchParams,"no place for params");
|
NS_ASSERTION(dispatchParams,"no place for params");
|
||||||
|
|
||||||
uint64_t* ap = args;
|
void* ap = args;
|
||||||
uint32_t next_gpr = 1; // skip first arg which is 'self'
|
uint32_t next_gpr = 1; // skip first arg which is 'self'
|
||||||
uint32_t next_fpr = 0;
|
uint32_t next_fpr = 0;
|
||||||
for (uint32_t i = 0; i < paramCount; i++) {
|
for (uint32_t i = 0; i < paramCount; i++) {
|
||||||
|
|
@ -57,7 +69,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.p = (void*)gprData[next_gpr++];
|
dp->val.p = (void*)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.p = (void*)*ap++;
|
get_value_and_advance(&dp->val.p, ap);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -67,7 +79,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.i8 = (int8_t)gprData[next_gpr++];
|
dp->val.i8 = (int8_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.i8 = (int8_t)*ap++;
|
get_value_and_advance(&dp->val.i8, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -75,7 +87,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.i16 = (int16_t)gprData[next_gpr++];
|
dp->val.i16 = (int16_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.i16 = (int16_t)*ap++;
|
get_value_and_advance(&dp->val.i16, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -83,7 +95,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.i32 = (int32_t)gprData[next_gpr++];
|
dp->val.i32 = (int32_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.i32 = (int32_t)*ap++;
|
get_value_and_advance(&dp->val.i32, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -91,7 +103,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.i64 = (int64_t)gprData[next_gpr++];
|
dp->val.i64 = (int64_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.i64 = (int64_t)*ap++;
|
get_value_and_advance(&dp->val.i64, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -99,7 +111,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.u8 = (uint8_t)gprData[next_gpr++];
|
dp->val.u8 = (uint8_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.u8 = (uint8_t)*ap++;
|
get_value_and_advance(&dp->val.u8, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -107,7 +119,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.u16 = (uint16_t)gprData[next_gpr++];
|
dp->val.u16 = (uint16_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.u16 = (uint16_t)*ap++;
|
get_value_and_advance(&dp->val.u16, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -115,7 +127,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.u32 = (uint32_t)gprData[next_gpr++];
|
dp->val.u32 = (uint32_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.u32 = (uint32_t)*ap++;
|
get_value_and_advance(&dp->val.u32, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -123,7 +135,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.u64 = (uint64_t)gprData[next_gpr++];
|
dp->val.u64 = (uint64_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.u64 = (uint64_t)*ap++;
|
get_value_and_advance(&dp->val.u64, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -131,7 +143,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_fpr < PARAM_FPR_COUNT) {
|
if (next_fpr < PARAM_FPR_COUNT) {
|
||||||
memcpy(&dp->val.f, &fprData[next_fpr++], sizeof(dp->val.f));
|
memcpy(&dp->val.f, &fprData[next_fpr++], sizeof(dp->val.f));
|
||||||
} else {
|
} else {
|
||||||
memcpy(&dp->val.f, ap++, sizeof(dp->val.f));
|
get_value_and_advance(&dp->val.f, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -139,15 +151,17 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_fpr < PARAM_FPR_COUNT) {
|
if (next_fpr < PARAM_FPR_COUNT) {
|
||||||
memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d));
|
memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d));
|
||||||
} else {
|
} else {
|
||||||
memcpy(&dp->val.d, ap++, sizeof(dp->val.d));
|
get_value_and_advance(&dp->val.d, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nsXPTType::T_BOOL:
|
case nsXPTType::T_BOOL:
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.b = (bool)gprData[next_gpr++];
|
dp->val.b = (bool)(uint8_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.b = (bool)*ap++;
|
uint8_t value;
|
||||||
|
get_value_and_advance(&value, ap);
|
||||||
|
dp->val.b = (bool)value;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -155,7 +169,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.c = (char)gprData[next_gpr++];
|
dp->val.c = (char)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.c = (char)*ap++;
|
get_value_and_advance(&dp->val.c, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -163,7 +177,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
if (next_gpr < PARAM_GPR_COUNT) {
|
if (next_gpr < PARAM_GPR_COUNT) {
|
||||||
dp->val.wc = (wchar_t)gprData[next_gpr++];
|
dp->val.wc = (wchar_t)gprData[next_gpr++];
|
||||||
} else {
|
} else {
|
||||||
dp->val.wc = (wchar_t)*ap++;
|
get_value_and_advance(&dp->val.wc, ap);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -173,7 +187,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
|
nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
|
||||||
|
|
||||||
if (dispatchParams != paramBuffer) {
|
if (dispatchParams != paramBuffer) {
|
||||||
delete [] dispatchParams;
|
delete [] dispatchParams;
|
||||||
|
|
@ -182,26 +196,34 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define GNU(str)
|
||||||
|
#define UNDERSCORE "__"
|
||||||
|
#else
|
||||||
|
#define GNU(str) str
|
||||||
|
#define UNDERSCORE "_"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Load w17 with the constant 'n' and branch to SharedStub().
|
// Load w17 with the constant 'n' and branch to SharedStub().
|
||||||
# define STUB_ENTRY(n) \
|
# define STUB_ENTRY(n) \
|
||||||
__asm__ ( \
|
__asm__ ( \
|
||||||
".section \".text\" \n\t" \
|
".text\n\t" \
|
||||||
".align 2\n\t" \
|
".align 2\n\t" \
|
||||||
".if "#n" < 10 \n\t" \
|
".if "#n" < 10 \n\t" \
|
||||||
".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
|
".globl " UNDERSCORE "ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
|
||||||
".hidden _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
|
GNU(".hidden _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t") \
|
||||||
".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
|
GNU(".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n")\
|
||||||
"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
|
"" UNDERSCORE "ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
|
||||||
".elseif "#n" < 100 \n\t" \
|
".elseif "#n" < 100 \n\t" \
|
||||||
".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
|
".globl " UNDERSCORE "ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
|
||||||
".hidden _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
|
GNU(".hidden _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t") \
|
||||||
".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
|
GNU(".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n")\
|
||||||
"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
|
"" UNDERSCORE "ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
|
||||||
".elseif "#n" < 1000 \n\t" \
|
".elseif "#n" < 1000 \n\t" \
|
||||||
".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
|
".globl " UNDERSCORE "ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
|
||||||
".hidden _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
|
GNU(".hidden _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t") \
|
||||||
".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
|
GNU(".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n")\
|
||||||
"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
|
UNDERSCORE "ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
|
||||||
".else \n\t" \
|
".else \n\t" \
|
||||||
".err \"stub number "#n" >= 1000 not yet supported\"\n" \
|
".err \"stub number "#n" >= 1000 not yet supported\"\n" \
|
||||||
".endif \n\t" \
|
".endif \n\t" \
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,30 @@
|
||||||
# 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/.
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define SYM(x) _ ## x
|
||||||
|
#else
|
||||||
|
#define SYM(x) x
|
||||||
|
#endif
|
||||||
|
|
||||||
.set NGPREGS,8
|
.set NGPREGS,8
|
||||||
.set NFPREGS,8
|
.set NFPREGS,8
|
||||||
|
|
||||||
.section ".text"
|
.text
|
||||||
|
.align 2
|
||||||
.globl SharedStub
|
.globl SharedStub
|
||||||
|
#ifndef __APPLE__
|
||||||
.hidden SharedStub
|
.hidden SharedStub
|
||||||
.type SharedStub,@function
|
.type SharedStub,@function
|
||||||
|
#endif
|
||||||
SharedStub:
|
SharedStub:
|
||||||
|
.cfi_startproc
|
||||||
stp x29, x30, [sp,#-16]!
|
stp x29, x30, [sp,#-16]!
|
||||||
|
.cfi_adjust_cfa_offset 16
|
||||||
|
.cfi_rel_offset x29, 0
|
||||||
|
.cfi_rel_offset x30, 8
|
||||||
mov x29, sp
|
mov x29, sp
|
||||||
|
.cfi_def_cfa_register x29
|
||||||
|
|
||||||
sub sp, sp, #8*(NGPREGS+NFPREGS)
|
sub sp, sp, #8*(NGPREGS+NFPREGS)
|
||||||
stp x0, x1, [sp, #64+(0*8)]
|
stp x0, x1, [sp, #64+(0*8)]
|
||||||
|
|
@ -30,10 +44,19 @@ SharedStub:
|
||||||
add x3, sp, #8*NFPREGS
|
add x3, sp, #8*NFPREGS
|
||||||
add x4, sp, #0
|
add x4, sp, #0
|
||||||
|
|
||||||
bl PrepareAndDispatch
|
bl SYM(PrepareAndDispatch)
|
||||||
|
|
||||||
add sp, sp, #8*(NGPREGS+NFPREGS)
|
add sp, sp, #8*(NGPREGS+NFPREGS)
|
||||||
|
.cfi_def_cfa_register sp
|
||||||
ldp x29, x30, [sp],#16
|
ldp x29, x30, [sp],#16
|
||||||
|
.cfi_adjust_cfa_offset -16
|
||||||
|
.cfi_restore x29
|
||||||
|
.cfi_restore x30
|
||||||
ret
|
ret
|
||||||
|
.cfi_endproc
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
.size SharedStub, . - SharedStub
|
.size SharedStub, . - SharedStub
|
||||||
|
|
||||||
|
.section .note.GNU-stack, "", @progbits
|
||||||
|
#endif
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
#include "xptcstubs_ppc_rhapsody.cpp"
|
#include "xptcstubs_ppc_rhapsody.cpp"
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
#include "xptcstubs_arm.cpp"
|
#include "xptcstubs_arm.cpp"
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
#include "xptcstubs_aarch64.cpp"
|
||||||
#else
|
#else
|
||||||
#error unknown cpu architecture
|
#error unknown cpu architecture
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue