NS_DEFINE_STATIC_IID_ACCESSOR(NS_CANVASPATTERN_PRIVATE_IID)
nsCanvasRenderingContext2D(); virtual ~nsCanvasRenderingContext2D();  nsresult Redraw(); nsresult UpdateImageFrame(); void SetCairoColor(nscolor c);   NS_IMETHOD Init (nsIDOMHTMLCanvasElement* aParentCanvas); NS_IMETHOD SetTargetImageFrame(gfxIImageFrame* aImageFrame);   NS_DECL_ISUPPORTS   NS_DECL_NSIDOMCANVASRENDERINGCONTEXT2D  protected:  void Destroy();  nsIFrame *GetCanvasLayoutFrame();   enum { STYLE_STROKE = 0, STYLE_FILL, STYLE_MAX };  PRBool StyleVariantToColor(nsIVariant* aStyle, PRInt32 aWhichStyle); void StyleColorToString(const nscolor& aColor, nsAString& aStr);  void DirtyAllStyles(); void ApplyStyle(PRInt32 aWhichStyle);   PRInt32 mWidth, mHeight;  nsCOMPtr<nsIDOMHTMLCanvasElement> mDOMCanvasElement; nsCOMPtr<nsICanvasElement> mCanvasElement;   nsCOMPtr<gfxIImageFrame> mImageFrame;  PRBool mDirty;   nsCOMPtr<nsICSSParser> mCSSParser;   cairo_t *mCairo; cairo_surface_t *mSurface; char *mSurfaceData;   PRInt32 mLastStyle; PRPackedBool mDirtyStyle[STYLE_MAX]; nscolor mColorStyles[STYLE_MAX]; nsCOMPtr<nsCanvasGradient> mGradientStyles[STYLE_MAX]; nsCOMPtr<nsCanvasPattern> mPatternStyles[STYLE_MAX];   static PRBool ConvertJSValToUint32(PRUint32* aProp, JSContext* aContext, jsval aValue); static PRBool ConvertJSValToXPCObject(nsISupports** aSupports, REFNSIID aIID, JSContext* aContext, jsval aValue); static PRBool ConvertJSValToDouble(double* aProp, JSContext* aContext, jsval aValue);   nsresult CairoSurfaceFromImageElement(nsIDOMHTMLImageElement *imgElt, cairo_surface_t **aCairoSurface, PRUint8 **imgDataOut, PRInt32 *widthOut, PRInt32 *heightOut); };
NS_INTERFACE_MAP_END/** ** nsCanvasPattern **/#define NS_CANVASPATTERN_PRIVATE_IID \    { 0xb85c6c8a, 0x0624, 0x4530, { 0xb8, 0xee, 0xff, 0xdf, 0x42, 0xe8, 0x21, 0x6d } }class nsCanvasPattern : public nsIDOMCanvasPattern{public:    NS_DEFINE_STATIC_IID_ACCESSOR(NS_CANVASPATTERN_PRIVATE_IID)