Bug 945088. Use the correct device offset in gfxContext. r=mattwoodrow

This commit is contained in:
Nicholas Cameron 2013-12-09 21:04:44 +13:00
parent f25924220b
commit fd076867c8
2 changed files with 5 additions and 3 deletions

View File

@ -176,8 +176,10 @@ gfxContext::CurrentSurface(gfxFloat *dx, gfxFloat *dy)
cairo_surface_t *s =
(cairo_surface_t*)mDT->GetNativeSurface(NATIVE_SURFACE_CAIRO_SURFACE);
if (s) {
if (dx && dy)
cairo_surface_get_device_offset(s, dx, dy);
if (dx && dy) {
*dx = -CurrentState().deviceOffset.x;
*dy = -CurrentState().deviceOffset.y;
}
return gfxASurface::Wrap(s);
}
}

View File

@ -1786,4 +1786,4 @@ fuzzy-if(cocoaWidget,1,40) == 928607-1.html 928607-1-ref.html
== 936670-1.svg 936670-1-ref.svg
== 941940-1.html 941940-1-ref.html
== 942017.html 942017-ref.html
fails-if(winWidget&&!d2d) == 942672-1.html 942672-1-ref.html
== 942672-1.html 942672-1-ref.html