merge from trunk.

git-svn-id: svn://10.0.0.236/branches/SVG_20020806_BRANCH@139666 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alex.fritze%crocodile-clips.com
2003-03-18 13:15:21 +00:00
parent 95f35b8965
commit 015a1fa3b8
6 changed files with 1249 additions and 971 deletions

View File

@@ -100,8 +100,6 @@ MOZ_INSTALLER = @MOZ_INSTALLER@
MOZ_NO_ACTIVEX_SUPPORT = @MOZ_NO_ACTIVEX_SUPPORT@
MOZ_ACTIVEX_SCRIPTING_SUPPORT = @MOZ_ACTIVEX_SCRIPTING_SUPPORT@
XPC_IDISPATCH_SUPPORT = @MOZ_ACTIVEX_SCRIPTING_SUPPORT@
MOZ_JSLOADER = @MOZ_JSLOADER@
MOZ_XPINSTALL = @MOZ_XPINSTALL@
MOZ_XPFE_COMPONENTS = @MOZ_XPFE_COMPONENTS@
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@
@@ -383,8 +381,6 @@ MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
COMPILER_DEPEND = @COMPILER_DEPEND@
MDDEPDIR := @MDDEPDIR@
MOZ_DISABLE_DTD_DEBUG = @MOZ_DISABLE_DTD_DEBUG@
MOZ_DEMANGLE_SYMBOLS = @MOZ_DEMANGLE_SYMBOLS@
# XXX - these need to be cleaned up and have real checks added -cls

