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 | ******************************************************************************* |
michael@0 | 3 | * Copyright (C) 2000-2011, International Business Machines |
michael@0 | 4 | * Corporation and others. All Rights Reserved. |
michael@0 | 5 | ******************************************************************************* |
michael@0 | 6 | * file name: ucol_data.h |
michael@0 | 7 | * encoding: US-ASCII |
michael@0 | 8 | * tab size: 8 (not used) |
michael@0 | 9 | * indentation:4 |
michael@0 | 10 | * |
michael@0 | 11 | * created on: 2011jul02 |
michael@0 | 12 | * created by: Markus Scherer |
michael@0 | 13 | * |
michael@0 | 14 | * Private implementation header for C/C++ collation. |
michael@0 | 15 | * Some file data structure definitions were moved here from i18n/ucol_imp.h |
michael@0 | 16 | * so that the common library (via ucol_swp.cpp) need not depend on the i18n library at all. |
michael@0 | 17 | * |
michael@0 | 18 | * We do not want to move the collation swapper to the i18n library because |
michael@0 | 19 | * a) the resource bundle swapper depends on it and would have to move too, and |
michael@0 | 20 | * b) we might want to eventually implement runtime data swapping, |
michael@0 | 21 | * which might (or might not) be easier if all swappers are in the common library. |
michael@0 | 22 | */ |
michael@0 | 23 | |
michael@0 | 24 | #ifndef __UCOL_DATA_H__ |
michael@0 | 25 | #define __UCOL_DATA_H__ |
michael@0 | 26 | |
michael@0 | 27 | #include "unicode/utypes.h" |
michael@0 | 28 | |
michael@0 | 29 | #if !UCONFIG_NO_COLLATION |
michael@0 | 30 | |
michael@0 | 31 | /* let us know whether reserved fields are reset to zero or junked */ |
michael@0 | 32 | #define UCOL_HEADER_MAGIC 0x20030618 |
michael@0 | 33 | |
michael@0 | 34 | typedef struct { |
michael@0 | 35 | int32_t size; |
michael@0 | 36 | /* all the offsets are in bytes */ |
michael@0 | 37 | /* to get the address add to the header address and cast properly */ |
michael@0 | 38 | uint32_t options; /* these are the default options for the collator */ |
michael@0 | 39 | uint32_t UCAConsts; /* structure which holds values for indirect positioning and implicit ranges */ |
michael@0 | 40 | uint32_t contractionUCACombos; /* this one is needed only for UCA, to copy the appropriate contractions */ |
michael@0 | 41 | uint32_t magic; /* magic number - lets us know whether reserved data is reset or junked */ |
michael@0 | 42 | uint32_t mappingPosition; /* const uint8_t *mappingPosition; */ |
michael@0 | 43 | uint32_t expansion; /* uint32_t *expansion; */ |
michael@0 | 44 | uint32_t contractionIndex; /* UChar *contractionIndex; */ |
michael@0 | 45 | uint32_t contractionCEs; /* uint32_t *contractionCEs; */ |
michael@0 | 46 | uint32_t contractionSize; /* needed for various closures */ |
michael@0 | 47 | /*int32_t latinOneMapping;*/ /* this is now handled in the trie itself *//* fast track to latin1 chars */ |
michael@0 | 48 | |
michael@0 | 49 | uint32_t endExpansionCE; /* array of last collation element in |
michael@0 | 50 | expansion */ |
michael@0 | 51 | uint32_t expansionCESize; /* array of maximum expansion size |
michael@0 | 52 | corresponding to the expansion |
michael@0 | 53 | collation elements with last element |
michael@0 | 54 | in endExpansionCE*/ |
michael@0 | 55 | int32_t endExpansionCECount; /* size of endExpansionCE */ |
michael@0 | 56 | uint32_t unsafeCP; /* hash table of unsafe code points */ |
michael@0 | 57 | uint32_t contrEndCP; /* hash table of final code points */ |
michael@0 | 58 | /* in contractions. */ |
michael@0 | 59 | |
michael@0 | 60 | int32_t contractionUCACombosSize; /* number of UCA contraction items. */ |
michael@0 | 61 | /*Length is contractionUCACombosSize*contractionUCACombosWidth*sizeof(UChar) */ |
michael@0 | 62 | UBool jamoSpecial; /* is jamoSpecial */ |
michael@0 | 63 | UBool isBigEndian; /* is this data big endian? from the UDataInfo header*/ |
michael@0 | 64 | uint8_t charSetFamily; /* what is the charset family of this data from the UDataInfo header*/ |
michael@0 | 65 | uint8_t contractionUCACombosWidth; /* width of UCA combos field */ |
michael@0 | 66 | UVersionInfo version; |
michael@0 | 67 | UVersionInfo UCAVersion; /* version of the UCA, read from file */ |
michael@0 | 68 | UVersionInfo UCDVersion; /* UCD version, obtained by u_getUnicodeVersion */ |
michael@0 | 69 | UVersionInfo formatVersion; /* format version from the UDataInfo header */ |
michael@0 | 70 | uint32_t scriptToLeadByte; /* offset to script to lead collation byte mapping data */ |
michael@0 | 71 | uint32_t leadByteToScript; /* offset to lead collation byte to script mapping data */ |
michael@0 | 72 | uint8_t reserved[76]; /* for future use */ |
michael@0 | 73 | } UCATableHeader; |
michael@0 | 74 | |
michael@0 | 75 | typedef struct { |
michael@0 | 76 | uint32_t byteSize; |
michael@0 | 77 | uint32_t tableSize; |
michael@0 | 78 | uint32_t contsSize; |
michael@0 | 79 | uint32_t table; |
michael@0 | 80 | uint32_t conts; |
michael@0 | 81 | UVersionInfo UCAVersion; /* version of the UCA, read from file */ |
michael@0 | 82 | uint8_t padding[8]; |
michael@0 | 83 | } InverseUCATableHeader; |
michael@0 | 84 | |
michael@0 | 85 | #endif /* !UCONFIG_NO_COLLATION */ |
michael@0 | 86 | |
michael@0 | 87 | #endif /* __UCOL_DATA_H__ */ |