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

Side by Side Diff: Source/modules/indexeddb/IDBKeyPath.cpp

Issue 1119663002: Making Unicode character names consistent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase patch Created 5 years, 7 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
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.cpp ('k') | Source/platform/fonts/Character.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const uint32_t unicodeDigit = Number_DecimalDigit; 95 const uint32_t unicodeDigit = Number_DecimalDigit;
96 const uint32_t unicodeConnectorPunctuation = Punctuation_Connector; 96 const uint32_t unicodeConnectorPunctuation = Punctuation_Connector;
97 97
98 static inline bool isIdentifierStartCharacter(UChar c) 98 static inline bool isIdentifierStartCharacter(UChar c)
99 { 99 {
100 return (category(c) & unicodeLetter) || (c == '$') || (c == '_'); 100 return (category(c) & unicodeLetter) || (c == '$') || (c == '_');
101 } 101 }
102 102
103 static inline bool isIdentifierCharacter(UChar c) 103 static inline bool isIdentifierCharacter(UChar c)
104 { 104 {
105 return (category(c) & (unicodeLetter | unicodeCombiningMark | unicodeDigit | unicodeConnectorPunctuation)) || (c == '$') || (c == '_') || (c == zeroWidthNon Joiner) || (c == zeroWidthJoiner); 105 return (category(c) & (unicodeLetter | unicodeCombiningMark | unicodeDigit | unicodeConnectorPunctuation)) || (c == '$') || (c == '_') || (c == zeroWidthNon JoinerCharacter) || (c == zeroWidthJoinerCharacter);
106 } 106 }
107 107
108 } // namespace 108 } // namespace
109 109
110 IDBKeyPathLexer::TokenType IDBKeyPathLexer::lexIdentifier(String& element) 110 IDBKeyPathLexer::TokenType IDBKeyPathLexer::lexIdentifier(String& element)
111 { 111 {
112 unsigned start = m_index; 112 unsigned start = m_index;
113 if (m_index < m_length && isIdentifierStartCharacter(m_string[m_index])) 113 if (m_index < m_length && isIdentifierStartCharacter(m_string[m_index]))
114 ++m_index; 114 ++m_index;
115 else 115 else
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 case StringType: 297 case StringType:
298 return m_string == other.m_string; 298 return m_string == other.m_string;
299 case ArrayType: 299 case ArrayType:
300 return m_array == other.m_array; 300 return m_array == other.m_array;
301 } 301 }
302 ASSERT_NOT_REACHED(); 302 ASSERT_NOT_REACHED();
303 return false; 303 return false;
304 } 304 }
305 305
306 } // namespace blink 306 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.cpp ('k') | Source/platform/fonts/Character.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698