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

Side by Side Diff: third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp

Issue 1916013004: Implement PotentialCustomElementName (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tkent review Created 4 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 | « third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(kojii): This file is compiled with $host_toolchain, which cannot find 5 // TODO(kojii): This file is compiled with $host_toolchain, which cannot find
6 // include files in platform/fonts. The build scripts should include this 6 // include files in platform/fonts. The build scripts should include this
7 // directory, and fix these #include's to "platform/fonts/...". 7 // directory, and fix these #include's to "platform/fonts/...".
8 #include "CharacterPropertyDataGenerator.h" 8 #include "CharacterPropertyDataGenerator.h"
9 9
10 #include "CharacterProperty.h" 10 #include "CharacterProperty.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 memset(values, 0, sizeof(CharacterProperty) * size); 77 memset(values, 0, sizeof(CharacterProperty) * size);
78 78
79 #define SET(name) \ 79 #define SET(name) \
80 setRanges(values, name##Ranges, ARRAY_LENGTH(name##Ranges), \ 80 setRanges(values, name##Ranges, ARRAY_LENGTH(name##Ranges), \
81 CharacterProperty::name); \ 81 CharacterProperty::name); \
82 setValues(values, name##Array, ARRAY_LENGTH(name##Array), \ 82 setValues(values, name##Array, ARRAY_LENGTH(name##Array), \
83 CharacterProperty::name); 83 CharacterProperty::name);
84 84
85 SET(isCJKIdeographOrSymbol); 85 SET(isCJKIdeographOrSymbol);
86 SET(isUprightInMixedVertical); 86 SET(isUprightInMixedVertical);
87 SET(isPotentialCustomElementNameChar);
87 88
88 // Create a trie from the value array. 89 // Create a trie from the value array.
89 UErrorCode error = U_ZERO_ERROR; 90 UErrorCode error = U_ZERO_ERROR;
90 UTrie2* trie = utrie2_open(0, 0, &error); 91 UTrie2* trie = utrie2_open(0, 0, &error);
91 assert(error == U_ZERO_ERROR); 92 assert(error == U_ZERO_ERROR);
92 UChar32 start = 0; 93 UChar32 start = 0;
93 CharacterProperty value = values[0]; 94 CharacterProperty value = values[0];
94 for (UChar32 c = 1;; c++) { 95 for (UChar32 c = 1;; c++) {
95 if (c < size && values[c] == value) 96 if (c < size && values[c] == value)
96 continue; 97 continue;
(...skipping 30 matching lines...) Expand all
127 if (argc <= 1) { 128 if (argc <= 1) {
128 generate(stdout); 129 generate(stdout);
129 } else { 130 } else {
130 FILE* fp = fopen(argv[1], "wb"); 131 FILE* fp = fopen(argv[1], "wb");
131 generate(fp); 132 generate(fp);
132 fclose(fp); 133 fclose(fp);
133 } 134 }
134 135
135 return 0; 136 return 0;
136 } 137 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698