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

Unified Diff: Source/core/html/parser/create-html-entity-table

Issue 120393003: HTMLEntityTable could use char to reduce binary size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: For review Created 6 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/parser/HTMLEntityTable.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/create-html-entity-table
diff --git a/Source/core/html/parser/create-html-entity-table b/Source/core/html/parser/create-html-entity-table
index 8c408fead9a5b1b929d26816683ef4b0c0ec478e..3b9ca45c58ce8b87b3234bb788702b7076cfb429 100755
--- a/Source/core/html/parser/create-html-entity-table
+++ b/Source/core/html/parser/create-html-entity-table
@@ -42,10 +42,6 @@ def convert_entity_to_cpp_name(entity):
return "%s%s" % (entity, postfix)
-def convert_entity_to_uchar_array(entity):
- return "{'%s'}" % "', '".join(entity)
-
-
def convert_value_to_int(value):
if not value:
return "0";
@@ -113,9 +109,7 @@ namespace {
""")
for entry in entries:
- output_file.write("static const UChar %s[] = %s;\n" % (
- convert_entity_to_cpp_name(entry[ENTITY]),
- convert_entity_to_uchar_array(entry[ENTITY])))
+ output_file.write("static const LChar %s[] = \"%s\";\n" % (convert_entity_to_cpp_name(entry[ENTITY]), entry[ENTITY]))
output_file.write("""
static const HTMLEntityTableEntry staticEntityTable[%s] = {\n""" % entity_count)
« no previous file with comments | « Source/core/html/parser/HTMLEntityTable.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698