gfx/skia/trunk/src/sfnt/SkOTTable_post.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.

     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_post_DEFINED
     9 #define SkOTTable_post_DEFINED
    11 #include "SkEndian.h"
    12 #include "SkOTTableTypes.h"
    13 #include "SkTypedEnum.h"
    15 #pragma pack(push, 1)
    17 struct SkOTTablePostScript {
    18     static const SK_OT_CHAR TAG0 = 'p';
    19     static const SK_OT_CHAR TAG1 = 'o';
    20     static const SK_OT_CHAR TAG2 = 's';
    21     static const SK_OT_CHAR TAG3 = 't';
    22     static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTablePostScript>::value;
    24     struct Format {
    25         SK_TYPED_ENUM(Value, SK_OT_Fixed,
    26             ((version1, SkTEndian_SwapBE32(0x00010000)))
    27             ((version2, SkTEndian_SwapBE32(0x00020000)))
    28             ((version2_5, SkTEndian_SwapBE32(0x00025000)))
    29             ((version3, SkTEndian_SwapBE32(0x00030000)))
    30             ((version4, SkTEndian_SwapBE32(0x00040000)))
    31             SK_SEQ_END,
    32         SK_SEQ_END)
    33         SK_OT_Fixed value;
    34     } format;
    35     SK_OT_Fixed italicAngle;
    36     SK_OT_FWORD underlinePosition;
    37     SK_OT_FWORD underlineThickness;
    38     SK_OT_ULONG isFixedPitch;
    39     SK_OT_ULONG minMemType42;
    40     SK_OT_ULONG maxMemType42;
    41     SK_OT_ULONG minMemType1;
    42     SK_OT_ULONG maxMemType1;
    43 };
    45 #pragma pack(pop)
    48 #include <stddef.h>
    49 SK_COMPILE_ASSERT(offsetof(SkOTTablePostScript, maxMemType1) == 28, SkOTTablePostScript_maxMemType1_not_at_28);
    50 SK_COMPILE_ASSERT(sizeof(SkOTTablePostScript) == 32, sizeof_SkOTTablePostScript_not_32);
    52 #endif

mercurial