Bug 612529 part 2 - Rework how scopingness and specialness is handled in stack nodes; refresh the set of scoping elements to spec. rs=jonas, a=blocking2.0-betaN.
This commit is contained in:
@@ -488,10 +488,6 @@ public final class AttributeName
|
||||
* The C++ destructor.
|
||||
*/
|
||||
@SuppressWarnings("unused") private void destructor() {
|
||||
Portability.releaseLocal(local[0]); // this must be a no-op for static
|
||||
// locals
|
||||
// for non-static cases the other array slots contain the same pointer
|
||||
// as weak references.
|
||||
Portability.deleteArray(local);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,22 +35,56 @@ public final class ElementName
|
||||
// implements Comparable<ElementName>
|
||||
{
|
||||
|
||||
/**
|
||||
* The mask for extracting the dispatch group.
|
||||
*/
|
||||
public static final int GROUP_MASK = 127;
|
||||
|
||||
/**
|
||||
* Indicates that the element is not a pre-interned element. Forbidden
|
||||
* on preinterned elements.
|
||||
*/
|
||||
public static final int CUSTOM = (1 << 30);
|
||||
|
||||
/**
|
||||
* Indicates that the element is in the "special" category. This bit
|
||||
* should not be pre-set on MathML or SVG specials--only on HTML specials.
|
||||
*/
|
||||
public static final int SPECIAL = (1 << 29);
|
||||
|
||||
/**
|
||||
* The element is foster-parenting. This bit should be pre-set on elements
|
||||
* that are foster-parenting as HTML.
|
||||
*/
|
||||
public static final int FOSTER_PARENTING = (1 << 28);
|
||||
|
||||
/**
|
||||
* The element is scoping. This bit should be pre-set on elements
|
||||
* that are scoping as HTML.
|
||||
*/
|
||||
public static final int SCOPING = (1 << 27);
|
||||
|
||||
/**
|
||||
* The element is scoping as SVG.
|
||||
*/
|
||||
public static final int SCOPING_AS_SVG = (1 << 26);
|
||||
|
||||
/**
|
||||
* The element is scoping as MathML.
|
||||
*/
|
||||
public static final int SCOPING_AS_MATHML = (1 << 25);
|
||||
|
||||
/**
|
||||
* The element is an HTML integration point.
|
||||
*/
|
||||
public static final int HTML_INTEGRATION_POINT = (1 << 24);
|
||||
|
||||
public static final ElementName NULL_ELEMENT_NAME = new ElementName(null);
|
||||
|
||||
public final @Local String name;
|
||||
|
||||
public final @Local String camelCaseName;
|
||||
|
||||
|
||||
/**
|
||||
* The lowest 7 bits are the dispatch group. The high bits are flags.
|
||||
*/
|
||||
@@ -129,8 +163,6 @@ public final class ElementName
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused") private void destructor() {
|
||||
Portability.releaseLocal(name); // this must be a no-op for static locals
|
||||
// for non-static cases the camel case contains the same pointer as a weak reference.
|
||||
}
|
||||
|
||||
@Virtual public ElementName cloneElementName(Interner interner) {
|
||||
@@ -158,6 +190,12 @@ public final class ElementName
|
||||
// if ((flags & SCOPING) != 0) {
|
||||
// buf.append(" | SCOPING");
|
||||
// }
|
||||
// if ((flags & SCOPING_AS_MATHML) != 0) {
|
||||
// buf.append(" | SCOPING_AS_MATHML");
|
||||
// }
|
||||
// if ((flags & SCOPING_AS_SVG) != 0) {
|
||||
// buf.append(" | SCOPING_AS_SVG");
|
||||
// }
|
||||
// return buf.toString();
|
||||
// }
|
||||
//
|
||||
@@ -392,17 +430,17 @@ public final class ElementName
|
||||
public static final ElementName LI = new ElementName("li", "li", TreeBuilder.LI | SPECIAL);
|
||||
public static final ElementName LN = new ElementName("ln", "ln", TreeBuilder.OTHER);
|
||||
public static final ElementName LT = new ElementName("lt", "lt", TreeBuilder.OTHER);
|
||||
public static final ElementName MI = new ElementName("mi", "mi", TreeBuilder.MI_MO_MN_MS_MTEXT);
|
||||
public static final ElementName MN = new ElementName("mn", "mn", TreeBuilder.MI_MO_MN_MS_MTEXT);
|
||||
public static final ElementName MO = new ElementName("mo", "mo", TreeBuilder.MI_MO_MN_MS_MTEXT);
|
||||
public static final ElementName MS = new ElementName("ms", "ms", TreeBuilder.MI_MO_MN_MS_MTEXT);
|
||||
public static final ElementName MI = new ElementName("mi", "mi", TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
|
||||
public static final ElementName MN = new ElementName("mn", "mn", TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
|
||||
public static final ElementName MO = new ElementName("mo", "mo", TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
|
||||
public static final ElementName MS = new ElementName("ms", "ms", TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
|
||||
public static final ElementName OL = new ElementName("ol", "ol", TreeBuilder.UL_OR_OL_OR_DL | SPECIAL);
|
||||
public static final ElementName OR = new ElementName("or", "or", TreeBuilder.OTHER);
|
||||
public static final ElementName PI = new ElementName("pi", "pi", TreeBuilder.OTHER);
|
||||
public static final ElementName RP = new ElementName("rp", "rp", TreeBuilder.RT_OR_RP);
|
||||
public static final ElementName RT = new ElementName("rt", "rt", TreeBuilder.RT_OR_RP);
|
||||
public static final ElementName TD = new ElementName("td", "td", TreeBuilder.TD_OR_TH | SCOPING);
|
||||
public static final ElementName TH = new ElementName("th", "th", TreeBuilder.TD_OR_TH | SCOPING);
|
||||
public static final ElementName TD = new ElementName("td", "td", TreeBuilder.TD_OR_TH | SPECIAL | SCOPING);
|
||||
public static final ElementName TH = new ElementName("th", "th", TreeBuilder.TD_OR_TH | SPECIAL | SCOPING);
|
||||
public static final ElementName TR = new ElementName("tr", "tr", TreeBuilder.TR | SPECIAL | FOSTER_PARENTING);
|
||||
public static final ElementName TT = new ElementName("tt", "tt", TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
|
||||
public static final ElementName UL = new ElementName("ul", "ul", TreeBuilder.UL_OR_OL_OR_DL | SPECIAL);
|
||||
@@ -465,14 +503,14 @@ public final class ElementName
|
||||
public static final ElementName COSH = new ElementName("cosh", "cosh", TreeBuilder.OTHER);
|
||||
public static final ElementName COTH = new ElementName("coth", "coth", TreeBuilder.OTHER);
|
||||
public static final ElementName CURL = new ElementName("curl", "curl", TreeBuilder.OTHER);
|
||||
public static final ElementName DESC = new ElementName("desc", "desc", TreeBuilder.FOREIGNOBJECT_OR_DESC);
|
||||
public static final ElementName DESC = new ElementName("desc", "desc", TreeBuilder.FOREIGNOBJECT_OR_DESC | SCOPING_AS_SVG);
|
||||
public static final ElementName DIFF = new ElementName("diff", "diff", TreeBuilder.OTHER);
|
||||
public static final ElementName DEFS = new ElementName("defs", "defs", TreeBuilder.OTHER);
|
||||
public static final ElementName FORM = new ElementName("form", "form", TreeBuilder.FORM | SPECIAL);
|
||||
public static final ElementName FONT = new ElementName("font", "font", TreeBuilder.FONT);
|
||||
public static final ElementName GRAD = new ElementName("grad", "grad", TreeBuilder.OTHER);
|
||||
public static final ElementName HEAD = new ElementName("head", "head", TreeBuilder.HEAD | SPECIAL);
|
||||
public static final ElementName HTML = new ElementName("html", "html", TreeBuilder.HTML | SCOPING);
|
||||
public static final ElementName HTML = new ElementName("html", "html", TreeBuilder.HTML | SPECIAL | SCOPING);
|
||||
public static final ElementName LINE = new ElementName("line", "line", TreeBuilder.OTHER);
|
||||
public static final ElementName LINK = new ElementName("link", "link", TreeBuilder.LINK_OR_BASEFONT_OR_BGSOUND | SPECIAL);
|
||||
public static final ElementName LIST = new ElementName("list", "list", TreeBuilder.OTHER);
|
||||
@@ -530,7 +568,7 @@ public final class ElementName
|
||||
public static final ElementName MINUS = new ElementName("minus", "minus", TreeBuilder.OTHER);
|
||||
public static final ElementName MROOT = new ElementName("mroot", "mroot", TreeBuilder.OTHER);
|
||||
public static final ElementName MSQRT = new ElementName("msqrt", "msqrt", TreeBuilder.OTHER);
|
||||
public static final ElementName MTEXT = new ElementName("mtext", "mtext", TreeBuilder.MI_MO_MN_MS_MTEXT);
|
||||
public static final ElementName MTEXT = new ElementName("mtext", "mtext", TreeBuilder.MI_MO_MN_MS_MTEXT | SCOPING_AS_MATHML);
|
||||
public static final ElementName NOTIN = new ElementName("notin", "notin", TreeBuilder.OTHER);
|
||||
public static final ElementName PIECE = new ElementName("piece", "piece", TreeBuilder.OTHER);
|
||||
public static final ElementName PARAM = new ElementName("param", "param", TreeBuilder.PARAM_OR_SOURCE | SPECIAL);
|
||||
@@ -539,8 +577,8 @@ public final class ElementName
|
||||
public static final ElementName STYLE = new ElementName("style", "style", TreeBuilder.STYLE | SPECIAL);
|
||||
public static final ElementName SMALL = new ElementName("small", "small", TreeBuilder.B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
|
||||
public static final ElementName THEAD = new ElementName("thead", "thead", TreeBuilder.TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING);
|
||||
public static final ElementName TABLE = new ElementName("table", "table", TreeBuilder.TABLE | FOSTER_PARENTING | SCOPING);
|
||||
public static final ElementName TITLE = new ElementName("title", "title", TreeBuilder.TITLE | SPECIAL);
|
||||
public static final ElementName TABLE = new ElementName("table", "table", TreeBuilder.TABLE | SPECIAL | FOSTER_PARENTING | SCOPING);
|
||||
public static final ElementName TITLE = new ElementName("title", "title", TreeBuilder.TITLE | SPECIAL | SCOPING_AS_SVG);
|
||||
public static final ElementName TSPAN = new ElementName("tspan", "tspan", TreeBuilder.OTHER);
|
||||
public static final ElementName TIMES = new ElementName("times", "times", TreeBuilder.OTHER);
|
||||
public static final ElementName TFOOT = new ElementName("tfoot", "tfoot", TreeBuilder.TBODY_OR_THEAD_OR_TFOOT | SPECIAL | FOSTER_PARENTING);
|
||||
@@ -553,7 +591,7 @@ public final class ElementName
|
||||
public static final ElementName ARCTAN = new ElementName("arctan", "arctan", TreeBuilder.OTHER);
|
||||
public static final ElementName ARCSIN = new ElementName("arcsin", "arcsin", TreeBuilder.OTHER);
|
||||
public static final ElementName ARCCOS = new ElementName("arccos", "arccos", TreeBuilder.OTHER);
|
||||
public static final ElementName APPLET = new ElementName("applet", "applet", TreeBuilder.MARQUEE_OR_APPLET | SCOPING);
|
||||
public static final ElementName APPLET = new ElementName("applet", "applet", TreeBuilder.MARQUEE_OR_APPLET | SPECIAL | SCOPING);
|
||||
public static final ElementName ARCCOT = new ElementName("arccot", "arccot", TreeBuilder.OTHER);
|
||||
public static final ElementName APPROX = new ElementName("approx", "approx", TreeBuilder.OTHER);
|
||||
public static final ElementName BUTTON = new ElementName("button", "button", TreeBuilder.BUTTON | SPECIAL);
|
||||
@@ -587,7 +625,7 @@ public final class ElementName
|
||||
public static final ElementName MOMENT = new ElementName("moment", "moment", TreeBuilder.OTHER);
|
||||
public static final ElementName MATRIX = new ElementName("matrix", "matrix", TreeBuilder.OTHER);
|
||||
public static final ElementName OPTION = new ElementName("option", "option", TreeBuilder.OPTION);
|
||||
public static final ElementName OBJECT = new ElementName("object", "object", TreeBuilder.OBJECT | SCOPING);
|
||||
public static final ElementName OBJECT = new ElementName("object", "object", TreeBuilder.OBJECT | SPECIAL | SCOPING);
|
||||
public static final ElementName OUTPUT = new ElementName("output", "output", TreeBuilder.OUTPUT_OR_LABEL);
|
||||
public static final ElementName PRIMES = new ElementName("primes", "primes", TreeBuilder.OTHER);
|
||||
public static final ElementName SOURCE = new ElementName("source", "source", TreeBuilder.PARAM_OR_SOURCE);
|
||||
@@ -615,7 +653,7 @@ public final class ElementName
|
||||
public static final ElementName COMPOSE = new ElementName("compose", "compose", TreeBuilder.OTHER);
|
||||
public static final ElementName CEILING = new ElementName("ceiling", "ceiling", TreeBuilder.OTHER);
|
||||
public static final ElementName CSYMBOL = new ElementName("csymbol", "csymbol", TreeBuilder.OTHER);
|
||||
public static final ElementName CAPTION = new ElementName("caption", "caption", TreeBuilder.CAPTION | SCOPING);
|
||||
public static final ElementName CAPTION = new ElementName("caption", "caption", TreeBuilder.CAPTION | SPECIAL | SCOPING);
|
||||
public static final ElementName DISCARD = new ElementName("discard", "discard", TreeBuilder.OTHER);
|
||||
public static final ElementName DECLARE = new ElementName("declare", "declare", TreeBuilder.OTHER);
|
||||
public static final ElementName DETAILS = new ElementName("details", "details", TreeBuilder.ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_NAV_OR_SECTION_OR_SUMMARY | SPECIAL);
|
||||
@@ -636,7 +674,7 @@ public final class ElementName
|
||||
public static final ElementName LISTING = new ElementName("listing", "listing", TreeBuilder.PRE_OR_LISTING | SPECIAL);
|
||||
public static final ElementName MFENCED = new ElementName("mfenced", "mfenced", TreeBuilder.OTHER);
|
||||
public static final ElementName MPADDED = new ElementName("mpadded", "mpadded", TreeBuilder.OTHER);
|
||||
public static final ElementName MARQUEE = new ElementName("marquee", "marquee", TreeBuilder.MARQUEE_OR_APPLET | SCOPING);
|
||||
public static final ElementName MARQUEE = new ElementName("marquee", "marquee", TreeBuilder.MARQUEE_OR_APPLET | SPECIAL | SCOPING);
|
||||
public static final ElementName MACTION = new ElementName("maction", "maction", TreeBuilder.OTHER);
|
||||
public static final ElementName MSUBSUP = new ElementName("msubsup", "msubsup", TreeBuilder.OTHER);
|
||||
public static final ElementName NOEMBED = new ElementName("noembed", "noembed", TreeBuilder.NOEMBED | SPECIAL);
|
||||
@@ -730,13 +768,13 @@ public final class ElementName
|
||||
public static final ElementName COLOR_PROFILE = new ElementName("color-profile", "color-profile", TreeBuilder.OTHER);
|
||||
public static final ElementName FONT_FACE_SRC = new ElementName("font-face-src", "font-face-src", TreeBuilder.OTHER);
|
||||
public static final ElementName FONT_FACE_URI = new ElementName("font-face-uri", "font-face-uri", TreeBuilder.OTHER);
|
||||
public static final ElementName FOREIGNOBJECT = new ElementName("foreignobject", "foreignObject", TreeBuilder.FOREIGNOBJECT_OR_DESC);
|
||||
public static final ElementName FOREIGNOBJECT = new ElementName("foreignobject", "foreignObject", TreeBuilder.FOREIGNOBJECT_OR_DESC | SCOPING_AS_SVG);
|
||||
public static final ElementName FECOLORMATRIX = new ElementName("fecolormatrix", "feColorMatrix", TreeBuilder.OTHER);
|
||||
public static final ElementName MISSING_GLYPH = new ElementName("missing-glyph", "missing-glyph", TreeBuilder.OTHER);
|
||||
public static final ElementName MMULTISCRIPTS = new ElementName("mmultiscripts", "mmultiscripts", TreeBuilder.OTHER);
|
||||
public static final ElementName SCALARPRODUCT = new ElementName("scalarproduct", "scalarproduct", TreeBuilder.OTHER);
|
||||
public static final ElementName VECTORPRODUCT = new ElementName("vectorproduct", "vectorproduct", TreeBuilder.OTHER);
|
||||
public static final ElementName ANNOTATION_XML = new ElementName("annotation-xml", "annotation-xml", TreeBuilder.ANNOTATION_XML);
|
||||
public static final ElementName ANNOTATION_XML = new ElementName("annotation-xml", "annotation-xml", TreeBuilder.ANNOTATION_XML | SCOPING_AS_MATHML);
|
||||
public static final ElementName DEFINITION_SRC = new ElementName("definition-src", "definition-src", TreeBuilder.OTHER);
|
||||
public static final ElementName FONT_FACE_NAME = new ElementName("font-face-name", "font-face-name", TreeBuilder.OTHER);
|
||||
public static final ElementName FEGAUSSIANBLUR = new ElementName("fegaussianblur", "feGaussianBlur", TreeBuilder.OTHER);
|
||||
|
||||
@@ -74,31 +74,6 @@ public final class Portability {
|
||||
// No-op in Java
|
||||
}
|
||||
|
||||
public static void retainLocal(@Local String local) {
|
||||
// No-op in Java
|
||||
}
|
||||
|
||||
/**
|
||||
* This MUST be a no-op on locals that are known at compile time.
|
||||
* @param local
|
||||
*/
|
||||
public static void releaseLocal(@Local String local) {
|
||||
// No-op in Java
|
||||
}
|
||||
|
||||
// [NOCPP[
|
||||
// These are no longer used in Gecko. Need to decide what to do about these in the long term.
|
||||
|
||||
public static void retainElement(Object elt) {
|
||||
// No-op in Java
|
||||
}
|
||||
|
||||
public static void releaseElement(Object elt) {
|
||||
// No-op in Java
|
||||
}
|
||||
|
||||
// ]NOCPP]
|
||||
|
||||
// Comparison methods
|
||||
|
||||
public static boolean localEqualsBuffer(@Local String local, @NoLength char[] buf, int offset, int length) {
|
||||
|
||||
@@ -59,26 +59,24 @@ final class StackNode<T> {
|
||||
return (flags & ElementName.SPECIAL) != 0;
|
||||
}
|
||||
|
||||
public boolean isScopingOrSpecial() {
|
||||
return (flags & (ElementName.SCOPING | ElementName.SPECIAL)) != 0;
|
||||
}
|
||||
|
||||
public boolean isFosterParenting() {
|
||||
return (flags & ElementName.FOSTER_PARENTING) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param group
|
||||
* TODO
|
||||
* Constructor for copying. This doesn't take another
|
||||
* <code>StackNode</code> because in C++ the caller is reponsible for
|
||||
* reobtaining the local names from another interner.
|
||||
*
|
||||
* @param flags
|
||||
* @param ns
|
||||
* @param name
|
||||
* @param node
|
||||
* @param scoping
|
||||
* @param special
|
||||
* @param popName
|
||||
* TODO
|
||||
* @param attributes
|
||||
*/
|
||||
StackNode(int flags, final @NsUri String ns, final @Local String name,
|
||||
final T node, final @Local String popName, HtmlAttributes attributes) {
|
||||
StackNode(int flags, @NsUri String ns, @Local String name,
|
||||
T node, @Local String popName, HtmlAttributes attributes) {
|
||||
this.flags = flags;
|
||||
this.name = name;
|
||||
this.popName = popName;
|
||||
@@ -86,83 +84,116 @@ final class StackNode<T> {
|
||||
this.node = node;
|
||||
this.attributes = attributes;
|
||||
this.refcount = 1;
|
||||
Portability.retainLocal(name);
|
||||
Portability.retainLocal(popName);
|
||||
Portability.retainElement(node);
|
||||
// not retaining namespace for now
|
||||
}
|
||||
|
||||
/**
|
||||
* Short hand for well-known HTML elements.
|
||||
*
|
||||
* @param elementName
|
||||
* TODO
|
||||
* @param node
|
||||
*/
|
||||
StackNode(final @NsUri String ns, ElementName elementName, final T node) {
|
||||
StackNode(ElementName elementName, T node) {
|
||||
this.flags = elementName.getFlags();
|
||||
this.name = elementName.name;
|
||||
this.popName = elementName.name;
|
||||
this.ns = ns;
|
||||
this.ns = "http://www.w3.org/1999/xhtml";
|
||||
this.node = node;
|
||||
this.attributes = null;
|
||||
this.refcount = 1;
|
||||
Portability.retainLocal(name);
|
||||
Portability.retainLocal(popName);
|
||||
Portability.retainElement(node);
|
||||
// not retaining namespace for now
|
||||
assert !elementName.isCustom() : "Don't use this constructor for custom elements.";
|
||||
}
|
||||
|
||||
StackNode(final @NsUri String ns, ElementName elementName, final T node,
|
||||
HtmlAttributes attributes) {
|
||||
/**
|
||||
* Constructor for HTML formatting elements.
|
||||
*
|
||||
* @param elementName
|
||||
* @param node
|
||||
* @param attributes
|
||||
*/
|
||||
StackNode(ElementName elementName, T node, HtmlAttributes attributes) {
|
||||
this.flags = elementName.getFlags();
|
||||
this.name = elementName.name;
|
||||
this.popName = elementName.name;
|
||||
this.ns = ns;
|
||||
this.ns = "http://www.w3.org/1999/xhtml";
|
||||
this.node = node;
|
||||
this.attributes = attributes;
|
||||
this.refcount = 1;
|
||||
Portability.retainLocal(name);
|
||||
Portability.retainLocal(popName);
|
||||
Portability.retainElement(node);
|
||||
// not retaining namespace for now
|
||||
assert !elementName.isCustom() : "Don't use this constructor for custom elements.";
|
||||
}
|
||||
|
||||
StackNode(final @NsUri String ns, ElementName elementName, final T node,
|
||||
@Local String popName) {
|
||||
/**
|
||||
* The common-case HTML constructor.
|
||||
*
|
||||
* @param elementName
|
||||
* @param node
|
||||
* @param popName
|
||||
*/
|
||||
StackNode(ElementName elementName, T node, @Local String popName) {
|
||||
this.flags = elementName.getFlags();
|
||||
this.name = elementName.name;
|
||||
this.popName = popName;
|
||||
this.ns = ns;
|
||||
this.ns = "http://www.w3.org/1999/xhtml";
|
||||
this.node = node;
|
||||
this.attributes = null;
|
||||
this.refcount = 1;
|
||||
Portability.retainLocal(name);
|
||||
Portability.retainLocal(popName);
|
||||
Portability.retainElement(node);
|
||||
// not retaining namespace for now
|
||||
}
|
||||
|
||||
StackNode(final @NsUri String ns, ElementName elementName, final T node,
|
||||
@Local String popName, boolean scoping) {
|
||||
this.flags = (scoping ? (elementName.getFlags() | ElementName.SCOPING)
|
||||
: (elementName.getFlags() & ~ElementName.SCOPING))
|
||||
& ~(ElementName.SPECIAL | ElementName.FOSTER_PARENTING);
|
||||
/**
|
||||
* Constructor for SVG elements. Note that the order of the arguments is
|
||||
* what distinguishes this from the HTML constructor. This is ugly, but
|
||||
* AFAICT the least disruptive way to make this work with Java's generics
|
||||
* and without unnecessary branches. :-(
|
||||
*
|
||||
* @param elementName
|
||||
* @param popName
|
||||
* @param node
|
||||
*/
|
||||
StackNode(ElementName elementName, @Local String popName, T node) {
|
||||
this.flags = prepareSvgFlags(elementName.getFlags());
|
||||
this.name = elementName.name;
|
||||
this.popName = popName;
|
||||
this.ns = ns;
|
||||
this.ns = "http://www.w3.org/2000/svg";
|
||||
this.node = node;
|
||||
this.attributes = null;
|
||||
this.refcount = 1;
|
||||
Portability.retainLocal(name);
|
||||
Portability.retainLocal(popName);
|
||||
Portability.retainElement(node);
|
||||
// not retaining namespace for now
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for MathML.
|
||||
*
|
||||
* @param elementName
|
||||
* @param node
|
||||
* @param popName
|
||||
* @param markAsIntegrationPoint
|
||||
*/
|
||||
StackNode(ElementName elementName, T node, @Local String popName,
|
||||
boolean markAsIntegrationPoint) {
|
||||
this.flags = prepareMathFlags(elementName.getFlags());
|
||||
this.name = elementName.name;
|
||||
this.popName = popName;
|
||||
this.ns = "http://www.w3.org/1998/Math/MathML";
|
||||
this.node = node;
|
||||
this.attributes = null;
|
||||
this.refcount = 1;
|
||||
}
|
||||
|
||||
private static int prepareSvgFlags(int flags) {
|
||||
flags &= ~(ElementName.FOSTER_PARENTING | ElementName.SCOPING | ElementName.SPECIAL);
|
||||
if ((flags & ElementName.SCOPING_AS_SVG) != 0) {
|
||||
flags |= (ElementName.SCOPING | ElementName.SPECIAL | ElementName.HTML_INTEGRATION_POINT);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
private static int prepareMathFlags(int flags) {
|
||||
flags &= ~(ElementName.FOSTER_PARENTING | ElementName.SCOPING | ElementName.SPECIAL);
|
||||
if ((flags & ElementName.SCOPING_AS_MATHML) != 0) {
|
||||
flags |= (ElementName.SCOPING | ElementName.SPECIAL);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused") private void destructor() {
|
||||
Portability.releaseLocal(name);
|
||||
Portability.releaseLocal(popName);
|
||||
Portability.releaseElement(node);
|
||||
// not releasing namespace for now
|
||||
Portability.delete(attributes);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +190,5 @@ public class StateSnapshot<T> implements TreeBuilderState<T> {
|
||||
listOfActiveFormattingElements[i].release();
|
||||
}
|
||||
}
|
||||
Portability.retainElement(formPointer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5727,7 +5727,6 @@ public class Tokenizer implements Locator {
|
||||
// ]NOCPP]
|
||||
|
||||
private void initDoctypeFields() {
|
||||
Portability.releaseLocal(doctypeName);
|
||||
doctypeName = "";
|
||||
if (systemIdentifier != null) {
|
||||
Portability.releaseString(systemIdentifier);
|
||||
@@ -6034,7 +6033,6 @@ public class Tokenizer implements Locator {
|
||||
* Create a new DOCTYPE token. Set its force-quirks flag
|
||||
* to on.
|
||||
*/
|
||||
Portability.releaseLocal(doctypeName);
|
||||
doctypeName = "";
|
||||
if (systemIdentifier != null) {
|
||||
Portability.releaseString(systemIdentifier);
|
||||
@@ -6434,7 +6432,6 @@ public class Tokenizer implements Locator {
|
||||
// It is OK and sufficient to release these here, since
|
||||
// there's no way out of the doctype states than through paths
|
||||
// that call this method.
|
||||
Portability.releaseLocal(doctypeName);
|
||||
doctypeName = null;
|
||||
Portability.releaseString(publicIdentifier);
|
||||
publicIdentifier = null;
|
||||
@@ -6494,7 +6491,6 @@ public class Tokenizer implements Locator {
|
||||
public void end() throws SAXException {
|
||||
strBuf = null;
|
||||
longStrBuf = null;
|
||||
Portability.releaseLocal(doctypeName);
|
||||
doctypeName = null;
|
||||
if (systemIdentifier != null) {
|
||||
Portability.releaseString(systemIdentifier);
|
||||
@@ -6642,7 +6638,6 @@ public class Tokenizer implements Locator {
|
||||
endTag = other.endTag;
|
||||
shouldSuspend = false;
|
||||
|
||||
Portability.releaseLocal(doctypeName);
|
||||
if (other.doctypeName == null) {
|
||||
doctypeName = null;
|
||||
} else {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -166,7 +166,6 @@ nsHtml5AttributeName::release()
|
||||
nsHtml5AttributeName::~nsHtml5AttributeName()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsHtml5AttributeName);
|
||||
nsHtml5Portability::releaseLocal(local[0]);
|
||||
delete[] local;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,6 @@ nsHtml5ElementName::release()
|
||||
nsHtml5ElementName::~nsHtml5ElementName()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsHtml5ElementName);
|
||||
nsHtml5Portability::releaseLocal(name);
|
||||
}
|
||||
|
||||
nsHtml5ElementName*
|
||||
@@ -560,17 +559,17 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_LI = new nsHtml5ElementName(nsHtml5Atoms::li, nsHtml5Atoms::li, NS_HTML5TREE_BUILDER_LI | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
ELT_LN = new nsHtml5ElementName(nsHtml5Atoms::ln, nsHtml5Atoms::ln, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_LT = new nsHtml5ElementName(nsHtml5Atoms::lt, nsHtml5Atoms::lt, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MI = new nsHtml5ElementName(nsHtml5Atoms::mi, nsHtml5Atoms::mi, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT);
|
||||
ELT_MN = new nsHtml5ElementName(nsHtml5Atoms::mn, nsHtml5Atoms::mn, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT);
|
||||
ELT_MO = new nsHtml5ElementName(nsHtml5Atoms::mo, nsHtml5Atoms::mo, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT);
|
||||
ELT_MS = new nsHtml5ElementName(nsHtml5Atoms::ms, nsHtml5Atoms::ms, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT);
|
||||
ELT_MI = new nsHtml5ElementName(nsHtml5Atoms::mi, nsHtml5Atoms::mi, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
|
||||
ELT_MN = new nsHtml5ElementName(nsHtml5Atoms::mn, nsHtml5Atoms::mn, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
|
||||
ELT_MO = new nsHtml5ElementName(nsHtml5Atoms::mo, nsHtml5Atoms::mo, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
|
||||
ELT_MS = new nsHtml5ElementName(nsHtml5Atoms::ms, nsHtml5Atoms::ms, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
|
||||
ELT_OL = new nsHtml5ElementName(nsHtml5Atoms::ol, nsHtml5Atoms::ol, NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
ELT_OR = new nsHtml5ElementName(nsHtml5Atoms::or_, nsHtml5Atoms::or_, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_PI = new nsHtml5ElementName(nsHtml5Atoms::pi, nsHtml5Atoms::pi, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_RP = new nsHtml5ElementName(nsHtml5Atoms::rp, nsHtml5Atoms::rp, NS_HTML5TREE_BUILDER_RT_OR_RP);
|
||||
ELT_RT = new nsHtml5ElementName(nsHtml5Atoms::rt, nsHtml5Atoms::rt, NS_HTML5TREE_BUILDER_RT_OR_RP);
|
||||
ELT_TD = new nsHtml5ElementName(nsHtml5Atoms::td, nsHtml5Atoms::td, NS_HTML5TREE_BUILDER_TD_OR_TH | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_TH = new nsHtml5ElementName(nsHtml5Atoms::th, nsHtml5Atoms::th, NS_HTML5TREE_BUILDER_TD_OR_TH | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_TD = new nsHtml5ElementName(nsHtml5Atoms::td, nsHtml5Atoms::td, NS_HTML5TREE_BUILDER_TD_OR_TH | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_TH = new nsHtml5ElementName(nsHtml5Atoms::th, nsHtml5Atoms::th, NS_HTML5TREE_BUILDER_TD_OR_TH | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_TR = new nsHtml5ElementName(nsHtml5Atoms::tr, nsHtml5Atoms::tr, NS_HTML5TREE_BUILDER_TR | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING);
|
||||
ELT_TT = new nsHtml5ElementName(nsHtml5Atoms::tt, nsHtml5Atoms::tt, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
|
||||
ELT_UL = new nsHtml5ElementName(nsHtml5Atoms::ul, nsHtml5Atoms::ul, NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
@@ -633,14 +632,14 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_COSH = new nsHtml5ElementName(nsHtml5Atoms::cosh, nsHtml5Atoms::cosh, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_COTH = new nsHtml5ElementName(nsHtml5Atoms::coth, nsHtml5Atoms::coth, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_CURL = new nsHtml5ElementName(nsHtml5Atoms::curl, nsHtml5Atoms::curl, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_DESC = new nsHtml5ElementName(nsHtml5Atoms::desc, nsHtml5Atoms::desc, NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC);
|
||||
ELT_DESC = new nsHtml5ElementName(nsHtml5Atoms::desc, nsHtml5Atoms::desc, NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC | NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG);
|
||||
ELT_DIFF = new nsHtml5ElementName(nsHtml5Atoms::diff, nsHtml5Atoms::diff, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_DEFS = new nsHtml5ElementName(nsHtml5Atoms::defs, nsHtml5Atoms::defs, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_FORM = new nsHtml5ElementName(nsHtml5Atoms::form, nsHtml5Atoms::form, NS_HTML5TREE_BUILDER_FORM | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
ELT_FONT = new nsHtml5ElementName(nsHtml5Atoms::font, nsHtml5Atoms::font, NS_HTML5TREE_BUILDER_FONT);
|
||||
ELT_GRAD = new nsHtml5ElementName(nsHtml5Atoms::grad, nsHtml5Atoms::grad, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_HEAD = new nsHtml5ElementName(nsHtml5Atoms::head, nsHtml5Atoms::head, NS_HTML5TREE_BUILDER_HEAD | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
ELT_HTML = new nsHtml5ElementName(nsHtml5Atoms::html, nsHtml5Atoms::html, NS_HTML5TREE_BUILDER_HTML | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_HTML = new nsHtml5ElementName(nsHtml5Atoms::html, nsHtml5Atoms::html, NS_HTML5TREE_BUILDER_HTML | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_LINE = new nsHtml5ElementName(nsHtml5Atoms::line, nsHtml5Atoms::line, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_LINK = new nsHtml5ElementName(nsHtml5Atoms::link, nsHtml5Atoms::link, NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
ELT_LIST = new nsHtml5ElementName(nsHtml5Atoms::list, nsHtml5Atoms::list, NS_HTML5TREE_BUILDER_OTHER);
|
||||
@@ -698,7 +697,7 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_MINUS = new nsHtml5ElementName(nsHtml5Atoms::minus, nsHtml5Atoms::minus, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MROOT = new nsHtml5ElementName(nsHtml5Atoms::mroot, nsHtml5Atoms::mroot, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MSQRT = new nsHtml5ElementName(nsHtml5Atoms::msqrt, nsHtml5Atoms::msqrt, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MTEXT = new nsHtml5ElementName(nsHtml5Atoms::mtext, nsHtml5Atoms::mtext, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT);
|
||||
ELT_MTEXT = new nsHtml5ElementName(nsHtml5Atoms::mtext, nsHtml5Atoms::mtext, NS_HTML5TREE_BUILDER_MI_MO_MN_MS_MTEXT | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
|
||||
ELT_NOTIN = new nsHtml5ElementName(nsHtml5Atoms::notin, nsHtml5Atoms::notin, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_PIECE = new nsHtml5ElementName(nsHtml5Atoms::piece, nsHtml5Atoms::piece, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_PARAM = new nsHtml5ElementName(nsHtml5Atoms::param, nsHtml5Atoms::param, NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
@@ -707,8 +706,8 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_STYLE = new nsHtml5ElementName(nsHtml5Atoms::style, nsHtml5Atoms::style, NS_HTML5TREE_BUILDER_STYLE | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
ELT_SMALL = new nsHtml5ElementName(nsHtml5Atoms::small_, nsHtml5Atoms::small_, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
|
||||
ELT_THEAD = new nsHtml5ElementName(nsHtml5Atoms::thead, nsHtml5Atoms::thead, NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING);
|
||||
ELT_TABLE = new nsHtml5ElementName(nsHtml5Atoms::table, nsHtml5Atoms::table, NS_HTML5TREE_BUILDER_TABLE | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_TITLE = new nsHtml5ElementName(nsHtml5Atoms::title, nsHtml5Atoms::title, NS_HTML5TREE_BUILDER_TITLE | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
ELT_TABLE = new nsHtml5ElementName(nsHtml5Atoms::table, nsHtml5Atoms::table, NS_HTML5TREE_BUILDER_TABLE | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_TITLE = new nsHtml5ElementName(nsHtml5Atoms::title, nsHtml5Atoms::title, NS_HTML5TREE_BUILDER_TITLE | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG);
|
||||
ELT_TSPAN = new nsHtml5ElementName(nsHtml5Atoms::tspan, nsHtml5Atoms::tspan, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_TIMES = new nsHtml5ElementName(nsHtml5Atoms::times, nsHtml5Atoms::times, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_TFOOT = new nsHtml5ElementName(nsHtml5Atoms::tfoot, nsHtml5Atoms::tfoot, NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING);
|
||||
@@ -721,7 +720,7 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_ARCTAN = new nsHtml5ElementName(nsHtml5Atoms::arctan, nsHtml5Atoms::arctan, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_ARCSIN = new nsHtml5ElementName(nsHtml5Atoms::arcsin, nsHtml5Atoms::arcsin, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_ARCCOS = new nsHtml5ElementName(nsHtml5Atoms::arccos, nsHtml5Atoms::arccos, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_APPLET = new nsHtml5ElementName(nsHtml5Atoms::applet, nsHtml5Atoms::applet, NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_APPLET = new nsHtml5ElementName(nsHtml5Atoms::applet, nsHtml5Atoms::applet, NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_ARCCOT = new nsHtml5ElementName(nsHtml5Atoms::arccot, nsHtml5Atoms::arccot, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_APPROX = new nsHtml5ElementName(nsHtml5Atoms::approx, nsHtml5Atoms::approx, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_BUTTON = new nsHtml5ElementName(nsHtml5Atoms::button, nsHtml5Atoms::button, NS_HTML5TREE_BUILDER_BUTTON | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
@@ -755,7 +754,7 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_MOMENT = new nsHtml5ElementName(nsHtml5Atoms::moment, nsHtml5Atoms::moment, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MATRIX = new nsHtml5ElementName(nsHtml5Atoms::matrix, nsHtml5Atoms::matrix, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_OPTION = new nsHtml5ElementName(nsHtml5Atoms::option, nsHtml5Atoms::option, NS_HTML5TREE_BUILDER_OPTION);
|
||||
ELT_OBJECT = new nsHtml5ElementName(nsHtml5Atoms::object, nsHtml5Atoms::object, NS_HTML5TREE_BUILDER_OBJECT | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_OBJECT = new nsHtml5ElementName(nsHtml5Atoms::object, nsHtml5Atoms::object, NS_HTML5TREE_BUILDER_OBJECT | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_OUTPUT = new nsHtml5ElementName(nsHtml5Atoms::output, nsHtml5Atoms::output, NS_HTML5TREE_BUILDER_OUTPUT_OR_LABEL);
|
||||
ELT_PRIMES = new nsHtml5ElementName(nsHtml5Atoms::primes, nsHtml5Atoms::primes, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_SOURCE = new nsHtml5ElementName(nsHtml5Atoms::source, nsHtml5Atoms::source, NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE);
|
||||
@@ -783,7 +782,7 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_COMPOSE = new nsHtml5ElementName(nsHtml5Atoms::compose, nsHtml5Atoms::compose, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_CEILING = new nsHtml5ElementName(nsHtml5Atoms::ceiling, nsHtml5Atoms::ceiling, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_CSYMBOL = new nsHtml5ElementName(nsHtml5Atoms::csymbol, nsHtml5Atoms::csymbol, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_CAPTION = new nsHtml5ElementName(nsHtml5Atoms::caption, nsHtml5Atoms::caption, NS_HTML5TREE_BUILDER_CAPTION | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_CAPTION = new nsHtml5ElementName(nsHtml5Atoms::caption, nsHtml5Atoms::caption, NS_HTML5TREE_BUILDER_CAPTION | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_DISCARD = new nsHtml5ElementName(nsHtml5Atoms::discard, nsHtml5Atoms::discard, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_DECLARE = new nsHtml5ElementName(nsHtml5Atoms::declare, nsHtml5Atoms::declare, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_DETAILS = new nsHtml5ElementName(nsHtml5Atoms::details, nsHtml5Atoms::details, NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_NAV_OR_SECTION_OR_SUMMARY | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
@@ -804,7 +803,7 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_LISTING = new nsHtml5ElementName(nsHtml5Atoms::listing, nsHtml5Atoms::listing, NS_HTML5TREE_BUILDER_PRE_OR_LISTING | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
ELT_MFENCED = new nsHtml5ElementName(nsHtml5Atoms::mfenced, nsHtml5Atoms::mfenced, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MPADDED = new nsHtml5ElementName(nsHtml5Atoms::mpadded, nsHtml5Atoms::mpadded, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MARQUEE = new nsHtml5ElementName(nsHtml5Atoms::marquee, nsHtml5Atoms::marquee, NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_MARQUEE = new nsHtml5ElementName(nsHtml5Atoms::marquee, nsHtml5Atoms::marquee, NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_SCOPING);
|
||||
ELT_MACTION = new nsHtml5ElementName(nsHtml5Atoms::maction, nsHtml5Atoms::maction, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MSUBSUP = new nsHtml5ElementName(nsHtml5Atoms::msubsup, nsHtml5Atoms::msubsup, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_NOEMBED = new nsHtml5ElementName(nsHtml5Atoms::noembed, nsHtml5Atoms::noembed, NS_HTML5TREE_BUILDER_NOEMBED | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
@@ -898,13 +897,13 @@ nsHtml5ElementName::initializeStatics()
|
||||
ELT_COLOR_PROFILE = new nsHtml5ElementName(nsHtml5Atoms::color_profile, nsHtml5Atoms::color_profile, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_FONT_FACE_SRC = new nsHtml5ElementName(nsHtml5Atoms::font_face_src, nsHtml5Atoms::font_face_src, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_FONT_FACE_URI = new nsHtml5ElementName(nsHtml5Atoms::font_face_uri, nsHtml5Atoms::font_face_uri, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_FOREIGNOBJECT = new nsHtml5ElementName(nsHtml5Atoms::foreignobject, nsHtml5Atoms::foreignObject, NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC);
|
||||
ELT_FOREIGNOBJECT = new nsHtml5ElementName(nsHtml5Atoms::foreignobject, nsHtml5Atoms::foreignObject, NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC | NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG);
|
||||
ELT_FECOLORMATRIX = new nsHtml5ElementName(nsHtml5Atoms::fecolormatrix, nsHtml5Atoms::feColorMatrix, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MISSING_GLYPH = new nsHtml5ElementName(nsHtml5Atoms::missing_glyph, nsHtml5Atoms::missing_glyph, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_MMULTISCRIPTS = new nsHtml5ElementName(nsHtml5Atoms::mmultiscripts, nsHtml5Atoms::mmultiscripts, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_SCALARPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::scalarproduct, nsHtml5Atoms::scalarproduct, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_VECTORPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::vectorproduct, nsHtml5Atoms::vectorproduct, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_ANNOTATION_XML = new nsHtml5ElementName(nsHtml5Atoms::annotation_xml, nsHtml5Atoms::annotation_xml, NS_HTML5TREE_BUILDER_ANNOTATION_XML);
|
||||
ELT_ANNOTATION_XML = new nsHtml5ElementName(nsHtml5Atoms::annotation_xml, nsHtml5Atoms::annotation_xml, NS_HTML5TREE_BUILDER_ANNOTATION_XML | NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML);
|
||||
ELT_DEFINITION_SRC = new nsHtml5ElementName(nsHtml5Atoms::definition_src, nsHtml5Atoms::definition_src, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_FONT_FACE_NAME = new nsHtml5ElementName(nsHtml5Atoms::font_face_name, nsHtml5Atoms::font_face_name, NS_HTML5TREE_BUILDER_OTHER);
|
||||
ELT_FEGAUSSIANBLUR = new nsHtml5ElementName(nsHtml5Atoms::fegaussianblur, nsHtml5Atoms::feGaussianBlur, NS_HTML5TREE_BUILDER_OTHER);
|
||||
|
||||
@@ -485,6 +485,9 @@ class nsHtml5ElementName
|
||||
#define NS_HTML5ELEMENT_NAME_SPECIAL (1 << 29)
|
||||
#define NS_HTML5ELEMENT_NAME_FOSTER_PARENTING (1 << 28)
|
||||
#define NS_HTML5ELEMENT_NAME_SCOPING (1 << 27)
|
||||
#define NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG (1 << 26)
|
||||
#define NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML (1 << 25)
|
||||
#define NS_HTML5ELEMENT_NAME_HTML_INTEGRATION_POINT (1 << 24)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -115,18 +115,6 @@ nsHtml5Portability::releaseString(nsString* str)
|
||||
delete str;
|
||||
}
|
||||
|
||||
// XXX useless code
|
||||
void
|
||||
nsHtml5Portability::retainLocal(nsIAtom* local)
|
||||
{
|
||||
}
|
||||
|
||||
// XXX useless code
|
||||
void
|
||||
nsHtml5Portability::releaseLocal(nsIAtom* local)
|
||||
{
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsHtml5Portability::localEqualsBuffer(nsIAtom* local, PRUnichar* buf, PRInt32 offset, PRInt32 length)
|
||||
{
|
||||
|
||||
@@ -71,8 +71,6 @@ class nsHtml5Portability
|
||||
static jArray<PRUnichar,PRInt32> newCharArrayFromString(nsString* string);
|
||||
static nsIAtom* newLocalFromLocal(nsIAtom* local, nsHtml5AtomTable* interner);
|
||||
static void releaseString(nsString* str);
|
||||
static void retainLocal(nsIAtom* local);
|
||||
static void releaseLocal(nsIAtom* local);
|
||||
static PRBool localEqualsBuffer(nsIAtom* local, PRUnichar* buf, PRInt32 offset, PRInt32 length);
|
||||
static PRBool lowerCaseLiteralIsPrefixOfIgnoreAsciiCaseString(const char* lowerCaseLiteral, nsString* string);
|
||||
static PRBool lowerCaseLiteralEqualsIgnoreAsciiCaseString(const char* lowerCaseLiteral, nsString* string);
|
||||
|
||||
@@ -77,12 +77,6 @@ nsHtml5StackNode::isSpecial()
|
||||
return (flags & NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsHtml5StackNode::isScopingOrSpecial()
|
||||
{
|
||||
return (flags & (NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL));
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsHtml5StackNode::isFosterParenting()
|
||||
{
|
||||
@@ -100,82 +94,99 @@ nsHtml5StackNode::nsHtml5StackNode(PRInt32 flags, PRInt32 ns, nsIAtom* name, nsI
|
||||
refcount(1)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5StackNode);
|
||||
nsHtml5Portability::retainLocal(name);
|
||||
nsHtml5Portability::retainLocal(popName);
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
nsHtml5StackNode::nsHtml5StackNode(PRInt32 ns, nsHtml5ElementName* elementName, nsIContent** node)
|
||||
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContent** node)
|
||||
: flags(elementName->getFlags()),
|
||||
name(elementName->name),
|
||||
popName(elementName->name),
|
||||
ns(ns),
|
||||
ns(kNameSpaceID_XHTML),
|
||||
node(node),
|
||||
attributes(nsnull),
|
||||
refcount(1)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5StackNode);
|
||||
nsHtml5Portability::retainLocal(name);
|
||||
nsHtml5Portability::retainLocal(popName);
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
|
||||
nsHtml5StackNode::nsHtml5StackNode(PRInt32 ns, nsHtml5ElementName* elementName, nsIContent** node, nsHtml5HtmlAttributes* attributes)
|
||||
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContent** node, nsHtml5HtmlAttributes* attributes)
|
||||
: flags(elementName->getFlags()),
|
||||
name(elementName->name),
|
||||
popName(elementName->name),
|
||||
ns(ns),
|
||||
ns(kNameSpaceID_XHTML),
|
||||
node(node),
|
||||
attributes(attributes),
|
||||
refcount(1)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5StackNode);
|
||||
nsHtml5Portability::retainLocal(name);
|
||||
nsHtml5Portability::retainLocal(popName);
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
|
||||
nsHtml5StackNode::nsHtml5StackNode(PRInt32 ns, nsHtml5ElementName* elementName, nsIContent** node, nsIAtom* popName)
|
||||
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContent** node, nsIAtom* popName)
|
||||
: flags(elementName->getFlags()),
|
||||
name(elementName->name),
|
||||
popName(popName),
|
||||
ns(ns),
|
||||
ns(kNameSpaceID_XHTML),
|
||||
node(node),
|
||||
attributes(nsnull),
|
||||
refcount(1)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5StackNode);
|
||||
nsHtml5Portability::retainLocal(name);
|
||||
nsHtml5Portability::retainLocal(popName);
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
nsHtml5StackNode::nsHtml5StackNode(PRInt32 ns, nsHtml5ElementName* elementName, nsIContent** node, nsIAtom* popName, PRBool scoping)
|
||||
: flags((scoping ? (elementName->getFlags() | NS_HTML5ELEMENT_NAME_SCOPING) : (elementName->getFlags() & ~NS_HTML5ELEMENT_NAME_SCOPING)) & ~(NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_FOSTER_PARENTING)),
|
||||
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIAtom* popName, nsIContent** node)
|
||||
: flags(prepareSvgFlags(elementName->getFlags())),
|
||||
name(elementName->name),
|
||||
popName(popName),
|
||||
ns(ns),
|
||||
ns(kNameSpaceID_SVG),
|
||||
node(node),
|
||||
attributes(nsnull),
|
||||
refcount(1)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5StackNode);
|
||||
nsHtml5Portability::retainLocal(name);
|
||||
nsHtml5Portability::retainLocal(popName);
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContent** node, nsIAtom* popName, PRBool markAsIntegrationPoint)
|
||||
: flags(prepareMathFlags(elementName->getFlags())),
|
||||
name(elementName->name),
|
||||
popName(popName),
|
||||
ns(kNameSpaceID_MathML),
|
||||
node(node),
|
||||
attributes(nsnull),
|
||||
refcount(1)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5StackNode);
|
||||
}
|
||||
|
||||
PRInt32
|
||||
nsHtml5StackNode::prepareSvgFlags(PRInt32 flags)
|
||||
{
|
||||
flags &= ~(NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
if ((flags & NS_HTML5ELEMENT_NAME_SCOPING_AS_SVG)) {
|
||||
flags |= (NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_HTML_INTEGRATION_POINT);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
PRInt32
|
||||
nsHtml5StackNode::prepareMathFlags(PRInt32 flags)
|
||||
{
|
||||
flags &= ~(NS_HTML5ELEMENT_NAME_FOSTER_PARENTING | NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
if ((flags & NS_HTML5ELEMENT_NAME_SCOPING_AS_MATHML)) {
|
||||
flags |= (NS_HTML5ELEMENT_NAME_SCOPING | NS_HTML5ELEMENT_NAME_SPECIAL);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
||||
nsHtml5StackNode::~nsHtml5StackNode()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsHtml5StackNode);
|
||||
nsHtml5Portability::releaseLocal(name);
|
||||
nsHtml5Portability::releaseLocal(popName);
|
||||
;
|
||||
delete attributes;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,13 +81,17 @@ class nsHtml5StackNode
|
||||
PRInt32 getGroup();
|
||||
PRBool isScoping();
|
||||
PRBool isSpecial();
|
||||
PRBool isScopingOrSpecial();
|
||||
PRBool isFosterParenting();
|
||||
nsHtml5StackNode(PRInt32 flags, PRInt32 ns, nsIAtom* name, nsIContent** node, nsIAtom* popName, nsHtml5HtmlAttributes* attributes);
|
||||
nsHtml5StackNode(PRInt32 ns, nsHtml5ElementName* elementName, nsIContent** node);
|
||||
nsHtml5StackNode(PRInt32 ns, nsHtml5ElementName* elementName, nsIContent** node, nsHtml5HtmlAttributes* attributes);
|
||||
nsHtml5StackNode(PRInt32 ns, nsHtml5ElementName* elementName, nsIContent** node, nsIAtom* popName);
|
||||
nsHtml5StackNode(PRInt32 ns, nsHtml5ElementName* elementName, nsIContent** node, nsIAtom* popName, PRBool scoping);
|
||||
nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContent** node);
|
||||
nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContent** node, nsHtml5HtmlAttributes* attributes);
|
||||
nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContent** node, nsIAtom* popName);
|
||||
nsHtml5StackNode(nsHtml5ElementName* elementName, nsIAtom* popName, nsIContent** node);
|
||||
nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContent** node, nsIAtom* popName, PRBool markAsIntegrationPoint);
|
||||
private:
|
||||
static PRInt32 prepareSvgFlags(PRInt32 flags);
|
||||
static PRInt32 prepareMathFlags(PRInt32 flags);
|
||||
public:
|
||||
~nsHtml5StackNode();
|
||||
void dropAttributes();
|
||||
void retain();
|
||||
|
||||
@@ -165,7 +165,6 @@ nsHtml5StateSnapshot::~nsHtml5StateSnapshot()
|
||||
listOfActiveFormattingElements[i]->release();
|
||||
}
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -3271,7 +3271,6 @@ nsHtml5Tokenizer::stateLoop(PRInt32 state, PRUnichar c, PRInt32 pos, PRUnichar*
|
||||
void
|
||||
nsHtml5Tokenizer::initDoctypeFields()
|
||||
{
|
||||
nsHtml5Portability::releaseLocal(doctypeName);
|
||||
doctypeName = nsHtml5Atoms::emptystring;
|
||||
if (systemIdentifier) {
|
||||
nsHtml5Portability::releaseString(systemIdentifier);
|
||||
@@ -3441,7 +3440,6 @@ nsHtml5Tokenizer::eof()
|
||||
emitComment(0, 0);
|
||||
} else {
|
||||
|
||||
nsHtml5Portability::releaseLocal(doctypeName);
|
||||
doctypeName = nsHtml5Atoms::emptystring;
|
||||
if (systemIdentifier) {
|
||||
nsHtml5Portability::releaseString(systemIdentifier);
|
||||
@@ -3672,7 +3670,6 @@ nsHtml5Tokenizer::emitDoctypeToken(PRInt32 pos)
|
||||
{
|
||||
cstart = pos + 1;
|
||||
tokenHandler->doctype(doctypeName, publicIdentifier, systemIdentifier, forceQuirks);
|
||||
nsHtml5Portability::releaseLocal(doctypeName);
|
||||
doctypeName = nsnull;
|
||||
nsHtml5Portability::releaseString(publicIdentifier);
|
||||
publicIdentifier = nsnull;
|
||||
@@ -3715,7 +3712,6 @@ nsHtml5Tokenizer::end()
|
||||
{
|
||||
strBuf = nsnull;
|
||||
longStrBuf = nsnull;
|
||||
nsHtml5Portability::releaseLocal(doctypeName);
|
||||
doctypeName = nsnull;
|
||||
if (systemIdentifier) {
|
||||
nsHtml5Portability::releaseString(systemIdentifier);
|
||||
@@ -3821,7 +3817,6 @@ nsHtml5Tokenizer::loadState(nsHtml5Tokenizer* other)
|
||||
seenDigits = other->seenDigits;
|
||||
endTag = other->endTag;
|
||||
shouldSuspend = PR_FALSE;
|
||||
nsHtml5Portability::releaseLocal(doctypeName);
|
||||
if (!other->doctypeName) {
|
||||
doctypeName = nsnull;
|
||||
} else {
|
||||
|
||||
@@ -78,11 +78,8 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
|
||||
originalMode = NS_HTML5TREE_BUILDER_INITIAL;
|
||||
currentPtr = -1;
|
||||
listPtr = -1;
|
||||
;
|
||||
formPointer = nsnull;
|
||||
;
|
||||
headPointer = nsnull;
|
||||
;
|
||||
deepTreeSurrogateParent = nsnull;
|
||||
start(fragment);
|
||||
charBufferLen = 0;
|
||||
@@ -92,11 +89,10 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
|
||||
nsIContent** elt;
|
||||
if (contextNode) {
|
||||
elt = contextNode;
|
||||
;
|
||||
} else {
|
||||
elt = createHtmlElementSetAsRoot(tokenizer->emptyAttributes());
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_HTML, elt);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_HTML, elt);
|
||||
currentPtr++;
|
||||
stack[currentPtr] = node;
|
||||
resetTheInsertionMode();
|
||||
@@ -111,11 +107,8 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
|
||||
} else {
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_DATA, contextName);
|
||||
}
|
||||
nsHtml5Portability::releaseLocal(contextName);
|
||||
contextName = nsnull;
|
||||
;
|
||||
contextNode = nsnull;
|
||||
;
|
||||
} else {
|
||||
mode = NS_HTML5TREE_BUILDER_INITIAL;
|
||||
inForeign = PR_FALSE;
|
||||
@@ -537,11 +530,8 @@ nsHtml5TreeBuilder::eof()
|
||||
void
|
||||
nsHtml5TreeBuilder::endTokenization()
|
||||
{
|
||||
;
|
||||
formPointer = nsnull;
|
||||
;
|
||||
headPointer = nsnull;
|
||||
;
|
||||
deepTreeSurrogateParent = nsnull;
|
||||
if (stack) {
|
||||
while (currentPtr > -1) {
|
||||
@@ -623,20 +613,20 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
if (kNameSpaceID_SVG == currNs) {
|
||||
attributes->adjustForSvg();
|
||||
if (selfClosing) {
|
||||
appendVoidElementToCurrentMayFosterCamelCase(currNs, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFosterSVG(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
} else {
|
||||
appendToCurrentNodeAndPushElementMayFosterCamelCase(currNs, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFosterSVG(elementName, attributes);
|
||||
}
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
} else {
|
||||
attributes->adjustForMath();
|
||||
if (selfClosing) {
|
||||
appendVoidElementToCurrentMayFoster(currNs, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFosterMathML(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
} else {
|
||||
appendToCurrentNodeAndPushElementMayFosterNoScoping(currNs, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFosterMathML(elementName, attributes);
|
||||
}
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -650,7 +640,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
switch(group) {
|
||||
case NS_HTML5TREE_BUILDER_TR: {
|
||||
clearStackBackTo(findLastInTableScopeOrRootTbodyTheadTfoot());
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_ROW;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -658,7 +648,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_TD_OR_TH: {
|
||||
|
||||
clearStackBackTo(findLastInTableScopeOrRootTbodyTheadTfoot());
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_TR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendToCurrentNodeAndPushElement(nsHtml5ElementName::ELT_TR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_ROW;
|
||||
continue;
|
||||
}
|
||||
@@ -685,7 +675,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
switch(group) {
|
||||
case NS_HTML5TREE_BUILDER_TD_OR_TH: {
|
||||
clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TR));
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_CELL;
|
||||
insertMarker();
|
||||
attributes = nsnull;
|
||||
@@ -717,27 +707,27 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_CAPTION: {
|
||||
clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
|
||||
insertMarker();
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_CAPTION;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_COLGROUP: {
|
||||
clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_COL: {
|
||||
clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_COLGROUP, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendToCurrentNodeAndPushElement(nsHtml5ElementName::ELT_COLGROUP, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_COLUMN_GROUP;
|
||||
NS_HTML5_CONTINUE(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_TBODY_OR_THEAD_OR_TFOOT: {
|
||||
clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -745,7 +735,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_TR:
|
||||
case NS_HTML5TREE_BUILDER_TD_OR_TH: {
|
||||
clearStackBackTo(findLastOrRoot(NS_HTML5TREE_BUILDER_TABLE));
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_TBODY, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendToCurrentNodeAndPushElement(nsHtml5ElementName::ELT_TBODY, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_TABLE_BODY;
|
||||
NS_HTML5_CONTINUE(starttagloop);
|
||||
}
|
||||
@@ -765,7 +755,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_CONTINUE(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_SCRIPT: {
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, elementName);
|
||||
@@ -773,7 +763,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_STYLE: {
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
|
||||
@@ -784,7 +774,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
if (!nsHtml5Portability::lowerCaseLiteralEqualsIgnoreAsciiCaseString("hidden", attributes->getValue(nsHtml5AttributeName::ATTR_TYPE))) {
|
||||
NS_HTML5_BREAK(intableloop);
|
||||
}
|
||||
appendVoidElementToCurrent(kNameSpaceID_XHTML, name, attributes, formPointer);
|
||||
appendVoidElementToCurrent(name, attributes, formPointer);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -869,7 +859,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
while (currentPtr > 0) {
|
||||
pop();
|
||||
}
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_FRAMESET;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -937,7 +927,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_UL_OR_OL_OR_DL:
|
||||
case NS_HTML5TREE_BUILDER_ADDRESS_OR_ARTICLE_OR_ASIDE_OR_DETAILS_OR_DIR_OR_FIGCAPTION_OR_FIGURE_OR_FOOTER_OR_HEADER_OR_HGROUP_OR_NAV_OR_SECTION_OR_SUMMARY: {
|
||||
implicitlyCloseP();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -947,19 +937,19 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
|
||||
pop();
|
||||
}
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_FIELDSET: {
|
||||
implicitlyCloseP();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes, formPointer);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_PRE_OR_LISTING: {
|
||||
implicitlyCloseP();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
needToDropLF = PR_TRUE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -993,13 +983,13 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
eltPos--;
|
||||
}
|
||||
implicitlyCloseP();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_PLAINTEXT: {
|
||||
implicitlyCloseP();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_PLAINTEXT, elementName);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1019,7 +1009,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
activeA->release();
|
||||
}
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushFormattingElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushFormattingElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -1027,7 +1017,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_FONT: {
|
||||
reconstructTheActiveFormattingElements();
|
||||
maybeForgetEarlierDuplicateFormattingElement(elementName->name, attributes);
|
||||
appendToCurrentNodeAndPushFormattingElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushFormattingElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -1037,7 +1027,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
|
||||
adoptionAgencyEndTag(nsHtml5Atoms::nobr);
|
||||
}
|
||||
appendToCurrentNodeAndPushFormattingElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushFormattingElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -1053,21 +1043,21 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_CONTINUE(starttagloop);
|
||||
} else {
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes, formPointer);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_OBJECT: {
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes, formPointer);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
|
||||
insertMarker();
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_MARQUEE_OR_APPLET: {
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
insertMarker();
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1076,7 +1066,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
if (!quirks) {
|
||||
implicitlyCloseP();
|
||||
}
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_TABLE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1087,14 +1077,14 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
reconstructTheActiveFormattingElements();
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE: {
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_HR: {
|
||||
implicitlyCloseP();
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1107,7 +1097,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_KEYGEN:
|
||||
case NS_HTML5TREE_BUILDER_INPUT: {
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, name, attributes, formPointer);
|
||||
appendVoidElementToCurrentMayFoster(name, attributes, formPointer);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1124,8 +1114,8 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
formAttrs->addAttribute(nsHtml5AttributeName::ATTR_ACTION, attributes->getValue(actionIndex));
|
||||
}
|
||||
appendToCurrentNodeAndPushFormElementMayFoster(formAttrs);
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_HR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_LABEL, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendVoidElementToCurrentMayFoster(nsHtml5ElementName::ELT_HR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName::ELT_LABEL, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
PRInt32 promptIndex = attributes->getIndex(nsHtml5AttributeName::ATTR_PROMPT);
|
||||
if (promptIndex > -1) {
|
||||
autoJArray<PRUnichar,PRInt32> prompt = nsHtml5Portability::newCharArrayFromString(attributes->getValue(promptIndex));
|
||||
@@ -1144,15 +1134,15 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
}
|
||||
}
|
||||
attributes->clearWithoutReleasingContents();
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, nsHtml5Atoms::input, inputAttributes, formPointer);
|
||||
appendVoidElementToCurrentMayFoster(nsHtml5Atoms::input, inputAttributes, formPointer);
|
||||
pop();
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_HR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendVoidElementToCurrentMayFoster(nsHtml5ElementName::ELT_HR, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
pop();
|
||||
selfClosing = PR_FALSE;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_TEXTAREA: {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes, formPointer);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RCDATA, elementName);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
@@ -1163,7 +1153,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_XMP: {
|
||||
implicitlyCloseP();
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
|
||||
@@ -1173,7 +1163,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_NOSCRIPT: {
|
||||
if (!scriptingEnabled) {
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
} else {
|
||||
@@ -1182,7 +1172,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_NOFRAMES:
|
||||
case NS_HTML5TREE_BUILDER_IFRAME:
|
||||
case NS_HTML5TREE_BUILDER_NOEMBED: {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
|
||||
@@ -1191,7 +1181,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_SELECT: {
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes, formPointer);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
|
||||
switch(mode) {
|
||||
case NS_HTML5TREE_BUILDER_IN_TABLE:
|
||||
case NS_HTML5TREE_BUILDER_IN_CAPTION:
|
||||
@@ -1234,7 +1224,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
optionendtagloop_end: ;
|
||||
}
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -1249,7 +1239,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
pop();
|
||||
}
|
||||
}
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -1257,10 +1247,10 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
reconstructTheActiveFormattingElements();
|
||||
attributes->adjustForMath();
|
||||
if (selfClosing) {
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_MathML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFosterMathML(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
} else {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_MathML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFosterMathML(elementName, attributes);
|
||||
inForeign = PR_TRUE;
|
||||
}
|
||||
attributes = nsnull;
|
||||
@@ -1270,10 +1260,10 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
reconstructTheActiveFormattingElements();
|
||||
attributes->adjustForSvg();
|
||||
if (selfClosing) {
|
||||
appendVoidElementToCurrentMayFosterCamelCase(kNameSpaceID_SVG, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFosterSVG(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
} else {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_SVG, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFosterSVG(elementName, attributes);
|
||||
inForeign = PR_TRUE;
|
||||
}
|
||||
attributes = nsnull;
|
||||
@@ -1293,13 +1283,13 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_OUTPUT_OR_LABEL: {
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes, formPointer);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes, formPointer);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
default: {
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -1320,7 +1310,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_BASE:
|
||||
case NS_HTML5TREE_BUILDER_COMMAND: {
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1330,7 +1320,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_BREAK(inheadloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_TITLE: {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RCDATA, elementName);
|
||||
@@ -1339,19 +1329,19 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_NOSCRIPT: {
|
||||
if (scriptingEnabled) {
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
|
||||
} else {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT;
|
||||
}
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_SCRIPT: {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, elementName);
|
||||
@@ -1360,7 +1350,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_STYLE:
|
||||
case NS_HTML5TREE_BUILDER_NOFRAMES: {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
|
||||
@@ -1391,21 +1381,21 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND: {
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_META: {
|
||||
checkMetaCharset(attributes);
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_STYLE:
|
||||
case NS_HTML5TREE_BUILDER_NOFRAMES: {
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
|
||||
@@ -1439,7 +1429,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_COL: {
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1493,7 +1483,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
if (isCurrent(nsHtml5Atoms::option)) {
|
||||
pop();
|
||||
}
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -1504,7 +1494,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
if (isCurrent(nsHtml5Atoms::optgroup)) {
|
||||
pop();
|
||||
}
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
@@ -1539,7 +1529,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
continue;
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_SCRIPT: {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, elementName);
|
||||
@@ -1572,12 +1562,12 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_IN_FRAMESET: {
|
||||
switch(group) {
|
||||
case NS_HTML5TREE_BUILDER_FRAMESET: {
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_FRAME: {
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1597,7 +1587,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_NOFRAMES: {
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
|
||||
@@ -1679,7 +1669,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_FRAMESET: {
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
mode = NS_HTML5TREE_BUILDER_IN_FRAMESET;
|
||||
attributes = nsnull;
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
@@ -1687,7 +1677,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_BASE: {
|
||||
|
||||
pushHeadPointerOntoStack();
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
pop();
|
||||
attributes = nsnull;
|
||||
@@ -1696,7 +1686,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_LINK_OR_BASEFONT_OR_BGSOUND: {
|
||||
|
||||
pushHeadPointerOntoStack();
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
pop();
|
||||
attributes = nsnull;
|
||||
@@ -1706,7 +1696,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
|
||||
checkMetaCharset(attributes);
|
||||
pushHeadPointerOntoStack();
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendVoidElementToCurrentMayFoster(elementName, attributes);
|
||||
selfClosing = PR_FALSE;
|
||||
pop();
|
||||
attributes = nsnull;
|
||||
@@ -1715,7 +1705,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_SCRIPT: {
|
||||
|
||||
pushHeadPointerOntoStack();
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, elementName);
|
||||
@@ -1726,7 +1716,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_NOFRAMES: {
|
||||
|
||||
pushHeadPointerOntoStack();
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RAWTEXT, elementName);
|
||||
@@ -1736,7 +1726,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_TITLE: {
|
||||
|
||||
pushHeadPointerOntoStack();
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElement(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_RCDATA, elementName);
|
||||
@@ -1783,7 +1773,7 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
NS_HTML5_BREAK(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_NOFRAMES: {
|
||||
appendToCurrentNodeAndPushElementMayFoster(kNameSpaceID_XHTML, elementName, attributes);
|
||||
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);
|
||||
originalMode = mode;
|
||||
mode = NS_HTML5TREE_BUILDER_TEXT;
|
||||
tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_SCRIPT_DATA, elementName);
|
||||
@@ -2326,7 +2316,6 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
|
||||
|
||||
NS_HTML5_BREAK(endtagloop);
|
||||
}
|
||||
;
|
||||
formPointer = nsnull;
|
||||
eltPos = findLastInScope(name);
|
||||
if (eltPos == NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
|
||||
@@ -2349,7 +2338,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
|
||||
}
|
||||
inForeign = PR_FALSE;
|
||||
}
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendVoidElementToCurrentMayFoster(elementName, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
NS_HTML5_BREAK(endtagloop);
|
||||
}
|
||||
generateImpliedEndTagsExceptFor(nsHtml5Atoms::p);
|
||||
@@ -2416,7 +2405,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
|
||||
inForeign = PR_FALSE;
|
||||
}
|
||||
reconstructTheActiveFormattingElements();
|
||||
appendVoidElementToCurrentMayFoster(kNameSpaceID_XHTML, elementName, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
appendVoidElementToCurrentMayFoster(elementName, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
|
||||
NS_HTML5_BREAK(endtagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_AREA_OR_WBR:
|
||||
@@ -2466,7 +2455,7 @@ nsHtml5TreeBuilder::endTag(nsHtml5ElementName* elementName)
|
||||
pop();
|
||||
}
|
||||
NS_HTML5_BREAK(endtagloop);
|
||||
} else if (node->isScopingOrSpecial()) {
|
||||
} else if (node->isSpecial()) {
|
||||
|
||||
NS_HTML5_BREAK(endtagloop);
|
||||
}
|
||||
@@ -3222,7 +3211,7 @@ nsHtml5TreeBuilder::adoptionAgencyEndTag(nsIAtom* name)
|
||||
PRInt32 furthestBlockPos = formattingEltStackPos + 1;
|
||||
while (furthestBlockPos <= currentPtr) {
|
||||
nsHtml5StackNode* node = stack[furthestBlockPos];
|
||||
if (node->isScopingOrSpecial()) {
|
||||
if (node->isSpecial()) {
|
||||
break;
|
||||
}
|
||||
furthestBlockPos++;
|
||||
@@ -3268,7 +3257,6 @@ nsHtml5TreeBuilder::adoptionAgencyEndTag(nsIAtom* name)
|
||||
node->release();
|
||||
node->release();
|
||||
node = newNode;
|
||||
;
|
||||
detachFromParent(lastNode->node);
|
||||
appendElement(lastNode->node, node->node);
|
||||
lastNode = node;
|
||||
@@ -3291,7 +3279,6 @@ nsHtml5TreeBuilder::adoptionAgencyEndTag(nsIAtom* name)
|
||||
|
||||
removeFromStack(formattingEltStackPos);
|
||||
insertIntoStack(formattingClone, furthestBlockPos);
|
||||
;
|
||||
}
|
||||
return PR_TRUE;
|
||||
}
|
||||
@@ -3415,7 +3402,7 @@ nsHtml5TreeBuilder::pushHeadPointerOntoStack()
|
||||
|
||||
|
||||
|
||||
silentPush(new nsHtml5StackNode(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_HEAD, headPointer));
|
||||
silentPush(new nsHtml5StackNode(nsHtml5ElementName::ELT_HEAD, headPointer));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -3518,9 +3505,8 @@ void
|
||||
nsHtml5TreeBuilder::appendHtmlElementToDocumentAndPush(nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContent** elt = createHtmlElementSetAsRoot(attributes);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_HTML, elt);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_HTML, elt);
|
||||
push(node);
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -3535,16 +3521,14 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushHeadElement(nsHtml5HtmlAttributes*
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, nsHtml5Atoms::head, attributes);
|
||||
appendElement(elt, stack[currentPtr]->node);
|
||||
headPointer = elt;
|
||||
;
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_HEAD, elt);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_HEAD, elt);
|
||||
push(node);
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushBodyElement(nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
appendToCurrentNodeAndPushElement(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_BODY, attributes);
|
||||
appendToCurrentNodeAndPushElement(nsHtml5ElementName::ELT_BODY, attributes);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -3558,7 +3542,6 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormElementMayFoster(nsHtml5HtmlAt
|
||||
{
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, nsHtml5Atoms::form, attributes);
|
||||
formPointer = elt;
|
||||
;
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3566,15 +3549,14 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormElementMayFoster(nsHtml5HtmlAt
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(kNameSpaceID_XHTML, nsHtml5ElementName::ELT_FORM, elt);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(nsHtml5ElementName::ELT_FORM, elt);
|
||||
push(node);
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormattingElementMayFoster(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormattingElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContent** elt = createElement(ns, elementName->name, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3582,28 +3564,26 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushFormattingElementMayFoster(PRInt32
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(ns, elementName, elt, attributes->cloneAttributes(nsnull));
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt, attributes->cloneAttributes(nsnull));
|
||||
push(node);
|
||||
append(node);
|
||||
node->retain();
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElement(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElement(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContent** elt = createElement(ns, elementName->name, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes);
|
||||
appendElement(elt, stack[currentPtr]->node);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(ns, elementName, elt);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt);
|
||||
push(node);
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->name;
|
||||
nsIContent** elt = createElement(ns, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3611,16 +3591,15 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(PRInt32 ns, nsHtm
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(ns, elementName, elt, popName);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt, popName);
|
||||
push(node);
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterNoScoping(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->name;
|
||||
nsIContent** elt = createElement(ns, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_MathML, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3628,16 +3607,15 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterNoScoping(PRInt32
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(ns, elementName, elt, popName, PR_FALSE);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt, popName, PR_FALSE);
|
||||
push(node);
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterCamelCase(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->camelCaseName;
|
||||
nsIContent** elt = createElement(ns, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_SVG, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3645,15 +3623,14 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFosterCamelCase(PRInt32
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(ns, elementName, elt, popName, nsHtml5ElementName::ELT_FOREIGNOBJECT == elementName);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, popName, elt);
|
||||
push(node);
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
{
|
||||
nsIContent** elt = createElement(ns, elementName->name, attributes, fragment ? nsnull : form);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, elementName->name, attributes, fragment ? nsnull : form);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3661,15 +3638,14 @@ nsHtml5TreeBuilder::appendToCurrentNodeAndPushElementMayFoster(PRInt32 ns, nsHtm
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(ns, elementName, elt);
|
||||
nsHtml5StackNode* node = new nsHtml5StackNode(elementName, elt);
|
||||
push(node);
|
||||
;
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(PRInt32 ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
{
|
||||
nsIContent** elt = createElement(ns, name, attributes, fragment ? nsnull : form);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, name, attributes, fragment ? nsnull : form);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3677,16 +3653,15 @@ nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(PRInt32 ns, nsIAtom* nam
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
elementPushed(ns, name, elt);
|
||||
elementPopped(ns, name, elt);
|
||||
;
|
||||
elementPushed(kNameSpaceID_XHTML, name, elt);
|
||||
elementPopped(kNameSpaceID_XHTML, name, elt);
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->name;
|
||||
nsIContent** elt = createElement(ns, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3694,16 +3669,15 @@ nsHtml5TreeBuilder::appendVoidElementToCurrentMayFoster(PRInt32 ns, nsHtml5Eleme
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
elementPushed(ns, popName, elt);
|
||||
elementPopped(ns, popName, elt);
|
||||
;
|
||||
elementPushed(kNameSpaceID_XHTML, popName, elt);
|
||||
elementPopped(kNameSpaceID_XHTML, popName, elt);
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFosterCamelCase(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIAtom* popName = elementName->camelCaseName;
|
||||
nsIContent** elt = createElement(ns, popName, attributes);
|
||||
nsIContent** elt = createElement(kNameSpaceID_SVG, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
@@ -3711,20 +3685,34 @@ nsHtml5TreeBuilder::appendVoidElementToCurrentMayFosterCamelCase(PRInt32 ns, nsH
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
elementPushed(ns, popName, elt);
|
||||
elementPopped(ns, popName, elt);
|
||||
;
|
||||
elementPushed(kNameSpaceID_SVG, popName, elt);
|
||||
elementPopped(kNameSpaceID_SVG, popName, elt);
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrent(PRInt32 ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrentMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes)
|
||||
{
|
||||
nsIContent** elt = createElement(ns, name, attributes, fragment ? nsnull : form);
|
||||
nsIAtom* popName = elementName->name;
|
||||
nsIContent** elt = createElement(kNameSpaceID_MathML, popName, attributes);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
if (current->isFosterParenting()) {
|
||||
|
||||
insertIntoFosterParent(elt);
|
||||
} else {
|
||||
appendElement(elt, current->node);
|
||||
}
|
||||
elementPushed(kNameSpaceID_MathML, popName, elt);
|
||||
elementPopped(kNameSpaceID_MathML, popName, elt);
|
||||
}
|
||||
|
||||
void
|
||||
nsHtml5TreeBuilder::appendVoidElementToCurrent(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form)
|
||||
{
|
||||
nsIContent** elt = createElement(kNameSpaceID_XHTML, name, attributes, fragment ? nsnull : form);
|
||||
nsHtml5StackNode* current = stack[currentPtr];
|
||||
appendElement(elt, current->node);
|
||||
elementPushed(ns, name, elt);
|
||||
elementPopped(ns, name, elt);
|
||||
;
|
||||
elementPushed(kNameSpaceID_XHTML, name, elt);
|
||||
elementPopped(kNameSpaceID_XHTML, name, elt);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -3754,10 +3742,8 @@ void
|
||||
nsHtml5TreeBuilder::setFragmentContext(nsIAtom* context, PRInt32 ns, nsIContent** node, PRBool quirks)
|
||||
{
|
||||
this->contextName = context;
|
||||
nsHtml5Portability::retainLocal(context);
|
||||
this->contextNamespace = ns;
|
||||
this->contextNode = node;
|
||||
;
|
||||
this->fragment = (!!contextName);
|
||||
this->quirks = quirks;
|
||||
}
|
||||
@@ -3854,7 +3840,6 @@ nsHtml5TreeBuilder::newSnapshot()
|
||||
stackCopy[i]->retain();
|
||||
}
|
||||
}
|
||||
;
|
||||
return new nsHtml5StateSnapshot(stackCopy, listCopy, formPointer, headPointer, deepTreeSurrogateParent, mode, originalMode, framesetOk, inForeign, needToDropLF, quirks);
|
||||
}
|
||||
|
||||
@@ -3929,15 +3914,9 @@ nsHtml5TreeBuilder::loadState(nsAHtml5TreeBuilderState* snapshot, nsHtml5AtomTab
|
||||
stack[i]->retain();
|
||||
}
|
||||
}
|
||||
;
|
||||
formPointer = snapshot->getFormPointer();
|
||||
;
|
||||
;
|
||||
headPointer = snapshot->getHeadPointer();
|
||||
;
|
||||
;
|
||||
deepTreeSurrogateParent = snapshot->getDeepTreeSurrogateParent();
|
||||
;
|
||||
mode = snapshot->getMode();
|
||||
originalMode = snapshot->getOriginalMode();
|
||||
framesetOk = snapshot->isFramesetOk();
|
||||
|
||||
@@ -175,16 +175,17 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState
|
||||
void appendToCurrentNodeAndPushBodyElement(nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushBodyElement();
|
||||
void appendToCurrentNodeAndPushFormElementMayFoster(nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushFormattingElementMayFoster(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElement(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElementMayFoster(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElementMayFosterNoScoping(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElementMayFosterCamelCase(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElementMayFoster(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContent** form);
|
||||
void appendVoidElementToCurrentMayFoster(PRInt32 ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form);
|
||||
void appendVoidElementToCurrentMayFoster(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendVoidElementToCurrentMayFosterCamelCase(PRInt32 ns, nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendVoidElementToCurrent(PRInt32 ns, nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form);
|
||||
void appendToCurrentNodeAndPushFormattingElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElement(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElementMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElementMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendToCurrentNodeAndPushElementMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes, nsIContent** form);
|
||||
void appendVoidElementToCurrentMayFoster(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form);
|
||||
void appendVoidElementToCurrentMayFoster(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendVoidElementToCurrentMayFosterSVG(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendVoidElementToCurrentMayFosterMathML(nsHtml5ElementName* elementName, nsHtml5HtmlAttributes* attributes);
|
||||
void appendVoidElementToCurrent(nsIAtom* name, nsHtml5HtmlAttributes* attributes, nsIContent** form);
|
||||
void appendVoidFormToCurrent(nsHtml5HtmlAttributes* attributes);
|
||||
protected:
|
||||
void accumulateCharacters(const PRUnichar* buf, PRInt32 start, PRInt32 length);
|
||||
|
||||
@@ -17,4 +17,5 @@ var html5Exceptions = {
|
||||
"<math><annotation-xml encoding=\"aPPlication/xhtmL+xMl\"><div>" : true, // Bug 612529
|
||||
"<math><annotation-xml encoding=\"text/html\"><div>" : true, // Bug 612529
|
||||
"<math><annotation-xml encoding=\"Text/htmL\"><div>" : true, // Bug 612529
|
||||
"<!doctype html><div><body><frameset>" : true, // Bug 614241
|
||||
}
|
||||
|
||||
@@ -546,6 +546,32 @@
|
||||
| <ul>
|
||||
| "a"
|
||||
|
||||
#data
|
||||
<!DOCTYPE html><p><svg><desc><p>
|
||||
#errors
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <p>
|
||||
| <svg svg>
|
||||
| <svg desc>
|
||||
| <p>
|
||||
|
||||
#data
|
||||
<!DOCTYPE html><p><svg><title><p>
|
||||
#errors
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <p>
|
||||
| <svg svg>
|
||||
| <svg title>
|
||||
| <p>
|
||||
|
||||
#data
|
||||
<div><svg><path><foreignObject><p></foreignObject><p>
|
||||
#errors
|
||||
|
||||
@@ -378,11 +378,11 @@
|
||||
| <p>
|
||||
| <math math>
|
||||
| <math mi>
|
||||
| <p>
|
||||
| <h1>
|
||||
| <p>
|
||||
| <h1>
|
||||
|
||||
#data
|
||||
<!doctype html><p><math><mi><p><h1>
|
||||
<!doctype html><p><math><mo><p><h1>
|
||||
#errors
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
@@ -391,9 +391,51 @@
|
||||
| <body>
|
||||
| <p>
|
||||
| <math math>
|
||||
| <math mi>
|
||||
| <math mo>
|
||||
| <p>
|
||||
| <h1>
|
||||
|
||||
#data
|
||||
<!doctype html><p><math><mn><p><h1>
|
||||
#errors
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <p>
|
||||
| <h1>
|
||||
| <math math>
|
||||
| <math mn>
|
||||
| <p>
|
||||
| <h1>
|
||||
|
||||
#data
|
||||
<!doctype html><p><math><ms><p><h1>
|
||||
#errors
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <p>
|
||||
| <math math>
|
||||
| <math ms>
|
||||
| <p>
|
||||
| <h1>
|
||||
|
||||
#data
|
||||
<!doctype html><p><math><mtext><p><h1>
|
||||
#errors
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <p>
|
||||
| <math math>
|
||||
| <math mtext>
|
||||
| <p>
|
||||
| <h1>
|
||||
|
||||
#data
|
||||
<!doctype html><frameset></noframes>
|
||||
@@ -830,6 +872,25 @@
|
||||
| <body>
|
||||
| "a "
|
||||
|
||||
#data
|
||||
<!doctype html><div><frameset>
|
||||
#errors
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
| <head>
|
||||
| <frameset>
|
||||
|
||||
#data
|
||||
<!doctype html><div><body><frameset>
|
||||
#errors
|
||||
#document
|
||||
| <!DOCTYPE html>
|
||||
| <html>
|
||||
| <head>
|
||||
| <body>
|
||||
| <div>
|
||||
|
||||
#data
|
||||
<!doctype html><p><math></p>a
|
||||
#errors
|
||||
@@ -854,7 +915,8 @@
|
||||
| <math math>
|
||||
| <math mn>
|
||||
| <span>
|
||||
| "a"
|
||||
| <p>
|
||||
| "a"
|
||||
|
||||
#data
|
||||
<!doctype html><math></html>
|
||||
|
||||
Reference in New Issue
Block a user