Tue, 06 Jan 2015 21:39:09 +0100
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.
michael@0 | 1 | changeset: 93076:25d0c8a38d7d |
michael@0 | 2 | tag: none |
michael@0 | 3 | tag: qbase |
michael@0 | 4 | tag: qtip |
michael@0 | 5 | tag: tip |
michael@0 | 6 | user: Jeff Muizelaar <jmuizelaar@mozilla.com> |
michael@0 | 7 | date: Thu May 03 15:21:52 2012 -0400 |
michael@0 | 8 | summary: Bug 751668. Avoid incorrectly using EXTEND_NONE. r=joe |
michael@0 | 9 | |
michael@0 | 10 | diff --git a/gfx/cairo/cairo/src/cairo-image-surface.c b/gfx/cairo/cairo/src/cairo-image-surface.c |
michael@0 | 11 | --- a/gfx/cairo/cairo/src/cairo-image-surface.c |
michael@0 | 12 | +++ b/gfx/cairo/cairo/src/cairo-image-surface.c |
michael@0 | 13 | @@ -1390,25 +1390,16 @@ static pixman_image_t * |
michael@0 | 14 | cairo_image_surface_t *source = (cairo_image_surface_t *) pattern->surface; |
michael@0 | 15 | cairo_surface_type_t type; |
michael@0 | 16 | |
michael@0 | 17 | if (source->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) |
michael@0 | 18 | source = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) pattern->surface)->target; |
michael@0 | 19 | |
michael@0 | 20 | type = source->base.backend->type; |
michael@0 | 21 | if (type == CAIRO_SURFACE_TYPE_IMAGE) { |
michael@0 | 22 | - if (extend != CAIRO_EXTEND_NONE && |
michael@0 | 23 | - sample.x >= 0 && |
michael@0 | 24 | - sample.y >= 0 && |
michael@0 | 25 | - sample.x + sample.width <= source->width && |
michael@0 | 26 | - sample.y + sample.height <= source->height) |
michael@0 | 27 | - { |
michael@0 | 28 | - extend = CAIRO_EXTEND_NONE; |
michael@0 | 29 | - } |
michael@0 | 30 | - |
michael@0 | 31 | if (sample.width == 1 && sample.height == 1) { |
michael@0 | 32 | if (sample.x < 0 || |
michael@0 | 33 | sample.y < 0 || |
michael@0 | 34 | sample.x >= source->width || |
michael@0 | 35 | sample.y >= source->height) |
michael@0 | 36 | { |
michael@0 | 37 | if (extend == CAIRO_EXTEND_NONE) |
michael@0 | 38 | return _pixman_transparent_image (); |
michael@0 | 39 |