private void appendVoidFormToCurrent(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T currentNode = nodeFromStackWithBlinkCompat(currentPtr); T elt = createElement("http://www.w3.org/1999/xhtml", "form", attributes, currentNode // CPPONLY: , htmlCreator(NS_NewHTMLFormElement) ); formPointer = elt; // ownership transferred to form pointer appendElement(elt, currentNode); elementPushed("http://www.w3.org/1999/xhtml", "form", elt); elementPopped("http://www.w3.org/1999/xhtml", "form", elt); }
private void appendVoidInputToCurrent(HtmlAttributes attributes, T form) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] // Can't be called for custom elements T currentNode = nodeFromStackWithBlinkCompat(currentPtr); T elt = createElement("http://www.w3.org/1999/xhtml", "input", attributes, form == null || fragment || isTemplateContents() ? null : form, currentNode // CPPONLY: , htmlCreator(NS_NewHTMLInputElement) ); appendElement(elt, currentNode); elementPushed("http://www.w3.org/1999/xhtml", "input", elt); elementPopped("http://www.w3.org/1999/xhtml", "input", elt); }
private void appendToCurrentNodeAndPushHeadElement(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T currentNode = nodeFromStackWithBlinkCompat(currentPtr); T elt = createElement("http://www.w3.org/1999/xhtml", "head", attributes, currentNode /* * head uses NS_NewHTMLSharedElement creator */ // CPPONLY: , htmlCreator(NS_NewHTMLSharedElement) ); appendElement(elt, currentNode); headPointer = elt; StackNode<T> node = createStackNode(ElementName.HEAD, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private void appendToCurrentNodeAndPushElement(ElementName elementName, HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] // This method can't be called for custom elements T currentNode = nodeFromStackWithBlinkCompat(currentPtr); T elt = createElement("http://www.w3.org/1999/xhtml", elementName.getName(), attributes, currentNode // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); appendElement(elt, currentNode); if (ElementName.TEMPLATE == elementName) { elt = getDocumentFragmentForTemplate(elt); } StackNode<T> node = createStackNode(elementName, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private void appendToCurrentNodeAndPushFormElementMayFoster( HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T elt; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/1999/xhtml", "form", attributes // CPPONLY: , htmlCreator(NS_NewHTMLFormElement) ); } else { T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/1999/xhtml", "form", attributes, currentNode // CPPONLY: , htmlCreator(NS_NewHTMLFormElement) ); appendElement(elt, currentNode); } if (!isTemplateContents()) { formPointer = elt; } StackNode<T> node = createStackNode(ElementName.FORM, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private void appendVoidElementToCurrentMayFoster( ElementName elementName, HtmlAttributes attributes, T form) throws SAXException { @Local String name = elementName.getName(); // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] // Can't be called for custom elements T elt; T formOwner = form == null || fragment || isTemplateContents() ? null : form; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); elt = createAndInsertFosterParentedElement("http://www.w3.org/1999/xhtml", name, attributes, formOwner // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); } else { T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/1999/xhtml", name, attributes, formOwner, currentNode // CPPONLY: , htmlCreator(elementName.getHtmlCreator()) ); appendElement(elt, currentNode); } elementPushed("http://www.w3.org/1999/xhtml", name, elt); elementPopped("http://www.w3.org/1999/xhtml", name, 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 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); }
T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/1999/xhtml", elementName.getName(), attributes, formOwner, currentNode
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); }
T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/2000/svg", popName, attributes, currentNode
T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/1999/xhtml", popName, attributes, currentNode
T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/1998/Math/MathML", popName, attributes, currentNode
T currentNode = nodeFromStackWithBlinkCompat(currentPtr); elt = createElement("http://www.w3.org/1999/xhtml", elementName.getName(), attributes, currentNode
T currentNode = nodeFromStackWithBlinkCompat(currentPtr); clone = createElement("http://www.w3.org/1999/xhtml", entry.name, entry.attributes.cloneAttributes(), currentNode
T insertionCommonAncestor = nodeFromStackWithBlinkCompat(formattingEltStackPos - 1); // weak ref appendElement(lastNode.node, nodeFromStackWithBlinkCompat(nodePos)); lastNode = node;