Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Side by Side Diff: Source/wtf/text/TextCodec.h

Issue 19845004: Do not normalize into NFC the values of form fields (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 21 matching lines...) Expand all
32 #include "wtf/Noncopyable.h" 32 #include "wtf/Noncopyable.h"
33 #include "wtf/PassOwnPtr.h" 33 #include "wtf/PassOwnPtr.h"
34 #include "wtf/Vector.h" 34 #include "wtf/Vector.h"
35 #include "wtf/text/WTFString.h" 35 #include "wtf/text/WTFString.h"
36 #include "wtf/unicode/Unicode.h" 36 #include "wtf/unicode/Unicode.h"
37 37
38 namespace WTF { 38 namespace WTF {
39 39
40 class TextEncoding; 40 class TextEncoding;
41 41
42 // Which normalization algorithm to apply.
43 enum NormalizationMode {
44 // No normalization is performed.
45 NoNormalization,
46
47 // Apply Unicode NFC normalization.
48 NFCNormalization
49 };
50
42 // Specifies what will happen when a character is encountered that is 51 // Specifies what will happen when a character is encountered that is
43 // not encodable in the character set. 52 // not encodable in the character set.
44 enum UnencodableHandling { 53 enum UnencodableHandling {
45 // Substitutes the replacement character "?". 54 // Substitutes the replacement character "?".
46 QuestionMarksForUnencodables, 55 QuestionMarksForUnencodables,
47 56
48 // Encodes the character as an XML entity. For example, U+06DE 57 // Encodes the character as an XML entity. For example, U+06DE
49 // would be "&#1758;" (0x6DE = 1758 in octal). 58 // would be "&#1758;" (0x6DE = 1758 in octal).
50 EntitiesForUnencodables, 59 EntitiesForUnencodables,
51 60
(...skipping 30 matching lines...) Expand all
82 typedef void (*EncodingNameRegistrar)(const char* alias, const char* name); 91 typedef void (*EncodingNameRegistrar)(const char* alias, const char* name);
83 92
84 typedef PassOwnPtr<TextCodec> (*NewTextCodecFunction)(const TextEncoding&, const void* additionalData); 93 typedef PassOwnPtr<TextCodec> (*NewTextCodecFunction)(const TextEncoding&, const void* additionalData);
85 typedef void (*TextCodecRegistrar)(const char* name, NewTextCodecFunction, const void* additionalData); 94 typedef void (*TextCodecRegistrar)(const char* name, NewTextCodecFunction, const void* additionalData);
86 95
87 } // namespace WTF 96 } // namespace WTF
88 97
89 using WTF::TextCodec; 98 using WTF::TextCodec;
90 99
91 #endif // TextCodec_h 100 #endif // TextCodec_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698