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 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 SkIBMFamilyClass_DEFINED |
michael@0 | 9 | #define SkIBMFamilyClass_DEFINED |
michael@0 | 10 | |
michael@0 | 11 | #include "SkOTTableTypes.h" |
michael@0 | 12 | #include "SkTypedEnum.h" |
michael@0 | 13 | |
michael@0 | 14 | #pragma pack(push, 1) |
michael@0 | 15 | |
michael@0 | 16 | struct SkIBMFamilyClass { |
michael@0 | 17 | SK_TYPED_ENUM(Class, SK_OT_BYTE, |
michael@0 | 18 | ((NoClassification, 0)) |
michael@0 | 19 | ((OldstyleSerifs, 1)) |
michael@0 | 20 | ((TransitionalSerifs, 2)) |
michael@0 | 21 | ((ModernSerifs, 3)) |
michael@0 | 22 | ((ClarendonSerifs, 4)) |
michael@0 | 23 | ((SlabSerifs, 5)) |
michael@0 | 24 | //6 reserved for future use |
michael@0 | 25 | ((FreeformSerifs, 7)) |
michael@0 | 26 | ((SansSerif, 8)) |
michael@0 | 27 | ((Ornamentals, 9)) |
michael@0 | 28 | ((Scripts, 10)) |
michael@0 | 29 | //11 reserved for future use |
michael@0 | 30 | ((Symbolic, 12)) |
michael@0 | 31 | //13-15 reserved for future use |
michael@0 | 32 | SK_SEQ_END, |
michael@0 | 33 | (familyClass)SK_SEQ_END) |
michael@0 | 34 | union SubClass { |
michael@0 | 35 | struct OldstyleSerifs { |
michael@0 | 36 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 37 | ((NoClassification, 0)) |
michael@0 | 38 | ((IBMRoundedLegibility, 1)) |
michael@0 | 39 | ((Garalde, 2)) |
michael@0 | 40 | ((Venetian, 3)) |
michael@0 | 41 | ((ModifiedVenetian, 4)) |
michael@0 | 42 | ((DutchModern, 5)) |
michael@0 | 43 | ((DutchTraditional, 6)) |
michael@0 | 44 | ((Contemporary, 7)) |
michael@0 | 45 | ((Calligraphic, 8)) |
michael@0 | 46 | //9-14 reserved for future use |
michael@0 | 47 | ((Miscellaneous, 15)) |
michael@0 | 48 | SK_SEQ_END, |
michael@0 | 49 | (value)SK_SEQ_END) |
michael@0 | 50 | } oldstyleSerifs; |
michael@0 | 51 | struct TransitionalSerifs { |
michael@0 | 52 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 53 | ((NoClassification, 0)) |
michael@0 | 54 | ((DirectLine, 1)) |
michael@0 | 55 | ((Script, 2)) |
michael@0 | 56 | //3-14 reserved for future use |
michael@0 | 57 | ((Miscellaneous, 15)) |
michael@0 | 58 | SK_SEQ_END, |
michael@0 | 59 | (value)SK_SEQ_END) |
michael@0 | 60 | } transitionalSerifs; |
michael@0 | 61 | struct ModernSerifs { |
michael@0 | 62 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 63 | ((NoClassification, 0)) |
michael@0 | 64 | ((Italian, 1)) |
michael@0 | 65 | ((Script, 2)) |
michael@0 | 66 | //3-14 reserved for future use |
michael@0 | 67 | ((Miscellaneous, 15)) |
michael@0 | 68 | SK_SEQ_END, |
michael@0 | 69 | (value)SK_SEQ_END) |
michael@0 | 70 | } modernSerifs; |
michael@0 | 71 | struct ClarendonSerifs { |
michael@0 | 72 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 73 | ((NoClassification, 0)) |
michael@0 | 74 | ((Clarendon, 1)) |
michael@0 | 75 | ((Modern, 2)) |
michael@0 | 76 | ((Traditional, 3)) |
michael@0 | 77 | ((Newspaper, 4)) |
michael@0 | 78 | ((StubSerif, 5)) |
michael@0 | 79 | ((Monotone, 6)) |
michael@0 | 80 | ((Typewriter, 7)) |
michael@0 | 81 | //8-14 reserved for future use |
michael@0 | 82 | ((Miscellaneous, 15)) |
michael@0 | 83 | SK_SEQ_END, |
michael@0 | 84 | (value)SK_SEQ_END) |
michael@0 | 85 | } clarendonSerifs; |
michael@0 | 86 | struct SlabSerifs { |
michael@0 | 87 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 88 | ((NoClassification, 0)) |
michael@0 | 89 | ((Monotone, 1)) |
michael@0 | 90 | ((Humanist, 2)) |
michael@0 | 91 | ((Geometric, 3)) |
michael@0 | 92 | ((Swiss, 4)) |
michael@0 | 93 | ((Typewriter, 5)) |
michael@0 | 94 | //6-14 reserved for future use |
michael@0 | 95 | ((Miscellaneous, 15)) |
michael@0 | 96 | SK_SEQ_END, |
michael@0 | 97 | (value)SK_SEQ_END) |
michael@0 | 98 | } slabSerifs; |
michael@0 | 99 | struct FreeformSerifs { |
michael@0 | 100 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 101 | ((NoClassification, 0)) |
michael@0 | 102 | ((Modern, 1)) |
michael@0 | 103 | //2-14 reserved for future use |
michael@0 | 104 | ((Miscellaneous, 15)) |
michael@0 | 105 | SK_SEQ_END, |
michael@0 | 106 | (value)SK_SEQ_END) |
michael@0 | 107 | } freeformSerifs; |
michael@0 | 108 | struct SansSerif { |
michael@0 | 109 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 110 | ((NoClassification, 0)) |
michael@0 | 111 | ((IBMNeoGrotesqueGothic, 1)) |
michael@0 | 112 | ((Humanist, 2)) |
michael@0 | 113 | ((LowXRoundGeometric, 3)) |
michael@0 | 114 | ((HighXRoundGeometric, 4)) |
michael@0 | 115 | ((NeoGrotesqueGothic, 5)) |
michael@0 | 116 | ((ModifiedNeoGrotesqueGothic, 6)) |
michael@0 | 117 | //7-8 reserved for future use |
michael@0 | 118 | ((TypewriterGothic, 9)) |
michael@0 | 119 | ((Matrix, 10)) |
michael@0 | 120 | //11-14 reserved for future use |
michael@0 | 121 | ((Miscellaneous, 15)) |
michael@0 | 122 | SK_SEQ_END, |
michael@0 | 123 | (value)SK_SEQ_END) |
michael@0 | 124 | } sansSerif; |
michael@0 | 125 | struct Ornamentals { |
michael@0 | 126 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 127 | ((NoClassification, 0)) |
michael@0 | 128 | ((Engraver, 1)) |
michael@0 | 129 | ((BlackLetter, 2)) |
michael@0 | 130 | ((Decorative, 3)) |
michael@0 | 131 | ((ThreeDimensional, 4)) |
michael@0 | 132 | //5-14 reserved for future use |
michael@0 | 133 | ((Miscellaneous, 15)) |
michael@0 | 134 | SK_SEQ_END, |
michael@0 | 135 | (value)SK_SEQ_END) |
michael@0 | 136 | } ornamentals; |
michael@0 | 137 | struct Scripts { |
michael@0 | 138 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 139 | ((NoClassification, 0)) |
michael@0 | 140 | ((Uncial, 1)) |
michael@0 | 141 | ((Brush_Joined, 2)) |
michael@0 | 142 | ((Formal_Joined, 3)) |
michael@0 | 143 | ((Monotone_Joined, 4)) |
michael@0 | 144 | ((Calligraphic, 5)) |
michael@0 | 145 | ((Brush_Unjoined, 6)) |
michael@0 | 146 | ((Formal_Unjoined, 7)) |
michael@0 | 147 | ((Monotone_Unjoined, 8)) |
michael@0 | 148 | //9-14 reserved for future use |
michael@0 | 149 | ((Miscellaneous, 15)) |
michael@0 | 150 | SK_SEQ_END, |
michael@0 | 151 | (value)SK_SEQ_END) |
michael@0 | 152 | } scripts; |
michael@0 | 153 | struct Symbolic { |
michael@0 | 154 | SK_TYPED_ENUM(Value, SK_OT_BYTE, |
michael@0 | 155 | ((NoClassification, 0)) |
michael@0 | 156 | //1-2 reserved for future use |
michael@0 | 157 | ((MixedSerif, 3)) |
michael@0 | 158 | //4-5 reserved for future use |
michael@0 | 159 | ((OldstyleSerif, 6)) |
michael@0 | 160 | ((NeoGrotesqueSansSerif, 7)) |
michael@0 | 161 | //8-14 reserved for future use |
michael@0 | 162 | ((Miscellaneous, 15)) |
michael@0 | 163 | SK_SEQ_END, |
michael@0 | 164 | (value)SK_SEQ_END) |
michael@0 | 165 | } symbolic; |
michael@0 | 166 | } familySubClass; |
michael@0 | 167 | }; |
michael@0 | 168 | |
michael@0 | 169 | #pragma pack(pop) |
michael@0 | 170 | |
michael@0 | 171 | |
michael@0 | 172 | SK_COMPILE_ASSERT(sizeof(SkIBMFamilyClass) == 2, sizeof_SkIBMFamilyClass_not_2); |
michael@0 | 173 | |
michael@0 | 174 | #endif |