gfx/skia/trunk/src/sfnt/SkOTTable_OS_2.h

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.

michael@0 1 /*
michael@0 2 * Copyright 2012 Google Inc.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7
michael@0 8 #ifndef SkOTTable_OS_2_DEFINED
michael@0 9 #define SkOTTable_OS_2_DEFINED
michael@0 10
michael@0 11 #include "SkOTTable_OS_2_VA.h"
michael@0 12 #include "SkOTTable_OS_2_V0.h"
michael@0 13 #include "SkOTTable_OS_2_V1.h"
michael@0 14 #include "SkOTTable_OS_2_V2.h"
michael@0 15 #include "SkOTTable_OS_2_V3.h"
michael@0 16 #include "SkOTTable_OS_2_V4.h"
michael@0 17
michael@0 18 #pragma pack(push, 1)
michael@0 19
michael@0 20 struct SkOTTableOS2 {
michael@0 21 static const SK_OT_CHAR TAG0 = 'O';
michael@0 22 static const SK_OT_CHAR TAG1 = 'S';
michael@0 23 static const SK_OT_CHAR TAG2 = '/';
michael@0 24 static const SK_OT_CHAR TAG3 = '2';
michael@0 25 static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableOS2>::value;
michael@0 26
michael@0 27 union Version {
michael@0 28 SK_OT_USHORT version;
michael@0 29
michael@0 30 //original V0 TT
michael@0 31 struct VA : SkOTTableOS2_VA { } vA;
michael@0 32 struct V0 : SkOTTableOS2_V0 { } v0;
michael@0 33 struct V1 : SkOTTableOS2_V1 { } v1;
michael@0 34 struct V2 : SkOTTableOS2_V2 { } v2;
michael@0 35 //makes fsType 0-3 exclusive
michael@0 36 struct V3 : SkOTTableOS2_V3 { } v3;
michael@0 37 //defines fsSelection bits 7-9
michael@0 38 struct V4 : SkOTTableOS2_V4 { } v4;
michael@0 39 } version;
michael@0 40 };
michael@0 41
michael@0 42 #pragma pack(pop)
michael@0 43
michael@0 44
michael@0 45 SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::VA) == 68, sizeof_SkOTTableOS2__VA_not_68);
michael@0 46 SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V0) == 78, sizeof_SkOTTableOS2__V0_not_78);
michael@0 47 SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V1) == 86, sizeof_SkOTTableOS2__V1_not_86);
michael@0 48 SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V2) == 96, sizeof_SkOTTableOS2__V2_not_96);
michael@0 49 SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V3) == 96, sizeof_SkOTTableOS2__V3_not_96);
michael@0 50 SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V4) == 96, sizeof_SkOTTableOS2__V4_not_96);
michael@0 51
michael@0 52 #endif

mercurial