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.
1 /*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
8 #ifndef SkOTTable_hhea_DEFINED
9 #define SkOTTable_hhea_DEFINED
11 #include "SkEndian.h"
12 #include "SkOTTableTypes.h"
13 #include "SkTypedEnum.h"
15 #pragma pack(push, 1)
17 struct SkOTTableHorizontalHeader {
18 static const SK_OT_CHAR TAG0 = 'h';
19 static const SK_OT_CHAR TAG1 = 'h';
20 static const SK_OT_CHAR TAG2 = 'e';
21 static const SK_OT_CHAR TAG3 = 'a';
22 static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableHorizontalHeader>::value;
24 SK_OT_Fixed version;
25 static const SK_OT_Fixed version1 = SkTEndian_SwapBE32(0x00010000);
26 SK_OT_FWORD Ascender;
27 SK_OT_FWORD Descender;
28 SK_OT_FWORD LineGap;
29 SK_OT_UFWORD advanceWidthMax;
30 SK_OT_FWORD minLeftSideBearing;
31 SK_OT_FWORD minRightSideBearing;
32 SK_OT_FWORD xMaxExtent;
33 SK_OT_SHORT caretSlopeRise;
34 SK_OT_SHORT caretSlopeRun;
35 SK_OT_SHORT caretOffset;
36 SK_OT_SHORT Reserved24;
37 SK_OT_SHORT Reserved26;
38 SK_OT_SHORT Reserved28;
39 SK_OT_SHORT Reserved30;
40 struct MetricDataFormat {
41 SK_TYPED_ENUM(Value, SK_OT_SHORT,
42 ((CurrentFormat, SkTEndian_SwapBE16(0)))
43 SK_SEQ_END,
44 (value)SK_SEQ_END)
45 } metricDataFormat;
46 SK_OT_USHORT numberOfHMetrics;
47 };
49 #pragma pack(pop)
52 #include <stddef.h>
53 SK_COMPILE_ASSERT(offsetof(SkOTTableHorizontalHeader, numberOfHMetrics) == 34, SkOTTableHorizontalHeader_numberOfHMetrics_not_at_34);
54 SK_COMPILE_ASSERT(sizeof(SkOTTableHorizontalHeader) == 36, sizeof_SkOTTableHorizontalHeader_not_36);
56 #endif