Commit 68b0376e authored by eric@webkit.org's avatar eric@webkit.org

2010-08-12 Adam Barth <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Add support for MathML entities
        https://bugs.webkit.org/show_bug.cgi?id=43949

        Test progression for proper entity support.

        * html5lib/runner-expected-html5.txt:
        * html5lib/runner-expected.txt:
2010-08-09  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Add support for MathML entities
        https://bugs.webkit.org/show_bug.cgi?id=43949

        Implementing the HTML5 entity parsing algorithm require refactoring how
        we search for entity names.  Instead of using a perfect hash, we now
        use a sorted list.  As we advance through the input, we walk down a
        binary search of the table looking for an entity.

        Using this data structure lets us keep track of whether the current
        string is a prefix of an existing entity, which we need for the
        algorithm.  In a future patch, I plan to add some indices to the
        table, which should let us narrow down the range of interesting entries
        more quickly.

        The one nasty piece of the algorithm is if we walk too far down the
        input and we need to back up to a previous match.  In this patch, we
        accomplish this by rewinding the input and consuming a known number of
        characters to resync the source.

        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLEntityParser.cpp:
        (WebCore::consumeHTMLEntity):
        * html/HTMLEntitySearch.cpp: Added.
        (WebCore::):
        (WebCore::HTMLEntitySearch::HTMLEntitySearch):
        (WebCore::HTMLEntitySearch::compare):
        (WebCore::HTMLEntitySearch::findStart):
        (WebCore::HTMLEntitySearch::findEnd):
        (WebCore::HTMLEntitySearch::advance):
        * html/HTMLEntitySearch.h: Added.
        (WebCore::HTMLEntitySearch::isEntityPrefix):
        (WebCore::HTMLEntitySearch::currentValue):
        (WebCore::HTMLEntitySearch::lastMatch):
        (WebCore::HTMLEntitySearch::):
        (WebCore::HTMLEntitySearch::fail):
        * html/HTMLEntityTable.h: Added.
        (WebCore::HTMLEntityTableEntry::lastCharacter):
2010-08-12  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Add support for MathML entities
        https://bugs.webkit.org/show_bug.cgi?id=43949

        A script for generating the C++ state data structure describing all the
        entities from a JSON description.

        * Scripts/create-html-entity-table: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fd7d08f7
