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

Side by Side Diff: Source/core/html/parser/HTMLEntityTable.h

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, 11 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) 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef HTMLEntityTable_h 26 #ifndef HTMLEntityTable_h
27 #define HTMLEntityTable_h 27 #define HTMLEntityTable_h
28 28
29 #include "wtf/text/WTFString.h" 29 #include "wtf/text/WTFString.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 struct HTMLEntityTableEntry { 33 struct HTMLEntityTableEntry {
34 UChar lastCharacter() const { return entity[length - 1]; } 34 LChar lastCharacter() const { return entity[length - 1]; }
35 35
36 const UChar* entity; 36 const LChar* entity;
37 int length; 37 int length;
38 UChar32 firstValue; 38 UChar32 firstValue;
39 UChar32 secondValue; 39 UChar32 secondValue;
40 }; 40 };
41 41
42 class HTMLEntityTable { 42 class HTMLEntityTable {
43 public: 43 public:
44 static const HTMLEntityTableEntry* firstEntry(); 44 static const HTMLEntityTableEntry* firstEntry();
45 static const HTMLEntityTableEntry* lastEntry(); 45 static const HTMLEntityTableEntry* lastEntry();
46 46
47 static const HTMLEntityTableEntry* firstEntryStartingWith(UChar); 47 static const HTMLEntityTableEntry* firstEntryStartingWith(UChar);
48 static const HTMLEntityTableEntry* lastEntryStartingWith(UChar); 48 static const HTMLEntityTableEntry* lastEntryStartingWith(UChar);
49 }; 49 };
50 50
51 } 51 }
52 52
53 #endif 53 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLEntityParser.cpp ('k') | Source/core/html/parser/create-html-entity-table » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698