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

Unified Diff: Source/core/html/parser/HTMLEntitySearch.cpp

Issue 199103002: Better storage of HTML entities. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
Index: Source/core/html/parser/HTMLEntitySearch.cpp
diff --git a/Source/core/html/parser/HTMLEntitySearch.cpp b/Source/core/html/parser/HTMLEntitySearch.cpp
index c4ef2b0c92f2bae7693be9036ab8a0693367824e..fe847e480384a41f536ccb2a8641f048f8d6e5c7 100644
--- a/Source/core/html/parser/HTMLEntitySearch.cpp
+++ b/Source/core/html/parser/HTMLEntitySearch.cpp
@@ -47,7 +47,8 @@ HTMLEntitySearch::CompareResult HTMLEntitySearch::compare(const HTMLEntityTableE
{
if (entry->length < m_currentLength + 1)
return Before;
- UChar entryNextCharacter = entry->entity[m_currentLength];
+ const LChar* entityString = HTMLEntityTable::entityString(*entry);
+ UChar entryNextCharacter = entityString[m_currentLength];
if (entryNextCharacter == nextCharacter)
return Prefix;
return entryNextCharacter < nextCharacter ? Before : After;

Powered by Google App Engine
This is Rietveld 408576698