1561
mozilla/configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -2631,18 +2631,22 @@ dnl supports it well enough to allow us to use it to change access, but not
dnl to resolve ambiguity. The next two tests determine how well the |using|
dnl keyword is supported.
dnl
dnl Check to see if we can change access with |using|.
dnl Check to see if we can change access with |using|. Test both a
dnl legal and an illegal example.
AC_CACHE_CHECK(whether the C++ \"using\" keyword can change access,
ac_cv_cpp_access_changing_using,
[AC_TRY_COMPILE(class X { public: int go(const X&) {return 3;} };
class Y : public X {
public: int go(int) {return 2;}
private: using X::go;
};,
X x; Y y;,
ac_cv_cpp_access_changing_using=yes,
ac_cv_cpp_access_changing_using=no)])
if test "$ac_cv_cpp_access_changing_using" = yes ; then
ac_cv_cpp_access_changing_using2,
[AC_TRY_COMPILE(
class A { protected: int foo() { return 0; } };
class B : public A { public: using A::foo; };,
B b; return b.foo();,
[AC_TRY_COMPILE(
class A { public: int foo() { return 1; } };
class B : public A { private: using A::foo; };,
B b; return b.foo();,
ac_cv_cpp_access_changing_using2=no,
ac_cv_cpp_access_changing_using2=yes)],
ac_cv_cpp_access_changing_using2=no)])
if test "$ac_cv_cpp_access_changing_using2" = yes ; then
AC_DEFINE(HAVE_CPP_ACCESS_CHANGING_USING)
fi
@@ -3038,7 +3042,14 @@ MOZ_ARG_HEADER(Toolkit Options)
dnl ========================================================
MOZ_ARG_ENABLE_STRING(default-toolkit,
[ --enable-default-toolkit=TK
Select default toolkit (default=<platform specific>)],
Select default toolkit
Platform specific defaults:
BeOS - beos
Mac OS X - mac (carbon)
Neutrino/QNX - photon
OS/2 - os2
Win32 - windows
* - gtk],
[ _DEFAULT_TOOLKIT=$enableval ],
[ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT])
@@ -3199,7 +3210,8 @@ dnl =========================================================
MOZ_LDAP_XPCOM=1
MOZ_ARG_DISABLE_BOOL(ldap,
[ --disable-ldap Disable LDAP support],
MOZ_LDAP_XPCOM=)
MOZ_LDAP_XPCOM=,
MOZ_LDAP_XPCOM=1)
dnl ========================================================
dnl = Phoenix
@@ -3219,7 +3231,8 @@ dnl = FreeType2
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(freetype2,
[ --disable-freetype2 Disable FreeType2 support ],
_NO_FREETYPE2=1 )
_NO_FREETYPE2=1,
_NO_FREETYPE2= )
if test "$no_x" = "yes"; then
_NO_FREETYPE2=1
@@ -3236,12 +3249,12 @@ dnl = Xft
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(xft,
[ --enable-xft Enable Xft support ],
MOZ_ENABLE_XFT=1
AC_DEFINE(MOZ_ENABLE_XFT)
)
MOZ_ENABLE_XFT=1,
MOZ_ENABLE_XFT= )
if test "$MOZ_ENABLE_XFT"
then
AC_DEFINE(MOZ_ENABLE_XFT)
PKG_CHECK_MODULES(MOZ_XFT, xft)
if test "$MOZ_ENABLE_GTK2"; then
PKG_CHECK_MODULES(_PANGOCHK, pango >= 1.1.0)
@@ -3255,7 +3268,7 @@ AC_SUBST(MOZ_XFT_LIBS)
dnl ========================================================
dnl = disabling x11 core support, enabled by default
dnl ========================================================
MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS:-1}
MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-1}
if test "$MOZ_ENABLE_COREXFONTS"
then
AC_DEFINE(MOZ_ENABLE_COREXFONTS)
@@ -3333,7 +3346,8 @@ dnl ========================================================
MOZ_JSDEBUGGER=1
MOZ_ARG_DISABLE_BOOL(jsd,
[ --disable-jsd Disable JavaScript debug library],
MOZ_JSDEBUGGER=)
MOZ_JSDEBUGGER=,
MOZ_JSDEBUGGER=1)
dnl ========================================================
@@ -3346,11 +3360,14 @@ dnl ========================================================
MOZ_ARG_ENABLE_BOOL(xinerama,
[ --enable-xinerama Enable Xinerama support
( not safe for Red Hat 7.0 ) ],
[ if test -n "$MOZ_XINERAMA_LIBS" && \
test -n "$ac_cv_header_X11_extensions_Xinerama_h"; then
_ENABLE_XINERAMA=1,
_ENABLE_XINERAMA= )
if test -n "$_ENABLE_XINERAMA" -a -n "$MOZ_XINERAMA_LIBS" -a \
-n "$ac_cv_header_X11_extensions_Xinerama_h"; then
MOZ_ENABLE_XINERAMA=1
AC_DEFINE(MOZ_ENABLE_XINERAMA)
fi ])
fi
dnl bi-directional support always on
IBMBIDI=1
@@ -3371,7 +3388,8 @@ dnl ========================================================
ACCESSIBILITY=1
MOZ_ARG_DISABLE_BOOL(accessibility,
[ --disable-accessibility Disable accessibility support],
ACCESSIBILITY= )
ACCESSIBILITY=,
ACCESSIBILITY=1 )
if test "$ACCESSIBILITY"; then
AC_DEFINE(ACCESSIBILITY)
fi
@@ -3381,16 +3399,19 @@ dnl xpfe/components on by default
dnl ========================================================
MOZ_XPFE_COMPONENTS=1
MOZ_ARG_DISABLE_BOOL(xpfe-components,
[ --disable-xpfe-components Disable xpfe components],
MOZ_XPFE_COMPONENTS= )
[ --disable-xpfe-components
Disable xpfe components],
MOZ_XPFE_COMPONENTS=,
MOZ_XPFE_COMPONENTS=1 )
dnl ========================================================
dnl xpinstall support on by default
dnl ========================================================
MOZ_XPINSTALL=1
MOZ_ARG_DISABLE_BOOL(xpinstall,
[ --disable-xpinstall Disable xpinstall support],
MOZ_XPINSTALL= )
[ --disable-xpinstall Disable xpinstall support],
MOZ_XPINSTALL=,
MOZ_XPINSTALL=1 )
if test "$MOZ_XPINSTALL"; then
AC_DEFINE(MOZ_XPINSTALL)
fi
@@ -3409,8 +3430,9 @@ dnl xpcom js loader support on by default
dnl ========================================================
MOZ_JSLOADER=1
MOZ_ARG_DISABLE_BOOL(jsloader,
[ --disable-jsloader Disable xpcom js loader support],
MOZ_JSLOADER= )
[ --disable-jsloader Disable xpcom js loader support],
MOZ_JSLOADER=,
MOZ_JSLOADER=1 )
if test "$MOZ_JSLOADER"; then
AC_DEFINE(MOZ_JSLOADER)
fi
@@ -3420,8 +3442,9 @@ dnl use native unicode converters
dnl ========================================================
MOZ_USE_NATIVE_UCONV=
MOZ_ARG_ENABLE_BOOL(native-uconv,
[ --enable-native-uconv enable iconv support],
MOZ_USE_NATIVE_UCONV=1 )
[ --enable-native-uconv Enable iconv support],
MOZ_USE_NATIVE_UCONV=1,
MOZ_USE_NATIVE_UCONV= )
if test "$MOZ_USE_NATIVE_UCONV"; then
AC_DEFINE(MOZ_USE_NATIVE_UCONV)
fi
@@ -3436,7 +3459,8 @@ MOZ_PLAINTEXT_EDITOR_ONLY=
MOZ_ARG_ENABLE_BOOL(plaintext-editor-only,
[ --enable-plaintext-editor-only
Allow only plaintext editing],
MOZ_PLAINTEXT_EDITOR_ONLY=1 )
MOZ_PLAINTEXT_EDITOR_ONLY=1,
MOZ_PLAINTEXT_EDITOR_ONLY= )
dnl Note the #define is MOZILLA, not MOZ, for compat with the Mac build.
AC_SUBST(MOZ_PLAINTEXT_EDITOR_ONLY)
@@ -3446,7 +3470,8 @@ dnl ========================================================
MOZ_COMPOSER=1
MOZ_ARG_DISABLE_BOOL(composer,
[ --disable-composer Disable building of Composer],
MOZ_COMPOSER= )
MOZ_COMPOSER=,
MOZ_COMPOSER=1 )
AC_SUBST(MOZ_COMPOSER)
dnl ========================================================
@@ -3550,15 +3575,17 @@ dnl ========================================================
MOZ_ARG_ENABLE_BOOL(ldap-experimental,
[ --enable-ldap-experimental
Enable LDAP experimental features],
MOZ_LDAP_XPCOM_EXPERIMENTAL=1)
MOZ_LDAP_XPCOM_EXPERIMENTAL=1,
MOZ_LDAP_XPCOM_EXPERIMENTAL=)
dnl ========================================================
dnl MathML on by default
dnl ========================================================
MOZ_MATHML=1
MOZ_ARG_DISABLE_BOOL(mathml,
[ --disable-mathml Disable MathML],
MOZ_MATHML= )
[ --disable-mathml Disable MathML support],
MOZ_MATHML=,
MOZ_MATHML=1 )
if test "$MOZ_MATHML"; then
AC_DEFINE(MOZ_MATHML)
fi
@@ -3568,20 +3595,29 @@ dnl SVG
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(svg,
[ --enable-svg Enable SVG ],
MOZ_SVG=1
AC_DEFINE(MOZ_SVG))
MOZ_SVG=1,
MOZ_SVG= )
if test -n "$MOZ_SVG"; then
AC_DEFINE(MOZ_SVG)
fi
AC_SUBST(MOZ_SVG)
MOZ_ARG_ENABLE_BOOL(svg-renderer-gdiplus,
[ --enable-svg-renderer-gdiplus Enable SVG gdi+ renderer ],
MOZ_SVG_RENDERER_GDIPLUS=1
AC_DEFINE(MOZ_SVG_RENDERER_GDIPLUS))
MOZ_SVG_RENDERER_GDIPLUS= )
if test -n "MOZ_SVG_RENDERER_GDIPLUS"; then
AC_DEFINE(MOZ_SVG_RENDERER_GDIPLUS)
fi
AC_SUBST(MOZ_SVG_RENDERER_GDIPLUS)
MOZ_ARG_ENABLE_BOOL(svg-renderer-libart,
[ --enable-svg-renderer-libart Enable SVG libart renderer ],
MOZ_SVG_RENDERER_LIBART=1
AC_DEFINE(MOZ_SVG_RENDERER_LIBART))
MOZ_SVG_RENDERER_LIBART= )
if test -n "MOZ_SVG_RENDERER_LIBART"; then
AC_DEFINE(MOZ_SVG_RENDERER_LIBART)
fi
AC_SUBST(MOZ_SVG_RENDERER_LIBART)
dnl To build transformiix standalone, set TX_EXE while configuring
@@ -3602,6 +3638,10 @@ MOZ_ARG_DISABLE_BOOL(installer,
[ --disable-installer Disable building of installer],
MOZ_INSTALLER=,
MOZ_INSTALLER=1 )
# Automatically disable installer if xpinstall isn't built
if test -z "$MOZ_XPINSTALL"; then
MOZ_INSTALLER=
fi
AC_SUBST(MOZ_INSTALLER)
dnl ========================================================
@@ -3626,7 +3666,8 @@ MOZ_ACTIVEX_SCRIPTING_SUPPORT=
if test -n "$_WIN32_MSVC"; then
MOZ_ARG_ENABLE_BOOL(activex-scripting,
[ --enable-activex-scripting
Enable building of ActiveX scripting and plugin support (win32 only)],
Enable building of ActiveX scripting
and plugin support (win32 only)],
MOZ_ACTIVEX_SCRIPTING_SUPPORT=1,
MOZ_ACTIVEX_SCRIPTING_SUPPORT=)
fi
@@ -3638,13 +3679,32 @@ then
fi
dnl ========================================================
dnl leaky
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(leaky,
[ --enable-leaky Build leaky memory tool],
MOZ_LEAKY=1,
MOZ_LEAKY=)
dnl ========================================================
dnl xpctools
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(xpctools,
[ --enable-xpctools Build JS profiling tool],
MOZ_XPCTOOLS=1,
MOZ_XPCTOOLS= )
dnl ========================================================
dnl build the tests by default
dnl ========================================================
ENABLE_TESTS=1
MOZ_ARG_DISABLE_BOOL(tests,
[ --disable-tests Do not build test libraries & programs],
ENABLE_TESTS= )
ENABLE_TESTS=,
ENABLE_TESTS=1 )
dnl ========================================================
dnl =
@@ -3657,25 +3717,26 @@ dnl ========================================================
dnl = Enable Lea malloc in xpcom. OFF by default.
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(xpcom-lea,
[ --enable-xpcom-lea Enable Lea malloc in xpcom ],
[ XPCOM_USE_LEA=1
AC_DEFINE(XPCOM_USE_LEA)])
[ --enable-xpcom-lea Use Lea malloc in xpcom ],
XPCOM_USE_LEA=1,
XPCOM_USE_LEA= )
if test -n "$XPCOM_USE_LEA"; then
AC_DEFINE(XPCOM_USE_LEA)
fi
dnl ========================================================
dnl = Enable Ultrasparc specific optimizations for JS
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(js-ultrasparc,
[ --enable-js-ultrasparc Enable UltraSPARC optimizations in JS],
[case "$target_os" in
solaris*)
case $OS_TEST in
sun4u)
JS_ULTRASPARC_OPTS=1
;;
esac
;;
esac
])
[ --enable-js-ultrasparc Use UltraSPARC optimizations in JS],
JS_ULTRASPARC_OPTS=1,
JS_ULTRASPARC_OPTS= )
dnl only enable option for ultrasparcs
if test `echo "$target_os" | grep -c \^solaris 2>/dev/null` = 0 -o \
"$OS_TEST" != "sun4u"; then
JS_ULTRASPARC_OPTS=
fi
AC_SUBST(JS_ULTRASPARC_OPTS)
dnl ========================================================
@@ -3683,29 +3744,7 @@ dnl =
dnl = Feature options that require extra sources to be pulled
dnl =
dnl ========================================================
MOZ_ARG_HEADER(Features that require extra sources)
dnl ========================================================
dnl mozilla/tools/leaky not part of default build.
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(leaky,
[ --enable-leaky Enable leaky memory tool (needs mozilla/tools/leaky)],
MOZ_LEAKY=1)
dnl ========================================================
dnl mozilla/tools/jprof not part of default build.
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(jprof,
[ --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof)],
MOZ_JPROF=1
AC_DEFINE(MOZ_JPROF))
dnl ========================================================
dnl mozilla/js/src/xpconnect/tools is not part of default build.
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(xpctools,
[ --enable-xpctools Build JS profiling tool (needs mozilla/js/src/xpconnect/tools)],
MOZ_XPCTOOLS=1)
dnl MOZ_ARG_HEADER(Features that require extra sources)
dnl ========================================================
dnl =
@@ -3817,31 +3856,24 @@ MOZ_ARG_ENABLE_STRING(debugger-info-modules,
MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES";
done ])
dnl ========================================================
dnl = Disable some DTD debugging code in the parser that
dnl = breaks on some compilers because of evil and broken
dnl = streams code in htmlparser/src/prstrm.cpp
dnl ========================================================
MOZ_DISABLE_DTD_DEBUG=
MOZ_ARG_DISABLE_BOOL(dtd-debug,
[ --disable-dtd-debug Disable DTD debugging code in the parser],
MOZ_DISABLE_DTD_DEBUG=1
AC_DEFINE(MOZ_DISABLE_DTD_DEBUG) )
dnl ========================================================
dnl Enable garbage collector
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(boehm,
[ --enable-boehm Enable the Boehm Garbage Collector],
GC_LEAK_DETECTOR=1,
GC_LEAK_DETECTOR= )
if test -n "$GC_LEAK_DETECTOR"; then
AC_DEFINE(GC_LEAK_DETECTOR)
GC_LEAK_DETECTOR=1)
fi
dnl ========================================================
dnl Disable runtime logging checks
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(logging,
[ --disable-logging Disable logging facilities],
NS_DISABLE_LOGGING=1)
NS_DISABLE_LOGGING=1,
NS_DISABLE_LOGGING= )
if test "$NS_DISABLE_LOGGING"; then
AC_DEFINE(NS_DISABLE_LOGGING)
else
@@ -3854,7 +3886,11 @@ dnl ========================================================
MOZ_ARG_ENABLE_BOOL(crash-on-assert,
[ --enable-crash-on-assert
Make NS_ASSERTION crash on Unix],
AC_DEFINE(UNIX_CRASH_ON_ASSERT))
_CRASH_ON_ASSERT=1,
_CRASH_ON_ASSERT= )
if test "$_CRASH_ON_ASSERT"; then
AC_DEFINE(UNIX_CRASH_ON_ASSERT)
fi
dnl ========================================================
dnl = Enable function reordering. Off by default
@@ -3862,19 +3898,29 @@ dnl ========================================================
MOZ_REORDER=
MOZ_ARG_ENABLE_BOOL(reorder,
[ --enable-reorder Enable function reordering (requires GNU ld) ],
[ if test -z "$GNU_LD"; then
AC_MSG_WARN([Reordering only works with GNU ld. Not reordering.])
else
MOZ_REORDER=1
fi])
_ENABLE_REORDER=1,
_ENABLE_REORDER= )
if test -n "$_ENABLE_REORDER"; then
if test -z "$GNU_LD"; then
AC_MSG_WARN([Reordering only works with GNU ld. Not reordering.])
else
MOZ_REORDER=1
fi
fi
dnl ========================================================
dnl = dnl This will enable logging of addref, release, ctor, dtor.
dnl ========================================================
_ENABLE_LOGREFCNT=42
MOZ_ARG_ENABLE_BOOL(logrefcnt,
[ --enable-logrefcnt Enable logging of refcounts (default=debug) ],
AC_DEFINE(FORCE_BUILD_REFCNT_LOGGING),
AC_DEFINE(NO_BUILD_REFCNT_LOGGING))
_ENABLE_LOGREFCNT=1,
_ENABLE_LOGREFCNT= )
if test "$_ENABLE_LOGREFCNT" = "1"; then
AC_DEFINE(FORCE_BUILD_REFCNT_LOGGING)
elif test -z "$_ENABLE_LOGREFCNT"; then
AC_DEFINE(NO_BUILD_REFCNT_LOGGING)
fi
dnl ========================================================
dnl = detect webshell leaks
@@ -3883,7 +3929,8 @@ MOZ_ARG_ENABLE_BOOL(detect-webshell-leaks,
[ --enable-detect-webshell-leaks
Enable detection of webshell leaks
(default=debug)],
_DETECT_WEBSHELL_LEAKS=1 , ,
_DETECT_WEBSHELL_LEAKS=1,
_DETECT_WEBSHELL_LEAKS=,
[ if test "$MOZ_DEBUG"; then
_DETECT_WEBSHELL_LEAKS=1
fi])
@@ -3898,10 +3945,15 @@ dnl = Use malloc wrapper lib
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(wrap-malloc,
[ --enable-wrap-malloc Wrap malloc calls (gnu linker only)],
[ if test "$GNU_CC"; then
_WRAP_MALLOC=1,
_WRAP_MALLOC= )
if test -n "$_WRAP_MALLOC"; then
if test "$GNU_CC"; then
WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc"
MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) -o $@'
fi])
fi
fi
dnl ========================================================
dnl = Location of malloc wrapper lib
@@ -3915,14 +3967,31 @@ dnl = Use Electric Fence
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(efence,
[ --enable-efence Link with Electric Fence],
AC_CHECK_LIB(efence,malloc))
_ENABLE_EFENCE=1,
_ENABLE_EFENCE= )
if test -n "$_ENABLE_EFENCE"; then
AC_CHECK_LIB(efence,malloc)
fi
dnl ========================================================
dnl jprof
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(jprof,
[ --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof)],
MOZ_JPROF=1,
MOZ_JPROF= )
if test -n "$MOZ_JPROF"; then
AC_DEFINE(MOZ_JPROF)
fi
dnl ========================================================
dnl = Enable stripping of libs & executables
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(strip,
[ --enable-strip Enable stripping of libs & executables ],
ENABLE_STRIP=1)
ENABLE_STRIP=1,
ENABLE_STRIP= )
dnl ========================================================
dnl = --enable-elf-dynstr-gc
@@ -3945,7 +4014,9 @@ dnl to true on x86 linux, and false everywhere else.
dnl
MOZ_ARG_ENABLE_BOOL(old-abi-compat-wrappers,
[ --enable-old-abi-compat-wrappers Support old GCC ABI symbols to ease the pain of the linux compiler change],
[ --enable-old-abi-compat-wrappers
Support old GCC ABI symbols to ease the pain
of the linux compiler change],
MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1,
MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS= )
if test "$MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS"; then
@@ -3979,8 +4050,11 @@ dnl ========================================================
MOZ_TIMELINE=
MOZ_ARG_ENABLE_BOOL(timeline,
[ --enable-timeline Enable timeline services ],
MOZ_TIMELINE=1,
MOZ_TIMELINE= )
if test -n "$MOZ_TIMELINE"; then
AC_DEFINE(MOZ_TIMELINE)
MOZ_TIMELINE=1)
fi
dnl ========================================================
dnl Turn on reflow counting
@@ -3988,8 +4062,11 @@ dnl ========================================================
MOZ_REFLOW_PERF=
MOZ_ARG_ENABLE_BOOL(reflow-perf,
[ --enable-reflow-perf Enable reflow performance tracing],
MOZ_REFLOW_PERF=1
AC_DEFINE(MOZ_REFLOW_PREF) )
MOZ_REFLOW_PERF=1,
MOZ_REFLOW_PERF= )
if test -n "$MOZ_REFLOW_PREF"; then
AC_DEFINE(MOZ_REFLOW_PREF)
fi
AC_SUBST(MOZ_REFLOW_PERF)
dnl ========================================================
@@ -3997,19 +4074,26 @@ dnl Enable performance metrics.
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(perf-metrics,
[ --enable-perf-metrics Enable performance metrics],
MOZ_PERF_METRICS=1
AC_DEFINE(MOZ_PERF_METRICS))
MOZ_PERF_METRICS=1,
MOZ_PERF_METRICS= )
if test -n "$MOZ_PERF_METRICS"; then
AC_DEFINE(MOZ_PERF_METRICS)
fi
dnl ========================================================
dnl Enable code size metrics.
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(codesighs,
[ --enable-codesighs Enable code size analysis tools],
[ if test -d $srcdir/tools/codesighs; then
MOZ_MAPINFO=1
else
AC_MSG_ERROR([Codesighs directory ./tools/codesighs required.])
fi])
_ENABLE_CODESIGHS=1,
_ENABLE_CODESIGHS= )
if test -n "$_ENABLE_CODESIGHS"; then
if test -d $srcdir/tools/codesighs; then
MOZ_MAPINFO=1
else
AC_MSG_ERROR([Codesighs directory $srcdir/tools/codesighs required.])
fi
fi
dnl ========================================================
dnl = Enable trace malloc
@@ -4017,7 +4101,8 @@ dnl ========================================================
NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
MOZ_ARG_ENABLE_BOOL(trace-malloc,
[ --enable-trace-malloc Enable malloc tracing],
NS_TRACE_MALLOC=1 )
NS_TRACE_MALLOC=1,
NS_TRACE_MALLOC= )
if test "$NS_TRACE_MALLOC"; then
# Please, Mr. Linker Man, don't take away our symbol names
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
@@ -4032,12 +4117,15 @@ dnl ========================================================
MOZ_ARG_ENABLE_BOOL(eazel-profiler-support,
[ --enable-eazel-profiler-support
Enable Corel/Eazel profiler support],
ENABLE_EAZEL_PROFILER=1
ENABLE_EAZEL_PROFILER=1,
ENABLE_EAZEL_PROFILER= )
if test -n "$ENABLE_EAZEL_PROFILER"; then
AC_DEFINE(ENABLE_EAZEL_PROFILER)
USE_ELF_DYNSTR_GC=
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
EAZEL_PROFILER_LIBS="-lprofiler -lpthread")
EAZEL_PROFILER_LIBS="-lprofiler -lpthread"
fi
MOZ_ARG_ENABLE_STRING(profile-modules,
[ --enable-profile-modules
@@ -4046,7 +4134,14 @@ MOZ_ARG_ENABLE_STRING(profile-modules,
MOZ_ARG_ENABLE_BOOL(insure,
[ --enable-insure Enable insure++ instrumentation (linux only)],
[ MOZ_INSURE="insure" MOZ_INSURIFYING=1 MOZ_INSURE_DIRS="." MOZ_INSURE_EXCLUDE_DIRS="config" ])
_ENABLE_INSURE=1,
_ENABLE_INSURE= )
if test -n "$_ENABLE_INSURE"; then
MOZ_INSURE="insure"
MOZ_INSURIFYING=1
MOZ_INSURE_DIRS="."
MOZ_INSURE_EXCLUDE_DIRS="config"
fi
MOZ_ARG_WITH_STRING(insure-dirs,
[ --with-insure-dirs=DIRS
@@ -4108,7 +4203,8 @@ dnl update xterm title
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(xterm-updates,
[ --enable-xterm-updates Update XTERM titles with current command.],
MOZ_UPDATE_XTERM=1)
MOZ_UPDATE_XTERM=1,
MOZ_UPDATE_XTERM= )
dnl =========================================================
dnl = Chrome format
@@ -4912,7 +5008,6 @@ AC_SUBST(OS_ARCH)
AC_SUBST(OS_RELEASE)
AC_SUBST(OS_TEST)
AC_SUBST(MOZ_DISABLE_DTD_DEBUG)
AC_SUBST(MOZ_DISABLE_JAR_PACKAGING)
AC_SUBST(MOZ_CHROME_FILE_FORMAT)

View File

@@ -61,6 +61,7 @@
#include "nsIAtom.h"
#include "nsVoidArray.h"
#include "nsISupportsArray.h"
#include "nsCOMArray.h"
#include "nsColor.h"
#include "nsStyleConsts.h"
#include "nsLayoutAtoms.h"
@@ -69,8 +70,10 @@
#include "nsINameSpace.h"
#include "nsThemeConstants.h"
#include "nsContentErrors.h"
#include "nsUnitConversion.h"
#include "prprf.h"
#include "math.h"
// XXX TODO:
// - rework aErrorCode stuff: switch over to nsresult
@@ -149,10 +152,6 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsICSSStyleSheet* aSheet);
NS_IMETHOD GetInfoMask(PRUint32& aResult);
NS_IMETHOD SetStyleSheet(nsICSSStyleSheet* aSheet);
NS_IMETHOD SetCaseSensitive(PRBool aCaseSensitive);
@@ -309,6 +308,11 @@ protected:
PRBool ParseColor(PRInt32& aErrorCode, nsCSSValue& aValue);
PRBool ParseColorComponent(PRInt32& aErrorCode, PRUint8& aComponent,
PRInt32& aType, char aStop);
// ParseHSLColor parses everything starting with the opening '(' up through
// and including the aStop char.
PRBool ParseHSLColor(PRInt32& aErrorCode, nscolor& aColor, char aStop);
// ParseColorOpacity will enforce that the color ends with a ')' after the opacity
PRBool ParseColorOpacity(PRInt32& aErrorCode, PRUint8& aOpacity);
PRBool ParseEnum(PRInt32& aErrorCode, nsCSSValue& aValue, const PRInt32 aKeywordTable[]);
PRInt32 SearchKeywordTable(nsCSSKeyword aKeyword, const PRInt32 aTable[]);
PRBool ParseVariant(PRInt32& aErrorCode, nsCSSValue& aValue,
@@ -323,37 +327,57 @@ protected:
PRBool TranslateDimension(PRInt32& aErrorCode, nsCSSValue& aValue, PRInt32 aVariantMask,
float aNumber, const nsString& aUnit);
void SetParsingCompoundProperty(PRBool aBool) {
mParsingCompoundProperty = aBool;
}
PRBool IsParsingCompoundProperty(void) {
return mParsingCompoundProperty;
}
// Current token. The value is valid after calling GetToken
nsCSSToken mToken;
// After an UngetToken is done this flag is true. The next call to
// GetToken clears the flag.
PRBool mHavePushBack;
// Our scanner. We own this and are responsible for deallocating it.
nsCSSScanner* mScanner;
nsIURI* mURL;
nsICSSStyleSheet* mSheet;
// The URI to be used as a base for relative URIs.
nsCOMPtr<nsIURI> mURL;
// The sheet we're parsing into
nsCOMPtr<nsICSSStyleSheet> mSheet;
// Used for @import rules
nsICSSLoader* mChildLoader; // not ref counted, it owns us
// Sheet section we're in. This is used to enforce correct ordering of the
// various rule types (eg the fact that a @charset rule must come before
// anything else).
enum nsCSSSection {
eCSSSection_Charset,
eCSSSection_Import,
eCSSSection_NameSpace,
eCSSSection_General
};
nsCSSSection mSection;
PRBool mNavQuirkMode;
PRBool mCaseSensitive;
nsCOMPtr<nsINameSpace> mNameSpace;
nsINameSpace* mNameSpace;
// After an UngetToken is done this flag is true. The next call to
// GetToken clears the flag.
PRPackedBool mHavePushBack;
nsISupportsArray* mGroupStack;
// True if we are in quirks mode; false in standards or almost standards mode
PRPackedBool mNavQuirkMode;
PRBool mParsingCompoundProperty;
void SetParsingCompoundProperty(PRBool aBool) {mParsingCompoundProperty = aBool;};
PRBool IsParsingCompoundProperty(void) {return mParsingCompoundProperty;};
// True if tagnames and attributes are case-sensitive
PRPackedBool mCaseSensitive;
// This flag is set when parsing a non-box shorthand; it's used to not apply
// some quirks during shorthand parsing
PRPackedBool mParsingCompoundProperty;
// Stack of rule groups; used for @media and such.
nsCOMArray<nsICSSGroupRule> mGroupStack;
};
PR_STATIC_CALLBACK(void) AppendRuleToArray(nsICSSRule* aRule, void* aArray)
@@ -423,48 +447,20 @@ static void ReportUnexpectedToken(nsCSSScanner *sc,
CSSParserImpl::CSSParserImpl()
: mToken(),
mHavePushBack(PR_FALSE),
mScanner(nsnull),
mURL(nsnull),
mSheet(nsnull),
mChildLoader(nsnull),
mSection(eCSSSection_Charset),
mHavePushBack(PR_FALSE),
mNavQuirkMode(PR_FALSE),
mCaseSensitive(PR_FALSE),
mNameSpace(nsnull),
mGroupStack(nsnull),
mParsingCompoundProperty(PR_FALSE)
{
}
NS_IMETHODIMP
CSSParserImpl::Init(nsICSSStyleSheet* aSheet)
{
NS_IF_RELEASE(mGroupStack);
NS_IF_RELEASE(mNameSpace);
NS_IF_RELEASE(mSheet);
mSheet = aSheet;
if (mSheet) {
NS_ADDREF(aSheet);
mSheet->GetNameSpace(mNameSpace);
}
return NS_OK;
}
NS_IMPL_ISUPPORTS1(CSSParserImpl, nsICSSParser)
CSSParserImpl::~CSSParserImpl()
{
NS_IF_RELEASE(mGroupStack);
NS_IF_RELEASE(mNameSpace);
NS_IF_RELEASE(mSheet);
}
NS_IMETHODIMP
CSSParserImpl::GetInfoMask(PRUint32& aResult)
{
aResult = NS_CSS_GETINFO_CSS1 | NS_CSS_GETINFO_CSSP;
return NS_OK;
}
NS_IMETHODIMP
@@ -477,12 +473,9 @@ CSSParserImpl::SetStyleSheet(nsICSSStyleSheet* aSheet)
if (aSheet != mSheet) {
// Switch to using the new sheet
NS_IF_RELEASE(mGroupStack);
NS_IF_RELEASE(mNameSpace);
NS_IF_RELEASE(mSheet);
mGroupStack.Clear();
mSheet = aSheet;
NS_ADDREF(mSheet);
mSheet->GetNameSpace(mNameSpace);
mSheet->GetNameSpace(*getter_AddRefs(mNameSpace));
}
return NS_OK;
@@ -519,9 +512,7 @@ CSSParserImpl::InitScanner(nsIUnicharInputStream* aInput, nsIURI* aURI)
return NS_ERROR_OUT_OF_MEMORY;
}
mScanner->Init(aInput, aURI);
NS_IF_RELEASE(mURL);
mURL = aURI;
NS_IF_ADDREF(mURL);
mHavePushBack = PR_FALSE;
@@ -535,7 +526,7 @@ CSSParserImpl::ReleaseScanner(void)
delete mScanner;
mScanner = nsnull;
}
NS_IF_RELEASE(mURL);
mURL = nsnull;
return NS_OK;
}
@@ -548,7 +539,7 @@ CSSParserImpl::Parse(nsIUnicharInputStream* aInput,
NS_ASSERTION(nsnull != aInputURL, "need base URL");
if (! mSheet) {
NS_NewCSSStyleSheet(&mSheet, aInputURL);
NS_NewCSSStyleSheet(getter_AddRefs(mSheet), aInputURL);
}
#ifdef DEBUG
else {
@@ -1327,8 +1318,7 @@ PRBool CSSParserImpl::ProcessNameSpace(PRInt32& aErrorCode, const nsString& aPre
NS_NewCSSNameSpaceRule(getter_AddRefs(rule), prefix, aURLSpec);
if (rule) {
(*aAppendFunc)(rule, aData);
NS_IF_RELEASE(mNameSpace);
mSheet->GetNameSpace(mNameSpace);
mSheet->GetNameSpace(*getter_AddRefs(mNameSpace));
}
return result;
@@ -1428,37 +1418,25 @@ void CSSParserImpl::SkipRuleSet(PRInt32& aErrorCode)
PRBool CSSParserImpl::PushGroup(nsICSSGroupRule* aRule)
{
if (! mGroupStack) {
NS_NewISupportsArray(&mGroupStack);
}
if (mGroupStack) {
mGroupStack->AppendElement(aRule);
if (mGroupStack.AppendObject(aRule))
return PR_TRUE;
}
return PR_FALSE;
}
void CSSParserImpl::PopGroup(void)
{
if (mGroupStack) {
PRUint32 count;
mGroupStack->Count(&count);
if (0 < count) {
mGroupStack->RemoveElementAt(count - 1);
}
PRInt32 count = mGroupStack.Count();
if (0 < count) {
mGroupStack.RemoveObjectAt(count - 1);
}
}
void CSSParserImpl::AppendRule(nsICSSRule* aRule)
{
PRUint32 count = 0;
if (mGroupStack) {
mGroupStack->Count(&count);
}
PRInt32 count = mGroupStack.Count();
if (0 < count) {
nsICSSGroupRule* group = (nsICSSGroupRule*)mGroupStack->ElementAt(count - 1);
group->AppendStyleRule(aRule);
NS_RELEASE(group);
mGroupStack[count - 1]->AppendStyleRule(aRule);
}
else {
mSheet->AppendStyleRule(aRule);
@@ -2483,7 +2461,6 @@ PRBool CSSParserImpl::ParseColor(PRInt32& aErrorCode, nsCSSValue& aValue)
return PR_FALSE;
}
nsCSSToken* tk = &mToken;
nscolor rgba;
switch (tk->mType) {
@@ -2520,12 +2497,47 @@ PRBool CSSParserImpl::ParseColor(PRInt32& aErrorCode, nsCSSValue& aValue)
ParseColorComponent(aErrorCode, r, type, ',') &&
ParseColorComponent(aErrorCode, g, type, ',') &&
ParseColorComponent(aErrorCode, b, type, ')')) {
rgba = NS_RGB(r,g,b);
aValue.SetColorValue(rgba);
aValue.SetColorValue(NS_RGB(r,g,b));
return PR_TRUE;
}
return PR_FALSE; // already pushed back
}
else if (mToken.mIdent.EqualsIgnoreCase("-moz-rgba")) {
// rgba ( component , component , component , opacity )
PRUint8 r, g, b, a;
PRInt32 type = COLOR_TYPE_UNKNOWN;
if (ExpectSymbol(aErrorCode, '(', PR_FALSE) && // this won't fail
ParseColorComponent(aErrorCode, r, type, ',') &&
ParseColorComponent(aErrorCode, g, type, ',') &&
ParseColorComponent(aErrorCode, b, type, ',') &&
ParseColorOpacity(aErrorCode, a)) {
aValue.SetColorValue(NS_RGBA(r, g, b, a));
return PR_TRUE;
}
return PR_FALSE; // already pushed back
}
else if (mToken.mIdent.EqualsIgnoreCase("-moz-hsl")) {
// hsl ( hue , saturation , lightness )
// "hue" is a number, "saturation" and "lightness" are percentages.
if (ParseHSLColor(aErrorCode, rgba, ')')) {
aValue.SetColorValue(rgba);
return PR_TRUE;
}
return PR_FALSE;
}
else if (mToken.mIdent.EqualsIgnoreCase("-moz-hsla")) {
// hsla ( hue , saturation , lightness , opacity )
// "hue" is a number, "saturation" and "lightness" are percentages,
// "opacity" is a number.
PRUint8 a;
if (ParseHSLColor(aErrorCode, rgba, ',') &&
ParseColorOpacity(aErrorCode, a)) {
aValue.SetColorValue(NS_RGBA(NS_GET_R(rgba), NS_GET_G(rgba),
NS_GET_B(rgba), a));
return PR_TRUE;
}
return PR_FALSE;
}
break;
default:
break;
@@ -2656,12 +2668,121 @@ PRBool CSSParserImpl::ParseColorComponent(PRInt32& aErrorCode,
PRUnichar stopString[2];
stopString[0] = PRUnichar(aStop);
stopString[1] = PRUnichar(0);
REPORT_UNEXPECTED_TOKEN(NS_LITERAL_STRING("Expected ") +
REPORT_UNEXPECTED_TOKEN(NS_LITERAL_STRING("Expected '") +
nsDependentString(stopString, 1) +
NS_LITERAL_STRING(" but found"));
NS_LITERAL_STRING("' but found"));
return PR_FALSE;
}
PRBool CSSParserImpl::ParseHSLColor(PRInt32& aErrorCode, nscolor& aColor,
char aStop)
{
float h, s, l;
if (!ExpectSymbol(aErrorCode, '(', PR_FALSE)) {
NS_ERROR("How did this get to be a function token?");
return PR_FALSE;
}
// Get the hue
if (!GetToken(aErrorCode, PR_TRUE)) {
REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("hue"));
return PR_FALSE;
}
if (mToken.mType != eCSSToken_Number) {
REPORT_UNEXPECTED_TOKEN(
NS_LITERAL_STRING("Expected a number but found"));
UngetToken();
return PR_FALSE;
}
h = mToken.mNumber;
h /= 360.0f;
// hue values are wraparound
h = h - floor(h);
if (!ExpectSymbol(aErrorCode, ',', PR_TRUE)) {
REPORT_UNEXPECTED_TOKEN(NS_LITERAL_STRING("Expected ',' but found"));
return PR_FALSE;
}
// Get the saturation
if (!GetToken(aErrorCode, PR_TRUE)) {
REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("saturation"));
return PR_FALSE;
}
if (mToken.mType != eCSSToken_Percentage) {
REPORT_UNEXPECTED_TOKEN(
NS_LITERAL_STRING("Expected a percentage but found"));
UngetToken();
return PR_FALSE;
}
s = mToken.mNumber;
if (s < 0.0f) s = 0.0f;
if (s > 1.0f) s = 1.0f;
if (!ExpectSymbol(aErrorCode, ',', PR_TRUE)) {
REPORT_UNEXPECTED_TOKEN(NS_LITERAL_STRING("Expected ',' but found"));
return PR_FALSE;
}
// Get the lightness
if (!GetToken(aErrorCode, PR_TRUE)) {
REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("lightness"));
return PR_FALSE;
}
if (mToken.mType != eCSSToken_Percentage) {
REPORT_UNEXPECTED_TOKEN(
NS_LITERAL_STRING("Expected a percentage but found"));
UngetToken();
return PR_FALSE;
}
l = mToken.mNumber;
if (l < 0.0f) l = 0.0f;
if (l > 1.0f) l = 1.0f;
if (ExpectSymbol(aErrorCode, aStop, PR_TRUE)) {
aColor = NS_HSL2RGB(h, s, l);
return PR_TRUE;
}
PRUnichar stopString[2];
stopString[0] = PRUnichar(aStop);
stopString[1] = PRUnichar(0);
REPORT_UNEXPECTED_TOKEN(NS_LITERAL_STRING("Expected '") +
nsDependentString(stopString, 1) +
NS_LITERAL_STRING("' but found"));
return PR_FALSE;
}
PRBool CSSParserImpl::ParseColorOpacity(PRInt32& aErrorCode, PRUint8& aOpacity)
{
if (!GetToken(aErrorCode, PR_TRUE)) {
REPORT_UNEXPECTED_EOF(NS_LITERAL_STRING("opacity in color value"));
return PR_FALSE;
}
if (mToken.mType != eCSSToken_Number) {
REPORT_UNEXPECTED_TOKEN(
NS_LITERAL_STRING("Expected a number but found"));
UngetToken();
return PR_FALSE;
}
PRUint32 value = (PRUint32)NSToIntRound(mToken.mNumber*255);
if (!ExpectSymbol(aErrorCode, ')', PR_TRUE)) {
REPORT_UNEXPECTED_TOKEN(NS_LITERAL_STRING("Expected ')' but found"));
return PR_FALSE;
}
if (value < 0) value = 0;
if (value > 255) value = 255;
aOpacity = (PRUint8)value;
return PR_TRUE;
}
#ifdef INCLUDE_XUL
PRBool CSSParserImpl::ParseTreePseudoElement(PRInt32& aErrorCode,
nsCSSSelector& aSelector)
@@ -3124,7 +3245,10 @@ PRBool CSSParserImpl::ParseVariant(PRInt32& aErrorCode, nsCSSValue& aValue,
(eCSSToken_ID == tk->mType) ||
(eCSSToken_Ident == tk->mType) ||
((eCSSToken_Function == tk->mType) &&
(tk->mIdent.EqualsIgnoreCase("rgb")))) {
(tk->mIdent.EqualsIgnoreCase("rgb") ||
tk->mIdent.EqualsIgnoreCase("-moz-hsl") ||
tk->mIdent.EqualsIgnoreCase("-moz-rgba") ||
tk->mIdent.EqualsIgnoreCase("-moz-hsla")))) {
// Put token back so that parse color can get it
UngetToken();
if (ParseColor(aErrorCode, aValue)) {
@@ -3346,7 +3470,7 @@ PRBool CSSParserImpl::ParseURL(PRInt32& aErrorCode, nsCSSValue& aValue)
// the style sheet.
// XXX editors won't like this - too bad for now
nsAutoString absURL;
if (nsnull != mURL && css_RequiresAbsoluteURI(tk->mIdent)) {
if (mURL && css_RequiresAbsoluteURI(tk->mIdent)) {
nsresult rv;
rv = NS_MakeAbsoluteURI(absURL, tk->mIdent, mURL);
if (NS_FAILED(rv)) {
@@ -4017,7 +4141,9 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode,
return ParseVariant(aErrorCode, aValue, VARIANT_AHK,
nsCSSProps::kTableLayoutKTable);
case eCSSProperty_text_align:
return ParseVariant(aErrorCode, aValue, VARIANT_HK | VARIANT_STRING,
// When we support aligning on a string, we can parse text-align
// as a string....
return ParseVariant(aErrorCode, aValue, VARIANT_HK /* | VARIANT_STRING */,
nsCSSProps::kTextAlignKTable);
case eCSSProperty_text_decoration:
return ParseTextDecoration(aErrorCode, aValue);

View File

@@ -53,7 +53,6 @@
#include "nsCRT.h"
static const char* kWhitespace = " \r\n\t"; // Optimized for typical cases
static const char kDTDDirectory[] = "res/dtd/";
/***************************** EXPAT CALL BACKS *******************************/
@@ -278,9 +277,12 @@ IsLoadableDTD(const nsCatalogData* aCatalogData, nsCOMPtr<nsIURI>* aDTD)
nsCOMPtr<nsILocalFile> lfile = do_QueryInterface(dtdPath);
nsCAutoString path;
path = NS_LITERAL_CSTRING(kDTDDirectory) + fileName;
lfile->AppendRelativeNativePath(path);
// append res/dtd/<fileName>
// can't do AppendRelativeNativePath("res/dtd/" + fileName)
// as that won't work on all platforms.
lfile->AppendNative(NS_LITERAL_CSTRING("res"));
lfile->AppendNative(NS_LITERAL_CSTRING("dtd"));
lfile->AppendNative(fileName);
PRBool exists;
dtdPath->Exists(&exists);

View File

@@ -53,7 +53,6 @@
#include "nsCRT.h"
static const char* kWhitespace = " \r\n\t"; // Optimized for typical cases
static const char kDTDDirectory[] = "res/dtd/";
/***************************** EXPAT CALL BACKS *******************************/
@@ -278,9 +277,12 @@ IsLoadableDTD(const nsCatalogData* aCatalogData, nsCOMPtr<nsIURI>* aDTD)
nsCOMPtr<nsILocalFile> lfile = do_QueryInterface(dtdPath);
nsCAutoString path;
path = NS_LITERAL_CSTRING(kDTDDirectory) + fileName;
lfile->AppendRelativeNativePath(path);
// append res/dtd/<fileName>
// can't do AppendRelativeNativePath("res/dtd/" + fileName)
// as that won't work on all platforms.
lfile->AppendNative(NS_LITERAL_CSTRING("res"));
lfile->AppendNative(NS_LITERAL_CSTRING("dtd"));
lfile->AppendNative(fileName);
PRBool exists;
dtdPath->Exists(&exists);