gfx/cairo/disable-printing.patch

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
     2 --- a/gfx/cairo/cairo/src/cairo-win32-surface.c
     3 +++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
     4 @@ -1892,21 +1892,22 @@ cairo_win32_surface_get_dc (cairo_surfac
     5  	return winsurf->dc;
     6      }
     8      if (_cairo_surface_is_paginated (surface)) {
     9  	cairo_surface_t *target;
    11  	target = _cairo_paginated_surface_get_target (surface);
    13 +#ifndef CAIRO_OMIT_WIN32_PRINTING
    14  	if (_cairo_surface_is_win32_printing (target)) {
    15  	    winsurf = (cairo_win32_surface_t *) target;
    16 -
    17  	    return winsurf->dc;
    18  	}
    19 +#endif
    20      }
    22      return NULL;
    23  }
    25  /**
    26   * cairo_win32_surface_get_image
    27   * @surface: a #cairo_surface_t

mercurial