2010-08-12 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add support for MathML entities
https://bugs.webkit.org/show_bug.cgi?id=43949
Test progression for proper entity support.
* html5lib/runner-expected-html5.txt:
* html5lib/runner-expected.txt:
2010-08-13 Mihai Parparita <mihaip@chromium.org>
Reviewed by Dimitri Glazkov.
......@@ -118,92 +118,10 @@ resources/doctype01.dat: PASS
resources/scriptdata01.dat: PASS
resources/html5test-com.dat:
7
9
10
11
Test 7 of 24 in resources/html5test-com.dat failed. Input:
&lang;&rang;
Got:
| <html>
| <head>
| <body>
| "〈〉"
Expected:
| <html>
| <head>
| <body>
| "⟨⟩"
Test 9 of 24 in resources/html5test-com.dat failed. Input:
&ImaginaryI;
Got:
| <html>
| <head>
| <body>
| "&ImaginaryI;"
Expected:
| <html>
| <head>
| <body>
| "ⅈ"
Test 10 of 24 in resources/html5test-com.dat failed. Input:
&Kopf;
Got:
| <html>
| <head>
| <body>
| "&Kopf;"
Expected:
| <html>
| <head>
| <body>
| "𝕂"
resources/html5test-com.dat: PASS
Test 11 of 24 in resources/html5test-com.dat failed. Input:
&notinva;
Got:
| <html>
| <head>
| <body>
| "&notinva;"
Expected:
| <html>
| <head>
| <body>
| "∉"
resources/entities01.dat:
2
5
Test 2 of 68 in resources/entities01.dat failed. Input:
FOO&gtBAR
Got:
| <html>
| <head>
| <body>
| "FOO&gtBAR"
Expected:
| <html>
| <head>
| <body>
| "FOO>BAR"
resources/entities01.dat: PASS
Test 5 of 68 in resources/entities01.dat failed. Input:
I'm &notit; I tell you
Got:
| <html>
| <head>
| <body>
| "I'm &notit; I tell you"
Expected:
| <html>
| <head>
| <body>
| "I'm ¬it; I tell you"
resources/entities02.dat: PASS
resources/comments01.dat: PASS
......
......@@ -191,92 +191,10 @@ resources/doctype01.dat: PASS
resources/scriptdata01.dat: PASS
resources/html5test-com.dat:
7
9
10
11
Test 7 of 24 in resources/html5test-com.dat failed. Input:
&lang;&rang;
Got:
| <html>
| <head>
| <body>
| "〈〉"
Expected:
| <html>
| <head>
| <body>
| "⟨⟩"
Test 9 of 24 in resources/html5test-com.dat failed. Input:
&ImaginaryI;
Got:
| <html>
| <head>
| <body>
| "&ImaginaryI;"
Expected:
| <html>
| <head>
| <body>
| "ⅈ"
Test 10 of 24 in resources/html5test-com.dat failed. Input:
&Kopf;
Got:
| <html>
| <head>
| <body>
| "&Kopf;"
Expected:
| <html>
| <head>
| <body>
| "𝕂"
resources/html5test-com.dat: PASS
Test 11 of 24 in resources/html5test-com.dat failed. Input:
&notinva;
Got:
| <html>
| <head>
| <body>
| "&notinva;"
Expected:
| <html>
| <head>
| <body>
| "∉"
resources/entities01.dat:
2
5
resources/entities01.dat: PASS
Test 2 of 68 in resources/entities01.dat failed. Input:
FOO&gtBAR
Got:
| <html>
| <head>
| <body>
| "FOO&gtBAR"
Expected:
| <html>
| <head>
| <body>
| "FOO>BAR"
Test 5 of 68 in resources/entities01.dat failed. Input:
I'm &notit; I tell you
Got:
| <html>
| <head>
| <body>
| "I'm &notit; I tell you"
Expected:
| <html>
| <head>
| <body>
| "I'm ¬it; I tell you"
resources/entities02.dat: PASS
resources/comments01.dat: PASS
......
......@@ -971,6 +971,7 @@ SET(WebCore_SOURCES
html/HTMLDocument.cpp
html/HTMLElement.cpp
html/HTMLElementStack.cpp
html/HTMLEntitySearch.cpp
html/HTMLEmbedElement.cpp
html/HTMLFieldSetElement.cpp
html/HTMLFormattingElementList.cpp
......
2010-08-09 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add support for MathML entities
https://bugs.webkit.org/show_bug.cgi?id=43949
Implementing the HTML5 entity parsing algorithm require refactoring how
we search for entity names. Instead of using a perfect hash, we now
use a sorted list. As we advance through the input, we walk down a
binary search of the table looking for an entity.
Using this data structure lets us keep track of whether the current
string is a prefix of an existing entity, which we need for the
algorithm. In a future patch, I plan to add some indices to the
table, which should let us narrow down the range of interesting entries
more quickly.
The one nasty piece of the algorithm is if we walk too far down the
input and we need to back up to a previous match. In this patch, we
accomplish this by rewinding the input and consuming a known number of
characters to resync the source.
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLEntityParser.cpp:
(WebCore::consumeHTMLEntity):
* html/HTMLEntitySearch.cpp: Added.
(WebCore::):
(WebCore::HTMLEntitySearch::HTMLEntitySearch):
(WebCore::HTMLEntitySearch::compare):
(WebCore::HTMLEntitySearch::findStart):
(WebCore::HTMLEntitySearch::findEnd):
(WebCore::HTMLEntitySearch::advance):
* html/HTMLEntitySearch.h: Added.
(WebCore::HTMLEntitySearch::isEntityPrefix):
(WebCore::HTMLEntitySearch::currentValue):
(WebCore::HTMLEntitySearch::lastMatch):
(WebCore::HTMLEntitySearch::):
(WebCore::HTMLEntitySearch::fail):
* html/HTMLEntityTable.h: Added.
(WebCore::HTMLEntityTableEntry::lastCharacter):
2010-08-13 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Eric Seidel.
......@@ -505,7 +505,7 @@ all : \
ColorData.cpp \
DocTypeStrings.cpp \
HTMLElementFactory.cpp \
HTMLEntityNames.cpp \
HTMLEntityTable.cpp \
HTMLNames.cpp \
WMLElementFactory.cpp \
WMLNames.cpp \
......@@ -600,8 +600,8 @@ DocTypeStrings.cpp : html/DocTypeStrings.gperf $(WebCore)/make-hash-tools.pl
# HTML entity names
HTMLEntityNames.cpp : html/HTMLEntityNames.gperf $(WebCore)/make-hash-tools.pl
perl $(WebCore)/make-hash-tools.pl . $(WebCore)/html/HTMLEntityNames.gperf
HTMLEntityTable.cpp : html/HTMLEntityNames.json $(WebCore)/../WebKitTools/Scripts/create-html-entity-table
python $(WebCore)/../WebKitTools/Scripts/create-html-entity-table -o HTMLEntityTable.cpp $(WebCore)/html/HTMLEntityNames.json
# --------
......
......@@ -92,7 +92,7 @@ webcore_built_sources += \
DerivedSources/WebCore/CSSValueKeywords.h \
DerivedSources/WebCore/HTMLElementFactory.cpp \
DerivedSources/WebCore/HTMLElementFactory.h \
DerivedSources/WebCore/HTMLEntityNames.cpp \
DerivedSources/WebCore/HTMLEntityTable.cpp \
DerivedSources/WebCore/HTMLNames.cpp \
DerivedSources/WebCore/HTMLNames.h \
DerivedSources/WebCore/InspectorBackendDispatcher.cpp \
......@@ -1427,6 +1427,8 @@ webcore_sources += \
WebCore/html/HTMLElement.h \
WebCore/html/HTMLElementStack.cpp \
WebCore/html/HTMLElementStack.h \
WebCore/html/HTMLEntitySearch.cpp \
WebCore/html/HTMLEntitySearch.h \
WebCore/html/HTMLEmbedElement.cpp \
WebCore/html/HTMLEmbedElement.h \
WebCore/html/HTMLFieldSetElement.cpp \
......@@ -4395,8 +4397,8 @@ DerivedSources/WebCore/DocTypeStrings.cpp : $(WebCore)/html/DocTypeStrings.gperf
$(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES_WEBCORE) $(WebCore)/html/DocTypeStrings.gperf
# HTML entity names
DerivedSources/WebCore/HTMLEntityNames.cpp : $(WebCore)/html/HTMLEntityNames.gperf $(WebCore)/make-hash-tools.pl
$(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES_WEBCORE) $(WebCore)/html/HTMLEntityNames.gperf
DerivedSources/WebCore/HTMLEntityTable.cpp : $(WebCore)/html/HTMLEntityNames.json $(WebCore)/../WebKitTools/Scripts/create-html-entity-table
$(PYTHON) $(WebCore)/../WebKitTools/Scripts/create-html-entity-table -o $(GENSOURCES_WEBCORE)/HTMLEntityTable.cpp $(WebCore)/html/HTMLEntityNames.json
# color names
DerivedSources/WebCore/ColorData.cpp: $(WebCore)/platform/ColorData.gperf $(WebCore)/make-hash-tools.pl
......
......@@ -276,9 +276,11 @@
# gperf rule
'../html/DocTypeStrings.gperf',
'../html/HTMLEntityNames.gperf',
'../platform/ColorData.gperf',
# json rule
'../html/HTMLEntityNames.json',
# idl rules
'<@(bindings_idl_files)',
],
......@@ -598,7 +600,7 @@
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
],
'dependencies': [
'inputs': [
'../make-hash-tools.pl',
],
'action': [
......@@ -609,6 +611,26 @@
],
'process_outputs_as_sources': 0,
},
{
'rule_name': 'json',
'extension': 'json',
#
# json outputs are generated by WebKitTools/Scripts/create-html-entity-table
#
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
],
'inputs': [
'../../WebKitTools/Scripts/create-html-entity-table',
],
'action': [
'python',
'../../WebKitTools/Scripts/create-html-entity-table',
'-o',
'<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
'<(RULE_INPUT_PATH)',
],
},
# Rule to build generated JavaScript (V8) bindings from .idl source.
{
'rule_name': 'binding',
......
......@@ -1588,6 +1588,8 @@
'html/HTMLElement.h',
'html/HTMLElementStack.cpp',
'html/HTMLElementStack.h',
'html/HTMLEntitySearch.cpp',
'html/HTMLEntitySearch.h',
'html/HTMLEmbedElement.cpp',
'html/HTMLEmbedElement.h',
'html/HTMLFieldSetElement.cpp',
......
......@@ -29,7 +29,7 @@ XML_NAMES = $$PWD/xml/xmlattrs.in
XMLNS_NAMES = $$PWD/xml/xmlnsattrs.in
ENTITIES_GPERF = $$PWD/html/HTMLEntityNames.gperf
HTML_ENTITIES = $$PWD/html/HTMLEntityNames.json
COLORDATA_GPERF = $$PWD/platform/ColorData.gperf
......@@ -590,12 +590,12 @@ xmlnames.commands = perl -I$$PWD/bindings/scripts $$xmlnames.wkScript --attrs $$
addExtraCompiler(xmlnames)
# GENERATOR 8-A:
entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.cpp
entities.input = ENTITIES_GPERF
entities.wkScript = $$PWD/make-hash-tools.pl
entities.commands = perl $$entities.wkScript $${WC_GENERATED_SOURCES_DIR} $$ENTITIES_GPERF
entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityTable.cpp
entities.input = HTML_ENTITIES
entities.wkScript = $$PWD/../WebKitTools/Scripts/create-html-entity-table
entities.commands = python $$entities.wkScript -o $${WC_GENERATED_SOURCES_DIR}/HTMLEntityTable.cpp $$HTML_ENTITIES
entities.clean = ${QMAKE_FILE_OUT}
entities.depends = $$PWD/make-hash-tools.pl
entities.depends = $$PWD/../WebKitTools/Scripts/create-html-entity-table
addExtraCompiler(entities)
# GENERATOR 8-B:
......
......@@ -671,6 +671,7 @@ SOURCES += \
html/HTMLDocument.cpp \
html/HTMLElement.cpp \
html/HTMLElementStack.cpp \
html/HTMLEntitySearch.cpp \
html/HTMLEmbedElement.cpp \
html/HTMLFieldSetElement.cpp \
html/HTMLFontElement.cpp \
......
......@@ -37636,6 +37636,14 @@
RelativePath="..\html\HTMLElementStack.h"
>
</File>
<File
RelativePath="..\html\HTMLEntitySearch.cpp"
>
</File>
<File
RelativePath="..\html\HTMLEntitySearch.h"
>
</File>
<File
RelativePath="..\html\HTMLEmbedElement.cpp"
>
......@@ -3183,6 +3183,9 @@
A8A564A611DC0E59003AC2F0 /* HTMLFormattingElementList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A564A411DC0E59003AC2F0 /* HTMLFormattingElementList.cpp */; };
A8A909AC0CBCD6B50029B807 /* RenderSVGTransformableContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A909AA0CBCD6B50029B807 /* RenderSVGTransformableContainer.h */; };
A8A909AD0CBCD6B50029B807 /* RenderSVGTransformableContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A909AB0CBCD6B50029B807 /* RenderSVGTransformableContainer.cpp */; };
A8BC044E1214EB2A00B5F122 /* HTMLEntitySearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 970C4FDF1211266200C3D393 /* HTMLEntitySearch.cpp */; };
A8BC044F1214EB2B00B5F122 /* HTMLEntitySearch.h in Headers */ = {isa = PBXBuildFile; fileRef = 970C4FE01211266200C3D393 /* HTMLEntitySearch.h */; };
A8BC04921214F69600B5F122 /* HTMLEntityTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8BC04911214F69600B5F122 /* HTMLEntityTable.cpp */; };
A8BCFD05120A046100B5F122 /* SVGPathSeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8BCFD04120A046100B5F122 /* SVGPathSeg.cpp */; };
A8C2280E11D4A59700D5A7D3 /* DocumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C2280D11D4A59700D5A7D3 /* DocumentParser.cpp */; };
A8C228A111D5722E00D5A7D3 /* DecodedDataDocumentParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C2289F11D5722E00D5A7D3 /* DecodedDataDocumentParser.h */; };
......@@ -8480,6 +8483,10 @@
97059974107D975200A50A7C /* PolicyCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyCallback.h; sourceTree = "<group>"; };
97059975107D975200A50A7C /* PolicyChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolicyChecker.cpp; sourceTree = "<group>"; };
97059976107D975200A50A7C /* PolicyChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyChecker.h; sourceTree = "<group>"; };
970C4FDF1211266200C3D393 /* HTMLEntitySearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLEntitySearch.cpp; sourceTree = "<group>"; };
970C4FE01211266200C3D393 /* HTMLEntitySearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLEntitySearch.h; sourceTree = "<group>"; };
970C4FE11211266200C3D393 /* HTMLEntityTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLEntityTable.cpp; sourceTree = "<group>"; };
970C4FE21211266200C3D393 /* HTMLEntityTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLEntityTable.h; sourceTree = "<group>"; };
9719AEFF11D09F2C00D45831 /* HTMLInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLInputStream.h; sourceTree = "<group>"; };
9738899E116EA9DC00ADF313 /* DocumentWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentWriter.cpp; sourceTree = "<group>"; };
9738899F116EA9DC00ADF313 /* DocumentWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentWriter.h; sourceTree = "<group>"; };
......@@ -8865,6 +8872,7 @@
A8A564A411DC0E59003AC2F0 /* HTMLFormattingElementList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFormattingElementList.cpp; sourceTree = "<group>"; };
A8A909AA0CBCD6B50029B807 /* RenderSVGTransformableContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGTransformableContainer.h; sourceTree = "<group>"; };
A8A909AB0CBCD6B50029B807 /* RenderSVGTransformableContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGTransformableContainer.cpp; sourceTree = "<group>"; };
A8BC04911214F69600B5F122 /* HTMLEntityTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLEntityTable.cpp; sourceTree = "<group>"; };
A8BCFD04120A046100B5F122 /* SVGPathSeg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathSeg.cpp; sourceTree = "<group>"; };
A8C2280D11D4A59700D5A7D3 /* DocumentParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentParser.cpp; sourceTree = "<group>"; };
A8C2289F11D5722E00D5A7D3 /* DecodedDataDocumentParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DecodedDataDocumentParser.h; sourceTree = "<group>"; };
......@@ -10945,7 +10953,6 @@
E1FF57A50F01256B00891EBB /* ThreadGlobalData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadGlobalData.cpp; sourceTree = "<group>"; };
E406F3FA1198304D009D59D6 /* DocTypeStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocTypeStrings.cpp; sourceTree = "<group>"; };
E406F3FB1198307D009D59D6 /* ColorData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ColorData.cpp; sourceTree = "<group>"; };
E406F4021198329A009D59D6 /* HTMLEntityNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLEntityNames.cpp; sourceTree = "<group>"; };
E415F10C0D9A05870033CE97 /* ElementTimeControl.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ElementTimeControl.idl; sourceTree = "<group>"; };
E415F1680D9A165D0033CE97 /* DOMElementTimeControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMElementTimeControl.h; sourceTree = "<group>"; };
E415F1830D9A1A830033CE97 /* ElementTimeControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementTimeControl.h; sourceTree = "<group>"; };
......@@ -12292,7 +12299,7 @@
E406F3FA1198304D009D59D6 /* DocTypeStrings.cpp */,
A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */,
A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */,
E406F4021198329A009D59D6 /* HTMLEntityNames.cpp */,
A8BC04911214F69600B5F122 /* HTMLEntityTable.cpp */,
A8D06B380A265DCD005E7203 /* HTMLNames.cpp */,
A8D06B370A265DCD005E7203 /* HTMLNames.h */,
938E65F609F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp */,
......@@ -13990,6 +13997,10 @@
859128790AB222EC00202265 /* HTMLEmbedElement.idl */,
976E895E11C0CA3A00EA9CA9 /* HTMLEntityParser.cpp */,
976E895F11C0CA3A00EA9CA9 /* HTMLEntityParser.h */,
970C4FDF1211266200C3D393 /* HTMLEntitySearch.cpp */,
970C4FE01211266200C3D393 /* HTMLEntitySearch.h */,
970C4FE11211266200C3D393 /* HTMLEntityTable.cpp */,
970C4FE21211266200C3D393 /* HTMLEntityTable.h */,
A81369B9097374F500D74463 /* HTMLFieldSetElement.cpp */,
A81369B8097374F500D74463 /* HTMLFieldSetElement.h */,
1AE2A9F40A1CDA5700B42B25 /* HTMLFieldSetElement.idl */,
......@@ -20163,6 +20174,7 @@
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */,
2EED57FE1214A9C2007656BB /* ThreadableBlobRegistry.h in Headers */,
A8BC044F1214EB2B00B5F122 /* HTMLEntitySearch.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -22590,6 +22602,8 @@
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
2EED57FD1214A9C2007656BB /* ThreadableBlobRegistry.cpp in Sources */,
A8BC044E1214EB2A00B5F122 /* HTMLEntitySearch.cpp in Sources */,
A8BC04921214F69600B5F122 /* HTMLEntityTable.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
%{
/*
Copyright (C) 1999 Lars Knoll (knoll@mpi-hd.mpg.de)
Copyright (C) 2002, 2003, 2004, 2005 Apple Inc. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
----------------------------------------------------------------------------
HTMLEntityNames.gperf: input file to generate a hash table for entities
HTMLEntityNames.cpp: DO NOT EDIT! generated by WebCore/make-hash-tools.pl
*/
%}
%struct-type
struct Entity {
const char *name;
int code;
};
%language=ANSI-C
%readonly-tables
%global-table
%compare-strncmp
%define lookup-function-name findEntity
%define hash-function-name entity_hash_function
%includes
%enum
%%
AElig, 0x00c6
AMP, 38
Aacute, 0x00c1
Acirc, 0x00c2
Agrave, 0x00c0
Alpha, 0x0391
Aring, 0x00c5
Atilde, 0x00c3
Auml, 0x00c4
Beta, 0x0392
COPY, 0x00a9
Ccedil, 0x00c7
Chi, 0x03a7
Dagger, 0x2021
Delta, 0x0394
ETH, 0x00d0
Eacute, 0x00c9
Ecirc, 0x00ca
Egrave, 0x00c8
Epsilon, 0x0395
Eta, 0x0397
Euml, 0x00cb
GT, 62
Gamma, 0x0393
Iacute, 0x00cd
Icirc, 0x00ce
Igrave, 0x00cc
Iota, 0x0399
Iuml, 0x00cf
Kappa, 0x039a
LT, 60
Lambda, 0x039b
Mu, 0x039c
Ntilde, 0x00d1
Nu, 0x039d
OElig, 0x0152
Oacute, 0x00d3
Ocirc, 0x00d4
Ograve, 0x00d2
Omega, 0x03a9
Omicron, 0x039f
Oslash, 0x00d8
Otilde, 0x00d5
Ouml, 0x00d6
Phi, 0x03a6
Pi, 0x03a0
Prime, 0x2033
Psi, 0x03a8
QUOT, 34
REG, 0x00ae
Rho, 0x03a1
Scaron, 0x0160
Sigma, 0x03a3
THORN, 0x00de
Tau, 0x03a4
Theta, 0x0398
Uacute, 0x00da
Ucirc, 0x00db
Ugrave, 0x00d9
Upsilon, 0x03a5
Uuml, 0x00dc
Xi, 0x039e
Yacute, 0x00dd
Yuml, 0x0178
Zeta, 0x0396
aacute, 0x00e1
acirc, 0x00e2
acute, 0x00b4
aelig, 0x00e6
agrave, 0x00e0
alefsym, 0x2135
alpha, 0x03b1
amp, 38
and, 0x2227
ang, 0x2220
apos, 0x0027
aring, 0x00e5
asymp, 0x2248
atilde, 0x00e3
auml, 0x00e4
bdquo, 0x201e
beta, 0x03b2
brvbar, 0x00a6
bull, 0x2022
cap, 0x2229
ccedil, 0x00e7
cedil, 0x00b8
cent, 0x00a2
chi, 0x03c7
circ, 0x02c6
clubs, 0x2663
cong, 0x2245
copy, 0x00a9
crarr, 0x21b5
cup, 0x222a
curren, 0x00a4
dArr, 0x21d3
dagger, 0x2020
darr, 0x2193
deg, 0x00b0
delta, 0x03b4
diams, 0x2666
divide, 0x00f7
eacute, 0x00e9
ecirc, 0x00ea
egrave, 0x00e8
empty, 0x2205
emsp, 0x2003
ensp, 0x2002
epsilon, 0x03b5
equiv, 0x2261
eta, 0x03b7
eth, 0x00f0
euml, 0x00eb
euro, 0x20ac
exist, 0x2203
fnof, 0x0192
forall, 0x2200
frac12, 0x00bd
frac14, 0x00bc
frac34, 0x00be
frasl, 0x2044
gamma, 0x03b3
ge, 0x2265
gt, 62
hArr, 0x21d4
harr, 0x2194
hearts, 0x2665
hellip, 0x2026