diff --git a/layout/svg/renderer/src/cairo/Makefile.in b/layout/svg/renderer/src/cairo/Makefile.in index eb0d81b691f0..b27e12b2bf8e 100644 --- a/layout/svg/renderer/src/cairo/Makefile.in +++ b/layout/svg/renderer/src/cairo/Makefile.in @@ -108,3 +108,7 @@ endif ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) LOCAL_INCLUDES += -I$(topsrcdir)/gfx/src/mac endif + +ifeq ($(MOZ_WIDGET_TOOLKIT), windows) +LOCAL_INCLUDES += -I$(topsrcdir)/gfx/src/windows +endif diff --git a/layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp b/layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp index b397b7635bde..37f8db9b693a 100644 --- a/layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp +++ b/layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp @@ -56,6 +56,11 @@ extern "C" { #include } +#elif defined(XP_WIN) +#include "nsDrawingSurfaceWin.h" +extern "C" { +#include +} #else #include "nsRenderingContextGTK.h" #include @@ -154,6 +159,13 @@ nsSVGCairoCanvas::Init(nsIRenderingContext *ctx, cairo_set_target_quartz_context(mCR, mQuartzRef, portRect.right - portRect.left, portRect.bottom - portRect.top); +#elif defined(XP_WIN) + nsDrawingSurfaceWin *surface; + HDC hdc; + ctx->GetDrawingSurface((nsIDrawingSurface**)&surface); + surface->GetDimensions(&mWidth, &mHeight); + surface->GetDC(&hdc); + cairo_set_target_win32(mCR, hdc); #else nsDrawingSurfaceGTK *surface; ctx->GetDrawingSurface((nsIDrawingSurface**)&surface);