Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Document.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
| index d1a185e5527a3c99ea73004ace5e1bb2bd12e6ec..256b4146be9d1e0158699d2301e36b3a28673181 100644 |
| --- a/third_party/WebKit/Source/core/dom/Document.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp |
| @@ -1313,11 +1313,13 @@ static inline String canonicalizedTitle(Document* document, |
| // Replace control characters with spaces and collapse whitespace. |
| bool pendingWhitespace = false; |
| + const UChar lineTabulationCharacter = 0x0b; |
|
tkent
2016/11/08 03:57:15
Please use symbols defined in wtf/text/CharacterNa
|
| + const UChar spaceCharacter = 0x20; |
| + const UChar deleteCharacter = 0x7f; |
| for (unsigned i = 0; i < length; ++i) { |
| UChar32 c = characters[i]; |
| - if (c <= 0x20 || c == 0x7F || |
| - (WTF::Unicode::category(c) & |
| - (WTF::Unicode::Separator_Line | WTF::Unicode::Separator_Paragraph))) { |
| + if ((c <= spaceCharacter && c != lineTabulationCharacter) || |
| + c == deleteCharacter) { |
| if (builderIndex != 0) |
| pendingWhitespace = true; |
| } else { |