OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> | 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // would be \06de. See: https://www.w3.org/TR/css-syntax-3/#escaping | 56 // would be \06de. See: https://www.w3.org/TR/css-syntax-3/#escaping |
57 CSSEncodedEntitiesForUnencodables, | 57 CSSEncodedEntitiesForUnencodables, |
58 }; | 58 }; |
59 | 59 |
60 typedef char UnencodableReplacementArray[32]; | 60 typedef char UnencodableReplacementArray[32]; |
61 | 61 |
62 enum FlushBehavior { | 62 enum FlushBehavior { |
63 // More bytes are coming, don't flush the codec. | 63 // More bytes are coming, don't flush the codec. |
64 DoNotFlush = 0, | 64 DoNotFlush = 0, |
65 | 65 |
66 // A fetch has hit EOF. Some codecs handle fetches differently, for compat rea
sons. | 66 // A fetch has hit EOF. Some codecs handle fetches differently, for compat |
| 67 // reasons. |
67 FetchEOF, | 68 FetchEOF, |
68 | 69 |
69 // Do a full flush of the codec. | 70 // Do a full flush of the codec. |
70 DataEOF | 71 DataEOF |
71 }; | 72 }; |
72 | 73 |
73 static_assert(!DoNotFlush, "DoNotFlush should be falsy"); | 74 static_assert(!DoNotFlush, "DoNotFlush should be falsy"); |
74 static_assert(FetchEOF, "FetchEOF should be truthy"); | 75 static_assert(FetchEOF, "FetchEOF should be truthy"); |
75 static_assert(DataEOF, "DataEOF should be truthy"); | 76 static_assert(DataEOF, "DataEOF should be truthy"); |
76 | 77 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 *NewTextCodecFunction)(const TextEncoding&, const void* additionalData); | 112 *NewTextCodecFunction)(const TextEncoding&, const void* additionalData); |
112 typedef void (*TextCodecRegistrar)(const char* name, | 113 typedef void (*TextCodecRegistrar)(const char* name, |
113 NewTextCodecFunction, | 114 NewTextCodecFunction, |
114 const void* additionalData); | 115 const void* additionalData); |
115 | 116 |
116 } // namespace WTF | 117 } // namespace WTF |
117 | 118 |
118 using WTF::TextCodec; | 119 using WTF::TextCodec; |
119 | 120 |
120 #endif // TextCodec_h | 121 #endif // TextCodec_h |
OLD | NEW |