--- a/browser/base/content/test/static/browser_all_files_referenced.js
+++ b/browser/base/content/test/static/browser_all_files_referenced.js
@@ -235,20 +235,16 @@ for (let entry of ignorableWhitelist) {
if (!isDevtools) {
// services/sync/modules/service.js
for (let module of ["addons.js", "bookmarks.js", "forms.js", "history.js",
"passwords.js", "prefs.js", "tabs.js",
"extension-storage.js"]) {
whitelist.add("resource://services-sync/engines/" + module);
}
- // intl/unicharutil/nsEntityConverter.h
- for (let name of ["html40Latin1", "html40Symbols", "html40Special", "mathml20"]) {
- whitelist.add("resource://gre/res/entityTables/" + name + ".properties");
- }
}
const gInterestingCategories = new Set([
"agent-style-sheets", "addon-provider-module", "webextension-scripts",
"webextension-schemas", "webextension-scripts-addon",
"webextension-scripts-content", "webextension-scripts-devtools"
]);
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -706,17 +706,16 @@
@RESPATH@/res/grabber.gif
#ifdef XP_MACOSX
@RESPATH@/res/cursors/*
#endif
@RESPATH@/res/fonts/*
@RESPATH@/res/dtd/*
@RESPATH@/res/html/*
@RESPATH@/res/language.properties
-@RESPATH@/res/entityTables/*
#ifdef XP_MACOSX
@RESPATH@/res/MainMenu.nib/
#endif
; svg
@RESPATH@/res/svg.css
@RESPATH@/components/dom_svg.xpt
@RESPATH@/components/dom_smil.xpt
--- a/dom/base/nsCopySupport.cpp
+++ b/dom/base/nsCopySupport.cpp
@@ -554,17 +554,17 @@ static nsresult AppendDOMNode(nsITransfe
nsCOMPtr<nsIHTMLDocument>(do_QueryInterface(document, &rv));
NS_ENSURE_SUCCESS(rv, NS_OK);
NS_ENSURE_TRUE(document->IsHTMLDocument(), NS_OK);
// init encoder with document and node
rv = docEncoder->NativeInit(document, NS_LITERAL_STRING(kHTMLMime),
nsIDocumentEncoder::OutputAbsoluteLinks |
- nsIDocumentEncoder::OutputEncodeW3CEntities);
+ nsIDocumentEncoder::OutputEncodeBasicEntities);
NS_ENSURE_SUCCESS(rv, rv);
rv = docEncoder->SetNativeNode(aDOMNode);
NS_ENSURE_SUCCESS(rv, rv);
// serialize to string
nsAutoString html, context, info;
rv = docEncoder->EncodeToStringWithContext(context, info, html);
--- a/dom/base/nsHTMLContentSerializer.cpp
+++ b/dom/base/nsHTMLContentSerializer.cpp
@@ -483,23 +483,17 @@ nsHTMLContentSerializer::AppendAndTransl
if (mBodyOnly && !mInBody) {
return true;
}
if (mDisableEntityEncoding) {
return aOutputStr.Append(aStr, mozilla::fallible);
}
- bool nonBasicEntities =
- !!(mFlags & (nsIDocumentEncoder::OutputEncodeLatin1Entities |
- nsIDocumentEncoder::OutputEncodeHTMLEntities |
- nsIDocumentEncoder::OutputEncodeW3CEntities));
-
- if (!nonBasicEntities &&
- (mFlags & (nsIDocumentEncoder::OutputEncodeBasicEntities))) {
+ if (mFlags & (nsIDocumentEncoder::OutputEncodeBasicEntities)) {
const uint8_t* entityTable = mInAttribute ? kAttrEntities : kEntities;
uint32_t start = 0;
const uint32_t len = aStr.Length();
for (uint32_t i = 0; i < len; ++i) {
const char* entity = nullptr;
i = FindNextBasicEntity(aStr, len, i, entityTable, &entity);
uint32_t normalTextLen = i - start;
if (normalTextLen) {
@@ -507,110 +501,14 @@ nsHTMLContentSerializer::AppendAndTransl
mozilla::fallible), false);
}
if (entity) {
NS_ENSURE_TRUE(aOutputStr.AppendASCII(entity, mozilla::fallible), false);
start = i + 1;
}
}
return true;
- } else if (nonBasicEntities) {
- nsIParserService* parserService = nsContentUtils::GetParserService();
-
- if (!parserService) {
- NS_ERROR("Can't get parser service");
- return true;
- }
-
- nsReadingIterator<char16_t> done_reading;
- aStr.EndReading(done_reading);
-
- // for each chunk of |aString|...
- uint32_t advanceLength = 0;
- nsReadingIterator<char16_t> iter;
-
- const uint8_t* entityTable = mInAttribute ? kAttrEntities : kEntities;
- nsAutoCString entityReplacement;
-
- for (aStr.BeginReading(iter);
- iter != done_reading;
- iter.advance(int32_t(advanceLength))) {
- uint32_t fragmentLength = done_reading - iter;
- uint32_t lengthReplaced = 0; // the number of UTF-16 codepoints
- // replaced by a particular entity
- const char16_t* c = iter.get();
- const char16_t* fragmentStart = c;
- const char16_t* fragmentEnd = c + fragmentLength;
- const char* entityText = nullptr;
- const char* fullConstEntityText = nullptr;
- char* fullEntityText = nullptr;
-
- advanceLength = 0;
- // for each character in this chunk, check if it
- // needs to be replaced
- for (; c < fragmentEnd; c++, advanceLength++) {
- char16_t val = *c;
- if (val <= kValNBSP && entityTable[val]) {
- fullConstEntityText = kEntityStrings[entityTable[val]];
- break;
- } else if (val > 127 &&
- ((val < 256 &&
- mFlags & nsIDocumentEncoder::OutputEncodeLatin1Entities) ||
- mFlags & nsIDocumentEncoder::OutputEncodeHTMLEntities)) {
- entityReplacement.Truncate();
- parserService->HTMLConvertUnicodeToEntity(val, entityReplacement);
-
- if (!entityReplacement.IsEmpty()) {
- entityText = entityReplacement.get();
- break;
- }
- }
- else if (val > 127 &&
- mFlags & nsIDocumentEncoder::OutputEncodeW3CEntities &&
- mEntityConverter) {
- if (NS_IS_HIGH_SURROGATE(val) &&
- c + 1 < fragmentEnd &&
- NS_IS_LOW_SURROGATE(*(c + 1))) {
- uint32_t valUTF32 = SURROGATE_TO_UCS4(val, *(++c));
- if (NS_SUCCEEDED(mEntityConverter->ConvertUTF32ToEntity(valUTF32,
- nsIEntityConverter::entityW3C, &fullEntityText))) {
- lengthReplaced = 2;
- break;
- }
- else {
- advanceLength++;
- }
- }
- else if (NS_SUCCEEDED(mEntityConverter->ConvertToEntity(val,
- nsIEntityConverter::entityW3C,
- &fullEntityText))) {
- lengthReplaced = 1;
- break;
- }
- }
- }
-
- bool result = aOutputStr.Append(fragmentStart, advanceLength, mozilla::fallible);
- if (entityText) {
- NS_ENSURE_TRUE(aOutputStr.Append(char16_t('&'), mozilla::fallible), false);
- NS_ENSURE_TRUE(AppendASCIItoUTF16(entityText, aOutputStr, mozilla::fallible), false);
- NS_ENSURE_TRUE(aOutputStr.Append(char16_t(';'), mozilla::fallible), false);
- advanceLength++;
- }
- else if (fullConstEntityText) {
- NS_ENSURE_TRUE(aOutputStr.AppendASCII(fullConstEntityText, mozilla::fallible), false);
- ++advanceLength;
- }
- // if it comes from nsIEntityConverter, it already has '&' and ';'
- else if (fullEntityText) {
- bool ok = AppendASCIItoUTF16(fullEntityText, aOutputStr, mozilla::fallible);
- free(fullEntityText);
- advanceLength += lengthReplaced;
- NS_ENSURE_TRUE(ok, false);
- }
- NS_ENSURE_TRUE(result, false);
- }
} else {
NS_ENSURE_TRUE(nsXMLContentSerializer::AppendAndTranslateEntities(aStr, aOutputStr), false);
}
return true;
}
--- a/dom/base/nsHTMLContentSerializer.h
+++ b/dom/base/nsHTMLContentSerializer.h
@@ -10,17 +10,16 @@
* string that could be parsed into more or less the original DOM.
*/
#ifndef nsHTMLContentSerializer_h__
#define nsHTMLContentSerializer_h__
#include "mozilla/Attributes.h"
#include "nsXHTMLContentSerializer.h"
-#include "nsIEntityConverter.h"
#include "nsString.h"
class nsIContent;
class nsIAtom;
class nsHTMLContentSerializer final : public nsXHTMLContentSerializer {
public:
nsHTMLContentSerializer();
--- a/dom/base/nsIDocumentEncoder.idl
+++ b/dom/base/nsIDocumentEncoder.idl
@@ -35,19 +35,19 @@ interface nsIDocumentEncoderNodeFixup :
nsIDOMNode fixupNode(in nsIDOMNode aNode, out boolean aSerializeCloneKids);
};
[scriptable, uuid(21f112df-d96f-47da-bfcb-5331273003d1)]
interface nsIDocumentEncoder : nsISupports
{
// Output methods flag bits. There are a frightening number of these,
// because everyone wants something a little bit different
-
+
- /**
+ /**
* Output only the selection (as opposed to the whole document).
*/
const unsigned long OutputSelectionOnly = (1 << 0);
/** Plaintext output: Convert html to plaintext that looks like the html.
* Implies wrap (except inside <pre>), since html wraps.
* HTML, XHTML and XML output: do prettyprinting, ignoring existing formatting.
* XML output : it doesn't implicitly wrap
@@ -58,17 +58,17 @@ interface nsIDocumentEncoder : nsISuppor
* HTML/XML source. This option overrides OutputFormatted if both are set.
* HTML/XHTML output: If neither are set, there won't be prettyprinting too, but
* long lines will be wrapped.
* Supported also in XML and Plaintext output.
* @note This option does not affect entity conversion.
*/
const unsigned long OutputRaw = (1 << 2);
- /**
+ /**
* Do not print html head tags.
* XHTML/HTML output only.
*/
const unsigned long OutputBodyOnly = (1 << 3);
/**
* Output as though the content is preformatted
* (e.g. maybe it's wrapped in a PRE or PRE_WRAP style tag)
@@ -102,33 +102,24 @@ interface nsIDocumentEncoder : nsISuppor
/**
* Convert links, image src, and script src to absolute URLs when possible.
* XHTML/HTML output only.
*/
const unsigned long OutputAbsoluteLinks = (1 << 7);
/**
- * Attempt to encode entities standardized at W3C (HTML, MathML, etc).
- * This is a catch-all flag for documents with mixed contents. Beware of
- * interoperability issues. See below for other flags which might likely
- * do what you want.
- * HTML output only.
- */
- const unsigned long OutputEncodeW3CEntities = (1 << 8);
-
- /**
* LineBreak processing: if this flag is set than CR line breaks will
* be written. If neither this nor OutputLFLineBreak is set, then we
* will use platform line breaks. The combination of the two flags will
* cause CRLF line breaks to be written.
*/
const unsigned long OutputCRLineBreak = (1 << 9);
- /**
+ /**
* LineBreak processing: if this flag is set than LF line breaks will
* be written. If neither this nor OutputCRLineBreak is set, then we
* will use platform line breaks. The combination of the two flags will
* cause CRLF line breaks to be written.
*/
const unsigned long OutputLFLineBreak = (1 << 10);
/**
@@ -153,62 +144,46 @@ interface nsIDocumentEncoder : nsISuppor
/**
* Encode entities when outputting to a string.
* E.g. If set, we'll output if clear, we'll output 0xa0.
* The basic set is just & < > " for interoperability
* with older products that don't support α and friends.
* HTML output only.
*/
const unsigned long OutputEncodeBasicEntities = (1 << 14);
-
- /**
- * Encode entities when outputting to a string.
- * The Latin1 entity set additionally includes 8bit accented letters
- * between 128 and 255.
- * HTML output only.
- */
- const unsigned long OutputEncodeLatin1Entities = (1 << 15);
-
- /**
- * Encode entities when outputting to a string.
- * The HTML entity set additionally includes accented letters, greek
- * letters, and other special markup symbols as defined in HTML4.
- * HTML output only.
- */
- const unsigned long OutputEncodeHTMLEntities = (1 << 16);
/**
* Normally is replaced with a space character when
* encoding data as plain text, set this flag if that's
* not desired.
* Plaintext output only.
*/
const unsigned long OutputPersistNBSP = (1 << 17);
/**
- * Normally when serializing the whole document using the HTML or
+ * Normally when serializing the whole document using the HTML or
* XHTML serializer, the encoding declaration is rewritten to match.
* This flag suppresses that behavior.
*/
const unsigned long OutputDontRewriteEncodingDeclaration = (1 << 18);
-
+
/**
* When using the HTML or XHTML serializer, skip elements that are not
* visible when this flag is set. Elements are not visible when they
* have CSS style display:none or visibility:collapse, for example.
*/
const unsigned long SkipInvisibleContent = (1 << 19);
-
+
/**
* Output for delsp=yes (RFC 3676). This is used with OutputFormatFlowed
* when converting to text for mail sending.
* PlainText output only.
*/
const unsigned long OutputFormatDelSp = (1 << 20);
-
+
/**
* Drop <br> elements considered "invisible" by the editor. OutputPreformatted
* implies this flag.
*/
const unsigned long OutputDropInvisibleBreak = (1 << 21);
/**
* Don't check for _moz_dirty attributes when deciding whether to
@@ -321,17 +296,17 @@ interface nsIDocumentEncoder : nsISuppor
/**
* The mime type preferred by the encoder. This piece of api was
* added because the copy encoder may need to switch mime types on you
* if you ask it to copy html that really represents plaintext content.
* Call this AFTER Init() and SetSelection() have both been called.
*/
readonly attribute AString mimeType;
-
+
/**
* Encode the document and send the result to the nsIOutputStream.
*
* Possible result codes are the stream errors which might have
* been encountered.
* @param aStream Stream into which to encode.
*/
void encodeToStream(in nsIOutputStream aStream);
@@ -346,17 +321,17 @@ interface nsIDocumentEncoder : nsISuppor
/**
* Encode the document into a string. Stores the extra context information
* into the two arguments.
* @param [OUT] aContextString The string where the parent hierarchy
* information will be stored.
* @param [OUT] aInfoString The string where extra context info will
* be stored.
* @return The document encoded as a string.
- *
+ *
*/
AString encodeToStringWithContext( out AString aContextString,
out AString aInfoString);
/**
* Encode the document into a string of limited size.
* @param aMaxLength After aMaxLength characters, the encoder will stop
* encoding new data.
--- a/dom/base/nsXHTMLContentSerializer.cpp
+++ b/dom/base/nsXHTMLContentSerializer.cpp
@@ -81,20 +81,16 @@ nsXHTMLContentSerializer::Init(uint32_t
mRewriteEncodingDeclaration = aRewriteEncodingDeclaration;
mIsCopying = aIsCopying;
mIsFirstChildOfOL = false;
mInBody = 0;
mDisableEntityEncoding = 0;
mBodyOnly = (mFlags & nsIDocumentEncoder::OutputBodyOnly) ? true
: false;
- // set up entity converter if we are going to need it
- if (mFlags & nsIDocumentEncoder::OutputEncodeW3CEntities) {
- mEntityConverter = do_CreateInstance(NS_ENTITYCONVERTER_CONTRACTID);
- }
return NS_OK;
}
// See if the string has any lines longer than longLineLen:
// if so, we presume formatting is wonky (e.g. the node has been edited)
// and we'd better rewrap the whole text node.
bool
--- a/dom/base/nsXHTMLContentSerializer.h
+++ b/dom/base/nsXHTMLContentSerializer.h
@@ -10,17 +10,16 @@
* string that could be parsed into more or less the original DOM.
*/
#ifndef nsXHTMLContentSerializer_h__
#define nsXHTMLContentSerializer_h__
#include "mozilla/Attributes.h"
#include "nsXMLContentSerializer.h"
-#include "nsIEntityConverter.h"
#include "nsString.h"
#include "nsTArray.h"
class nsIContent;
class nsIAtom;
namespace mozilla {
class Encoding;
@@ -98,17 +97,16 @@ class nsXHTMLContentSerializer : public
MOZ_MUST_USE
virtual bool AppendAndTranslateEntities(const nsAString& aStr,
nsAString& aOutputStr) override;
private:
bool IsElementPreformatted(nsIContent* aNode);
protected:
- nsCOMPtr<nsIEntityConverter> mEntityConverter;
/*
* isHTMLParser should be set to true by the HTML parser which inherits from
* this class. It avoids to redefine methods just for few changes.
*/
bool mIsHTMLSerializer;
bool mDoHeader;
deleted file mode 100644
--- a/dom/base/test/file_htmlserializer_2_enthtml.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<html><head>
-<meta http-equiv="content-type" content="text/html; charset="><title>Test for html serializer with entities</title>
-</head><body>
-
-<p>The basic set is just & < > " for interoperability with older products that don't support α and friends.</p>
-
-<p>latin1 ¡ ¢ £ ¤ ¥ ¦ § ¨
-© ª « ¬ ­ ® ¯ ° ± ²
-³ ´
-µ ¶ · ¸ ¹ º » ¼ ½
-¾ ¿ À Á Â Ã Ä Å
-Æ
-Ç È É Ê Ë Ì Í Î
-Ï Ð Ñ Ò Ó Ô Õ Ö ×
-Ø
-Ù Ú Û Ü Ý Þ ß à
-á â ã ä å æ ç è
-é ê
-ë ì í î ï ð ñ ò ó
- ô õ ö ÷ ø ù ú û
-ü ý
-þ ÿ </p>
-<p>symbols, math.. ƒ Α Β Γ Δ Ε
-Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο
-Π Ρ Σ Τ Υ
-Φ Χ Ψ Ω α β γ δ ε
-ζ η θ ι κ λ μ ν ξ ο
-π ρ ς
-σ τ υ φ χ ψ ω ϑ ϒ
-ϖ • … ′ ″ ‾ ⁄ ℘ ℑ
-ℜ
-™ ℵ ← ↑ → ↓ ↔ ↵ ⇐
-⇑ ⇒ ⇓ ⇔ ∀ ∂ ∃ ∅ ∇
-∈ ∉
-∋ ∏ ∑ − ∗ √ ∝ ∞ ∠ ∧
-∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤
-≥
-⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ⌈
-⌉ ⌊ ⌋ ◊ ♠ ♣ ♥ ♦
-</p>
-<p> others
-Œ œ Š š Ÿ ˆ ˜    
-  ‌ ‍ ‎ ‏–— ‘ ’
-‚“ ” „ † ‡ ‰ ‹
-› €
-</p></body></html>
\ No newline at end of file
deleted file mode 100644
--- a/dom/base/test/file_htmlserializer_2_entw3c.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<html><head>
-<meta http-equiv="content-type" content="text/html; charset="><title>Test for html serializer with entities</title>
-</head><body>
-
-<p>The basic set is just & < > " for interoperability with older products that don't support α and friends.</p>
-
-<p>latin1 ¡ ¢ £ ¤ ¥ ¦ § ¨
-© ª « ¬ ­ ® ¯ ° ± ²
-³ ´
-µ ¶ · ¸ ¹ º » ¼ ½
-¾ ¿ À Á Â Ã Ä Å
-Æ
-Ç È É Ê Ë Ì Í Î
-Ï Ð Ñ Ò Ó Ô Õ Ö ×
-Ø
-Ù Ú Û Ü Ý Þ ß à
-á â ã ä å æ ç è
-é ê
-ë ì í î ï ð ñ ò ó
- ô õ ö ÷ ø ù ú û
-ü ý
-þ ÿ </p>
-<p>symbols, math.. ƒ Α Β Γ Δ Ε
-Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο
-Π Ρ Σ Τ Υ
-Φ Χ Ψ Ω α β γ δ ε
-ζ η θ ι κ λ μ ν ξ ο
-π ρ ς
-σ τ υ φ χ ψ ω ϑ ϒ
-ϖ • … ′ ″ ‾ ⁄ ℘ ℑ
-ℜ
-™ ℵ ← ↑ → ↓ ↔ ↵ ⇐
-⇑ ⇒ ⇓ ⇔ ∀ ∂ ∃ ∅ ∇
-∈ ∉
-∋ ∏ ∑ − ∗ √ ∝ ∞ ∠ ∧
-∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤
-≥
-⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ⌈
-⌉ ⌊ ⌋ ◊ ♠ ♣ ♥ ♦
-</p>
-<p> others
-Œ œ Š š Ÿ ˆ ˜    
-  ‌ ‍ ‎ ‏–— ‘ ’
-‚“ ” „ † ‡ ‰ ‹
-› €
-</p></body></html>
\ No newline at end of file
deleted file mode 100644
--- a/dom/base/test/file_htmlserializer_2_latin1.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html><head>
-<meta http-equiv="content-type" content="text/html; charset="><title>Test for html serializer with entities</title>
-</head><body>
-
-<p>The basic set is just & < > " for interoperability with older products that don't support α and friends.</p>
-
-<p>latin1 ¡ ¢ £ ¤ ¥ ¦ § ¨
-© ª « ¬ ­ ® ¯ ° ± ²
-³ ´
-µ ¶ · ¸ ¹ º » ¼ ½
-¾ ¿ À Á Â Ã Ä Å
-Æ
-Ç È É Ê Ë Ì Í Î
-Ï Ð Ñ Ò Ó Ô Õ Ö ×
-Ø
-Ù Ú Û Ü Ý Þ ß à
-á â ã ä å æ ç è
-é ê
-ë ì í î ï ð ñ ò ó
- ô õ ö ÷ ø ù ú û
-ü ý
-þ ÿ </p>
-<p>symbols, math.. ƒ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ
-Φ Χ Ψ Ω α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς
-σ τ υ φ χ ψ ω ϑ ϒ ϖ • … ′ ″ ‾ ⁄ ℘ ℑ ℜ
-™ ℵ ← ↑ → ↓ ↔ ↵ ⇐ ⇑ ⇒ ⇓ ⇔ ∀ ∂ ∃ ∅ ∇ ∈ ∉
-∋ ∏ ∑ − ∗ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥
-⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ⌈ ⌉ ⌊ ⌋ ◊ ♠ ♣ ♥ ♦
-</p>
-<p> others
-Œ œ Š š Ÿ ˆ ˜ –— ‘ ’
-‚“ ” „ † ‡ ‰ ‹ › €
-</p></body></html>
\ No newline at end of file
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -140,19 +140,16 @@ support-files =
file_htmlserializer_1_noflag.html
file_htmlserializer_1_noformatpre.html
file_htmlserializer_1_raw.html
file_htmlserializer_1_sibling_body.html
file_htmlserializer_1_sibling_body_only_body.html
file_htmlserializer_1_wrap.html
file_htmlserializer_2.html
file_htmlserializer_2_basic.html
- file_htmlserializer_2_enthtml.html
- file_htmlserializer_2_entw3c.html
- file_htmlserializer_2_latin1.html
file_htmlserializer_ipv6.html
file_htmlserializer_ipv6_out.html
file_lock_orientation.html
file_mozfiledataurl_img.jpg
file_record_orientation.html
file_restrictedEventSource.sjs
file_settimeout_inner.html
file_timer_flood.html
--- a/dom/base/test/test_bug424359-2.html
+++ b/dom/base/test/test_bug424359-2.html
@@ -46,64 +46,45 @@ function loadFileContent(aFile, aCharset
var str = {}, content = '';
while (inputStream.readString(4096, str) != 0) {
content += str.value;
}
return content;
}
function isRoughly(actual, expected, message) {
- return is(actual.replace("<!DOCTYPE HTML", "<!DOCTYPE html"),
- expected,
+ return is(actual.replace("<!DOCTYPE HTML", "<!DOCTYPE html"),
+ expected,
message);
}
function testHtmlSerializer_1 () {
const de = SpecialPowers.Ci.nsIDocumentEncoder;
var encoder = SpecialPowers.Cc["@mozilla.org/layout/documentEncoder;1?type=text/html"]
.createInstance(SpecialPowers.Ci.nsIDocumentEncoder);
var doc = $("testframe").contentDocument;
var out, expected;
- // in the following tests, we must use the OutputLFLineBreak flag, to avoid
+ // in the following test, we must use the OutputLFLineBreak flag, to avoid
// to have the default line break of the platform in the result, so the test
// can pass on all platform
- //------------ OutputEncodeW3CEntities
- encoder.init(doc, "text/html", de.OutputLFLineBreak | de.OutputEncodeW3CEntities);
- out = encoder.encodeToString();
- expected = loadFileContent("file_htmlserializer_2_entw3c.html");
- isRoughly(out, expected, "test OutputEncodeW3CEntities");
-
//------------ OutputEncodeBasicEntities
encoder.init(doc, "text/html", de.OutputLFLineBreak | de.OutputEncodeBasicEntities);
out = encoder.encodeToString();
expected = loadFileContent("file_htmlserializer_2_basic.html");
isRoughly(out, expected, "test OutputEncodeBasicEntities");
- //------------ OutputEncodeLatin1Entities
- encoder.init(doc, "text/html", de.OutputLFLineBreak | de.OutputEncodeLatin1Entities);
- out = encoder.encodeToString();
- expected = loadFileContent("file_htmlserializer_2_latin1.html");
- isRoughly(out, expected, "test OutputEncodeLatin1Entities");
-
- //------------ OutputEncodeHTMLEntities
- encoder.init(doc, "text/html", de.OutputLFLineBreak | de.OutputEncodeHTMLEntities);
- out = encoder.encodeToString();
- expected = loadFileContent("file_htmlserializer_2_enthtml.html");
- isRoughly(out, expected, "test OutputEncodeHTMLEntities");
-
-
// tests on the serialization of selections
var node = document.getElementById('draggable');
var select = window.getSelection();
- select.selectAllChildren(node);
+ select.selectAllChildren(node);
encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly);
encoder.setSelection(select);
out = encoder.encodeToString();
expected = 'This is a <em>draggable</em> bit of text.';
is(out, expected, "test selection");
encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly);
@@ -117,17 +98,17 @@ function testHtmlSerializer_1 () {
encoder.setNode(node);
out = encoder.encodeToString();
expected = "<div id=\"draggable\" ondragstart=\"doDragStartSelection(event)\">This is a <em>draggable</em> bit of text.</div>";
is(out, expected, "test node");
node = document.getElementById('aList');
var select = window.getSelection();
- select.selectAllChildren(node);
+ select.selectAllChildren(node);
encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly);
encoder.setSelection(select);
out = encoder.encodeToString();
expected = '\n <li>Lorem ipsum dolor</li>\n <li>sit amet, <strong>consectetuer</strong> </li>\n <li>adipiscing elit</li>\n <li>Nam eu sapien. Sed viverra lacus. Donec quis ipsum. Nunc cursus aliquet lectus. Nunc vitae eros. Class</li>\n <li>aptent taciti</li>\n';
is(out, expected, "test list selection");
encoder.init(document, "text/html", de.OutputLFLineBreak | de.OutputSelectionOnly);
--- a/dom/webbrowserpersist/WebBrowserPersistLocalDocument.cpp
+++ b/dom/webbrowserpersist/WebBrowserPersistLocalDocument.cpp
@@ -1258,22 +1258,16 @@ ConvertEncoderFlags(uint32_t aEncoderFla
if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_WRAP)
encoderFlags |= nsIDocumentEncoder::OutputWrap;
if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_FORMAT_FLOWED)
encoderFlags |= nsIDocumentEncoder::OutputFormatFlowed;
if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_ABSOLUTE_LINKS)
encoderFlags |= nsIDocumentEncoder::OutputAbsoluteLinks;
if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_ENCODE_BASIC_ENTITIES)
encoderFlags |= nsIDocumentEncoder::OutputEncodeBasicEntities;
- if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_ENCODE_LATIN1_ENTITIES)
- encoderFlags |= nsIDocumentEncoder::OutputEncodeLatin1Entities;
- if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_ENCODE_HTML_ENTITIES)
- encoderFlags |= nsIDocumentEncoder::OutputEncodeHTMLEntities;
- if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_ENCODE_W3C_ENTITIES)
- encoderFlags |= nsIDocumentEncoder::OutputEncodeW3CEntities;
if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_CR_LINEBREAKS)
encoderFlags |= nsIDocumentEncoder::OutputCRLineBreak;
if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_LF_LINEBREAKS)
encoderFlags |= nsIDocumentEncoder::OutputLFLineBreak;
if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_NOSCRIPT_CONTENT)
encoderFlags |= nsIDocumentEncoder::OutputNoScriptContent;
if (aEncoderFlags & nsIWebBrowserPersist::ENCODE_FLAGS_NOFRAMES_CONTENT)
encoderFlags |= nsIDocumentEncoder::OutputNoFramesContent;
--- a/dom/webbrowserpersist/nsIWebBrowserPersist.idl
+++ b/dom/webbrowserpersist/nsIWebBrowserPersist.idl
@@ -68,22 +68,22 @@ interface nsIWebBrowserPersist : nsICanc
/**
* Force relevant cookies to be sent with this load even if normally they
* wouldn't be.
*/
const unsigned long PERSIST_FLAGS_FORCE_ALLOW_COOKIES = 65536;
/**
- * Flags governing how data is fetched and saved from the network.
+ * Flags governing how data is fetched and saved from the network.
* It is best to set this value explicitly unless you are prepared
* to accept the default values.
*/
attribute unsigned long persistFlags;
-
+
/** Persister is ready to save data */
const unsigned long PERSIST_STATE_READY = 1;
/** Persister is saving data */
const unsigned long PERSIST_STATE_SAVING = 2;
/** Persister has finished saving data */
const unsigned long PERSIST_STATE_FINISHED = 3;
/**
@@ -194,24 +194,16 @@ interface nsIWebBrowserPersist : nsICanc
* when converting to text for mail sending. This differs just slightly
* but in an important way from normal formatted, and that is that
* lines are space stuffed. This can't (correctly) be done later.
*/
const unsigned long ENCODE_FLAGS_FORMAT_FLOWED = 64;
/** Convert links to absolute links where possible. */
const unsigned long ENCODE_FLAGS_ABSOLUTE_LINKS = 128;
- /**
- * Attempt to encode entities standardized at W3C (HTML, MathML, etc).
- * This is a catch-all flag for documents with mixed contents. Beware of
- * interoperability issues. See below for other flags which might likely
- * do what you want.
- */
- const unsigned long ENCODE_FLAGS_ENCODE_W3C_ENTITIES = 256;
-
/**
* Output with carriage return line breaks. May also be combined with
* ENCODE_FLAGS_LF_LINEBREAKS and if neither is specified, the platform
* default format is used.
*/
const unsigned long ENCODE_FLAGS_CR_LINEBREAKS = 512;
/**
* Output with linefeed line breaks. May also be combined with
@@ -220,31 +212,21 @@ interface nsIWebBrowserPersist : nsICanc
*/
const unsigned long ENCODE_FLAGS_LF_LINEBREAKS = 1024;
/** For plaintext output. Output the content of noscript elements. */
const unsigned long ENCODE_FLAGS_NOSCRIPT_CONTENT = 2048;
/** For plaintext output. Output the content of noframes elements. */
const unsigned long ENCODE_FLAGS_NOFRAMES_CONTENT = 4096;
/**
- * Encode basic entities, e.g. output instead of character code 0xa0.
+ * Encode basic entities, e.g. output instead of character code 0xa0.
* The basic set is just & < > " for interoperability
* with older products that don't support α and friends.
*/
const unsigned long ENCODE_FLAGS_ENCODE_BASIC_ENTITIES = 8192;
- /**
- * Encode Latin1 entities. This includes the basic set and
- * accented letters between 128 and 255.
- */
- const unsigned long ENCODE_FLAGS_ENCODE_LATIN1_ENTITIES = 16384;
- /**
- * Encode HTML4 entities. This includes the basic set, accented
- * letters, greek letters and certain special markup symbols.
- */
- const unsigned long ENCODE_FLAGS_ENCODE_HTML_ENTITIES = 32768;
/**
* Save the specified DOM document to file and optionally all linked files
* (e.g. images, CSS, JS & subframes). Do not call this method until the
* document has finished loading!
*
* @param aDocument Document to save to file. Some implementations of
* this interface may also support <CODE>nullptr</CODE>
@@ -252,17 +234,17 @@ interface nsIWebBrowserPersist : nsICanc
* nsIWebBrowserPersistDocument or nsIDOMDocument.
* @param aFile Target local file. This may be a nsIFile object or an
* nsIURI object with a file scheme or a scheme that
* supports uploading (e.g. ftp).
* @param aDataPath Path to directory where URIs linked to the document
* are saved or nullptr if no linked URIs should be saved.
* This may be a nsIFile object or an nsIURI object
* with a file scheme.
- * @param aOutputContentType The desired MIME type format to save the
+ * @param aOutputContentType The desired MIME type format to save the
* document and all subdocuments into or nullptr to use
* the default behaviour.
* @param aEncodingFlags Flags to pass to the encoder.
* @param aWrapColumn For text documents, indicates the desired width to
* wrap text at. Parameter is ignored if wrapping is not
* specified by the encoding flags.
*
* @see nsIWebBrowserPersistDocument
--- a/intl/build/nsI18nModule.cpp
+++ b/intl/build/nsI18nModule.cpp
@@ -6,17 +6,16 @@
#include "mozilla/ModuleUtils.h"
// lwbrk
#include "nsLWBrkCIID.h"
#include "nsJISx4051LineBreaker.h"
#include "nsSampleWordBreaker.h"
// unicharutil
-#include "nsEntityConverter.h"
#include "nsUnicodeNormalizer.h"
// string bundles (intl)
#include "nsStringBundleService.h"
#include "nsStringBundleTextOverride.h"
// locale
#include "nsLocaleConstructors.h"
@@ -24,52 +23,48 @@
// uconv
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJISx4051LineBreaker)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSampleWordBreaker)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStringBundleService, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStringBundleTextOverride, Init)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsEntityConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeNormalizer)
NS_DEFINE_NAMED_CID(MOZ_LOCALESERVICE_CID);
NS_DEFINE_NAMED_CID(MOZ_OSPREFERENCES_CID);
NS_DEFINE_NAMED_CID(NS_LBRK_CID);
NS_DEFINE_NAMED_CID(NS_WBRK_CID);
-NS_DEFINE_NAMED_CID(NS_ENTITYCONVERTER_CID);
NS_DEFINE_NAMED_CID(NS_UNICODE_NORMALIZER_CID);
NS_DEFINE_NAMED_CID(NS_STRINGBUNDLESERVICE_CID);
NS_DEFINE_NAMED_CID(NS_STRINGBUNDLETEXTOVERRIDE_CID);
NS_DEFINE_NAMED_CID(NS_COLLATIONFACTORY_CID);
NS_DEFINE_NAMED_CID(NS_PLATFORMCHARSET_CID);
NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
static const mozilla::Module::CIDEntry kIntlCIDs[] = {
{ &kMOZ_LOCALESERVICE_CID, false, nullptr, mozilla::intl::LocaleServiceConstructor },
{ &kMOZ_OSPREFERENCES_CID, false, nullptr, mozilla::intl::OSPreferencesConstructor },
{ &kNS_LBRK_CID, false, nullptr, nsJISx4051LineBreakerConstructor },
{ &kNS_WBRK_CID, false, nullptr, nsSampleWordBreakerConstructor },
- { &kNS_ENTITYCONVERTER_CID, false, nullptr, nsEntityConverterConstructor },
{ &kNS_UNICODE_NORMALIZER_CID, false, nullptr, nsUnicodeNormalizerConstructor },
{ &kNS_STRINGBUNDLESERVICE_CID, false, nullptr, nsStringBundleServiceConstructor },
{ &kNS_STRINGBUNDLETEXTOVERRIDE_CID, false, nullptr, nsStringBundleTextOverrideConstructor },
{ &kNS_COLLATIONFACTORY_CID, false, nullptr, nsCollationFactoryConstructor },
{ &kNS_PLATFORMCHARSET_CID, false, nullptr, nsPlatformCharsetConstructor },
{ &kNS_COLLATION_CID, false, nullptr, nsCollationConstructor },
{ nullptr }
};
static const mozilla::Module::ContractIDEntry kIntlContracts[] = {
{ MOZ_LOCALESERVICE_CONTRACTID, &kMOZ_LOCALESERVICE_CID },
{ MOZ_OSPREFERENCES_CONTRACTID, &kMOZ_OSPREFERENCES_CID },
{ NS_LBRK_CONTRACTID, &kNS_LBRK_CID },
{ NS_WBRK_CONTRACTID, &kNS_WBRK_CID },
- { NS_ENTITYCONVERTER_CONTRACTID, &kNS_ENTITYCONVERTER_CID },
{ NS_UNICODE_NORMALIZER_CONTRACTID, &kNS_UNICODE_NORMALIZER_CID },
{ NS_STRINGBUNDLE_CONTRACTID, &kNS_STRINGBUNDLESERVICE_CID },
{ NS_STRINGBUNDLETEXTOVERRIDE_CONTRACTID, &kNS_STRINGBUNDLETEXTOVERRIDE_CID },
{ NS_COLLATIONFACTORY_CONTRACTID, &kNS_COLLATIONFACTORY_CID },
{ NS_PLATFORMCHARSET_CONTRACTID, &kNS_PLATFORMCHARSET_CID },
{ NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
{ nullptr }
};
--- a/intl/unicharutil/moz.build
+++ b/intl/unicharutil/moz.build
@@ -1,33 +1,28 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-DIRS += ['util', 'tables']
+DIRS += ['util']
TEST_DIRS += ['tests']
XPIDL_SOURCES += [
- 'nsIEntityConverter.idl',
'nsIUnicodeNormalizer.idl',
]
XPIDL_MODULE = 'unicharutil'
EXPORTS += [
'nsUGenCategory.h',
'nsUnicodeNormalizer.h',
]
-UNIFIED_SOURCES += [
- 'nsEntityConverter.cpp',
-]
-
if CONFIG['ENABLE_INTL_API']:
UNIFIED_SOURCES += [
'nsUnicodeNormalizer_ICU.cpp',
]
else:
UNIFIED_SOURCES += [
'nsUnicodeNormalizer.cpp',
]
deleted file mode 100644
--- a/intl/unicharutil/nsEntityConverter.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsEntityConverter.h"
-#include "nsLiteralString.h"
-#include "nsString.h"
-#include "mozilla/Services.h"
-#include "nsServiceManagerUtils.h"
-#include "nsCRT.h"
-
-//
-// implementation methods
-//
-nsEntityConverter::nsEntityConverter() { }
-
-nsEntityConverter::~nsEntityConverter() { }
-
-nsIStringBundle*
-nsEntityConverter:: GetVersionBundleInstance(uint32_t versionNumber)
-{
- switch(versionNumber){
- case nsIEntityConverter::html40Latin1:
- if (!mHTML40Latin1Bundle) {
- mHTML40Latin1Bundle = LoadEntityBundle(kHTML40LATIN1);
- MOZ_ASSERT(mHTML40Latin1Bundle, "LoadEntityBundle failed");
- }
- return mHTML40Latin1Bundle;
- case nsIEntityConverter::html40Symbols:
- if (!mHTML40SymbolsBundle) {
- mHTML40SymbolsBundle = LoadEntityBundle(kHTML40SYMBOLS);
- MOZ_ASSERT(mHTML40SymbolsBundle, "LoadEntityBundle failed");
- }
- return mHTML40SymbolsBundle;
- case nsIEntityConverter::html40Special:
- if (!mHTML40SpecialBundle) {
- mHTML40SpecialBundle = LoadEntityBundle(kHTML40SPECIAL);
- MOZ_ASSERT(mHTML40SpecialBundle, "LoadEntityBundle failed");
- }
- return mHTML40SpecialBundle;
- case nsIEntityConverter::mathml20:
- if (!mMathML20Bundle) {
- mMathML20Bundle = LoadEntityBundle(kMATHML20);
- MOZ_ASSERT(mMathML20Bundle, "LoadEntityBundle failed");
- }
- return mMathML20Bundle;
- default:
- return nullptr;
- }
-}
-
-already_AddRefed<nsIStringBundle>
-nsEntityConverter:: LoadEntityBundle(const char *fileName)
-{
- NS_ENSURE_TRUE(fileName, nullptr);
-
- nsAutoCString url("resource://gre/res/entityTables/");
- nsresult rv;
-
- nsCOMPtr<nsIStringBundleService> bundleService =
- do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
- NS_ENSURE_SUCCESS(rv, nullptr);
-
- url.Append(fileName);
-
- nsCOMPtr<nsIStringBundle> bundle;
- rv = bundleService->CreateBundle(url.get(), getter_AddRefs(bundle));
- NS_ENSURE_SUCCESS(rv, nullptr);
-
- return bundle.forget();
-}
-
-//
-// nsISupports methods
-//
-NS_IMPL_ISUPPORTS(nsEntityConverter,nsIEntityConverter)
-
-//
-// nsIEntityConverter
-//
-NS_IMETHODIMP
-nsEntityConverter::ConvertToEntity(char16_t character, uint32_t entityVersion, char **_retval)
-{
- return ConvertUTF32ToEntity((uint32_t)character, entityVersion, _retval);
-}
-
-NS_IMETHODIMP
-nsEntityConverter::ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char **_retval)
-{
- NS_ASSERTION(_retval, "null ptr- _retval");
- if (nullptr == _retval) {
- return NS_ERROR_NULL_POINTER;
- }
- *_retval = nullptr;
-
- for (uint32_t mask = 1, mask2 = 0xFFFFFFFFL; (0!=(entityVersion & mask2)); mask<<=1, mask2<<=1) {
- if (0 == (entityVersion & mask)) {
- continue;
- }
-
- nsIStringBundle* entities = GetVersionBundleInstance(entityVersion & mask);
- NS_ASSERTION(entities, "Cannot get the entity");
-
- if (!entities) {
- continue;
- }
-
- nsAutoCString key("entity.");
- key.AppendInt(character,10);
-
- nsXPIDLString value;
- nsresult rv = entities->GetStringFromName(key.get(), getter_Copies(value));
- if (NS_SUCCEEDED(rv)) {
- *_retval = ToNewCString(value);
- return NS_OK;
- }
- }
- return NS_ERROR_ILLEGAL_VALUE;
-}
-
-NS_IMETHODIMP
-nsEntityConverter::ConvertToEntities(const char16_t *inString, uint32_t entityVersion, char16_t **_retval)
-{
- NS_ENSURE_ARG_POINTER(inString);
- NS_ENSURE_ARG_POINTER(_retval);
-
- *_retval = nullptr;
-
- nsString outString;
-
- // per character look for the entity
- uint32_t len = NS_strlen(inString);
- for (uint32_t i = 0; i < len; i++) {
- nsAutoCString key("entity.");
- if (NS_IS_HIGH_SURROGATE(inString[i]) && i + 2 < len && NS_IS_LOW_SURROGATE(inString[i + 1])) {
- key.AppendInt(SURROGATE_TO_UCS4(inString[i], inString[i+1]), 10);
- ++i;
- } else {
- key.AppendInt(inString[i],10);
- }
-
- nsXPIDLString value;
- const char16_t *entity = nullptr;
-
- for (uint32_t mask = 1, mask2 = 0xFFFFFFFFL; (0!=(entityVersion & mask2)); mask<<=1, mask2<<=1) {
- if (0 == (entityVersion & mask)) {
- continue;
- }
- nsIStringBundle* entities = GetVersionBundleInstance(entityVersion & mask);
- NS_ASSERTION(entities, "Cannot get the property file");
-
- if (!entities) {
- continue;
- }
-
- nsresult rv =
- entities->GetStringFromName(key.get(), getter_Copies(value));
- if (NS_SUCCEEDED(rv)) {
- entity = value.get();
- break;
- }
- }
- if (entity) {
- outString.Append(entity);
- } else {
- outString.Append(&inString[i], 1);
- }
- }
-
- *_retval = ToNewUnicode(outString);
-
- return NS_OK;
-}
deleted file mode 100644
--- a/intl/unicharutil/nsEntityConverter.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsEntityConverter_h__
-#define nsEntityConverter_h__
-
-#include "nsIEntityConverter.h"
-#include "nsIStringBundle.h"
-#include "nsCOMPtr.h"
-
-class nsEntityConverter: public nsIEntityConverter
-{
-public:
- //
- // implementation methods
- //
- nsEntityConverter();
-
- //
- // nsISupports
- //
- NS_DECL_ISUPPORTS
-
- NS_IMETHOD ConvertUTF32ToEntity(uint32_t character, uint32_t entityVersion, char **_retval) override;
- NS_IMETHOD ConvertToEntity(char16_t character, uint32_t entityVersion, char **_retval) override;
- NS_IMETHOD ConvertToEntities(const char16_t *inString, uint32_t entityVersion, char16_t **_retval) override;
-
-protected:
- // map version number to a string bundle
- nsIStringBundle* GetVersionBundleInstance(uint32_t versionNumber);
-
- // load a string bundle file
- already_AddRefed<nsIStringBundle> LoadEntityBundle(const char *fileName);
-
- const char* kHTML40LATIN1 = "html40Latin1.properties";
- const char* kHTML40SYMBOLS = "html40Symbols.properties";
- const char* kHTML40SPECIAL = "html40Special.properties";
- const char* kMATHML20 = "mathml20.properties";
- nsCOMPtr<nsIStringBundle> mHTML40Latin1Bundle;
- nsCOMPtr<nsIStringBundle> mHTML40SymbolsBundle;
- nsCOMPtr<nsIStringBundle> mHTML40SpecialBundle;
- nsCOMPtr<nsIStringBundle> mMathML20Bundle;
-
- virtual ~nsEntityConverter();
-};
-
-#endif
deleted file mode 100644
--- a/intl/unicharutil/nsIEntityConverter.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-%{C++
-// {9E9B565A-8E52-4C1A-8805-B2B91655F874}
-#define NS_ENTITYCONVERTER_CID { 0x9e9b565a, 0x8e52, 0x4c1a, {0x88, 0x05, 0xb2, 0xb9, 0x16, 0x55, 0xf8, 0x74}}
-#define NS_ENTITYCONVERTER_CONTRACTID "@mozilla.org/intl/entityconverter;1"
-%}
-
-[scriptable, uuid(D14C7111-55E0-11d3-91D9-00105AA3F7DC)]
-interface nsIEntityConverter : nsISupports
-{
- const unsigned long entityNone = 0;
- const unsigned long html40Latin1 = 1;
- const unsigned long html40Symbols = 2;
- const unsigned long html40Special = 4; // excludes ", &, <, >
- const unsigned long transliterate = 8; // Obsolete
- const unsigned long mathml20 = 16;
- const unsigned long html32 = html40Latin1;
- const unsigned long html40 = html40Latin1+html40Symbols+html40Special;
- const unsigned long entityW3C = html40+mathml20;
-
- string ConvertUTF32ToEntity(in unsigned long character, in unsigned long entityVersion);
- string ConvertToEntity(in wchar character, in unsigned long entityVersion);
-
- wstring ConvertToEntities(in wstring inString, in unsigned long entityVersion);
-};
deleted file mode 100644
--- a/intl/unicharutil/tables/html40Latin1.properties
+++ /dev/null
@@ -1,114 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# LOCALIZATION NOTE FILE
-# This file contains names that assign html elements to
-# ascii codepoints. Do not translate any of the "entities" in
-# this file.
-
-entity.list.name=html40Latin1
-entity.160=
-entity.161=¡
-entity.162=¢
-entity.163=£
-entity.164=¤
-entity.165=¥
-entity.166=¦
-entity.167=§
-entity.168=¨
-entity.169=©
-entity.170=ª
-entity.171=«
-entity.172=¬
-entity.173=­
-entity.174=®
-entity.175=¯
-entity.176=°
-entity.177=±
-entity.178=²
-entity.179=³
-entity.180=´
-entity.181=µ
-entity.182=¶
-entity.183=·
-entity.184=¸
-entity.185=¹
-entity.186=º
-entity.187=»
-entity.188=¼
-entity.189=½
-entity.190=¾
-entity.191=¿
-entity.192=À
-entity.193=Á
-entity.194=Â
-entity.195=Ã
-entity.196=Ä
-entity.197=Å
-entity.198=Æ
-entity.199=Ç
-entity.200=È
-entity.201=É
-entity.202=Ê
-entity.203=Ë
-entity.204=Ì
-entity.205=Í
-entity.206=Î
-entity.207=Ï
-entity.208=Ð
-entity.209=Ñ
-entity.210=Ò
-entity.211=Ó
-entity.212=Ô
-entity.213=Õ
-entity.214=Ö
-entity.215=×
-entity.216=Ø
-entity.217=Ù
-entity.218=Ú
-entity.219=Û
-entity.220=Ü
-entity.221=Ý
-entity.222=Þ
-entity.223=ß
-entity.224=à
-entity.225=á
-entity.226=â
-entity.227=ã
-entity.228=ä
-entity.229=å
-entity.230=æ
-entity.231=ç
-entity.232=è
-entity.233=é
-entity.234=ê
-entity.235=ë
-entity.236=ì
-entity.237=í
-entity.238=î
-entity.239=ï
-entity.240=ð
-entity.241=ñ
-entity.242=ò
-entity.243=ó
-entity.244=ô
-entity.245=õ
-entity.246=ö
-entity.247=÷
-entity.248=ø
-entity.249=ù
-entity.250=ú
-entity.251=û
-entity.252=ü
-entity.253=ý
-entity.254=þ
-entity.255=ÿ
-
-
-
-
-
-
-
-
deleted file mode 100644
--- a/intl/unicharutil/tables/html40Special.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# LOCALIZATION NOTE: FILE
-# This file contains names that assign entity references to
-# numbers in an entity.list object. Do not translate this file.
-
-entity.list.name=html40Special
-entity.338=Œ
-entity.339=œ
-entity.352=Š
-entity.353=š
-entity.376=Ÿ
-entity.710=ˆ
-entity.732=˜
-entity.8194= 
-entity.8195= 
-entity.8201= 
-entity.8204=‌
-entity.8205=‍
-entity.8206=‎
-entity.8207=‏
-entity.8211=–
-entity.8212=—
-entity.8216=‘
-entity.8217=’
-entity.8218=‚
-entity.8220=“
-entity.8221=”
-entity.8222=„
-entity.8224=†
-entity.8225=‡
-entity.8240=‰
-entity.8249=‹
-entity.8250=›
-entity.8364=€
deleted file mode 100644
--- a/intl/unicharutil/tables/html40Symbols.properties
+++ /dev/null
@@ -1,132 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# LOCALIZATION NOTE FILE
-# Do not translate this file.
-
-entity.list.name=html40Symbols
-entity.402=ƒ
-entity.913=Α
-entity.914=Β
-entity.915=Γ
-entity.916=Δ
-entity.917=Ε
-entity.918=Ζ
-entity.919=Η
-entity.920=Θ
-entity.921=Ι
-entity.922=Κ
-entity.923=Λ
-entity.924=Μ
-entity.925=Ν
-entity.926=Ξ
-entity.927=Ο
-entity.928=Π
-entity.929=Ρ
-entity.931=Σ
-entity.932=Τ
-entity.933=Υ
-entity.934=Φ
-entity.935=Χ
-entity.936=Ψ
-entity.937=Ω
-entity.945=α
-entity.946=β
-entity.947=γ
-entity.948=δ
-entity.949=ε
-entity.950=ζ
-entity.951=η
-entity.952=θ
-entity.953=ι
-entity.954=κ
-entity.955=λ
-entity.956=μ
-entity.957=ν
-entity.958=ξ
-entity.959=ο
-entity.960=π
-entity.961=ρ
-entity.962=ς
-entity.963=σ
-entity.964=τ
-entity.965=υ
-entity.966=φ
-entity.967=χ
-entity.968=ψ
-entity.969=ω
-entity.977=ϑ
-entity.978=ϒ
-entity.982=ϖ
-entity.8226=•
-entity.8230=…
-entity.8242=′
-entity.8243=″
-entity.8254=‾
-entity.8260=⁄
-entity.8472=℘
-entity.8465=ℑ
-entity.8476=ℜ
-entity.8482=™
-entity.8501=ℵ
-entity.8592=←
-entity.8593=↑
-entity.8594=→
-entity.8595=↓
-entity.8596=↔
-entity.8629=↵
-entity.8656=⇐
-entity.8657=⇑
-entity.8658=⇒
-entity.8659=⇓
-entity.8660=⇔
-entity.8704=∀
-entity.8706=∂
-entity.8707=∃
-entity.8709=∅
-entity.8711=∇
-entity.8712=∈
-entity.8713=∉
-entity.8715=∋
-entity.8719=∏
-entity.8721=∑
-entity.8722=−
-entity.8727=∗
-entity.8730=√
-entity.8733=∝
-entity.8734=∞
-entity.8736=∠
-entity.8743=∧
-entity.8744=∨
-entity.8745=∩
-entity.8746=∪
-entity.8747=∫
-entity.8756=∴
-entity.8764=∼
-entity.8773=≅
-entity.8776=≈
-entity.8800=≠
-entity.8801=≡
-entity.8804=≤
-entity.8805=≥
-entity.8834=⊂
-entity.8835=⊃
-entity.8836=⊄
-entity.8838=⊆
-entity.8839=⊇
-entity.8853=⊕
-entity.8855=⊗
-entity.8869=⊥
-entity.8901=⋅
-entity.8968=⌈
-entity.8969=⌉
-entity.8970=⌊
-entity.8971=⌋
-entity.9001=⟨
-entity.9002=⟩
-entity.9674=◊
-entity.9824=♠
-entity.9827=♣
-entity.9829=♥
-entity.9830=♦
deleted file mode 100644
--- a/intl/unicharutil/tables/mathml20.properties
+++ /dev/null
@@ -1,1253 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-## LOCALIZATION NOTE: FILE
-# Do not translate this file.
-# The file contains a mapping of Unicode values to MathML entity names.
-# Entities already listed in html40 were deliberately excluded. So you must use
-# nsIEntityConverter.html40 + nsIEntityConverter.mathml20 to access everything.
-
-entity.list.name=mathml20
-entity.168=¨
-entity.175=‾
-entity.177=±
-entity.184=¸
-entity.256=Ā
-entity.257=ā
-entity.258=Ă
-entity.259=ă
-entity.260=Ą
-entity.261=ą
-entity.262=Ć
-entity.263=ć
-entity.264=Ĉ
-entity.265=ĉ
-entity.266=Ċ
-entity.267=ċ
-entity.268=Č
-entity.269=č
-entity.270=Ď
-entity.271=ď
-entity.272=Đ
-entity.273=đ
-entity.274=Ē
-entity.275=ē
-entity.278=Ė
-entity.279=ė
-entity.280=Ę
-entity.281=ę
-entity.282=Ě
-entity.283=ě
-entity.284=Ĝ
-entity.285=ĝ
-entity.286=Ğ
-entity.287=ğ
-entity.288=Ġ
-entity.289=ġ
-entity.290=Ģ
-entity.292=Ĥ
-entity.293=ĥ
-entity.294=Ħ
-entity.295=ħ
-entity.296=Ĩ
-entity.297=ĩ
-entity.298=Ī
-entity.299=ī
-entity.302=Į
-entity.303=į
-entity.304=İ
-entity.306=IJ
-entity.307=ij
-entity.308=Ĵ
-entity.309=ĵ
-entity.310=Ķ
-entity.311=ķ
-entity.312=ĸ
-entity.313=Ĺ
-entity.314=ĺ
-entity.315=Ļ
-entity.316=ļ
-entity.317=Ľ
-entity.318=ľ
-entity.319=Ŀ
-entity.320=ŀ
-entity.321=Ł
-entity.322=ł
-entity.323=Ń
-entity.324=ń
-entity.325=Ņ
-entity.326=ņ
-entity.327=Ň
-entity.328=ň
-entity.329=ʼn
-entity.330=Ŋ
-entity.331=ŋ
-entity.332=Ō
-entity.333=ō
-entity.336=Ő
-entity.337=ő
-entity.340=Ŕ
-entity.341=ŕ
-entity.342=Ŗ
-entity.343=ŗ
-entity.344=Ř
-entity.345=ř
-entity.346=Ś
-entity.347=ś
-entity.348=Ŝ
-entity.349=ŝ
-entity.350=Ş
-entity.351=ş
-entity.354=Ţ
-entity.355=ţ
-entity.356=Ť
-entity.357=ť
-entity.358=Ŧ
-entity.359=ŧ
-entity.360=Ũ
-entity.361=ũ
-entity.362=Ū
-entity.363=ū
-entity.364=Ŭ
-entity.365=ŭ
-entity.366=Ů
-entity.367=ů
-entity.368=Ű
-entity.369=ű
-entity.370=Ų
-entity.371=ų
-entity.372=Ŵ
-entity.373=ŵ
-entity.374=Ŷ
-entity.375=ŷ
-entity.377=Ź
-entity.378=ź
-entity.379=Ż
-entity.380=ż
-entity.381=Ž
-entity.382=ž
-entity.437=Ƶ
-entity.501=ǵ
-entity.711=ˇ
-entity.728=˘
-entity.729=˙
-entity.730=˚
-entity.731=˛
-entity.732=˜
-entity.733=˝
-entity.785=̑
-entity.818=_
-entity.949=ϵ
-entity.962=ς
-entity.966=ϕ
-entity.977=ϑ
-entity.978=ϒ
-entity.981=ϕ
-entity.982=ϖ
-entity.988=Ϝ
-entity.989=ϝ
-entity.1008=ϰ
-entity.1009=ϱ
-entity.1013=ϵ
-entity.1014=϶
-entity.1025=Ё
-entity.1026=Ђ
-entity.1027=Ѓ
-entity.1028=Є
-entity.1029=Ѕ
-entity.1030=І
-entity.1031=Ї
-entity.1032=Ј
-entity.1033=Љ
-entity.1034=Њ
-entity.1035=Ћ
-entity.1036=Ќ
-entity.1038=Ў
-entity.1039=Џ
-entity.1040=А
-entity.1041=Б
-entity.1042=В
-entity.1043=Г
-entity.1044=Д
-entity.1045=Е
-entity.1046=Ж
-entity.1047=З
-entity.1048=И
-entity.1049=Й
-entity.1050=К
-entity.1051=Л
-entity.1052=М
-entity.1053=Н
-entity.1054=О
-entity.1055=П
-entity.1056=Р
-entity.1057=С
-entity.1058=Т
-entity.1059=У
-entity.1060=Ф
-entity.1061=Х
-entity.1062=Ц
-entity.1063=Ч
-entity.1064=Ш
-entity.1065=Щ
-entity.1066=Ъ
-entity.1067=Ы
-entity.1068=Ь
-entity.1069=Э
-entity.1070=Ю
-entity.1071=Я
-entity.1072=а
-entity.1073=б
-entity.1074=в
-entity.1075=г
-entity.1076=д
-entity.1077=е
-entity.1078=ж
-entity.1079=з
-entity.1080=и
-entity.1081=й
-entity.1082=к
-entity.1083=л
-entity.1084=м
-entity.1085=н
-entity.1086=о
-entity.1087=п
-entity.1088=р
-entity.1089=с
-entity.1090=т
-entity.1091=у
-entity.1092=ф
-entity.1093=х
-entity.1094=ц
-entity.1095=ч
-entity.1096=ш
-entity.1097=щ
-entity.1098=ъ
-entity.1099=ы
-entity.1100=ь
-entity.1101=э
-entity.1102=ю
-entity.1103=я
-entity.1105=ё
-entity.1106=ђ
-entity.1107=ѓ
-entity.1108=є
-entity.1109=ѕ
-entity.1110=і
-entity.1111=ї
-entity.1112=ј
-entity.1113=љ
-entity.1114=њ
-entity.1115=ћ
-entity.1116=ќ
-entity.1118=ў
-entity.1119=џ
-entity.8196= 
-entity.8197= 
-entity.8199= 
-entity.8200= 
-entity.8201= 
-entity.8202= 
-entity.8203=​
-entity.8208=‐
-entity.8213=―
-entity.8214=‖
-entity.8216=‘
-entity.8217=’
-entity.8218=‚
-entity.8220=“
-entity.8221=”
-entity.8222=„
-entity.8226=•
-entity.8229=‥
-entity.8241=‱
-entity.8244=‴
-entity.8245=‵
-entity.8257=⁁
-entity.8259=⁃
-entity.8271=⁏
-entity.8279=⁗
-entity.8287= 
-entity.8288=⁠
-entity.8289=⁡
-entity.8290=⁢
-entity.8291=⁣
-entity.8411=⃛
-entity.8412=⃜
-entity.8450=ℂ
-entity.8453=℅
-entity.8458=ℊ
-entity.8459=ℋ
-entity.8460=ℌ
-entity.8461=ℍ
-entity.8462=ℎ
-entity.8463=ℏ
-entity.8464=ℐ
-entity.8465=ℑ
-entity.8466=ℒ
-entity.8467=ℓ
-entity.8469=ℕ
-entity.8470=№
-entity.8471=℗
-entity.8473=ℙ
-entity.8474=ℚ
-entity.8475=ℛ
-entity.8476=ℜ
-entity.8477=ℝ
-entity.8478=℞
-entity.8484=ℤ
-entity.8486=Ω
-entity.8487=℧
-entity.8488=ℨ
-entity.8489=℩
-entity.8491=Å
-entity.8492=ℬ
-entity.8493=ℭ
-entity.8495=ℯ
-entity.8496=ℰ
-entity.8497=ℱ
-entity.8499=ℳ
-entity.8500=ℴ
-entity.8501=ℵ
-entity.8502=ℶ
-entity.8503=ℷ
-entity.8504=ℸ
-entity.8517=ⅅ
-entity.8518=ⅆ
-entity.8519=ⅇ
-entity.8520=ⅈ
-entity.8531=⅓
-entity.8532=⅔
-entity.8533=⅕
-entity.8534=⅖
-entity.8535=⅗
-entity.8536=⅘
-entity.8537=⅙
-entity.8538=⅚
-entity.8539=⅛
-entity.8540=⅜
-entity.8541=⅝
-entity.8542=⅞
-entity.8592=←
-entity.8593=↑
-entity.8594=→
-entity.8595=↓
-entity.8596=↔
-entity.8597=↕
-entity.8598=↖
-entity.8599=↗
-entity.8600=↘
-entity.8601=↙
-entity.8602=↚
-entity.8603=↛
-entity.8605=↝
-entity.8606=↞
-entity.8607=↟
-entity.8608=↠
-entity.8609=↡
-entity.8610=↢
-entity.8611=↣
-entity.8612=↤
-entity.8613=↥
-entity.8614=↦
-entity.8615=↧
-entity.8617=↩
-entity.8618=↪
-entity.8619=↫
-entity.8620=↬
-entity.8621=↭
-entity.8622=↮
-entity.8624=↰
-entity.8625=↱
-entity.8626=↲
-entity.8627=↳
-entity.8630=↶
-entity.8631=↷
-entity.8634=↺
-entity.8635=↻
-entity.8636=↼
-entity.8637=↽
-entity.8638=↾
-entity.8639=↿
-entity.8640=⇀
-entity.8641=⇁
-entity.8642=⇂
-entity.8643=⇃
-entity.8644=⇄
-entity.8645=⇅
-entity.8646=⇆
-entity.8647=⇇
-entity.8648=⇈
-entity.8649=⇉
-entity.8650=⇊
-entity.8651=⇋
-entity.8652=⇌
-entity.8653=⇍
-entity.8654=⇎
-entity.8655=⇏
-entity.8656=⇐
-entity.8657=⇑
-entity.8658=⇒
-entity.8659=⇓
-entity.8660=⇔
-entity.8661=⇕
-entity.8662=⇖
-entity.8663=⇗
-entity.8664=⇘
-entity.8665=⇙
-entity.8666=⇚
-entity.8667=⇛
-entity.8669=⇝
-entity.8676=⇤
-entity.8677=⇥
-entity.8693=⇵
-entity.8701=⇽
-entity.8702=⇾
-entity.8703=⇿
-entity.8704=∀
-entity.8705=∁
-entity.8706=∂
-entity.8707=∃
-entity.8708=∄
-entity.8709=∅
-entity.8711=∇
-entity.8712=∈
-entity.8713=∉
-entity.8715=∋
-entity.8716=∌
-entity.8719=∏
-entity.8720=∐
-entity.8721=∑
-entity.8723=∓
-entity.8724=∔
-entity.8726=∖
-entity.8728=∘
-entity.8730=√
-entity.8733=∝
-entity.8735=∟
-entity.8736=∠
-entity.8737=∡
-entity.8738=∢
-entity.8739=∣
-entity.8740=∤
-entity.8741=∥
-entity.8742=∦
-entity.8743=∧
-entity.8744=∨
-entity.8747=∫
-entity.8748=∬
-entity.8749=∭
-entity.8750=∮
-entity.8751=∯
-entity.8752=∰
-entity.8753=∱
-entity.8754=∲
-entity.8755=∳
-entity.8756=∴
-entity.8757=∵
-entity.8758=∶
-entity.8759=∷
-entity.8760=∸
-entity.8762=∺
-entity.8763=∻
-entity.8764=∼
-entity.8765=∽
-entity.8766=∾
-entity.8767=∿
-entity.8768=≀
-entity.8769=≁
-entity.8770=≂
-entity.8771=≃
-entity.8772=≄
-entity.8773=≅
-entity.8774=≆
-entity.8775=≇
-entity.8776=≈
-entity.8777=≉
-entity.8778=≊
-entity.8779=≋
-entity.8780=≌
-entity.8781=≍
-entity.8782=≎
-entity.8783=≏
-entity.8784=≐
-entity.8785=≑
-entity.8786=≒
-entity.8787=≓
-entity.8788=≔
-entity.8789=≕
-entity.8790=≖
-entity.8791=≗
-entity.8793=≙
-entity.8794=≚
-entity.8796=≜
-entity.8799=≟
-entity.8800=≠
-entity.8801=≡
-entity.8802=≢
-entity.8804=≤
-entity.8805=≥
-entity.8806=≦
-entity.8807=≧
-entity.8808=≨
-entity.8809=≩
-entity.8810=≪
-entity.8811=≫
-entity.8812=≬
-entity.8813=≭
-entity.8814=≮
-entity.8815=≯
-entity.8816=≰
-entity.8817=≱
-entity.8818=≲
-entity.8819=≳
-entity.8820=≴
-entity.8821=≵
-entity.8822=≶
-entity.8823=≷
-entity.8824=≸
-entity.8825=≹
-entity.8826=≺
-entity.8827=≻
-entity.8828=≼
-entity.8829=≽
-entity.8830=≾
-entity.8831=≿
-entity.8832=⊀
-entity.8833=⊁
-entity.8834=⊂
-entity.8835=⊃
-entity.8837=⊅
-entity.8838=⊆
-entity.8839=⊇
-entity.8840=⊈
-entity.8841=⊉
-entity.8842=⊊
-entity.8843=⊋
-entity.8845=⊍
-entity.8846=⊎
-entity.8847=⊏
-entity.8848=⊐
-entity.8849=⊑
-entity.8850=⊒
-entity.8851=⊓
-entity.8852=⊔
-entity.8853=⊕
-entity.8854=⊖
-entity.8855=⊗
-entity.8856=⊘
-entity.8857=⊙
-entity.8858=⊚
-entity.8859=⊛
-entity.8861=⊝
-entity.8862=⊞
-entity.8863=⊟
-entity.8864=⊠
-entity.8865=⊡
-entity.8866=⊢
-entity.8867=⊣
-entity.8868=⊤
-entity.8869=⊥
-entity.8871=⊧
-entity.8872=⊨
-entity.8873=⊩
-entity.8874=⊪
-entity.8875=⊫
-entity.8876=⊬
-entity.8877=⊭
-entity.8878=⊮
-entity.8879=⊯
-entity.8880=⊰
-entity.8882=⊲
-entity.8883=⊳
-entity.8884=⊴
-entity.8885=⊵
-entity.8886=⊶
-entity.8887=⊷
-entity.8888=⊸
-entity.8889=⊹
-entity.8890=⊺
-entity.8891=⊻
-entity.8893=⊽
-entity.8894=⊾
-entity.8895=⊿
-entity.8896=⋀
-entity.8897=⋁
-entity.8898=⋂
-entity.8899=⋃
-entity.8900=⋄
-entity.8902=⋆
-entity.8903=⋇
-entity.8904=⋈
-entity.8905=⋉
-entity.8906=⋊
-entity.8907=⋋
-entity.8908=⋌
-entity.8909=⋍
-entity.8910=⋎
-entity.8911=⋏
-entity.8912=⋐
-entity.8913=⋑
-entity.8914=⋒
-entity.8915=⋓
-entity.8916=⋔
-entity.8917=⋕
-entity.8918=⋖
-entity.8919=⋗
-entity.8920=⋘
-entity.8921=⋙
-entity.8922=⋚
-entity.8923=⋛
-entity.8926=⋞
-entity.8927=⋟
-entity.8928=⋠
-entity.8929=⋡
-entity.8930=⋢
-entity.8931=⋣
-entity.8934=⋦
-entity.8935=⋧
-entity.8936=⋨
-entity.8937=⋩
-entity.8938=⋪
-entity.8939=⋫
-entity.8940=⋬
-entity.8941=⋭
-entity.8942=⋮
-entity.8943=⋯
-entity.8944=⋰
-entity.8945=⋱
-entity.8946=⋲
-entity.8947=⋳
-entity.8948=⋴
-entity.8949=⋵
-entity.8950=⋶
-entity.8951=⋷
-entity.8953=⋹
-entity.8954=⋺
-entity.8955=⋻
-entity.8956=⋼
-entity.8957=⋽
-entity.8958=⋾
-entity.8965=⌅
-entity.8966=⌆
-entity.8968=⌈
-entity.8969=⌉
-entity.8970=⌊
-entity.8971=⌋
-entity.8972=⌌
-entity.8973=⌍
-entity.8974=⌎
-entity.8975=⌏
-entity.8976=⌐
-entity.8978=⌒
-entity.8979=⌓
-entity.8981=⌕
-entity.8982=⌖
-entity.8988=⌜
-entity.8989=⌝
-entity.8990=⌞
-entity.8991=⌟
-entity.8994=⌢
-entity.8995=⌣
-entity.9005=⌭
-entity.9006=⌮
-entity.9014=⌶
-entity.9021=⌽
-entity.9023=⌿
-entity.9084=⍼
-entity.9136=⎰
-entity.9137=⎱
-entity.9140=⎴
-entity.9141=⎵
-entity.9142=⎶
-entity.9180=⏜
-entity.9181=⏝
-entity.9182=⏞
-entity.9183=⏟
-entity.9186=⏢
-entity.9191=⏧
-entity.9251=␣
-entity.9416=Ⓢ
-entity.9472=─
-entity.9474=│
-entity.9484=┌
-entity.9488=┐
-entity.9492=└
-entity.9496=┘
-entity.9500=├
-entity.9508=┤
-entity.9516=┬
-entity.9524=┴
-entity.9532=┼
-entity.9552=═
-entity.9553=║
-entity.9554=╒
-entity.9555=╓
-entity.9556=╔
-entity.9557=╕
-entity.9558=╖
-entity.9559=╗
-entity.9560=╘
-entity.9561=╙
-entity.9562=╚
-entity.9563=╛
-entity.9564=╜
-entity.9565=╝
-entity.9566=╞
-entity.9567=╟
-entity.9568=╠
-entity.9569=╡
-entity.9570=╢
-entity.9571=╣
-entity.9572=╤
-entity.9573=╥
-entity.9574=╦
-entity.9575=╧
-entity.9576=╨
-entity.9577=╩
-entity.9578=╪
-entity.9579=╫
-entity.9580=╬
-entity.9600=▀
-entity.9604=▄
-entity.9608=█
-entity.9617=░
-entity.9618=▒
-entity.9619=▓
-entity.9633=□
-entity.9642=▪
-entity.9643=▫
-entity.9645=▭
-entity.9646=▮
-entity.9649=▱
-entity.9651=△
-entity.9652=▴
-entity.9653=▵
-entity.9656=▸
-entity.9657=▹
-entity.9661=▽
-entity.9662=▾
-entity.9663=▿
-entity.9666=◂
-entity.9667=◃
-entity.9674=◊
-entity.9675=○
-entity.9708=◬
-entity.9711=◯
-entity.9720=◸
-entity.9721=◹
-entity.9722=◺
-entity.9723=◻
-entity.9724=◼
-entity.9733=★
-entity.9734=☆
-entity.9742=☎
-entity.9792=♀
-entity.9794=♂
-entity.9824=♠
-entity.9827=♣
-entity.9829=♥
-entity.9830=♦
-entity.9834=♪
-entity.9837=♭
-entity.9838=♮
-entity.9839=♯
-entity.10003=✓
-entity.10007=✗
-entity.10016=✠
-entity.10038=✶
-entity.10072=❘
-entity.10098=❲
-entity.10099=❳
-entity.10214=⟦
-entity.10215=⟧
-entity.10216=⟨
-entity.10217=⟩
-entity.10218=⟪
-entity.10219=⟫
-entity.10220=⟬
-entity.10221=⟭
-entity.10229=⟵
-entity.10230=⟶
-entity.10231=⟷
-entity.10232=⟸
-entity.10233=⟹
-entity.10234=⟺
-entity.10236=⟼
-entity.10239=⟿
-entity.10498=⤂
-entity.10499=⤃
-entity.10500=⤄
-entity.10501=⤅
-entity.10508=⤌
-entity.10509=⤍
-entity.10510=⤎
-entity.10511=⤏
-entity.10512=⤐
-entity.10513=⤑
-entity.10514=⤒
-entity.10515=⤓
-entity.10518=⤖
-entity.10521=⤙
-entity.10522=⤚
-entity.10523=⤛
-entity.10524=⤜
-entity.10525=⤝
-entity.10526=⤞
-entity.10527=⤟
-entity.10528=⤠
-entity.10531=⤣
-entity.10532=⤤
-entity.10533=⤥
-entity.10534=⤦
-entity.10535=⤧
-entity.10536=⤨
-entity.10537=⤩
-entity.10538=⤪
-entity.10547=⤳
-entity.10549=⤵
-entity.10550=⤶
-entity.10551=⤷
-entity.10552=⤸
-entity.10553=⤹
-entity.10556=⤼
-entity.10557=⤽
-entity.10565=⥅
-entity.10568=⥈
-entity.10569=⥉
-entity.10570=⥊
-entity.10571=⥋
-entity.10574=⥎
-entity.10575=⥏
-entity.10576=⥐
-entity.10577=⥑
-entity.10578=⥒
-entity.10579=⥓
-entity.10580=⥔
-entity.10581=⥕
-entity.10582=⥖
-entity.10583=⥗
-entity.10584=⥘
-entity.10585=⥙
-entity.10586=⥚
-entity.10587=⥛
-entity.10588=⥜
-entity.10589=⥝
-entity.10590=⥞
-entity.10591=⥟
-entity.10592=⥠
-entity.10593=⥡
-entity.10594=⥢
-entity.10595=⥣
-entity.10596=⥤
-entity.10597=⥥
-entity.10598=⥦
-entity.10599=⥧
-entity.10600=⥨
-entity.10601=⥩
-entity.10602=⥪
-entity.10603=⥫
-entity.10604=⥬
-entity.10605=⥭
-entity.10606=⥮
-entity.10607=⥯
-entity.10608=⥰
-entity.10609=⥱
-entity.10610=⥲
-entity.10611=⥳
-entity.10612=⥴
-entity.10613=⥵
-entity.10614=⥶
-entity.10616=⥸
-entity.10617=⥹
-entity.10619=⥻
-entity.10620=⥼
-entity.10621=⥽
-entity.10622=⥾
-entity.10623=⥿
-entity.10629=⦅
-entity.10630=⦆
-entity.10635=⦋
-entity.10636=⦌
-entity.10637=⦍
-entity.10638=⦎
-entity.10639=⦏
-entity.10640=⦐
-entity.10641=⦑
-entity.10642=⦒
-entity.10643=⦓
-entity.10644=⦔
-entity.10645=⦕
-entity.10646=⦖
-entity.10650=⦚
-entity.10652=⦜
-entity.10653=⦝
-entity.10660=⦤
-entity.10661=⦥
-entity.10662=⦦
-entity.10663=⦧
-entity.10664=⦨
-entity.10665=⦩
-entity.10666=⦪
-entity.10667=⦫
-entity.10668=⦬
-entity.10669=⦭
-entity.10670=⦮
-entity.10671=⦯
-entity.10672=⦰
-entity.10673=⦱
-entity.10674=⦲
-entity.10675=⦳
-entity.10676=⦴
-entity.10677=⦵
-entity.10678=⦶
-entity.10679=⦷
-entity.10681=⦹
-entity.10683=⦻
-entity.10684=⦼
-entity.10686=⦾
-entity.10687=⦿
-entity.10688=⧀
-entity.10689=⧁
-entity.10690=⧂
-entity.10691=⧃
-entity.10692=⧄
-entity.10693=⧅
-entity.10697=⧉
-entity.10701=⧍
-entity.10702=⧎
-entity.10703=⧏
-entity.10704=⧐
-entity.10714=∽̱
-entity.10716=⧜
-entity.10717=⧝
-entity.10718=⧞
-entity.10723=⧣
-entity.10724=⧤
-entity.10725=⧥
-entity.10731=⧫
-entity.10740=⧴
-entity.10742=⧶
-entity.10752=⨀
-entity.10753=⨁
-entity.10754=⨂
-entity.10756=⨄
-entity.10758=⨆
-entity.10764=⨌
-entity.10765=⨍
-entity.10768=⨐
-entity.10769=⨑
-entity.10770=⨒
-entity.10771=⨓
-entity.10772=⨔
-entity.10773=⨕
-entity.10774=⨖
-entity.10775=⨗
-entity.10786=⨢
-entity.10787=⨣
-entity.10788=⨤
-entity.10789=⨥
-entity.10790=⨦
-entity.10791=⨧
-entity.10793=⨩
-entity.10794=⨪
-entity.10797=⨭
-entity.10798=⨮
-entity.10799=⨯
-entity.10800=⨰
-entity.10801=⨱
-entity.10803=⨳
-entity.10804=⨴
-entity.10805=⨵
-entity.10806=⨶
-entity.10807=⨷
-entity.10808=⨸
-entity.10809=⨹
-entity.10810=⨺
-entity.10811=⨻
-entity.10812=⨼
-entity.10815=⨿
-entity.10816=⩀
-entity.10818=⩂
-entity.10819=⩃
-entity.10820=⩄
-entity.10821=⩅
-entity.10822=⩆
-entity.10823=⩇
-entity.10824=⩈
-entity.10825=⩉
-entity.10826=⩊
-entity.10827=⩋
-entity.10828=⩌
-entity.10829=⩍
-entity.10832=⩐
-entity.10835=⩓
-entity.10836=⩔
-entity.10837=⩕
-entity.10838=⩖
-entity.10839=⩗
-entity.10840=⩘
-entity.10842=⩚
-entity.10843=⩛
-entity.10844=⩜
-entity.10845=⩝
-entity.10847=⩟
-entity.10854=⩦
-entity.10858=⩪
-entity.10861=⩭
-entity.10862=⩮
-entity.10863=⩯
-entity.10864=⩰
-entity.10865=⩱
-entity.10866=⩲
-entity.10867=⩳
-entity.10868=⩴
-entity.10869=⩵
-entity.10871=⩷
-entity.10872=⩸
-entity.10873=⩹
-entity.10874=⩺
-entity.10875=⩻
-entity.10876=⩼
-entity.10877=⩽
-entity.10878=⩾
-entity.10879=⩿
-entity.10880=⪀
-entity.10881=⪁
-entity.10882=⪂
-entity.10883=⪃
-entity.10884=⪄
-entity.10885=⪅
-entity.10886=⪆
-entity.10887=⪇
-entity.10888=⪈
-entity.10889=⪉
-entity.10890=⪊
-entity.10891=⪋
-entity.10892=⪌
-entity.10893=⪍
-entity.10894=⪎
-entity.10895=⪏
-entity.10896=⪐
-entity.10897=⪑
-entity.10898=⪒
-entity.10899=⪓
-entity.10900=⪔
-entity.10901=⪕
-entity.10902=⪖
-entity.10903=⪗
-entity.10904=⪘
-entity.10905=⪙
-entity.10906=⪚
-entity.10909=⪝
-entity.10910=⪞
-entity.10911=⪟
-entity.10912=⪠
-entity.10913=⪡
-entity.10914=⪢
-entity.10916=⪤
-entity.10917=⪥
-entity.10918=⪦
-entity.10919=⪧
-entity.10920=⪨
-entity.10921=⪩
-entity.10922=⪪
-entity.10923=⪫
-entity.10924=⪬
-entity.10925=⪭
-entity.10926=⪮
-entity.10927=⪯
-entity.10928=⪰
-entity.10931=⪳
-entity.10932=⪴
-entity.10933=⪵
-entity.10934=⪶
-entity.10935=⪷
-entity.10936=⪸
-entity.10937=⪹
-entity.10938=⪺
-entity.10939=⪻
-entity.10940=⪼
-entity.10941=⪽
-entity.10942=⪾
-entity.10943=⪿
-entity.10944=⫀
-entity.10945=⫁
-entity.10946=⫂
-entity.10947=⫃
-entity.10948=⫄
-entity.10949=⫅
-entity.10950=⫆
-entity.10951=⫇
-entity.10952=⫈
-entity.10955=⫋
-entity.10956=⫌
-entity.10959=⫏
-entity.10960=⫐
-entity.10961=⫑
-entity.10962=⫒
-entity.10963=⫓
-entity.10964=⫔
-entity.10965=⫕
-entity.10966=⫖
-entity.10967=⫗
-entity.10968=⫘
-entity.10969=⫙
-entity.10970=⫚
-entity.10971=⫛
-entity.10980=⫤
-entity.10982=⫦
-entity.10983=⫧
-entity.10984=⫨
-entity.10985=⫩
-entity.10987=⫫
-entity.10988=⫬
-entity.10989=⫭
-entity.10990=⫮
-entity.10991=⫯
-entity.10992=⫰
-entity.10993=⫱
-entity.10994=⫲
-entity.10995=⫳
-entity.11005=⫽
-entity.64256=ff
-entity.64257=fi
-entity.64258=fl
-entity.64259=ffi
-entity.64260=ffl
-entity.119964=𝒜
-entity.119966=𝒞
-entity.119967=𝒟
-entity.119970=𝒢
-entity.119973=𝒥
-entity.119974=𝒦
-entity.119977=𝒩
-entity.119978=𝒪
-entity.119979=𝒫
-entity.119980=𝒬
-entity.119982=𝒮
-entity.119983=𝒯
-entity.119984=𝒰
-entity.119985=𝒱
-entity.119986=𝒲
-entity.119987=𝒳
-entity.119988=𝒴
-entity.119989=𝒵
-entity.119990=𝒶
-entity.119991=𝒷
-entity.119992=𝒸
-entity.119993=𝒹
-entity.119995=𝒻
-entity.119997=𝒽
-entity.119998=𝒾
-entity.119999=𝒿
-entity.120000=𝓀
-entity.120001=𝓁
-entity.120002=𝓂
-entity.120003=𝓃
-entity.120005=𝓅
-entity.120006=𝓆
-entity.120007=𝓇
-entity.120008=𝓈
-entity.120009=𝓉
-entity.120010=𝓊
-entity.120011=𝓋
-entity.120012=𝓌
-entity.120013=𝓍
-entity.120014=𝓎
-entity.120015=𝓏
-entity.120068=𝔄
-entity.120069=𝔅
-entity.120071=𝔇
-entity.120072=𝔈
-entity.120073=𝔉
-entity.120074=𝔊
-entity.120077=𝔍
-entity.120078=𝔎
-entity.120079=𝔏
-entity.120080=𝔐
-entity.120081=𝔑
-entity.120082=𝔒
-entity.120083=𝔓
-entity.120084=𝔔
-entity.120086=𝔖
-entity.120087=𝔗
-entity.120088=𝔘
-entity.120089=𝔙
-entity.120090=𝔚
-entity.120091=𝔛
-entity.120092=𝔜
-entity.120094=𝔞
-entity.120095=𝔟
-entity.120096=𝔠
-entity.120097=𝔡
-entity.120098=𝔢
-entity.120099=𝔣
-entity.120100=𝔤
-entity.120101=𝔥
-entity.120102=𝔦
-entity.120103=𝔧
-entity.120104=𝔨
-entity.120105=𝔩
-entity.120106=𝔪
-entity.120107=𝔫
-entity.120108=𝔬
-entity.120109=𝔭
-entity.120110=𝔮
-entity.120111=𝔯
-entity.120112=𝔰
-entity.120113=𝔱
-entity.120114=𝔲
-entity.120115=𝔳
-entity.120116=𝔴
-entity.120117=𝔵
-entity.120118=𝔶
-entity.120119=𝔷
-entity.120120=𝔸
-entity.120121=𝔹
-entity.120123=𝔻
-entity.120124=𝔼
-entity.120125=𝔽
-entity.120126=𝔾
-entity.120128=𝕀
-entity.120129=𝕁
-entity.120130=𝕂
-entity.120131=𝕃
-entity.120132=𝕄
-entity.120134=𝕆
-entity.120138=𝕊
-entity.120139=𝕋
-entity.120140=𝕌
-entity.120141=𝕍
-entity.120142=𝕎
-entity.120143=𝕏
-entity.120144=𝕐
-entity.120146=𝕒
-entity.120147=𝕓
-entity.120148=𝕔
-entity.120149=𝕕
-entity.120150=𝕖
-entity.120151=𝕗
-entity.120152=𝕘
-entity.120153=𝕙
-entity.120154=𝕚
-entity.120155=𝕛
-entity.120156=𝕜
-entity.120157=𝕝
-entity.120158=𝕞
-entity.120159=𝕟
-entity.120160=𝕠
-entity.120161=𝕡
-entity.120162=𝕢
-entity.120163=𝕣
-entity.120164=𝕤
-entity.120165=𝕥
-entity.120166=𝕦
-entity.120167=𝕧
-entity.120168=𝕨
-entity.120169=𝕩
-entity.120170=𝕪
-entity.120171=𝕫
-entity.120484=ı
-entity.120485=ȷ
deleted file mode 100644
--- a/intl/unicharutil/tables/moz.build
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-RESOURCE_FILES.entityTables = [
- 'html40Latin1.properties',
- 'html40Special.properties',
- 'html40Symbols.properties',
- 'mathml20.properties',
-]
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -482,17 +482,16 @@
@BINPATH@/res/table-remove-column.gif
@BINPATH@/res/table-remove-row-active.gif
@BINPATH@/res/table-remove-row-hover.gif
@BINPATH@/res/table-remove-row.gif
@BINPATH@/res/grabber.gif
@BINPATH@/res/dtd/*
@BINPATH@/res/html/*
@BINPATH@/res/language.properties
-@BINPATH@/res/entityTables/*
#ifndef MOZ_ANDROID_EXCLUDE_FONTS
@BINPATH@/res/fonts/*
#else
@BINPATH@/res/fonts/*.properties
#endif
; svg
--- a/parser/htmlparser/moz.build
+++ b/parser/htmlparser/moz.build
@@ -33,17 +33,16 @@ EXPORTS += [
'nsScannerString.h',
]
UNIFIED_SOURCES += [
'CNavDTD.cpp',
'CParserContext.cpp',
'nsElementTable.cpp',
'nsExpatDriver.cpp',
- 'nsHTMLEntities.cpp',
'nsHTMLTags.cpp',
'nsHTMLTokenizer.cpp',
'nsParser.cpp',
'nsParserModule.cpp',
'nsParserMsgUtils.cpp',
'nsParserService.cpp',
'nsScanner.cpp',
'nsScannerString.cpp',
deleted file mode 100644
--- a/parser/htmlparser/nsHTMLEntities.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/ArrayUtils.h"
-
-#include "nsHTMLEntities.h"
-
-#include "nsString.h"
-#include "nsCRT.h"
-#include "PLDHashTable.h"
-
-using namespace mozilla;
-
-struct EntityNode {
- const char* mStr; // never owns buffer
- int32_t mUnicode;
-};
-
-struct EntityNodeEntry : public PLDHashEntryHdr
-{
- const EntityNode* node;
-};
-
-static bool matchNodeUnicode(const PLDHashEntryHdr* aHdr, const void* key)
-{
- const EntityNodeEntry* entry = static_cast<const EntityNodeEntry*>(aHdr);
- const int32_t ucode = NS_PTR_TO_INT32(key);
- return (entry->node->mUnicode == ucode);
-}
-
-static PLDHashNumber hashUnicodeValue(const void* key)
-{
- // key is actually the unicode value
- return HashGeneric(key);
-}
-
-static const PLDHashTableOps UnicodeToEntityOps = {
- hashUnicodeValue,
- matchNodeUnicode,
- PLDHashTable::MoveEntryStub,
- PLDHashTable::ClearEntryStub,
- nullptr,
-};
-
-static PLDHashTable* gUnicodeToEntity;
-static nsrefcnt gTableRefCnt = 0;
-
-#define HTML_ENTITY(_name, _value) { #_name, _value },
-static const EntityNode gEntityArray[] = {
-#include "nsHTMLEntityList.h"
-};
-#undef HTML_ENTITY
-
-#define NS_HTML_ENTITY_COUNT ((int32_t)ArrayLength(gEntityArray))
-
-nsresult
-nsHTMLEntities::AddRefTable(void)
-{
- if (!gTableRefCnt) {
- gUnicodeToEntity = new PLDHashTable(&UnicodeToEntityOps,
- sizeof(EntityNodeEntry),
- NS_HTML_ENTITY_COUNT);
- for (const EntityNode *node = gEntityArray,
- *node_end = ArrayEnd(gEntityArray);
- node < node_end; ++node) {
-
- // add to Unicode->Entity table
- auto entry =
- static_cast<EntityNodeEntry*>
- (gUnicodeToEntity->Add(NS_INT32_TO_PTR(node->mUnicode), fallible));
- NS_ASSERTION(entry, "Error adding an entry");
- // Prefer earlier entries when we have duplication.
- if (!entry->node)
- entry->node = node;
- }
-#ifdef DEBUG
- gUnicodeToEntity->MarkImmutable();
-#endif
- }
- ++gTableRefCnt;
- return NS_OK;
-}
-
-void
-nsHTMLEntities::ReleaseTable(void)
-{
- if (--gTableRefCnt != 0) {
- return;
- }
-
- delete gUnicodeToEntity;
- gUnicodeToEntity = nullptr;
-}
-
-const char*
-nsHTMLEntities::UnicodeToEntity(int32_t aUnicode)
-{
- NS_ASSERTION(gUnicodeToEntity, "no lookup table, needs addref");
- auto entry =
- static_cast<EntityNodeEntry*>
- (gUnicodeToEntity->Search(NS_INT32_TO_PTR(aUnicode)));
-
- return entry ? entry->node->mStr : nullptr;
-}
-
deleted file mode 100644
--- a/parser/htmlparser/nsHTMLEntities.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef nsHTMLEntities_h___
-#define nsHTMLEntities_h___
-
-#include "nsString.h"
-
-class nsHTMLEntities {
-public:
-
- static nsresult AddRefTable(void);
- static void ReleaseTable(void);
-
-/**
- * Translate a unicode value into an entity string. This call
- * returns null if the entity cannot be mapped.
- * Note that the string returned DOES NOT have the leading "&" nor
- * the trailing ";" in it.
- */
- static const char* UnicodeToEntity(int32_t aUnicode);
-};
-
-#endif /* nsHTMLEntities_h___ */
deleted file mode 100644
--- a/parser/htmlparser/nsHTMLEntityList.h
+++ /dev/null
@@ -1,303 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/******
-
- This file contains the list of all HTML entities
- See nsHTMLEntities.h for access to the enum values for entities
-
- It is designed to be used as inline input to nsHTMLEntities.cpp *only*
- through the magic of C preprocessing.
-
- All entries must be enclosed in the macro HTML_ENTITY which will have cruel
- and unusual things done to it
-
- It is recommended (but not strictly necessary) to keep all entries
- in alphabetical order
-
- The first argument to HTML_ENTITY is the string value of the entity
- The second argument it HTML_ENTITY is the unicode value of the entity
-
- ******/
-
-// ISO 8859-1 entities.
-// See the HTML4.0 spec for this list in it's DTD form
-HTML_ENTITY(nbsp, 160)
-HTML_ENTITY(iexcl, 161)
-HTML_ENTITY(cent, 162)
-HTML_ENTITY(pound, 163)
-HTML_ENTITY(curren, 164)
-HTML_ENTITY(yen, 165)
-HTML_ENTITY(brvbar, 166)
-HTML_ENTITY(sect, 167)
-HTML_ENTITY(uml, 168)
-HTML_ENTITY(copy, 169)
-HTML_ENTITY(ordf, 170)
-HTML_ENTITY(laquo, 171)
-HTML_ENTITY(not, 172)
-HTML_ENTITY(shy, 173)
-HTML_ENTITY(reg, 174)
-HTML_ENTITY(macr, 175)
-HTML_ENTITY(deg, 176)
-HTML_ENTITY(plusmn, 177)
-HTML_ENTITY(sup2, 178)
-HTML_ENTITY(sup3, 179)
-HTML_ENTITY(acute, 180)
-HTML_ENTITY(micro, 181)
-HTML_ENTITY(para, 182)
-HTML_ENTITY(middot, 183)
-HTML_ENTITY(cedil, 184)
-HTML_ENTITY(sup1, 185)
-HTML_ENTITY(ordm, 186)
-HTML_ENTITY(raquo, 187)
-HTML_ENTITY(frac14, 188)
-HTML_ENTITY(frac12, 189)
-HTML_ENTITY(frac34, 190)
-HTML_ENTITY(iquest, 191)
-HTML_ENTITY(Agrave, 192)
-HTML_ENTITY(Aacute, 193)
-HTML_ENTITY(Acirc, 194)
-HTML_ENTITY(Atilde, 195)
-HTML_ENTITY(Auml, 196)
-HTML_ENTITY(Aring, 197)
-HTML_ENTITY(AElig, 198)
-HTML_ENTITY(Ccedil, 199)
-HTML_ENTITY(Egrave, 200)
-HTML_ENTITY(Eacute, 201)
-HTML_ENTITY(Ecirc, 202)
-HTML_ENTITY(Euml, 203)
-HTML_ENTITY(Igrave, 204)
-HTML_ENTITY(Iacute, 205)
-HTML_ENTITY(Icirc, 206)
-HTML_ENTITY(Iuml, 207)
-HTML_ENTITY(ETH, 208)
-HTML_ENTITY(Ntilde, 209)
-HTML_ENTITY(Ograve, 210)
-HTML_ENTITY(Oacute, 211)
-HTML_ENTITY(Ocirc, 212)
-HTML_ENTITY(Otilde, 213)
-HTML_ENTITY(Ouml, 214)
-HTML_ENTITY(times, 215)
-HTML_ENTITY(Oslash, 216)
-HTML_ENTITY(Ugrave, 217)
-HTML_ENTITY(Uacute, 218)
-HTML_ENTITY(Ucirc, 219)
-HTML_ENTITY(Uuml, 220)
-HTML_ENTITY(Yacute, 221)
-HTML_ENTITY(THORN, 222)
-HTML_ENTITY(szlig, 223)
-HTML_ENTITY(agrave, 224)
-HTML_ENTITY(aacute, 225)
-HTML_ENTITY(acirc, 226)
-HTML_ENTITY(atilde, 227)
-HTML_ENTITY(auml, 228)
-HTML_ENTITY(aring, 229)
-HTML_ENTITY(aelig, 230)
-HTML_ENTITY(ccedil, 231)
-HTML_ENTITY(egrave, 232)
-HTML_ENTITY(eacute, 233)
-HTML_ENTITY(ecirc, 234)
-HTML_ENTITY(euml, 235)
-HTML_ENTITY(igrave, 236)
-HTML_ENTITY(iacute, 237)
-HTML_ENTITY(icirc, 238)
-HTML_ENTITY(iuml, 239)
-HTML_ENTITY(eth, 240)
-HTML_ENTITY(ntilde, 241)
-HTML_ENTITY(ograve, 242)
-HTML_ENTITY(oacute, 243)
-HTML_ENTITY(ocirc, 244)
-HTML_ENTITY(otilde, 245)
-HTML_ENTITY(ouml, 246)
-HTML_ENTITY(divide, 247)
-HTML_ENTITY(oslash, 248)
-HTML_ENTITY(ugrave, 249)
-HTML_ENTITY(uacute, 250)
-HTML_ENTITY(ucirc, 251)
-HTML_ENTITY(uuml, 252)
-HTML_ENTITY(yacute, 253)
-HTML_ENTITY(thorn, 254)
-HTML_ENTITY(yuml, 255)
-
-// Symbols, mathematical symbols and Greek letters
-// See the HTML4.0 spec for this list in it's DTD form
-HTML_ENTITY(fnof, 402)
-HTML_ENTITY(Alpha, 913)
-HTML_ENTITY(Beta, 914)
-HTML_ENTITY(Gamma, 915)
-HTML_ENTITY(Delta, 916)
-HTML_ENTITY(Epsilon, 917)
-HTML_ENTITY(Zeta, 918)
-HTML_ENTITY(Eta, 919)
-HTML_ENTITY(Theta, 920)
-HTML_ENTITY(Iota, 921)
-HTML_ENTITY(Kappa, 922)
-HTML_ENTITY(Lambda, 923)
-HTML_ENTITY(Mu, 924)
-HTML_ENTITY(Nu, 925)
-HTML_ENTITY(Xi, 926)
-HTML_ENTITY(Omicron, 927)
-HTML_ENTITY(Pi, 928)
-HTML_ENTITY(Rho, 929)
-HTML_ENTITY(Sigma, 931)
-HTML_ENTITY(Tau, 932)
-HTML_ENTITY(Upsilon, 933)
-HTML_ENTITY(Phi, 934)
-HTML_ENTITY(Chi, 935)
-HTML_ENTITY(Psi, 936)
-HTML_ENTITY(Omega, 937)
-HTML_ENTITY(alpha, 945)
-HTML_ENTITY(beta, 946)
-HTML_ENTITY(gamma, 947)
-HTML_ENTITY(delta, 948)
-HTML_ENTITY(epsilon, 949)
-HTML_ENTITY(zeta, 950)
-HTML_ENTITY(eta, 951)
-HTML_ENTITY(theta, 952)
-HTML_ENTITY(iota, 953)
-HTML_ENTITY(kappa, 954)
-HTML_ENTITY(lambda, 955)
-HTML_ENTITY(mu, 956)
-HTML_ENTITY(nu, 957)
-HTML_ENTITY(xi, 958)
-HTML_ENTITY(omicron, 959)
-HTML_ENTITY(pi, 960)
-HTML_ENTITY(rho, 961)
-HTML_ENTITY(sigmaf, 962)
-HTML_ENTITY(sigma, 963)
-HTML_ENTITY(tau, 964)
-HTML_ENTITY(upsilon, 965)
-HTML_ENTITY(phi, 966)
-HTML_ENTITY(chi, 967)
-HTML_ENTITY(psi, 968)
-HTML_ENTITY(omega, 969)
-HTML_ENTITY(thetasym, 977)
-HTML_ENTITY(upsih, 978)
-HTML_ENTITY(piv, 982)
-HTML_ENTITY(bull, 8226)
-HTML_ENTITY(hellip, 8230)
-HTML_ENTITY(prime, 8242)
-HTML_ENTITY(Prime, 8243)
-HTML_ENTITY(oline, 8254)
-HTML_ENTITY(frasl, 8260)
-HTML_ENTITY(weierp, 8472)
-HTML_ENTITY(image, 8465)
-HTML_ENTITY(real, 8476)
-HTML_ENTITY(trade, 8482)
-HTML_ENTITY(alefsym, 8501)
-HTML_ENTITY(larr, 8592)
-HTML_ENTITY(uarr, 8593)
-HTML_ENTITY(rarr, 8594)
-HTML_ENTITY(darr, 8595)
-HTML_ENTITY(harr, 8596)
-HTML_ENTITY(crarr, 8629)
-HTML_ENTITY(lArr, 8656)
-HTML_ENTITY(uArr, 8657)
-HTML_ENTITY(rArr, 8658)
-HTML_ENTITY(dArr, 8659)
-HTML_ENTITY(hArr, 8660)
-HTML_ENTITY(forall, 8704)
-HTML_ENTITY(part, 8706)
-HTML_ENTITY(exist, 8707)
-HTML_ENTITY(empty, 8709)
-HTML_ENTITY(nabla, 8711)
-HTML_ENTITY(isin, 8712)
-HTML_ENTITY(notin, 8713)
-HTML_ENTITY(ni, 8715)
-HTML_ENTITY(prod, 8719)
-HTML_ENTITY(sum, 8721)
-HTML_ENTITY(minus, 8722)
-HTML_ENTITY(lowast, 8727)
-HTML_ENTITY(radic, 8730)
-HTML_ENTITY(prop, 8733)
-HTML_ENTITY(infin, 8734)
-HTML_ENTITY(ang, 8736)
-HTML_ENTITY(and, 8743)
-HTML_ENTITY(or, 8744)
-HTML_ENTITY(cap, 8745)
-HTML_ENTITY(cup, 8746)
-HTML_ENTITY(int, 8747)
-HTML_ENTITY(there4, 8756)
-HTML_ENTITY(sim, 8764)
-HTML_ENTITY(cong, 8773)
-HTML_ENTITY(asymp, 8776)
-HTML_ENTITY(ne, 8800)
-HTML_ENTITY(equiv, 8801)
-HTML_ENTITY(le, 8804)
-HTML_ENTITY(ge, 8805)
-HTML_ENTITY(sub, 8834)
-HTML_ENTITY(sup, 8835)
-HTML_ENTITY(nsub, 8836)
-HTML_ENTITY(sube, 8838)
-HTML_ENTITY(supe, 8839)
-HTML_ENTITY(oplus, 8853)
-HTML_ENTITY(otimes, 8855)
-HTML_ENTITY(perp, 8869)
-HTML_ENTITY(sdot, 8901)
-HTML_ENTITY(lceil, 8968)
-HTML_ENTITY(rceil, 8969)
-HTML_ENTITY(lfloor, 8970)
-HTML_ENTITY(rfloor, 8971)
-// Bug 603716: expansions of ⟨ and ⟩ have been modified in HTML5.
-// See http://www.w3.org/2003/entities/2007/htmlmathml-f.ent
-HTML_ENTITY(lang, 0x27E8)
-HTML_ENTITY(rang, 0x27E9)
-HTML_ENTITY(loz, 9674)
-HTML_ENTITY(spades, 9824)
-HTML_ENTITY(clubs, 9827)
-HTML_ENTITY(hearts, 9829)
-HTML_ENTITY(diams, 9830)
-
-// Markup-significant and internationalization characters
-// See the HTML4.0 spec for this list in it's DTD form
-HTML_ENTITY(quot, 34)
-HTML_ENTITY(amp, 38)
-HTML_ENTITY(lt, 60)
-HTML_ENTITY(gt, 62)
-HTML_ENTITY(OElig, 338)
-HTML_ENTITY(oelig, 339)
-HTML_ENTITY(Scaron, 352)
-HTML_ENTITY(scaron, 353)
-HTML_ENTITY(Yuml, 376)
-HTML_ENTITY(circ, 710)
-HTML_ENTITY(tilde, 732)
-HTML_ENTITY(ensp, 8194)
-HTML_ENTITY(emsp, 8195)
-HTML_ENTITY(thinsp, 8201)
-HTML_ENTITY(zwnj, 8204)
-HTML_ENTITY(zwj, 8205)
-HTML_ENTITY(lrm, 8206)
-HTML_ENTITY(rlm, 8207)
-HTML_ENTITY(ndash, 8211)
-HTML_ENTITY(mdash, 8212)
-HTML_ENTITY(lsquo, 8216)
-HTML_ENTITY(rsquo, 8217)
-HTML_ENTITY(sbquo, 8218)
-HTML_ENTITY(ldquo, 8220)
-HTML_ENTITY(rdquo, 8221)
-HTML_ENTITY(bdquo, 8222)
-HTML_ENTITY(dagger, 8224)
-HTML_ENTITY(Dagger, 8225)
-HTML_ENTITY(permil, 8240)
-HTML_ENTITY(lsaquo, 8249)
-HTML_ENTITY(rsaquo, 8250)
-HTML_ENTITY(euro, 8364)
-
-// Navigator entity extensions
-// This block of entities needs to be at the bottom of the list since it
-// contains duplicate Unicode codepoints. The codepoint to entity name
-// mapping (used by Composer) must ignores them, which occurs only
-// because they are listed later.
-
-// apos is from XML
-HTML_ENTITY(apos, 39)
-// The capitalized versions are required to handle non-standard input.
-HTML_ENTITY(AMP, 38)
-HTML_ENTITY(COPY, 169)
-HTML_ENTITY(GT, 62)
-HTML_ENTITY(LT, 60)
-HTML_ENTITY(QUOT, 34)
-HTML_ENTITY(REG, 174)
-
--- a/parser/htmlparser/nsIParserService.h
+++ b/parser/htmlparser/nsIParserService.h
@@ -78,18 +78,15 @@ class nsIParserService : public nsISuppo
*
* @return nsIAtom* The tag corresponding to the nsHTMLTag enum value, or
* nullptr if the enum value doesn't correspond to a tag
* (eHTMLTag_unknown, eHTMLTag_userdefined, eHTMLTag_text,
* ...).
*/
virtual nsIAtom *HTMLIdToAtomTag(int32_t aId) const = 0;
- NS_IMETHOD HTMLConvertUnicodeToEntity(int32_t aUnicode,
- nsCString& aEntity) const = 0;
-
NS_IMETHOD IsContainer(int32_t aId, bool& aIsContainer) const = 0;
NS_IMETHOD IsBlock(int32_t aId, bool& aIsBlock) const = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIParserService, NS_IPARSERSERVICE_IID)
#endif // nsIParserService_h__
--- a/parser/htmlparser/nsParserModule.cpp
+++ b/parser/htmlparser/nsParserModule.cpp
@@ -6,17 +6,16 @@
#include "nsIAtom.h"
#include "nsString.h"
#include "nspr.h"
#include "nsCOMPtr.h"
#include "mozilla/ModuleUtils.h"
#include "nsParserCIID.h"
#include "nsParser.h"
#include "CNavDTD.h"
-#include "nsHTMLEntities.h"
#include "nsHTMLTokenizer.h"
//#include "nsTextTokenizer.h"
#include "nsElementTable.h"
#include "nsParserService.h"
#include "nsSAXAttributes.h"
#include "nsSAXLocator.h"
#include "nsSAXXMLReader.h"
@@ -66,37 +65,31 @@ static const mozilla::Module::ContractID
};
static nsresult
Initialize()
{
nsresult rv = nsHTMLTags::AddRefTable();
NS_ENSURE_SUCCESS(rv, rv);
- rv = nsHTMLEntities::AddRefTable();
- if (NS_FAILED(rv)) {
- nsHTMLTags::ReleaseTable();
- return rv;
- }
#ifdef DEBUG
CheckElementTable();
#endif
#ifdef DEBUG
nsHTMLTags::TestTagTable();
#endif
return rv;
}
static void
Shutdown()
{
nsHTMLTags::ReleaseTable();
- nsHTMLEntities::ReleaseTable();
}
static mozilla::Module kParserModule = {
mozilla::Module::kVersion,
kParserCIDs,
kParserContracts,
nullptr,
nullptr,
--- a/parser/htmlparser/nsParserService.cpp
+++ b/parser/htmlparser/nsParserService.cpp
@@ -2,17 +2,16 @@
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsError.h"
#include "nsIAtom.h"
#include "nsParserService.h"
-#include "nsHTMLEntities.h"
#include "nsElementTable.h"
#include "nsICategoryManager.h"
#include "nsCategoryManagerUtils.h"
nsParserService::nsParserService()
{
}
@@ -48,28 +47,16 @@ nsParserService::HTMLIdToStringTag(int32
nsIAtom*
nsParserService::HTMLIdToAtomTag(int32_t aId) const
{
return nsHTMLTags::GetAtom((nsHTMLTag)aId);
}
NS_IMETHODIMP
-nsParserService::HTMLConvertUnicodeToEntity(int32_t aUnicode,
- nsCString& aEntity) const
-{
- const char* str = nsHTMLEntities::UnicodeToEntity(aUnicode);
- if (str) {
- aEntity.Assign(str);
- }
-
- return NS_OK;
-}
-
-NS_IMETHODIMP
nsParserService::IsContainer(int32_t aId, bool& aIsContainer) const
{
aIsContainer = nsHTMLElement::IsContainer((eHTMLTags)aId);
return NS_OK;
}
NS_IMETHODIMP
--- a/parser/htmlparser/nsParserService.h
+++ b/parser/htmlparser/nsParserService.h
@@ -42,15 +42,13 @@ public:
int32_t HTMLCaseSensitiveAtomTagToId(nsIAtom* aAtom) const override;
int32_t HTMLStringTagToId(const nsAString& aTag) const override;
const char16_t *HTMLIdToStringTag(int32_t aId) const override;
nsIAtom *HTMLIdToAtomTag(int32_t aId) const override;
- NS_IMETHOD HTMLConvertUnicodeToEntity(int32_t aUnicode,
- nsCString& aEntity) const override;
NS_IMETHOD IsContainer(int32_t aId, bool& aIsContainer) const override;
NS_IMETHOD IsBlock(int32_t aId, bool& aIsBlock) const override;
};
#endif
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -1455,45 +1455,18 @@ var ViewSelectionSource = {
">": '&<span class="entity">gt;</span>',
'"': '&<span class="entity">quot;</span>'
};
function charTableLookup(letter) {
return charTable[letter];
}
- function convertEntity(letter) {
- try {
- var unichar = this._entityConverter
- .ConvertToEntity(letter, entityVersion);
- var entity = unichar.substring(1); // extract '&'
- return '&<span class="entity">' + entity + "</span>";
- } catch (ex) {
- return letter;
- }
- }
-
- if (!this._entityConverter) {
- try {
- this._entityConverter = Cc["@mozilla.org/intl/entityconverter;1"]
- .createInstance(Ci.nsIEntityConverter);
- } catch (e) { }
- }
-
- const entityVersion = Ci.nsIEntityConverter.entityW3C;
-
- var str = text;
-
// replace chars in our charTable
- str = str.replace(/[<>&"]/g, charTableLookup);
-
- // replace chars > 0x7f via nsIEntityConverter
- str = str.replace(/[^\0-\u007f]/g, convertEntity);
-
- return str;
+ return text.replace(/[<>&"]/g, charTableLookup);
}
};
ViewSelectionSource.init();
addEventListener("MozApplicationManifest", function(e) {
let doc = e.target;
let info = {