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 | // |
michael@0 | 2 | // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. |
michael@0 | 3 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 4 | // found in the LICENSE file. |
michael@0 | 5 | // |
michael@0 | 6 | |
michael@0 | 7 | struct VS_OUTPUT |
michael@0 | 8 | { |
michael@0 | 9 | float4 position : POSITION; |
michael@0 | 10 | float4 texcoord : TEXCOORD0; |
michael@0 | 11 | }; |
michael@0 | 12 | |
michael@0 | 13 | uniform float4 halfPixelSize : c0; |
michael@0 | 14 | |
michael@0 | 15 | // Standard Vertex Shader |
michael@0 | 16 | // Input 0 is the homogenous position. |
michael@0 | 17 | // Outputs the homogenous position as-is. |
michael@0 | 18 | // Outputs a tex coord with (0,0) in the upper-left corner of the screen and (1,1) in the bottom right. |
michael@0 | 19 | // C0.X must be negative half-pixel width, C0.Y must be half-pixel height. C0.ZW must be 0. |
michael@0 | 20 | VS_OUTPUT standardvs(in float4 position : POSITION) |
michael@0 | 21 | { |
michael@0 | 22 | VS_OUTPUT Out; |
michael@0 | 23 | |
michael@0 | 24 | Out.position = position + halfPixelSize; |
michael@0 | 25 | Out.texcoord = position * float4(0.5, -0.5, 1.0, 1.0) + float4(0.5, 0.5, 0, 0); |
michael@0 | 26 | |
michael@0 | 27 | return Out; |
michael@0 | 28 | }; |
michael@0 | 29 | |
michael@0 | 30 | // Flip Y Vertex Shader |
michael@0 | 31 | // Input 0 is the homogenous position. |
michael@0 | 32 | // Outputs the homogenous position as-is. |
michael@0 | 33 | // Outputs a tex coord with (0,1) in the upper-left corner of the screen and (1,0) in the bottom right. |
michael@0 | 34 | // C0.XY must be the half-pixel width and height. C0.ZW must be 0. |
michael@0 | 35 | VS_OUTPUT flipyvs(in float4 position : POSITION) |
michael@0 | 36 | { |
michael@0 | 37 | VS_OUTPUT Out; |
michael@0 | 38 | |
michael@0 | 39 | Out.position = position + halfPixelSize; |
michael@0 | 40 | Out.texcoord = position * float4(0.5, 0.5, 1.0, 1.0) + float4(0.5, 0.5, 0, 0); |
michael@0 | 41 | |
michael@0 | 42 | return Out; |
michael@0 | 43 | }; |