Bug 610345 - Add MathML named characters that expand to two code points to the HTML5 parser. rs=jonas, a=blocking2.0-betaN.

This commit is contained in:
Henri Sivonen 2010-11-23 13:49:27 +02:00
parent 9db8689cdf
commit be4cdc6c1a
8 changed files with 2046 additions and 1861 deletions

View File

@ -3076,7 +3076,6 @@ public class Tokenizer implements Locator {
continue;
}
// TODO warn about apos (IE) and TRADE (Opera)
if (candidate == -1) {
// reconsume deals with CR, LF or nul
/*
@ -3151,11 +3150,15 @@ public class Tokenizer implements Locator {
* table).
*/
@Const @NoLength char[] val = NamedCharacters.VALUES[candidate];
// See if the first slot holds a high surrogate
if ((val[0] & 0xFC00) == 0xD800) {
emitOrAppendTwo(val, returnState);
} else {
if (
// [NOCPP[
val.length == 1
// ]NOCPP]
// CPPONLY: val[1] == 0
) {
emitOrAppendOne(val, returnState);
} else {
emitOrAppendTwo(val, returnState);
}
// this is so complicated!
if (strBufMark < strBufLen) {
@ -6350,11 +6353,15 @@ public class Tokenizer implements Locator {
* table).
*/
@Const @NoLength char[] val = NamedCharacters.VALUES[candidate];
// See if the first slot holds a high surrogate
if ((val[0] & 0xFC00) == 0xD800) {
emitOrAppendTwo(val, returnState);
} else {
if (
// [NOCPP[
val.length == 1
// ]NOCPP]
// CPPONLY: val[1] == 0
) {
emitOrAppendOne(val, returnState);
} else {
emitOrAppendTwo(val, returnState);
}
// this is so complicated!
if (strBufMark < strBufLen) {

View File

@ -1224,7 +1224,7 @@ public abstract class TreeBuilder<T> implements TokenHandler,
/**
* @see nu.validator.htmlparser.common.TokenHandler#zeroOriginatingReplacementCharacter()
*/
@Override public void zeroOriginatingReplacementCharacter()
public void zeroOriginatingReplacementCharacter()
throws SAXException {
if (inForeign || mode == TEXT) {
characters(REPLACEMENT_CHARACTER, 0, 1);
@ -5241,7 +5241,7 @@ public abstract class TreeBuilder<T> implements TokenHandler,
/**
* @see nu.validator.htmlparser.common.TokenHandler#cdataSectionAllowed()
*/
@Override public boolean cdataSectionAllowed() throws SAXException {
public boolean cdataSectionAllowed() throws SAXException {
return inForeign && currentPtr >= 0
&& stack[currentPtr].ns != "http://www.w3.org/1999/xhtml";
}

View File

@ -24,27 +24,31 @@
#include "nsHtml5NamedCharactersAccel.h"
static PRInt32 const HILO_ACCEL_65[] = {
0, 0, 0, 0, 0, 0, 0, 12386493, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38863441, 0, 0, 0, 0, 58524541, 0, 0, 0, 73466977, 0, 0, 0, 80282823, 0, 0, 0, 0, 0, 109971084, 0, 0, 130549704, 133957628, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 12386493, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40174181, 0, 0, 0, 0, 60162966, 0, 0, 0, 75367550, 0, 0, 0, 82183396, 0, 0, 0, 0, 0, 115148507, 0, 0, 135989275, 139397199, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_66[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27525540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80348362, 0, 0, 0, 0, 0, 110036623, 0, 0, 0, 134088701, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28770743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82248935, 0, 0, 0, 0, 0, 115214046, 0, 0, 0, 139528272, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_68[] = {
0, 0, 0, 4980811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37159479, 0, 0, 0, 0, 0, 0, 0, 0, 62915519, 0, 0, 0, 0, 0, 0, 0, 89982301, 0, 0, 0, 0, 0, 0, 0, 0, 134154239, 0, 0, 0, 0
0, 0, 0, 4980811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38470219, 0, 0, 0, 0, 0, 0, 0, 0, 64553944, 0, 0, 0, 0, 0, 0, 0, 92145022, 0, 0, 0, 0, 0, 0, 0, 0, 139593810, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_69[] = {
65536, 0, 0, 0, 0, 0, 0, 0, 13172937, 0, 0, 0, 0, 0, 24052079, 0, 0, 27656613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69796904, 0, 0, 0, 0, 80479435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
65536, 0, 0, 0, 0, 0, 0, 0, 13172937, 0, 0, 0, 0, 0, 25297282, 0, 0, 28901816, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71500866, 0, 0, 0, 0, 82380008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_71[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94897574, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_72[] = {
0, 0, 2555943, 0, 0, 0, 0, 0, 0, 0, 15532269, 0, 0, 0, 0, 0, 0, 0, 30540241, 33161721, 0, 0, 0, 0, 0, 39584348, 0, 0, 0, 58590078, 0, 0, 0, 0, 0, 0, 0, 80544973, 0, 0, 0, 0, 0, 110102160, 0, 0, 130615241, 0, 0, 0, 0, 0
0, 0, 2555943, 0, 0, 0, 0, 0, 0, 0, 15532269, 0, 0, 0, 0, 0, 0, 0, 31785444, 34406924, 0, 0, 0, 0, 0, 40895088, 0, 0, 0, 60228503, 0, 0, 0, 0, 0, 0, 0, 82445546, 0, 0, 0, 0, 0, 115279583, 0, 0, 136054812, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_73[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38928978, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40239718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_74[] = {
@ -52,7 +56,7 @@ static PRInt32 const HILO_ACCEL_74[] = {
};
static PRInt32 const HILO_ACCEL_76[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92669317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95225257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_77[] = {
@ -60,19 +64,19 @@ static PRInt32 const HILO_ACCEL_77[] = {
};
static PRInt32 const HILO_ACCEL_78[] = {
0, 0, 0, 0, 8454273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44696234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 8454273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46072511, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_79[] = {
0, 0, 2687016, 0, 0, 0, 0, 0, 13304011, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30605779, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 2687016, 0, 0, 0, 0, 0, 13304011, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31850982, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_82[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33227259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92734855, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34472462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95290798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_83[] = {
0, 0, 0, 5111886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33358332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100599295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 5111886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34603535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105776718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_84[] = {
@ -80,11 +84,11 @@ static PRInt32 const HILO_ACCEL_84[] = {
};
static PRInt32 const HILO_ACCEL_85[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27263391, 0, 0, 0, 0, 0, 0, 0, 38994515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28508594, 0, 0, 0, 0, 0, 0, 0, 40305255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_86[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92865928, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95421871, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_90[] = {
@ -92,107 +96,107 @@ static PRInt32 const HILO_ACCEL_90[] = {
};
static PRInt32 const HILO_ACCEL_97[] = {
327684, 1900571, 2949162, 5374032, 8716420, 0, 11206826, 12517566, 13435084, 0, 15663343, 16515320, 19988785, 20644155, 24183152, 25952652, 0, 27918759, 30671316, 33489406, 34734607, 0, 0, 0, 39125588, 39649885, 40305254, 45220523, 52691740, 58917759, 63112129, 67240962, 70059050, 73925730, 75367549, 0, 79561917, 81986766, 90703198, 93390218, 100795904, 104990268, 0, 111675025, 116590323, 126814094, 130811850, 135006208, 0, 0, 138479679, 139266125
327684, 1900571, 2949162, 5374032, 8716420, 0, 11206826, 12517566, 13435084, 0, 15663343, 16515320, 19988785, 20644155, 25428355, 27197855, 0, 29163962, 31916519, 34734609, 36045347, 0, 0, 0, 40436328, 40960625, 41615994, 46596800, 54264627, 60556184, 64750554, 68879387, 71763012, 75826303, 77268122, 0, 81462490, 83952875, 92865919, 96142769, 105973327, 110167691, 0, 116917984, 121833283, 132253665, 136251421, 140707923, 0, 0, 144574620, 145361066
};
static PRInt32 const HILO_ACCEL_98[] = {
393222, 0, 0, 0, 0, 0, 11272364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34865683, 37225016, 0, 0, 0, 0, 40370792, 45351603, 0, 59048836, 0, 0, 70124590, 73991273, 0, 0, 0, 82445540, 0, 93521298, 0, 0, 0, 112133801, 116655860, 126879632, 130942925, 0, 0, 0, 0, 0
393222, 0, 0, 0, 0, 0, 11272364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36176423, 38535756, 0, 0, 0, 0, 41681532, 46727880, 0, 60687261, 0, 0, 71828552, 75891846, 0, 0, 0, 84411650, 0, 96404924, 0, 0, 0, 117376761, 121898820, 132319203, 136382496, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_99[] = {
589831, 1966110, 3276846, 5505107, 8978566, 10420383, 11468973, 12583104, 13631694, 15139046, 15794416, 16711933, 20054322, 20840764, 24379762, 26018189, 0, 28115371, 30998997, 33686016, 35062293, 37290553, 38273608, 0, 39256662, 39780958, 40829545, 45482677, 53150501, 59179910, 63505348, 67306499, 70255663, 74056810, 75629695, 79037621, 79692991, 82773227, 90834281, 93914516, 101058051, 105055811, 0, 112461488, 117573365, 127076241, 131139535, 135071757, 136054812, 136906791, 138610754, 139397198
589831, 1966110, 3276846, 5505107, 8978566, 10420383, 11468973, 12583104, 13631694, 15139046, 15794416, 16711933, 20054322, 20840764, 25624965, 27263392, 0, 29360574, 32244200, 34931219, 36373033, 38601293, 39584348, 0, 40567402, 41091698, 42205821, 46858954, 54723389, 60818335, 65143773, 68944924, 71959625, 75957383, 77530268, 80938194, 81593564, 84739337, 92997002, 96863680, 106235474, 110233234, 0, 117704448, 122816325, 132515812, 136579106, 140773476, 142149753, 143001732, 144705695, 145492139
};
static PRInt32 const HILO_ACCEL_100[] = {
0, 0, 3342387, 0, 9044106, 0, 11534512, 0, 13697233, 0, 0, 0, 0, 0, 24445301, 0, 0, 0, 0, 0, 35127832, 37421626, 0, 0, 0, 39846496, 0, 45548215, 53216044, 59442056, 63570890, 0, 70321201, 0, 0, 0, 0, 83166448, 90899819, 93980058, 101385735, 0, 0, 112789173, 117769987, 127141780, 131336146, 135137294, 0, 136972330, 0, 139462736
0, 0, 3342387, 0, 9044106, 0, 11534512, 0, 13697233, 0, 0, 0, 0, 0, 25690504, 0, 0, 0, 0, 0, 36438572, 38732366, 0, 0, 0, 41157236, 0, 46924492, 54788932, 61080481, 65209315, 0, 72025163, 0, 0, 0, 0, 85132558, 93062540, 96929223, 106563158, 0, 0, 118032133, 123012947, 132581351, 136775717, 140839013, 0, 143067271, 0, 145557677
};
static PRInt32 const HILO_ACCEL_101[] = {
0, 2162719, 3473460, 5636181, 0, 0, 0, 0, 0, 0, 0, 18809088, 20185395, 21299519, 0, 0, 0, 28377518, 0, 0, 0, 37945916, 38339145, 0, 0, 39977569, 40960624, 46072504, 53609261, 59704204, 63636427, 67372036, 71042098, 74318955, 75826307, 0, 0, 84935926, 90965356, 94569883, 101451276, 105383492, 0, 113247930, 118490886, 127207317, 0, 135530511, 136316957, 0, 138741828, 139593809
0, 2162719, 3473460, 5636181, 0, 0, 0, 0, 0, 0, 0, 18809088, 20185395, 21299519, 0, 0, 0, 29622721, 0, 0, 0, 39256656, 39649885, 0, 0, 41288309, 42336901, 47448781, 55182149, 61342629, 65274852, 69010461, 72811596, 76219528, 77726880, 0, 0, 86967572, 93128077, 97650120, 106628699, 110560915, 0, 118490890, 123733846, 132646888, 0, 141232230, 142411898, 0, 144836769, 145688750
};
static PRInt32 const HILO_ACCEL_102[] = {
655370, 2228258, 3538998, 5701719, 9109643, 10485920, 11600049, 12648641, 13762770, 15204584, 15859954, 18874656, 20250933, 21365062, 24510838, 26083726, 27328929, 28443058, 31064538, 33751555, 35193369, 38011460, 38404682, 38601293, 39322200, 40043107, 41091698, 46138048, 53674803, 59835280, 63767500, 67634181, 71107645, 74384495, 75957382, 79103159, 79758529, 85132561, 91030893, 94635428, 101582349, 105449033, 109119105, 113444545, 118621969, 127272854, 131467221, 135596053, 136382497, 137037867, 138807366, 139659347
655370, 2228258, 3538998, 5701719, 9109643, 10485920, 11600049, 12648641, 13762770, 15204584, 15859954, 18874656, 20250933, 21365062, 25756041, 27328929, 28574132, 29688261, 32309741, 34996758, 36504109, 39322200, 39715422, 39912033, 40632940, 41353847, 42467975, 47514325, 55247691, 61473705, 65405925, 69272606, 72877144, 76285068, 77857955, 81003732, 81659102, 87164208, 93193614, 97715667, 106759772, 110626456, 114296528, 118687505, 123864929, 132712425, 136906792, 141297772, 142477438, 143132808, 144902307, 145754288
};
static PRInt32 const HILO_ACCEL_103[] = {
786443, 0, 0, 0, 9240716, 0, 11665586, 0, 13893843, 0, 0, 0, 0, 0, 24641911, 0, 0, 0, 0, 0, 35324442, 0, 0, 0, 0, 0, 41222772, 0, 0, 0, 64095182, 0, 71238718, 0, 76088456, 0, 79824066, 85263636, 0, 94963109, 101844495, 0, 0, 0, 0, 0, 131598295, 0, 0, 0, 0, 0
786443, 0, 0, 0, 9240716, 0, 11665586, 0, 13893843, 0, 0, 0, 0, 0, 25887114, 0, 0, 0, 0, 0, 36635182, 0, 0, 0, 0, 0, 42599049, 0, 0, 0, 65733607, 0, 73008217, 0, 77989029, 0, 81724639, 87295283, 0, 98305492, 107021918, 0, 0, 0, 0, 0, 137037866, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_104[] = {
0, 0, 3604535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26149263, 0, 28508595, 31326683, 33948164, 0, 0, 0, 0, 0, 0, 0, 0, 53936948, 59966354, 0, 0, 0, 0, 0, 0, 79889603, 85525782, 91096430, 95159722, 101975571, 105711178, 0, 113772228, 119080723, 128059287, 131794905, 0, 0, 137168940, 0, 139724884
0, 0, 3604535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27394466, 0, 29753798, 32571886, 35258903, 0, 0, 0, 0, 0, 0, 0, 0, 55509836, 61604779, 0, 0, 0, 0, 0, 0, 81790176, 87557429, 93259151, 98502109, 107152994, 110888601, 0, 119015188, 124323683, 133498858, 137234476, 0, 0, 143263881, 0, 145819825
};
static PRInt32 const HILO_ACCEL_105[] = {
0, 0, 3866680, 6160472, 0, 10616993, 0, 12714178, 0, 0, 0, 0, 20316470, 0, 0, 26214800, 0, 30015924, 31392223, 34210311, 0, 0, 0, 38666830, 0, 0, 0, 46990017, 54919992, 60752788, 0, 67699721, 71304256, 0, 76416138, 0, 0, 0, 91817327, 95421869, 102041109, 105907790, 109184642, 114493129, 119998234, 128518051, 0, 0, 0, 137234478, 138872903, 139790421
0, 0, 3866680, 6160472, 0, 10616993, 0, 12714178, 0, 0, 0, 0, 20316470, 0, 0, 27460003, 0, 31261127, 32637426, 35521051, 0, 0, 0, 39977570, 0, 0, 0, 48366294, 56492880, 62391213, 0, 69338146, 73073755, 0, 78316711, 0, 0, 0, 93980048, 98764256, 107218532, 111085213, 114362065, 119736089, 125241194, 133957622, 0, 0, 0, 143329419, 144967844, 145885362
};
static PRInt32 const HILO_ACCEL_106[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60818336, 0, 0, 71369793, 0, 76481679, 0, 79955140, 85591322, 0, 95487409, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62456761, 0, 69403683, 73139292, 0, 78382252, 0, 81855713, 87622969, 0, 98829796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_107[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47055566, 0, 0, 0, 0, 0, 74515568, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48431843, 0, 0, 0, 0, 0, 76416141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_108[] = {
851981, 0, 4063292, 0, 9306254, 0, 0, 0, 0, 0, 0, 19005729, 0, 0, 0, 26280337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41419382, 47776463, 55051079, 60949409, 64422867, 67896330, 71631938, 0, 0, 0, 0, 85919003, 91948410, 96273842, 102368790, 106825297, 0, 114689748, 120063784, 0, 132057052, 135661590, 0, 137365551, 0, 0
851981, 0, 4063292, 0, 9306254, 0, 0, 0, 0, 0, 0, 19005729, 0, 0, 0, 27525540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42795659, 49152740, 56623967, 62587834, 66061292, 69600292, 73401437, 0, 0, 0, 0, 87950650, 94111131, 99878373, 107546213, 112002720, 0, 119932708, 125306744, 0, 137496623, 141363309, 0, 143460492, 0, 0
};
static PRInt32 const HILO_ACCEL_109[] = {
917518, 0, 0, 0, 9502863, 0, 0, 0, 14155989, 0, 0, 19071267, 0, 0, 24838521, 0, 0, 0, 31457760, 0, 35389980, 0, 0, 0, 0, 0, 41681529, 0, 0, 0, 64881624, 0, 0, 0, 76940432, 79168696, 0, 86115616, 0, 96339390, 102696475, 106890847, 0, 114820823, 120522537, 0, 132253664, 0, 0, 137431089, 0, 0
917518, 0, 0, 0, 9502863, 0, 0, 0, 14155989, 0, 0, 19071267, 0, 0, 26083724, 0, 0, 0, 32702963, 0, 36700720, 0, 0, 0, 0, 0, 43057806, 0, 0, 0, 66520049, 0, 0, 0, 78841005, 81069269, 0, 88147263, 0, 99943925, 107873898, 112068270, 0, 120063783, 125831033, 0, 137693235, 0, 0, 143526030, 0, 0
};
static PRInt32 const HILO_ACCEL_110[] = {
983055, 0, 0, 0, 0, 0, 0, 0, 14483673, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35783197, 0, 0, 0, 0, 0, 43188861, 47842010, 0, 0, 65012703, 67961869, 72090694, 0, 77661335, 0, 0, 86574371, 92013948, 0, 0, 0, 0, 114886361, 0, 0, 0, 0, 0, 137496626, 0, 0
983055, 0, 0, 0, 0, 0, 0, 0, 14483673, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37093937, 0, 0, 0, 0, 0, 44565138, 49349359, 0, 0, 66651128, 69665831, 73860193, 0, 79561908, 0, 0, 88606018, 94176669, 0, 0, 0, 0, 120129321, 0, 0, 0, 141494382, 0, 143591567, 0, 0
};
static PRInt32 const HILO_ACCEL_111[] = {
1114128, 2293795, 4587583, 8257631, 9633938, 10813603, 11731123, 12845251, 14680286, 15270121, 15925491, 19661092, 20382007, 23724359, 24904060, 26411410, 27394466, 30147019, 31523297, 34275851, 35914275, 38076997, 38470219, 38732367, 39387737, 40108644, 43319956, 50987739, 56165193, 61801379, 65143777, 68224014, 72156237, 74908786, 77923490, 79234233, 80020677, 87754026, 92145021, 97060287, 102762016, 107152992, 109250179, 115345114, 120850224, 128976810, 132384739, 135727127, 136448034, 137758771, 138938440, 139855958
1114128, 2293795, 4587583, 8257631, 9633938, 10813603, 11731123, 12845251, 14680286, 15270121, 15925491, 19661092, 20382007, 24969543, 26149263, 27656613, 28639669, 31392222, 32768500, 35586591, 37225015, 39387737, 39780959, 40043107, 40698477, 41419384, 44696233, 52495090, 57738081, 63439804, 66782202, 69927976, 73925736, 76809359, 79824063, 81134806, 81921250, 89785673, 94307742, 100795894, 107939439, 112330415, 114427602, 120588074, 126158721, 134416381, 137824310, 141559920, 142542975, 143853712, 145033381, 145950899
};
static PRInt32 const HILO_ACCEL_112[] = {
1179666, 0, 0, 0, 9699476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25035133, 0, 0, 0, 0, 0, 36766245, 0, 0, 0, 0, 0, 43844246, 51053323, 0, 0, 65536995, 68289554, 0, 0, 77989030, 0, 0, 87885116, 92210559, 97453514, 102958625, 0, 109315716, 115541729, 121046837, 129042353, 132974565, 135792664, 136513571, 0, 0, 0
1179666, 0, 0, 0, 9699476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26280336, 0, 0, 0, 0, 0, 38076985, 0, 0, 0, 0, 0, 45220523, 52560674, 0, 0, 67175420, 69993516, 0, 0, 79889603, 0, 0, 89916763, 94373280, 101451267, 108136048, 0, 114493139, 120784689, 126355334, 134481924, 138414136, 141625457, 142608512, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_113[] = {
0, 0, 0, 0, 9896085, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32047586, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66192361, 0, 0, 0, 78120103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121964344, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 9896085, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33292789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67830786, 0, 0, 0, 80020676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127403913, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_114[] = {
1310739, 2359332, 4653127, 0, 0, 0, 12189876, 0, 0, 0, 0, 0, 0, 0, 25100671, 27001236, 0, 30212557, 0, 34341388, 36831794, 0, 0, 0, 0, 0, 43975326, 51249932, 56296282, 61998000, 66323443, 69600275, 72221774, 0, 0, 0, 0, 88278334, 0, 97781200, 103810596, 108856932, 0, 115607268, 122029894, 130025394, 133302254, 135858201, 136644644, 137889847, 0, 0
1310739, 2359332, 4653127, 0, 0, 0, 12189876, 0, 0, 0, 0, 0, 0, 0, 26345874, 28246439, 0, 31457760, 0, 35652128, 38142534, 0, 0, 0, 0, 0, 45351603, 52757283, 57869170, 63636425, 67961868, 71304237, 73991273, 0, 0, 0, 0, 90309981, 0, 101910029, 108988019, 114034355, 0, 120850228, 127469465, 135464965, 138741825, 141690994, 142739585, 143984788, 0, 0
};
static PRInt32 const HILO_ACCEL_115[] = {
1441813, 2424869, 4718664, 8388735, 10027160, 10879142, 12255419, 12976325, 14745825, 15401194, 15991028, 19857709, 20447544, 23789931, 25297280, 27132317, 27460003, 30343630, 32113130, 34472461, 36897331, 38142534, 38535756, 38797904, 39453274, 40174181, 44237472, 51708687, 56623964, 62260147, 66520053, 69665831, 72483919, 75105400, 78578857, 79365306, 80086214, 88933700, 92341632, 99026389, 104072753, 108988030, 109381253, 116000485, 122292039, 130287553, 133367795, 135923738, 136710182, 138020921, 139003977, 139921495
1441813, 2424869, 4718664, 8388735, 10027160, 10879142, 12255419, 12976325, 14745825, 15401194, 15991028, 19857709, 20447544, 25035134, 26542483, 28377520, 28705206, 31588833, 33358333, 35783201, 38208071, 39453274, 39846496, 40108644, 40764014, 41484921, 45613749, 53216038, 58196852, 63898572, 68158478, 71369793, 74253418, 77005973, 80479430, 81265879, 81986787, 90965347, 94504353, 103679508, 109250176, 114165453, 114558676, 121243445, 127731610, 135727124, 138807366, 142018675, 142805123, 144115862, 145098918, 146016436
};
static PRInt32 const HILO_ACCEL_116[] = {
1572887, 0, 0, 0, 10092698, 0, 12320956, 0, 14811362, 0, 0, 19923248, 0, 23921004, 25493891, 0, 0, 0, 32178667, 0, 36962868, 0, 0, 0, 0, 0, 44368548, 0, 56689505, 62456759, 66716664, 0, 73401427, 0, 78709936, 0, 0, 89785678, 0, 99550696, 104334901, 0, 0, 116393707, 122619723, 0, 133629940, 0, 0, 0, 0, 0
1572887, 0, 0, 0, 10092698, 0, 12320956, 0, 14811362, 0, 0, 19923248, 0, 25166207, 26739094, 0, 0, 0, 33423870, 0, 38273608, 0, 0, 0, 0, 0, 45744825, 0, 58262393, 64095184, 68355089, 0, 75170926, 0, 80610509, 0, 0, 91817325, 0, 104203823, 109512324, 0, 0, 121636667, 128059294, 0, 139069511, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_117[] = {
1703961, 2490406, 4849737, 0, 10223771, 0, 0, 13107399, 15007971, 15466732, 0, 0, 20513081, 23986542, 25624966, 0, 0, 30409168, 33030636, 0, 37093941, 0, 0, 0, 39518811, 0, 44499622, 52101910, 58262370, 62587834, 66913275, 0, 0, 0, 78906546, 79430844, 0, 89916763, 92538242, 99812848, 104465977, 109053568, 109774470, 116459249, 126224208, 0, 133826552, 0, 0, 138151995, 139200586, 0
1703961, 2490406, 4849737, 0, 10223771, 0, 0, 13107399, 15007971, 15466732, 0, 0, 20513081, 25231745, 26870169, 0, 0, 31654371, 34275839, 0, 38404681, 0, 0, 0, 40829551, 0, 45875899, 53609261, 59900794, 64226259, 68551700, 0, 0, 0, 80807119, 81331417, 0, 91948410, 94700963, 104465975, 109643400, 114230991, 114951893, 121702209, 131663779, 0, 139266123, 0, 0, 144246936, 145295527, 0
};
static PRInt32 const HILO_ACCEL_118[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25887112, 0, 0, 0, 0, 0, 0, 38208071, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100206068, 104531515, 0, 0, 0, 0, 0, 0, 0, 0, 138217533, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27132315, 0, 0, 0, 0, 0, 0, 39518811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75302012, 0, 0, 0, 0, 92079484, 0, 105383483, 109708938, 0, 0, 0, 0, 0, 0, 0, 0, 144312474, 0, 0
};
static PRInt32 const HILO_ACCEL_119[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44630696, 0, 58393466, 62653372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100533754, 0, 0, 0, 0, 126551943, 130484165, 133892091, 0, 0, 138283070, 0, 140052568
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46006973, 0, 60031891, 64291797, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105711177, 0, 0, 0, 0, 131991514, 135923736, 139331662, 0, 0, 144378011, 0, 146147509
};
static PRInt32 const HILO_ACCEL_120[] = {
0, 0, 0, 0, 10354845, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67175422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116524786, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 10354845, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68813847, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121767746, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_121[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58459004, 0, 0, 0, 0, 75236475, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60097429, 0, 0, 0, 0, 77137048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static PRInt32 const HILO_ACCEL_122[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62784445, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126683020, 0, 0, 135989275, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64422870, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132122591, 0, 0, 142084216, 0, 0, 0, 0
};
const PRInt32* const nsHtml5NamedCharactersAccel::HILO_ACCEL[] = {
@ -267,7 +271,7 @@ const PRInt32* const nsHtml5NamedCharactersAccel::HILO_ACCEL[] = {
HILO_ACCEL_68,
HILO_ACCEL_69,
0,
0,
HILO_ACCEL_71,
HILO_ACCEL_72,
HILO_ACCEL_73,
HILO_ACCEL_74,

File diff suppressed because it is too large Load Diff

View File

@ -1534,10 +1534,10 @@ nsHtml5Tokenizer::stateLoop(PRInt32 state, PRUnichar c, PRInt32 pos, PRUnichar*
}
const PRUnichar* val = nsHtml5NamedCharacters::VALUES[candidate];
if ((val[0] & 0xFC00) == 0xD800) {
emitOrAppendTwo(val, returnState);
} else {
if (!val[1]) {
emitOrAppendOne(val, returnState);
} else {
emitOrAppendTwo(val, returnState);
}
if (strBufMark < strBufLen) {
if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {
@ -3617,10 +3617,10 @@ nsHtml5Tokenizer::eof()
}
const PRUnichar* val = nsHtml5NamedCharacters::VALUES[candidate];
if ((val[0] & 0xFC00) == 0xD800) {
emitOrAppendTwo(val, returnState);
} else {
if (!val[1]) {
emitOrAppendOne(val, returnState);
} else {
emitOrAppendTwo(val, returnState);
}
if (strBufMark < strBufLen) {
if ((returnState & NS_HTML5TOKENIZER_DATA_AND_RCDATA_MASK)) {

View File

@ -77,6 +77,7 @@ _TEST_FILES = adoption01.dat \
tests21.dat \
tests22.dat \
tests23.dat \
tests24.dat \
tests2.dat \
tests3.dat \
tests4.dat \

View File

@ -0,0 +1,79 @@
#data
<!DOCTYPE html>&NotEqualTilde;
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| "≂̸"
#data
<!DOCTYPE html>&NotEqualTilde;A
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| "≂̸A"
#data
<!DOCTYPE html>&ThickSpace;
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| ""
#data
<!DOCTYPE html>&ThickSpace;A
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| "A"
#data
<!DOCTYPE html>&NotSubset;
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| "⊂⃒"
#data
<!DOCTYPE html>&NotSubset;A
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| "⊂⃒A"
#data
<!DOCTYPE html>&Gopf;
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| "𝔾"
#data
<!DOCTYPE html>&Gopf;A
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| "𝔾A"

View File

@ -24,6 +24,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=366936
"tests21.dat",
"tests22.dat",
"tests23.dat",
"tests24.dat",
"tests2.dat",
"tests3.dat",
"tests4.dat",