gfx/cairo/win32-canvas-glyph-position.patch

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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.

     1 diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
     2 --- a/gfx/cairo/cairo/src/cairo-win32-font.c
     3 +++ b/gfx/cairo/cairo/src/cairo-win32-font.c
     4 @@ -1182,22 +1182,22 @@ _add_glyph (cairo_glyph_state_t *state,
     5      if (state->glyphs.num_elements > 0) {
     6  	int dx;
     8  	if (logical_y != state->last_y) {
     9  	    status = _flush_glyphs (state);
    10  	    if (status)
    11  		return status;
    12  	    state->start_x = logical_x;
    13 +	} else {
    14 +	    dx = logical_x - state->last_x;
    15 +	    status = _cairo_array_append (&state->dx, &dx);
    16 +	    if (status)
    17 +		return status;
    18  	}
    19 -
    20 -	dx = logical_x - state->last_x;
    21 -	status = _cairo_array_append (&state->dx, &dx);
    22 -	if (status)
    23 -	    return status;
    24      } else {
    25  	state->start_x = logical_x;
    26      }
    28      state->last_x = logical_x;
    29      state->last_y = logical_y;
    31      status = _cairo_array_append (&state->glyphs, &glyph_index);

mercurial