Bug 387132 followup - build the reftest-fast tool correctly with libxul, r=vlad a=only functional change is NPOB
--- a/content/canvas/public/nsICanvasElement.h
+++ b/content/canvas/public/nsICanvasElement.h
@@ -34,17 +34,18 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsICanvasElement_h___
#define nsICanvasElement_h___
#include "nsISupports.h"
-#include "nsIFrame.h"
+
+class nsIFrame;
// {C234660C-BD06-493e-8583-939A5A158B37}
#define NS_ICANVASELEMENT_IID \
{ 0xc234660c, 0xbd06, 0x493e, { 0x85, 0x83, 0x93, 0x9a, 0x5a, 0x15, 0x8b, 0x37 } }
class nsIRenderingContext;
struct _cairo_surface;
--- a/gfx/thebes/public/gfxASurface.h
+++ b/gfx/thebes/public/gfxASurface.h
@@ -35,17 +35,16 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef GFX_ASURFACE_H
#define GFX_ASURFACE_H
#include "gfxTypes.h"
#include "gfxRect.h"
-#include "nsStringFwd.h"
typedef struct _cairo_surface cairo_surface_t;
typedef struct _cairo_user_data_key cairo_user_data_key_t;
typedef void (*thebes_destroy_func_t) (void *data);
/**
* A surface is something you can draw on. Instantiate a subclass of this
--- a/gfx/thebes/public/gfxColor.h
+++ b/gfx/thebes/public/gfxColor.h
@@ -33,17 +33,19 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef GFX_COLOR_H
#define GFX_COLOR_H
+#ifdef MOZILLA_INTERNAL_API
#include "nsPrintfCString.h"
+#endif
#include "gfxTypes.h"
/**
* Fast approximate division by 255. It has the property that
* for all 0 <= n <= 255*255, FAST_DIVIDE_BY_255(n) == n/255.
* But it only uses two adds and two shifts instead of an
* integer division (which is expensive on many processors).
@@ -184,22 +186,24 @@ struct THEBES_API gfxRGBA {
((PRUint8)((r*a) * 255.0) << 16) |
((PRUint8)((g*a) * 255.0) << 8) |
((PRUint8)((b*a) * 255.0)));
} else {
return 0;
}
}
+#ifdef MOZILLA_INTERNAL_API
/**
* Convert this color to a hex value. For example, for rgb(255,0,0),
* this will return FF0000.
*/
// XXX I'd really prefer to just have this return an nsACString
// Does this function even make sense, since we're just ignoring the alpha value?
void Hex(nsACString& result) const {
nsPrintfCString hex(8, "%02x%02x%02x", PRUint8(r*255.0), PRUint8(g*255.0), PRUint8(b*255.0));
result.Assign(hex);
}
+#endif
};
#endif /* _GFX_COLOR_H */
--- a/layout/tools/reftest/Makefile.in
+++ b/layout/tools/reftest/Makefile.in
@@ -39,24 +39,20 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = reftest
-ifdef DISABLED_FOR_NOW
-
LIBRARY_NAME = reftest
IS_COMPONENT = 1
MODULE_NAME = nsReftestModule
-MOZILLA_INTERNAL_API = 1
-
REQUIRES = \
xpcom \
string \
gfx \
layout \
widget \
dom \
js \
@@ -78,31 +74,32 @@ REQUIRES = \
exthandler \
uconv \
intl \
content \
thebes \
zlib \
$(NULL)
+ifndef MOZ_ENABLE_LIBXUL
EXTRA_DSO_LIBS = thebes
+endif
EXTRA_DSO_LDOPTS = \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
+ $(XPCOM_GLUE_LDOPTS) \
$(MOZ_COMPONENT_LIBS) \
$(ZLIB_LIBS) \
$(NULL)
XPIDLSRCS = nsIReftestHelper.idl
CPPSRCS = nsReftestHelper.cpp
-endif
-
EXTRA_COMPONENTS= \
reftest-cmdline.js \
$(NULL)
CHROME_DEPS = \
autoconf.js \
$(NULL)
--- a/layout/tools/reftest/nsReftestHelper.cpp
+++ b/layout/tools/reftest/nsReftestHelper.cpp
@@ -37,27 +37,27 @@
* ***** END LICENSE BLOCK ***** */
#include <string.h>
#include "nsIFactory.h"
#include "nsIGenericFactory.h"
#include "nsISupports.h"
-#include "nsIFrame.h"
-
#include "nsIDOMHTMLCanvasElement.h"
#include "nsIDOMCanvasRenderingContext2D.h"
#include "nsICanvasRenderingContextInternal.h"
#include "nsIReftestHelper.h"
#include "gfxContext.h"
#include "gfxImageSurface.h"
+#include "nsStringGlue.h"
+
class nsReftestHelper :
public nsIReftestHelper
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIREFTESTHELPER
};
--- a/xpcom/string/public/nsStringFwd.h
+++ b/xpcom/string/public/nsStringFwd.h
@@ -40,16 +40,19 @@
#ifndef nsStringFwd_h___
#define nsStringFwd_h___
#ifndef nscore_h___
#include "nscore.h"
#endif
+#ifndef MOZILLA_INTERNAL_API
+#error Internal string headers are not available from external-linkage code.
+#endif
/**
* double-byte (PRUnichar) string types
*/
class nsAString;
class nsObsoleteAString;
#ifdef MOZ_V1_STRING_ABI