if (other.tagName == null) { tagName = null; } else if (other.tagName.isInterned()) { tagName = other.tagName; } else {
/** * Short hand for well-known HTML elements. * * @param elementName * @param node */ void setValues(ElementName elementName, T node // [NOCPP[ , TaintableLocatorImpl locator // ]NOCPP] ) { assert isUnused(); this.flags = elementName.getFlags(); this.name = elementName.getName(); this.popName = elementName.getName(); this.ns = "http://www.w3.org/1999/xhtml"; this.node = node; this.attributes = null; this.refcount = 1; assert elementName.isInterned() : "Don't use this constructor for custom elements."; /* * Not used for formatting elements, so no need to track creator. */ // CPPONLY: this.htmlCreator = null; // [NOCPP[ this.locator = locator; // ]NOCPP] }
/** * Short hand for well-known HTML elements. * * @param elementName * @param node */ void setValues(ElementName elementName, T node // [NOCPP[ , TaintableLocatorImpl locator // ]NOCPP] ) { assert isUnused(); this.flags = elementName.getFlags(); this.name = elementName.getName(); this.popName = elementName.getName(); this.ns = "http://www.w3.org/1999/xhtml"; this.node = node; this.attributes = null; this.refcount = 1; assert elementName.isInterned() : "Don't use this constructor for custom elements."; /* * Not used for formatting elements, so no need to track creator. */ // CPPONLY: this.htmlCreator = null; // [NOCPP[ this.locator = locator; // ]NOCPP] }
/** * Setter for HTML formatting elements. * * @param elementName * @param node * @param attributes */ void setValues(ElementName elementName, T node, HtmlAttributes attributes // [NOCPP[ , TaintableLocatorImpl locator // ]NOCPP] ) { assert isUnused(); this.flags = elementName.getFlags(); this.name = elementName.getName(); this.popName = elementName.getName(); this.ns = "http://www.w3.org/1999/xhtml"; this.node = node; this.attributes = attributes; this.refcount = 1; assert elementName.isInterned() : "Don't use this constructor for custom elements."; /* * Need to track creator for formatting elements in order to be able * to clone them. */ // CPPONLY: this.htmlCreator = elementName.getHtmlCreator(); // [NOCPP[ this.locator = locator; // ]NOCPP] }
/** * Setter for HTML formatting elements. * * @param elementName * @param node * @param attributes */ void setValues(ElementName elementName, T node, HtmlAttributes attributes // [NOCPP[ , TaintableLocatorImpl locator // ]NOCPP] ) { assert isUnused(); this.flags = elementName.getFlags(); this.name = elementName.getName(); this.popName = elementName.getName(); this.ns = "http://www.w3.org/1999/xhtml"; this.node = node; this.attributes = attributes; this.refcount = 1; assert elementName.isInterned() : "Don't use this constructor for custom elements."; /* * Need to track creator for formatting elements in order to be able * to clone them. */ // CPPONLY: this.htmlCreator = elementName.getHtmlCreator(); // [NOCPP[ this.locator = locator; // ]NOCPP] }
if (other.tagName == null) { tagName = null; } else if (other.tagName.isInterned()) { tagName = other.tagName; } else {
private void appendVoidElementToCurrentMayFosterMathML( ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.getName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1998/Math/MathML"); if (!elementName.isInterned()) { popName = checkPopName(popName); } // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/1998/Math/MathML", popName, attributes // CPPONLY: , htmlCreator(null) ); } else { elt = createElement("http://www.w3.org/1998/Math/MathML", popName, attributes, current.node // CPPONLY: , htmlCreator(null) ); appendElement(elt, current.node); } elementPushed("http://www.w3.org/1998/Math/MathML", popName, elt); elementPopped("http://www.w3.org/1998/Math/MathML", popName, elt); }
private void appendVoidElementToCurrentMayFoster( ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.getName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); if (!elementName.isInterned()) { popName = checkPopName(popName); } // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/1999/xhtml", popName, attributes // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); } else { elt = createElement("http://www.w3.org/1999/xhtml", popName, attributes, current.node // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); appendElement(elt, current.node); } elementPushed("http://www.w3.org/1999/xhtml", popName, elt); elementPopped("http://www.w3.org/1999/xhtml", popName, elt); }
private void appendVoidElementToCurrentMayFosterSVG( ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.getCamelCaseName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/2000/svg"); if (!elementName.isInterned()) { popName = checkPopName(popName); } // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/2000/svg", popName, attributes // CPPONLY: , svgCreator(elementName.getSvgCreator()) ); } else { elt = createElement("http://www.w3.org/2000/svg", popName, attributes, current.node // CPPONLY: , svgCreator(elementName.getSvgCreator()) ); appendElement(elt, current.node); } elementPushed("http://www.w3.org/2000/svg", popName, elt); elementPopped("http://www.w3.org/2000/svg", popName, elt); }
private void appendVoidElementToCurrentMayFoster( ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.getName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); if (!elementName.isInterned()) { popName = checkPopName(popName); } // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/1999/xhtml", popName, attributes // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); } else { T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/1999/xhtml", popName, attributes, currentNode // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); appendElement(elt, currentNode); } elementPushed("http://www.w3.org/1999/xhtml", popName, elt); elementPopped("http://www.w3.org/1999/xhtml", popName, elt); }
private void appendVoidElementToCurrentMayFosterSVG( ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.getCamelCaseName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/2000/svg"); if (!elementName.isInterned()) { popName = checkPopName(popName); } // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/2000/svg", popName, attributes // CPPONLY: , svgCreator(elementName.getSvgCreator()) ); } else { T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/2000/svg", popName, attributes, currentNode // CPPONLY: , svgCreator(elementName.getSvgCreator()) ); appendElement(elt, currentNode); } elementPushed("http://www.w3.org/2000/svg", popName, elt); elementPopped("http://www.w3.org/2000/svg", popName, elt); }
private void appendVoidElementToCurrentMayFosterMathML( ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.getName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1998/Math/MathML"); if (!elementName.isInterned()) { popName = checkPopName(popName); } // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/1998/Math/MathML", popName, attributes // CPPONLY: , htmlCreator(null) ); } else { T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/1998/Math/MathML", popName, attributes, currentNode // CPPONLY: , htmlCreator(null) ); appendElement(elt, currentNode); } elementPushed("http://www.w3.org/1998/Math/MathML", popName, elt); elementPopped("http://www.w3.org/1998/Math/MathML", popName, elt); }
private void appendToCurrentNodeAndPushElementMayFoster(ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.getName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); if (!elementName.isInterned()) { popName = checkPopName(popName); } // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/1999/xhtml", popName, attributes // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); } else { elt = createElement("http://www.w3.org/1999/xhtml", popName, attributes, current.node // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); appendElement(elt, current.node); } StackNode<T> node = createStackNode(elementName, elt, popName // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private void appendToCurrentNodeAndPushElementMayFosterSVG( ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.getCamelCaseName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/2000/svg"); if (!elementName.isInterned()) { popName = checkPopName(popName); } // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/2000/svg", popName, attributes // CPPONLY: , svgCreator(elementName.getSvgCreator()) ); } else { elt = createElement("http://www.w3.org/2000/svg", popName, attributes, current.node // CPPONLY: , svgCreator(elementName.getSvgCreator()) ); appendElement(elt, current.node); } StackNode<T> node = createStackNode(elementName, popName, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
if (!elementName.isInterned()) { popName = checkPopName(popName);
if (!elementName.isInterned()) { popName = checkPopName(popName);
if (!elementName.isInterned()) { popName = checkPopName(popName);
if (!elementName.isInterned()) { popName = checkPopName(popName);