diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 647fbf33aa85..98e491dc8ca7 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -179,6 +179,7 @@ MOZ_SVG_RENDERER_GDIPLUS = @MOZ_SVG_RENDERER_GDIPLUS@ MOZ_SVG_RENDERER_LIBART = @MOZ_SVG_RENDERER_LIBART@ MOZ_SVG_RENDERER_CAIRO = @MOZ_SVG_RENDERER_CAIRO@ MOZ_LIBART_CFLAGS = @MOZ_LIBART_CFLAGS@ +MOZ_ENABLE_CAIRO = @MOZ_ENABLE_CAIRO@ MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@ TX_EXE = @TX_EXE@ diff --git a/configure b/configure index 10c9d92a6c6c..050e6e3ddbb1 100755 --- a/configure +++ b/configure @@ -11050,6 +11050,12 @@ if test "${enable_cairo+set}" = set; then fi fi +if test "$MOZ_ENABLE_CAIRO"; then + cat >> confdefs.h <<\EOF +#define MOZ_ENABLE_CAIRO 1 +EOF + +fi fi # SKIP_LIBRARY_CHECKS @@ -11250,7 +11256,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:11254: checking for $ac_word" >&5 +echo "configure:11260: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11285,7 +11291,7 @@ fi min_gtk_version=$GTK_VERSION echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:11289: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:11295: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -11308,7 +11314,7 @@ echo "configure:11289: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -11386,7 +11392,7 @@ main () } EOF -if { (eval echo configure:11390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -11421,7 +11427,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -11431,7 +11437,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:11435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -11483,7 +11489,7 @@ then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:11487: checking for $ac_word" >&5 +echo "configure:11493: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11527,19 +11533,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gtk+-2.0 >= 1.3.7""... $ac_c" 1>&6 -echo "configure:11531: checking for gtk+-2.0 >= 1.3.7" >&5 +echo "configure:11537: checking for gtk+-2.0 >= 1.3.7" >&5 if $PKG_CONFIG --exists "gtk+-2.0 >= 1.3.7" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6 -echo "configure:11538: checking MOZ_GTK2_CFLAGS" >&5 +echo "configure:11544: checking MOZ_GTK2_CFLAGS" >&5 MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 1.3.7"` echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6 -echo "configure:11543: checking MOZ_GTK2_LIBS" >&5 +echo "configure:11549: checking MOZ_GTK2_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic MOZ_GTK2_LIBS="`$PKG_CONFIG --libs-only-L \"gtk+-2.0 >= 1.3.7\"` `$PKG_CONFIG --libs-only-l \"gtk+-2.0 >= 1.3.7\"`" @@ -11604,7 +11610,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:11608: checking for $ac_word" >&5 +echo "configure:11614: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HOST_MOC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11656,7 +11662,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for main in -lqt""... $ac_c" 1>&6 -echo "configure:11660: checking for main in -lqt" >&5 +echo "configure:11666: checking for main in -lqt" >&5 ac_lib_var=`echo qt'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11664,14 +11670,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lqt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11690,7 +11696,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lqt-mt""... $ac_c" 1>&6 -echo "configure:11694: checking for main in -lqt-mt" >&5 +echo "configure:11700: checking for main in -lqt-mt" >&5 ac_lib_var=`echo qt-mt'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11698,14 +11704,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lqt-mt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11741,9 +11747,9 @@ fi LIBS="$LIBS $QT_LIBS" echo $ac_n "checking Qt - version >= $QT_VERSION""... $ac_c" 1>&6 -echo "configure:11745: checking Qt - version >= $QT_VERSION" >&5 +echo "configure:11751: checking Qt - version >= $QT_VERSION" >&5 cat > conftest.$ac_ext < int main() { @@ -11754,7 +11760,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result="yes" else @@ -12141,7 +12147,7 @@ EOF # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12145: checking for $ac_word" >&5 +echo "configure:12151: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12185,19 +12191,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for xft""... $ac_c" 1>&6 -echo "configure:12189: checking for xft" >&5 +echo "configure:12195: checking for xft" >&5 if $PKG_CONFIG --exists "xft" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_XFT_CFLAGS""... $ac_c" 1>&6 -echo "configure:12196: checking MOZ_XFT_CFLAGS" >&5 +echo "configure:12202: checking MOZ_XFT_CFLAGS" >&5 MOZ_XFT_CFLAGS=`$PKG_CONFIG --cflags "xft"` echo "$ac_t""$MOZ_XFT_CFLAGS" 1>&6 echo $ac_n "checking MOZ_XFT_LIBS""... $ac_c" 1>&6 -echo "configure:12201: checking MOZ_XFT_LIBS" >&5 +echo "configure:12207: checking MOZ_XFT_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic MOZ_XFT_LIBS="`$PKG_CONFIG --libs-only-L \"xft\"` `$PKG_CONFIG --libs-only-l \"xft\"`" @@ -12232,7 +12238,7 @@ echo "configure:12201: checking MOZ_XFT_LIBS" >&5 # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12236: checking for $ac_word" >&5 +echo "configure:12242: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12276,19 +12282,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pango >= 1.1.0""... $ac_c" 1>&6 -echo "configure:12280: checking for pango >= 1.1.0" >&5 +echo "configure:12286: checking for pango >= 1.1.0" >&5 if $PKG_CONFIG --exists "pango >= 1.1.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking _PANGOCHK_CFLAGS""... $ac_c" 1>&6 -echo "configure:12287: checking _PANGOCHK_CFLAGS" >&5 +echo "configure:12293: checking _PANGOCHK_CFLAGS" >&5 _PANGOCHK_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.1.0"` echo "$ac_t""$_PANGOCHK_CFLAGS" 1>&6 echo $ac_n "checking _PANGOCHK_LIBS""... $ac_c" 1>&6 -echo "configure:12292: checking _PANGOCHK_LIBS" >&5 +echo "configure:12298: checking _PANGOCHK_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic _PANGOCHK_LIBS="`$PKG_CONFIG --libs-only-L \"pango >= 1.1.0\"` `$PKG_CONFIG --libs-only-l \"pango >= 1.1.0\"`" @@ -12348,7 +12354,7 @@ EOF # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12352: checking for $ac_word" >&5 +echo "configure:12358: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12392,19 +12398,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pango >= 1.5.0""... $ac_c" 1>&6 -echo "configure:12396: checking for pango >= 1.5.0" >&5 +echo "configure:12402: checking for pango >= 1.5.0" >&5 if $PKG_CONFIG --exists "pango >= 1.5.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_PANGO_CFLAGS""... $ac_c" 1>&6 -echo "configure:12403: checking MOZ_PANGO_CFLAGS" >&5 +echo "configure:12409: checking MOZ_PANGO_CFLAGS" >&5 MOZ_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.5.0"` echo "$ac_t""$MOZ_PANGO_CFLAGS" 1>&6 echo $ac_n "checking MOZ_PANGO_LIBS""... $ac_c" 1>&6 -echo "configure:12408: checking MOZ_PANGO_LIBS" >&5 +echo "configure:12414: checking MOZ_PANGO_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic MOZ_PANGO_LIBS="`$PKG_CONFIG --libs-only-L \"pango >= 1.5.0\"` `$PKG_CONFIG --libs-only-l \"pango >= 1.5.0\"`" @@ -12438,7 +12444,7 @@ echo "configure:12408: checking MOZ_PANGO_LIBS" >&5 CFLAGS="$MOZ_PANGO_CFLAGS $CFLAGS" LDFLAGS="$MOZ_PANGO_LIBS $LDFLAGS" echo $ac_n "checking for pango_fc_font_map_add_decoder_find_func in -lpangoft2-1.0""... $ac_c" 1>&6 -echo "configure:12442: checking for pango_fc_font_map_add_decoder_find_func in -lpangoft2-1.0" >&5 +echo "configure:12448: checking for pango_fc_font_map_add_decoder_find_func in -lpangoft2-1.0" >&5 ac_lib_var=`echo pangoft2-1.0'_'pango_fc_font_map_add_decoder_find_func | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12446,7 +12452,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpangoft2-1.0 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12524,7 +12530,7 @@ then _SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$XLDFLAGS $LDFLAGS" echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6 -echo "configure:12528: checking for XpGetPrinterList in -lXp" >&5 +echo "configure:12534: checking for XpGetPrinterList in -lXp" >&5 ac_lib_var=`echo Xp'_'XpGetPrinterList | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12532,7 +12538,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXp $XEXT_LIBS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12616,7 +12622,7 @@ fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12620: checking for $ac_word" >&5 +echo "configure:12626: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12660,19 +12666,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION""... $ac_c" 1>&6 -echo "configure:12664: checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" >&5 +echo "configure:12670: checking for gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" >&5 if $PKG_CONFIG --exists "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GNOMEVFS_CFLAGS""... $ac_c" 1>&6 -echo "configure:12671: checking MOZ_GNOMEVFS_CFLAGS" >&5 +echo "configure:12677: checking MOZ_GNOMEVFS_CFLAGS" >&5 MOZ_GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION"` echo "$ac_t""$MOZ_GNOMEVFS_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GNOMEVFS_LIBS""... $ac_c" 1>&6 -echo "configure:12676: checking MOZ_GNOMEVFS_LIBS" >&5 +echo "configure:12682: checking MOZ_GNOMEVFS_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic MOZ_GNOMEVFS_LIBS="`$PKG_CONFIG --libs-only-L \"gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION\"` `$PKG_CONFIG --libs-only-l \"gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION\"`" @@ -12722,7 +12728,7 @@ echo "configure:12676: checking MOZ_GNOMEVFS_LIBS" >&5 # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12726: checking for $ac_word" >&5 +echo "configure:12732: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12766,19 +12772,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for gconf-2.0 >= $GCONF_VERSION""... $ac_c" 1>&6 -echo "configure:12770: checking for gconf-2.0 >= $GCONF_VERSION" >&5 +echo "configure:12776: checking for gconf-2.0 >= $GCONF_VERSION" >&5 if $PKG_CONFIG --exists "gconf-2.0 >= $GCONF_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GCONF_CFLAGS""... $ac_c" 1>&6 -echo "configure:12777: checking MOZ_GCONF_CFLAGS" >&5 +echo "configure:12783: checking MOZ_GCONF_CFLAGS" >&5 MOZ_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= $GCONF_VERSION"` echo "$ac_t""$MOZ_GCONF_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GCONF_LIBS""... $ac_c" 1>&6 -echo "configure:12782: checking MOZ_GCONF_LIBS" >&5 +echo "configure:12788: checking MOZ_GCONF_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic MOZ_GCONF_LIBS="`$PKG_CONFIG --libs-only-L \"gconf-2.0 >= $GCONF_VERSION\"` `$PKG_CONFIG --libs-only-l \"gconf-2.0 >= $GCONF_VERSION\"`" @@ -12824,7 +12830,7 @@ echo "configure:12782: checking MOZ_GCONF_LIBS" >&5 # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12828: checking for $ac_word" >&5 +echo "configure:12834: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12868,19 +12874,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libgnome-2.0 >= $LIBGNOME_VERSION""... $ac_c" 1>&6 -echo "configure:12872: checking for libgnome-2.0 >= $LIBGNOME_VERSION" >&5 +echo "configure:12878: checking for libgnome-2.0 >= $LIBGNOME_VERSION" >&5 if $PKG_CONFIG --exists "libgnome-2.0 >= $LIBGNOME_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_LIBGNOME_CFLAGS""... $ac_c" 1>&6 -echo "configure:12879: checking MOZ_LIBGNOME_CFLAGS" >&5 +echo "configure:12885: checking MOZ_LIBGNOME_CFLAGS" >&5 MOZ_LIBGNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnome-2.0 >= $LIBGNOME_VERSION"` echo "$ac_t""$MOZ_LIBGNOME_CFLAGS" 1>&6 echo $ac_n "checking MOZ_LIBGNOME_LIBS""... $ac_c" 1>&6 -echo "configure:12884: checking MOZ_LIBGNOME_LIBS" >&5 +echo "configure:12890: checking MOZ_LIBGNOME_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic MOZ_LIBGNOME_LIBS="`$PKG_CONFIG --libs-only-L \"libgnome-2.0 >= $LIBGNOME_VERSION\"` `$PKG_CONFIG --libs-only-l \"libgnome-2.0 >= $LIBGNOME_VERSION\"`" @@ -12957,7 +12963,7 @@ fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12961: checking for $ac_word" >&5 +echo "configure:12967: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13001,19 +13007,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libgnomeui-2.0 >= $GNOMEUI_VERSION""... $ac_c" 1>&6 -echo "configure:13005: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5 +echo "configure:13011: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5 if $PKG_CONFIG --exists "libgnomeui-2.0 >= $GNOMEUI_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking MOZ_GNOMEUI_CFLAGS""... $ac_c" 1>&6 -echo "configure:13012: checking MOZ_GNOMEUI_CFLAGS" >&5 +echo "configure:13018: checking MOZ_GNOMEUI_CFLAGS" >&5 MOZ_GNOMEUI_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 >= $GNOMEUI_VERSION"` echo "$ac_t""$MOZ_GNOMEUI_CFLAGS" 1>&6 echo $ac_n "checking MOZ_GNOMEUI_LIBS""... $ac_c" 1>&6 -echo "configure:13017: checking MOZ_GNOMEUI_LIBS" >&5 +echo "configure:13023: checking MOZ_GNOMEUI_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic MOZ_GNOMEUI_LIBS="`$PKG_CONFIG --libs-only-L \"libgnomeui-2.0 >= $GNOMEUI_VERSION\"` `$PKG_CONFIG --libs-only-l \"libgnomeui-2.0 >= $GNOMEUI_VERSION\"`" @@ -13467,7 +13473,7 @@ if test `echo "$MOZ_EXTENSIONS" | grep -c java` -ne 0; then # Extract the first word of "javac", so it can be a program name with args. set dummy javac; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13471: checking for $ac_word" >&5 +echo "configure:13477: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAVAC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13503,7 +13509,7 @@ fi # Extract the first word of "jar", so it can be a program name with args. set dummy jar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13507: checking for $ac_word" >&5 +echo "configure:13513: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13543,7 +13549,7 @@ fi # Extract the first word of "javac", so it can be a program name with args. set dummy javac; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13547: checking for $ac_word" >&5 +echo "configure:13553: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAVAC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13579,7 +13585,7 @@ fi # Extract the first word of "jar", so it can be a program name with args. set dummy jar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13583: checking for $ac_word" >&5 +echo "configure:13589: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13646,17 +13652,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13650: checking for $ac_hdr" >&5 +echo "configure:13656: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13687,17 +13693,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13691: checking for $ac_hdr" >&5 +echo "configure:13697: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13727,7 +13733,7 @@ done CPPFLAGS="$_SAVE_CPPFLAGS $GSSAPI_INCLUDES" echo $ac_n "checking for gss_init_sec_context in -lgss""... $ac_c" 1>&6 -echo "configure:13731: checking for gss_init_sec_context in -lgss" >&5 +echo "configure:13737: checking for gss_init_sec_context in -lgss" >&5 ac_lib_var=`echo gss'_'gss_init_sec_context | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13735,7 +13741,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgss $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13771,12 +13777,12 @@ fi _GSS_LIBS="-L$GSSAPI_DIR/lib -lgssapi_krb5" LIBS="$LIBS $_GSS_LIBS" echo $ac_n "checking for gss_init_sec_context""... $ac_c" 1>&6 -echo "configure:13775: checking for gss_init_sec_context" >&5 +echo "configure:13781: checking for gss_init_sec_context" >&5 if eval "test \"`echo '$''{'ac_cv_func_gss_init_sec_context'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gss_init_sec_context=yes" else @@ -13829,7 +13835,7 @@ fi LIBS="$LIBS $TMP_GSSAPI_LIBS" echo $ac_n "checking for gss_init_sec_context in -lgssapi""... $ac_c" 1>&6 -echo "configure:13833: checking for gss_init_sec_context in -lgssapi" >&5 +echo "configure:13839: checking for gss_init_sec_context in -lgssapi" >&5 ac_lib_var=`echo gssapi'_'gss_init_sec_context | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13837,7 +13843,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgssapi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13884,17 +13890,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13888: checking for $ac_hdr" >&5 +echo "configure:13894: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13924,17 +13930,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13928: checking for $ac_hdr" >&5 +echo "configure:13934: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13962,7 +13968,7 @@ done cat > conftest.$ac_ext < @@ -13973,7 +13979,7 @@ int main() { gss_OID oid = GSS_C_NT_HOSTBASED_SERVICE; ; return 0; } EOF -if { (eval echo configure:13977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1 @@ -14110,7 +14116,7 @@ fi if test -n "$MOZ_SVG_RENDERER_GDIPLUS"; then echo $ac_n "checking for Gdiplus.h""... $ac_c" 1>&6 -echo "configure:14114: checking for Gdiplus.h" >&5 +echo "configure:14120: checking for Gdiplus.h" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -14120,7 +14126,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < #include @@ -14129,7 +14135,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -14454,18 +14460,18 @@ fi if test -n "$MOZ_OPTIMIZE"; then echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6 -echo "configure:14458: checking for valid optimization flags" >&5 +echo "configure:14464: checking for valid optimization flags" >&5 _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:14469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _results=yes else @@ -14683,7 +14689,7 @@ fi if test -n "$_ENABLE_EFENCE"; then echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6 -echo "configure:14687: checking for malloc in -lefence" >&5 +echo "configure:14693: checking for malloc in -lefence" >&5 ac_lib_var=`echo efence'_'malloc | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14691,7 +14697,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lefence $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14802,12 +14808,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in __builtin_vec_new __builtin_vec_delete __builtin_new __builtin_delete __pure_virtual do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14806: checking for $ac_func" >&5 +echo "configure:14812: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15077,12 +15083,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in __cxa_demangle do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15081: checking for $ac_func" >&5 +echo "configure:15087: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15246,7 +15252,7 @@ if test -z "$SKIP_COMPILER_CHECKS"; then # Compiler Options echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 -echo "configure:15250: checking for gcc -pipe support" >&5 +echo "configure:15256: checking for gcc -pipe support" >&5 if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then echo '#include ' > dummy-hello.c echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c @@ -15261,14 +15267,14 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -pipe" cat > conftest.$ac_ext < int main() { printf("Hello World\n"); ; return 0; } EOF -if { (eval echo configure:15272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _res_gcc_pipe="yes" else @@ -15310,16 +15316,16 @@ if test "$_IGNORE_LONG_LONG_WARNINGS"; then _SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long" echo $ac_n "checking whether compiler supports -Wno-long-long""... $ac_c" 1>&6 -echo "configure:15314: checking whether compiler supports -Wno-long-long" >&5 +echo "configure:15320: checking whether compiler supports -Wno-long-long" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long" @@ -15340,16 +15346,16 @@ _SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fprofile-generate" echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6 -echo "configure:15344: checking whether C compiler supports -fprofile-generate" >&5 +echo "configure:15350: checking whether C compiler supports -fprofile-generate" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PROFILE_GEN_CFLAGS="-fprofile-generate" result="yes" @@ -15367,16 +15373,16 @@ if test $result = "yes"; then else CFLAGS="$_SAVE_CFLAGS -fprofile-arcs" echo $ac_n "checking whether C compiler supports -fprofile-arcs""... $ac_c" 1>&6 -echo "configure:15371: checking whether C compiler supports -fprofile-arcs" >&5 +echo "configure:15377: checking whether C compiler supports -fprofile-arcs" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* PROFILE_GEN_CFLAGS="-fprofile-arcs" result="yes" @@ -15422,18 +15428,18 @@ if test "$_PEDANTIC"; then _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic" echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6 -echo "configure:15426: checking whether C++ compiler has -pedantic long long bug" >&5 +echo "configure:15432: checking whether C++ compiler has -pedantic long long bug" >&5 if test "$cross_compiling" = yes; then result="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="no" else @@ -15463,12 +15469,12 @@ fi fi echo $ac_n "checking for correct temporary object destruction order""... $ac_c" 1>&6 -echo "configure:15467: checking for correct temporary object destruction order" >&5 +echo "configure:15473: checking for correct temporary object destruction order" >&5 if test "$cross_compiling" = yes; then result="maybe" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:15498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then result="yes" else @@ -15509,12 +15515,12 @@ fi _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}" echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6 -echo "configure:15513: checking for correct overload resolution with const and templates" >&5 +echo "configure:15519: checking for correct overload resolution with const and templates" >&5 if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -15544,7 +15550,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_nscap_nonconst_opeq_bug="no" else @@ -15826,7 +15832,7 @@ then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15830: checking for $ac_word" >&5 +echo "configure:15836: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15870,19 +15876,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for libIDL-2.0 >= 0.8.0""... $ac_c" 1>&6 -echo "configure:15874: checking for libIDL-2.0 >= 0.8.0" >&5 +echo "configure:15880: checking for libIDL-2.0 >= 0.8.0" >&5 if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking LIBIDL_CFLAGS""... $ac_c" 1>&6 -echo "configure:15881: checking LIBIDL_CFLAGS" >&5 +echo "configure:15887: checking LIBIDL_CFLAGS" >&5 LIBIDL_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"` echo "$ac_t""$LIBIDL_CFLAGS" 1>&6 echo $ac_n "checking LIBIDL_LIBS""... $ac_c" 1>&6 -echo "configure:15886: checking LIBIDL_LIBS" >&5 +echo "configure:15892: checking LIBIDL_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic LIBIDL_LIBS="`$PKG_CONFIG --libs-only-L \"libIDL-2.0 >= 0.8.0\"` `$PKG_CONFIG --libs-only-l \"libIDL-2.0 >= 0.8.0\"`" @@ -16005,7 +16011,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:16009: checking for $ac_word" >&5 +echo "configure:16015: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16040,7 +16046,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:16044: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:16050: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -16063,7 +16069,7 @@ echo "configure:16044: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -16139,7 +16145,7 @@ main () } EOF -if { (eval echo configure:16143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -16173,7 +16179,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -16183,7 +16189,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:16187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -16227,7 +16233,7 @@ rm -f conftest* # Extract the first word of "libIDL-config", so it can be a program name with args. set dummy libIDL-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:16231: checking for $ac_word" >&5 +echo "configure:16237: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16262,7 +16268,7 @@ fi min_libIDL_version=$LIBIDL_VERSION echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6 -echo "configure:16266: checking for libIDL - version >= $min_libIDL_version" >&5 +echo "configure:16272: checking for libIDL - version >= $min_libIDL_version" >&5 no_libIDL="" if test "$LIBIDL_CONFIG" = "no" ; then no_libIDL=yes @@ -16289,7 +16295,7 @@ echo "configure:16266: checking for libIDL - version >= $min_libIDL_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -16375,7 +16381,7 @@ main () } EOF -if { (eval echo configure:16379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -16409,7 +16415,7 @@ fi CFLAGS="$CFLAGS $LIBIDL_CFLAGS" LIBS="$LIBS $LIBIDL_LIBS" cat > conftest.$ac_ext < @@ -16420,7 +16426,7 @@ int main() { return IDL_get_libver_string ? 1 : 0; ; return 0; } EOF -if { (eval echo configure:16424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libIDL or finding the wrong" @@ -16460,7 +16466,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:16464: checking for $ac_word" >&5 +echo "configure:16470: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16539,7 +16545,7 @@ if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:16543: checking for $ac_word" >&5 +echo "configure:16549: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16583,19 +16589,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for glib-2.0 >= 1.3.7""... $ac_c" 1>&6 -echo "configure:16587: checking for glib-2.0 >= 1.3.7" >&5 +echo "configure:16593: checking for glib-2.0 >= 1.3.7" >&5 if $PKG_CONFIG --exists "glib-2.0 >= 1.3.7" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking GLIB_CFLAGS""... $ac_c" 1>&6 -echo "configure:16594: checking GLIB_CFLAGS" >&5 +echo "configure:16600: checking GLIB_CFLAGS" >&5 GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 1.3.7"` echo "$ac_t""$GLIB_CFLAGS" 1>&6 echo $ac_n "checking GLIB_LIBS""... $ac_c" 1>&6 -echo "configure:16599: checking GLIB_LIBS" >&5 +echo "configure:16605: checking GLIB_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic GLIB_LIBS="`$PKG_CONFIG --libs-only-L \"glib-2.0 >= 1.3.7\"` `$PKG_CONFIG --libs-only-l \"glib-2.0 >= 1.3.7\"`" @@ -16679,7 +16685,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:16683: checking for $ac_word" >&5 +echo "configure:16689: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16714,7 +16720,7 @@ fi min_glib_version=${GLIB_VERSION} echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:16718: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:16724: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -16737,7 +16743,7 @@ echo "configure:16718: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -16813,7 +16819,7 @@ main () } EOF -if { (eval echo configure:16817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -16847,7 +16853,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -16857,7 +16863,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:16861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -16936,19 +16942,19 @@ mk_add_options MOZ_CO_MODULE=mozilla/other-licenses/libart_lgpl" 1>&2; exit 1; } # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:16940: checking for working alloca.h" >&5 +echo "configure:16946: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:16952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -16969,12 +16975,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:16973: checking for alloca" >&5 +echo "configure:16979: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -17034,12 +17040,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:17038: checking whether alloca needs Cray hooks" >&5 +echo "configure:17044: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17068: checking for $ac_func" >&5 +echo "configure:17074: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17119,7 +17125,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:17123: checking stack direction for C alloca" >&5 +echo "configure:17129: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -17127,7 +17133,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:17156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -17183,7 +17189,7 @@ if test "$MOZ_SVG_RENDERER_CAIRO" -o "$MOZ_ENABLE_CAIRO" ; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:17187: checking for $ac_word" >&5 +echo "configure:17193: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -17227,19 +17233,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for cairo >= $CAIRO_VERSION""... $ac_c" 1>&6 -echo "configure:17231: checking for cairo >= $CAIRO_VERSION" >&5 +echo "configure:17237: checking for cairo >= $CAIRO_VERSION" >&5 if $PKG_CONFIG --exists "cairo >= $CAIRO_VERSION" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking CAIRO_CFLAGS""... $ac_c" 1>&6 -echo "configure:17238: checking CAIRO_CFLAGS" >&5 +echo "configure:17244: checking CAIRO_CFLAGS" >&5 CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION"` echo "$ac_t""$CAIRO_CFLAGS" 1>&6 echo $ac_n "checking CAIRO_LIBS""... $ac_c" 1>&6 -echo "configure:17243: checking CAIRO_LIBS" >&5 +echo "configure:17249: checking CAIRO_LIBS" >&5 ## don't use --libs since that can do evil things like add ## -Wl,--export-dynamic CAIRO_LIBS="`$PKG_CONFIG --libs-only-L \"cairo >= $CAIRO_VERSION\"` `$PKG_CONFIG --libs-only-l \"cairo >= $CAIRO_VERSION\"`" @@ -17493,14 +17499,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < int main() { int x = 1; x++; ; return 0; } EOF -if { (eval echo configure:17504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -17784,7 +17790,7 @@ if test -n "$MOZ_X11"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $XCFLAGS" cat > conftest.$ac_ext < @@ -17800,7 +17806,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:17804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 diff --git a/configure.in b/configure.in index 25864728010a..d6dd8b14d024 100644 --- a/configure.in +++ b/configure.in @@ -3178,6 +3178,9 @@ MOZ_ARG_ENABLE_BOOL(cairo, [ --enable-cairo Enable Cairo-specific features (Canvas)], MOZ_ENABLE_CAIRO=1, MOZ_ENABLE_CAIRO= ) +if test "$MOZ_ENABLE_CAIRO"; then + AC_DEFINE(MOZ_ENABLE_CAIRO) +fi fi # SKIP_LIBRARY_CHECKS diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 4da9edc0be26..3d0788689c84 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -2915,7 +2915,7 @@ nsDocument::GetBoxObjectFor(nsIDOMElement* aElement, nsIBoxObject** aResult) contractID += "-listbox"; else if (tag == nsXULAtoms::scrollbox) contractID += "-scrollbox"; -#ifndef MOZ_ENABLE_CAIRO +#ifdef MOZ_ENABLE_CAIRO else if (tag == nsXULAtoms::canvas) contractID += "-canvas"; #endif diff --git a/layout/xul/base/public/nsICanvasBoxObject.idl b/layout/xul/base/public/nsICanvasBoxObject.idl index 53f84283f079..e1596e518da3 100644 --- a/layout/xul/base/public/nsICanvasBoxObject.idl +++ b/layout/xul/base/public/nsICanvasBoxObject.idl @@ -43,3 +43,9 @@ interface nsICanvasBoxObject : nsISupports nsISupports getContext(in string aContext); }; +[scriptable, uuid(1d6f084b-cb1d-4068-a20f-df11f7955017)] +interface nsICanvasFrame : nsISupports +{ + nsISupports getContext(in string aContext); +}; + diff --git a/layout/xul/base/public/nsICanvasRenderingContext2D.idl b/layout/xul/base/public/nsICanvasRenderingContext2D.idl index 69748a74bea5..8b36af720aee 100644 --- a/layout/xul/base/public/nsICanvasRenderingContext2D.idl +++ b/layout/xul/base/public/nsICanvasRenderingContext2D.idl @@ -38,10 +38,25 @@ #include "nsISupports.idl" interface nsIDOMHTMLImageElement; +interface nsIBoxObject; + +[scriptable, uuid(bbb20a59-524e-4662-981e-5e142814b20c)] +interface nsICanvasGradient : nsISupports +{ + void addColorStop(in float offset, in DOMString color); +}; + +[scriptable, uuid(21dea65c-5c08-4eb1-ac82-81fe95be77b8)] +interface nsICanvasPattern : nsISupports +{ +}; [scriptable, uuid(fd1e2245-8d8c-4146-bf47-fb84ddd6fca0)] interface nsICanvasRenderingContext2D : nsISupports { + // back-reference to the canvas object + readonly attribute nsIBoxObject canvas; + // state void save(); void restore(); @@ -51,11 +66,28 @@ interface nsICanvasRenderingContext2D : nsISupports void rotate(in float angle); void translate(in float x, in float y); - // colors - // XXX how does setAlpha affect alpha set by StrokeColor and FillColor? - void setStrokeColor(in string color); - void setFillColor(in string color); - void setAlpha(in float alpha); + // compositing + attribute float globalAlpha; /* default 1.0 -- opaque */ + attribute DOMString globalCompositeOperation; /* default "over" */ + + // colors and styles + attribute DOMString strokeStyle; + attribute DOMString fillStyle; + + nsICanvasGradient createLinearGradient (in float x0, in float y0, in float x1, in float y1); + nsICanvasGradient createRadialGradient(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1); + nsICanvasPattern createPattern(in nsIDOMHTMLImageElement image, in DOMString repetition); + + attribute float lineWidth; /* default 1 */ + attribute DOMString lineCap; /* "butt", "round", "square" (default) */ + attribute DOMString lineJoin; /* "round", "bevel", "miter" (default) */ + attribute float miterLimit; /* default 10 */ + + // shadows + attribute float shadowOffsetX; + attribute float shadowOffsetY; + attribute float shadowBlur; + attribute DOMString shadowColor; // rects void clearRect(in float x, in float y, in float w, in float h); @@ -65,42 +97,24 @@ interface nsICanvasRenderingContext2D : nsISupports // path API void beginPath(); void closePath(); - void fillPath(); - void strokePath(); + + void moveTo(in float x, in float y); + void lineTo(in float x, in float y); + void quadraticCurveTo(in float cpx, in float cpy, in float x, in float y); + void bezierCurveTo(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y); + void arcTo(in float x1, in float y1, in float x2, in float y2, in float radius); + void arc(in float x, in float y, in float r, in float startAngle, in float endAngle, in boolean clockwise); + void rect(in float x, in float y, in float w, in float h); + + void fill(); + void stroke(); void clip(); - void moveToPoint(in float x, in float y); - void addLineToPoint(in float x, in float y); - void addQuadraticCurveToPoint(in float cpx, in float cpy, in float x, in float y); - void addBezierCurveToPoint(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y); - void addArcToPoint(in float x1, in float y1, in float x2, in float y2, in float radius); - void addArc(in float x, in float y, in float r, in float startAngle, in float endAngle, in boolean clockwise); - void addRect(in float x, in float y, in float w, in float h); - - // line caps/joins - void setLineWidth(in float width); - void setLineCap(in string capstyle); // "round" "square" - void setLineJoin(in string joinstyle); // "round" "bevel" "miter" - void setMiterLimit(in float limit); - // image api - void drawImage(in nsIDOMHTMLImageElement image, in long x, in long y, in long w, in long h, in string composite); - void drawImageFromRect(in nsIDOMHTMLImageElement image, - in long sx, in long sy, in long sw, in long sh, - in long dx, in long dy, in long dw, in long dh, - in string composite); - - // shadow api (uh..) - void setShadow(in float width, in float height, in float blur, in string color); - void clearShadow(); - - // compositing - void setCompositeOperation(in string composite); - - // - // additions - // - - // nsIHTMLImageElement getImage(); // snapshot the current canvas - + void drawImage(); +/* + void drawImage(in HTMLImageElement image, in float dx, in float dy); + void drawImage(in HTMLImageElement image, in float dx, in float dy, in float dw, in float dh); + void drawImage(in HTMLImageElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh); +*/ }; diff --git a/layout/xul/base/src/Makefile.in b/layout/xul/base/src/Makefile.in index 75e2e48c80df..b68a09eb366f 100644 --- a/layout/xul/base/src/Makefile.in +++ b/layout/xul/base/src/Makefile.in @@ -129,6 +129,7 @@ ifdef MOZ_ENABLE_CAIRO CPPSRCS += \ nsCanvasFrame.cpp \ nsCanvasBoxObject.cpp \ + nsCanvasRenderingContext2D.cpp \ $(NULL) endif diff --git a/layout/xul/base/src/nsCanvasBoxObject.cpp b/layout/xul/base/src/nsCanvasBoxObject.cpp index 14b9ad5f4197..77a650983054 100644 --- a/layout/xul/base/src/nsCanvasBoxObject.cpp +++ b/layout/xul/base/src/nsCanvasBoxObject.cpp @@ -51,7 +51,7 @@ public: nsCanvasBoxObject(); virtual ~nsCanvasBoxObject(); - nsICanvasBoxObject* GetFrameBoxObject(); + nsICanvasFrame* GetCanvasFrame(); // nsISupports interface NS_DECL_ISUPPORTS_INHERITED @@ -81,13 +81,13 @@ nsCanvasBoxObject::~nsCanvasBoxObject() { } -inline nsICanvasBoxObject * -nsCanvasBoxObject::GetFrameBoxObject() +inline nsICanvasFrame * +nsCanvasBoxObject::GetCanvasFrame() { nsIFrame *frame = GetFrame(); - nsICanvasBoxObject *frameCanvasBoxObject = nsnull; - CallQueryInterface(frame, &frameCanvasBoxObject); - return frameCanvasBoxObject; + nsICanvasFrame *canvasFrame = nsnull; + CallQueryInterface(frame, &canvasFrame); + return canvasFrame; } // nsPIBoxObject @@ -113,9 +113,9 @@ nsCanvasBoxObject::InvalidatePresentationStuff() NS_IMETHODIMP nsCanvasBoxObject::GetContext(const char *aContext, nsISupports **aResult) { - nsICanvasBoxObject *canvas = GetFrameBoxObject(); + nsICanvasFrame *canvas = GetCanvasFrame(); if (canvas) - return GetFrameBoxObject()->GetContext(aContext, aResult); + return canvas->GetContext(aContext, aResult); return NS_ERROR_FAILURE; } diff --git a/layout/xul/base/src/nsCanvasFrame.cpp b/layout/xul/base/src/nsCanvasFrame.cpp index b06d4537bf1b..6e5abf4ca56c 100644 --- a/layout/xul/base/src/nsCanvasFrame.cpp +++ b/layout/xul/base/src/nsCanvasFrame.cpp @@ -57,7 +57,7 @@ NS_NewCanvasXULFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame) // QueryInterface // NS_INTERFACE_MAP_BEGIN(nsCanvasFrame) - NS_INTERFACE_MAP_ENTRY(nsICanvasBoxObject) + NS_INTERFACE_MAP_ENTRY(nsICanvasFrame) NS_INTERFACE_MAP_END_INHERITING(nsLeafBoxFrame) nsCanvasFrame::nsCanvasFrame(nsIPresShell* aPresShell) diff --git a/layout/xul/base/src/nsCanvasFrame.h b/layout/xul/base/src/nsCanvasFrame.h index 14fe01670a3d..2e9256bfea41 100644 --- a/layout/xul/base/src/nsCanvasFrame.h +++ b/layout/xul/base/src/nsCanvasFrame.h @@ -44,8 +44,8 @@ #include "nsICanvasRenderingContext.h" class nsCanvasFrame : - public nsLeafBoxFrame, - public nsICanvasBoxObject + public nsLeafBoxFrame, // this must be the first thing we inherit from, due to nsFrame operator delete business + public nsICanvasFrame { public: nsCanvasFrame(nsIPresShell* aPresShell); @@ -68,8 +68,8 @@ public: // nsISupports interface NS_DECL_ISUPPORTS - // nsICanvasBoxObject interface - NS_DECL_NSICANVASBOXOBJECT + // nsICanvasFrame interface + NS_DECL_NSICANVASFRAME protected: nsPresContext* mPresContext; diff --git a/layout/xul/base/src/nsCanvasRenderingContext2D.cpp b/layout/xul/base/src/nsCanvasRenderingContext2D.cpp index 6b426ad62279..5192bba145dc 100644 --- a/layout/xul/base/src/nsCanvasRenderingContext2D.cpp +++ b/layout/xul/base/src/nsCanvasRenderingContext2D.cpp @@ -49,6 +49,10 @@ #include "nsIDOMHTMLImageElement.h" #include "nsIImageLoadingContent.h" +#include "nsPrintfCString.h" + +#include "nsReadableUtils.h" + #include class nsCanvasRenderingContext2D : @@ -114,12 +118,15 @@ NS_NewCanvasRenderingContext2D(nsICanvasRenderingContext2D** aResult) NS_IMPL_ISUPPORTS2(nsCanvasRenderingContext2D, nsICanvasRenderingContext2D, nsICanvasRenderingContext) static PRBool -ColorStringToColor (const char *str, nscolor &color) +ColorStringToColor (const nsAString& style, nscolor &color) { - if (!str || !str[0]) + nsCAutoString str; + str.Assign(NS_ConvertUTF16toUTF8(style)); + + if (str.IsEmpty()) return PR_FALSE; - int slen = nsCRT::strlen(str); + int slen = str.Length(); if (str[0] == '#') { unsigned int shift = 0; @@ -139,7 +146,7 @@ ColorStringToColor (const char *str, nscolor &color) } else if (slen == 7) { char *ss = nsnull; unsigned long l; - l = strtoul (str+1, &ss, 16); + l = strtoul (nsPromiseFlatCString(str).get()+1, &ss, 16); if (*ss != 0) { return PR_FALSE; } @@ -150,11 +157,11 @@ ColorStringToColor (const char *str, nscolor &color) } } - if (nsCRT::strncmp(str, "rgb(", 4) == 0) { + if (StringBeginsWith(style, NS_LITERAL_STRING("rgb("))) { // ... } - if (NS_ColorNameToRGB(NS_ConvertUTF8toUTF16(str), &color)) + if (NS_ColorNameToRGB(style, &color)) return PR_TRUE; return PR_FALSE; @@ -192,11 +199,9 @@ nsCanvasRenderingContext2D::SetCairoColor(nscolor c) double r = double(NS_GET_R(c) / 255.0); double g = double(NS_GET_G(c) / 255.0); double b = double(NS_GET_B(c) / 255.0); - double a = double(NS_GET_A(c) / 255.0); // fprintf (stderr, "::SetCairoColor r: %g g: %g b: %g a: %g\n", r, g, b, a); cairo_set_rgb_color (mCairo, r, g, b); - cairo_set_alpha (mCairo, a); } NS_IMETHODIMP @@ -314,9 +319,10 @@ nsCanvasRenderingContext2D::Paint(nsPresContext* aPresContext, mDirty = PR_FALSE; } - nsPoint dst = mCanvasFrame->GetPosition(); + nsPoint dstpt = mCanvasFrame->GetPosition(); nsRect src(0, 0, NSIntPixelsToTwips(mWidth, mPixelsToTwips), NSIntPixelsToTwips(mHeight, mPixelsToTwips)); - return aRenderingContext.DrawImage(mImageContainer, &src, &dst); + nsRect dst(dstpt.x, dstpt.y, src.width, src.height); + return aRenderingContext.DrawImage(mImageContainer, src, dst); } return NS_OK; @@ -326,6 +332,13 @@ nsCanvasRenderingContext2D::Paint(nsPresContext* aPresContext, // nsCanvasRenderingContext2D impl // +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetCanvas(nsIBoxObject **canvas) +{ + //NS_IF_ADDREF(*canvas = mCanvasFrame); + return NS_ERROR_NOT_IMPLEMENTED; +} + // // state // @@ -374,37 +387,128 @@ nsCanvasRenderingContext2D::Translate(float x, float y) // NS_IMETHODIMP -nsCanvasRenderingContext2D::SetStrokeColor(const char* color) +nsCanvasRenderingContext2D::SetGlobalAlpha(float globalAlpha) { - nscolor c; - if (ColorStringToColor(color, c)) { - mStrokeColor = (mStrokeColor & 0xff000000) | (c & 0x00ffffff); + cairo_set_alpha (mCairo, globalAlpha); + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetGlobalAlpha(float *globalAlpha) +{ + double d = cairo_current_alpha(mCairo); + *globalAlpha = (float) d; + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::SetStrokeStyle(const nsAString& style) +{ + if (ColorStringToColor(style, mStrokeColor)) return NS_OK; - } return NS_ERROR_FAILURE; } NS_IMETHODIMP -nsCanvasRenderingContext2D::SetFillColor(const char* color) +nsCanvasRenderingContext2D::GetStrokeStyle(nsAString& style) { - nscolor c; - if (ColorStringToColor(color, c)) { - mFillColor = (mFillColor & 0xff000000) | (c & 0x00ffffff); + style.Assign(NS_ConvertUTF8toUTF16(nsPrintfCString(100, "#%08x", mStrokeColor))); + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::SetFillStyle(const nsAString& style) +{ + if (ColorStringToColor(style, mFillColor)) return NS_OK; - } return NS_ERROR_FAILURE; } NS_IMETHODIMP -nsCanvasRenderingContext2D::SetAlpha(float alpha) +nsCanvasRenderingContext2D::GetFillStyle(nsAString& style) { - // XXX change the alpha of both the stroke and fill colors - PRUint8 alpha8 = (PRUint8) (alpha * 255.0); - mFillColor = (mFillColor & 0x00ffffff) | (alpha8 << 24); - mStrokeColor = (mStrokeColor & 0x00ffffff) | (alpha8 << 24); + style.Assign(NS_ConvertUTF8toUTF16(nsPrintfCString(100, "#%08x", mFillColor))); + return NS_OK; +} +// +// gradients and patterns +// +NS_IMETHODIMP +nsCanvasRenderingContext2D::CreateLinearGradient(float x0, float y0, float x1, float y1, + nsICanvasGradient **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::CreateRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1, + nsICanvasGradient **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::CreatePattern(nsIDOMHTMLImageElement *image, + const nsAString& repetition, + nsICanvasPattern **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +// +// shadows +// +NS_IMETHODIMP +nsCanvasRenderingContext2D::SetShadowOffsetX(float x) +{ + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetShadowOffsetX(float *x) +{ + *x = 0.0f; + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::SetShadowOffsetY(float y) +{ + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetShadowOffsetY(float *y) +{ + *y = 0.0f; + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::SetShadowBlur(float blur) +{ + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetShadowBlur(float *blur) +{ + *blur = 0.0f; + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::SetShadowColor(const nsAString& color) +{ + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetShadowColor(nsAString& color) +{ return NS_OK; } @@ -471,7 +575,7 @@ nsCanvasRenderingContext2D::ClosePath() } NS_IMETHODIMP -nsCanvasRenderingContext2D::FillPath() +nsCanvasRenderingContext2D::Fill() { SetCairoColor(mFillColor); cairo_fill(mCairo); @@ -479,7 +583,7 @@ nsCanvasRenderingContext2D::FillPath() } NS_IMETHODIMP -nsCanvasRenderingContext2D::StrokePath() +nsCanvasRenderingContext2D::Stroke() { SetCairoColor(mStrokeColor); cairo_stroke(mCairo); @@ -494,43 +598,43 @@ nsCanvasRenderingContext2D::Clip() } NS_IMETHODIMP -nsCanvasRenderingContext2D::MoveToPoint(float x, float y) +nsCanvasRenderingContext2D::MoveTo(float x, float y) { cairo_move_to(mCairo, x, y); return NS_OK; } NS_IMETHODIMP -nsCanvasRenderingContext2D::AddLineToPoint(float x, float y) +nsCanvasRenderingContext2D::LineTo(float x, float y) { cairo_line_to(mCairo, x, y); return NS_OK; } NS_IMETHODIMP -nsCanvasRenderingContext2D::AddQuadraticCurveToPoint(float cpx, float cpy, float x, float y) +nsCanvasRenderingContext2D::QuadraticCurveTo(float cpx, float cpy, float x, float y) { cairo_curve_to(mCairo, cpx, cpy, cpx, cpy, x, y); return NS_OK; } NS_IMETHODIMP -nsCanvasRenderingContext2D::AddBezierCurveToPoint(float cp1x, float cp1y, - float cp2x, float cp2y, - float x, float y) +nsCanvasRenderingContext2D::BezierCurveTo(float cp1x, float cp1y, + float cp2x, float cp2y, + float x, float y) { cairo_curve_to(mCairo, cp1x, cp1y, cp2x, cp2y, x, y); return NS_OK; } NS_IMETHODIMP -nsCanvasRenderingContext2D::AddArcToPoint(float x1, float y1, float x2, float y2, float radius) +nsCanvasRenderingContext2D::ArcTo(float x1, float y1, float x2, float y2, float radius) { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP -nsCanvasRenderingContext2D::AddArc(float x, float y, float r, float startAngle, float endAngle, int clockwise) +nsCanvasRenderingContext2D::Arc(float x, float y, float r, float startAngle, float endAngle, int clockwise) { if (clockwise) cairo_arc (mCairo, x, y, r, startAngle, endAngle); @@ -540,7 +644,7 @@ nsCanvasRenderingContext2D::AddArc(float x, float y, float r, float startAngle, } NS_IMETHODIMP -nsCanvasRenderingContext2D::AddRect(float x, float y, float w, float h) +nsCanvasRenderingContext2D::Rect(float x, float y, float w, float h) { cairo_rectangle (mCairo, x, y, w, h); return NS_OK; @@ -558,13 +662,21 @@ nsCanvasRenderingContext2D::SetLineWidth(float width) } NS_IMETHODIMP -nsCanvasRenderingContext2D::SetLineCap(const char *capstyle) +nsCanvasRenderingContext2D::GetLineWidth(float *width) +{ + double d = cairo_current_line_width(mCairo); + *width = (float) d; + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::SetLineCap(const nsAString& capstyle) { cairo_line_cap_t cap; - if (nsCRT::strcmp(capstyle, "round") == 0) + if (capstyle.EqualsLiteral("round")) cap = CAIRO_LINE_CAP_ROUND; - else if (nsCRT::strcmp(capstyle, "square") == 0) + else if (capstyle.EqualsLiteral("square")) cap = CAIRO_LINE_CAP_SQUARE; else return NS_ERROR_NOT_IMPLEMENTED; @@ -574,15 +686,30 @@ nsCanvasRenderingContext2D::SetLineCap(const char *capstyle) } NS_IMETHODIMP -nsCanvasRenderingContext2D::SetLineJoin(const char *joinstyle) +nsCanvasRenderingContext2D::GetLineCap(nsAString& capstyle) +{ + cairo_line_cap_t cap = cairo_current_line_cap(mCairo); + + if (cap == CAIRO_LINE_CAP_ROUND) + capstyle.AssignLiteral("round"); + else if (cap == CAIRO_LINE_CAP_SQUARE) + capstyle.AssignLiteral("square"); + else + return NS_ERROR_FAILURE; + + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::SetLineJoin(const nsAString& joinstyle) { cairo_line_join_t j; - if (nsCRT::strcmp(joinstyle, "round") == 0) + if (joinstyle.EqualsLiteral("round")) j = CAIRO_LINE_JOIN_ROUND; - else if (nsCRT::strcmp(joinstyle, "bevel") == 0) + else if (joinstyle.EqualsLiteral("bevel")) j = CAIRO_LINE_JOIN_BEVEL; - else if (nsCRT::strcmp(joinstyle, "miter") == 0) + else if (joinstyle.EqualsLiteral("miter")) j = CAIRO_LINE_JOIN_MITER; else return NS_ERROR_NOT_IMPLEMENTED; @@ -591,6 +718,23 @@ nsCanvasRenderingContext2D::SetLineJoin(const char *joinstyle) return NS_OK; } +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetLineJoin(nsAString& joinstyle) +{ + cairo_line_join_t j = cairo_current_line_join(mCairo); + + if (j == CAIRO_LINE_JOIN_ROUND) + joinstyle.AssignLiteral("round"); + else if (j == CAIRO_LINE_JOIN_BEVEL) + joinstyle.AssignLiteral("bevel"); + else if (j == CAIRO_LINE_JOIN_MITER) + joinstyle.AssignLiteral("miter"); + else + return NS_ERROR_FAILURE; + + return NS_OK; +} + NS_IMETHODIMP nsCanvasRenderingContext2D::SetMiterLimit(float miter) { @@ -598,13 +742,22 @@ nsCanvasRenderingContext2D::SetMiterLimit(float miter) return NS_OK; } +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetMiterLimit(float *miter) +{ + double d = cairo_current_miter_limit(mCairo); + *miter = (float) d; + return NS_OK; +} + // // image // NS_IMETHODIMP -nsCanvasRenderingContext2D::DrawImage(nsIDOMHTMLImageElement *aImage, int x, int y, int w, int h, const char *composite) +nsCanvasRenderingContext2D::DrawImage() { +#if 0 nsCOMPtr contentImage(aImage); nsCOMPtr request; contentImage->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST, getter_AddRefs(request)); @@ -713,35 +866,18 @@ nsCanvasRenderingContext2D::DrawImage(nsIDOMHTMLImageElement *aImage, int x, int cairo_surface_destroy(surface); return NS_OK; -} - -NS_IMETHODIMP -nsCanvasRenderingContext2D::DrawImageFromRect(nsIDOMHTMLImageElement *aImage, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, const char *composite) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -// shadows.. -NS_IMETHODIMP -nsCanvasRenderingContext2D::SetShadow(float width, float height, float blur, const char *color) -{ +#endif return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP -nsCanvasRenderingContext2D::ClearShadow() +nsCanvasRenderingContext2D::SetGlobalCompositeOperation(const nsAString& op) { - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsCanvasRenderingContext2D::SetCompositeOperation(const char *composite) -{ - cairo_operator_t the_op; + cairo_operator_t cairo_op; #define CANVAS_OP_TO_CAIRO_OP(cvsop,cairoop) \ - if (nsCRT::strcmp (composite, cvsop) == 0) \ - the_op = CAIRO_OPERATOR_##cairoop; + if (op.EqualsLiteral(cvsop)) \ + cairo_op = CAIRO_OPERATOR_##cairoop; CANVAS_OP_TO_CAIRO_OP("clear", CLEAR) else CANVAS_OP_TO_CAIRO_OP("copy", SRC) @@ -759,6 +895,38 @@ nsCanvasRenderingContext2D::SetCompositeOperation(const char *composite) else CANVAS_OP_TO_CAIRO_OP("over", OVER) else return NS_ERROR_NOT_IMPLEMENTED; - cairo_set_operator(mCairo, the_op); +#undef CANVAS_OP_TO_CAIRO_OP + + cairo_set_operator(mCairo, cairo_op); + return NS_OK; +} + +NS_IMETHODIMP +nsCanvasRenderingContext2D::GetGlobalCompositeOperation(nsAString& op) +{ + cairo_operator_t cairo_op = cairo_current_operator(mCairo); + +#define CANVAS_OP_TO_CAIRO_OP(cvsop,cairoop) \ + if (cairo_op == CAIRO_OPERATOR_##cairoop) \ + op.AssignLiteral(cvsop); + + CANVAS_OP_TO_CAIRO_OP("clear", CLEAR) + else CANVAS_OP_TO_CAIRO_OP("copy", SRC) + else CANVAS_OP_TO_CAIRO_OP("darker", SATURATE) // XXX + else CANVAS_OP_TO_CAIRO_OP("destination-atop", ATOP_REVERSE) + else CANVAS_OP_TO_CAIRO_OP("destination-in", IN_REVERSE) + else CANVAS_OP_TO_CAIRO_OP("destination-out", OUT_REVERSE) + else CANVAS_OP_TO_CAIRO_OP("destination-over", OVER_REVERSE) + else CANVAS_OP_TO_CAIRO_OP("lighter", SATURATE) + else CANVAS_OP_TO_CAIRO_OP("source-atop", ATOP) + else CANVAS_OP_TO_CAIRO_OP("source-in", IN) + else CANVAS_OP_TO_CAIRO_OP("source-out", OUT) + else CANVAS_OP_TO_CAIRO_OP("source-over", OVER) + else CANVAS_OP_TO_CAIRO_OP("xor", XOR) + else CANVAS_OP_TO_CAIRO_OP("over", OVER) + else return NS_ERROR_FAILURE; + +#undef CANVAS_OP_TO_CAIRO_OP + return NS_OK; } diff --git a/layout/xul/base/src/nsICanvasRenderingContext.h b/layout/xul/base/src/nsICanvasRenderingContext.h index d7ddb70ea213..256b05a8e91a 100644 --- a/layout/xul/base/src/nsICanvasRenderingContext.h +++ b/layout/xul/base/src/nsICanvasRenderingContext.h @@ -43,6 +43,7 @@ #include "nsIFrame.h" #include "nsPresContext.h" #include "nsIRenderingContext.h" +#include "nsIBoxObject.h" #define NS_ICANVASRENDERINGCONTEXT_IID \ { 0x753a56cb, 0xf8ca, 0x4deb, { 0xb8, 0x75, 0xf2, 0x80, 0xeb, 0x91, 0x2c, 0x56 } }