Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | From f2fa15680ec3ac95cb68d4957557f06561a7dc55 Mon Sep 17 00:00:00 2001 |
michael@0 | 2 | From: Karl Tomlinson <karlt+@karlt.net> |
michael@0 | 3 | Date: Fri, 16 Jul 2010 22:39:50 +0000 |
michael@0 | 4 | Subject: clip: return empty clip from _cairo_clip_copy_rectangle_list when all_clipped |
michael@0 | 5 | |
michael@0 | 6 | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29122 |
michael@0 | 7 | Tested by test/get-clip |
michael@0 | 8 | |
michael@0 | 9 | Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> |
michael@0 | 10 | --- |
michael@0 | 11 | diff --git a/src/cairo-clip.c b/src/cairo-clip.c |
michael@0 | 12 | index 12dc04d..f6173c6 100644 |
michael@0 | 13 | --- a/src/cairo-clip.c |
michael@0 | 14 | +++ b/src/cairo-clip.c |
michael@0 | 15 | @@ -1499,7 +1499,10 @@ _cairo_clip_copy_rectangle_list (cairo_clip_t *clip, cairo_gstate_t *gstate) |
michael@0 | 16 | int n_rects = 0; |
michael@0 | 17 | int i; |
michael@0 | 18 | |
michael@0 | 19 | - if (clip != NULL && clip->path != NULL) { |
michael@0 | 20 | + if (clip->all_clipped) |
michael@0 | 21 | + goto DONE; |
michael@0 | 22 | + |
michael@0 | 23 | + if (clip->path != NULL) { |
michael@0 | 24 | status = _cairo_clip_get_region (clip, ®ion); |
michael@0 | 25 | if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) { |
michael@0 | 26 | goto DONE; |
michael@0 | 27 | -- |
michael@0 | 28 | cgit v0.8.3-6-g21f6 |