protected T createElement(@NsUri String ns, @Local String name, HtmlAttributes attributes, T form, T intendedParent // CPPONLY: , @Creator Object creator ) throws SAXException { return createElement("http://www.w3.org/1999/xhtml", name, attributes, intendedParent // CPPONLY: , creator ); }
protected T createElement(@NsUri String ns, @Local String name, HtmlAttributes attributes, T form, T intendedParent // CPPONLY: , @Creator Object creator ) throws SAXException { return createElement("http://www.w3.org/1999/xhtml", name, attributes, intendedParent // CPPONLY: , creator ); }
private void appendVoidFormToCurrent(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T elt = createElement("http://www.w3.org/1999/xhtml", "form", attributes); formPointer = elt; // ownership transferred to form pointer StackNode<T> current = stack[currentPtr]; appendElement(elt, current.node); elementPushed("http://www.w3.org/1999/xhtml", "form", elt); elementPopped("http://www.w3.org/1999/xhtml", "form", elt); }
protected T createElement(@NsUri String ns, @Local String name, HtmlAttributes attributes, T form) throws SAXException { return createElement("http://www.w3.org/1999/xhtml", name, attributes); }
private void appendVoidFormToCurrent(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T currentNode = stack[currentPtr].node; 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 appendVoidElementToCurrent( @Local String name, HtmlAttributes attributes, T form) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] // Can't be called for custom elements T elt = createElement("http://www.w3.org/1999/xhtml", name, attributes, fragment ? null : form); StackNode<T> current = stack[currentPtr]; appendElement(elt, current.node); elementPushed("http://www.w3.org/1999/xhtml", name, elt); elementPopped("http://www.w3.org/1999/xhtml", name, 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 = stack[currentPtr].node; 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 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 = stack[currentPtr].node; 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 elt = createElement("http://www.w3.org/1999/xhtml", elementName.name, attributes); appendElement(elt, stack[currentPtr].node); StackNode<T> node = new StackNode<T>(elementName, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private void appendToCurrentNodeAndPushHeadElement(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T elt = createElement("http://www.w3.org/1999/xhtml", "head", attributes); appendElement(elt, stack[currentPtr].node); headPointer = elt; StackNode<T> node = new StackNode<T>(ElementName.HEAD, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private T createAndInsertFosterParentedElement(@NsUri String ns, @Local String name, HtmlAttributes attributes, T form // CPPONLY: , @Creator Object creator ) throws SAXException { int tablePos = findLastOrRoot(TreeBuilder.TABLE); int templatePos = findLastOrRoot(TreeBuilder.TEMPLATE); if (templatePos >= tablePos) { T child = createElement(ns, name, attributes, form, stack[templatePos].node // CPPONLY: , creator ); appendElement(child, stack[templatePos].node); return child; } StackNode<T> node = stack[tablePos]; return createAndInsertFosterParentedElement(ns, name, attributes, form, node.node, stack[tablePos - 1].node // CPPONLY: , creator ); }
private T createAndInsertFosterParentedElement(@NsUri String ns, @Local String name, HtmlAttributes attributes, T form // CPPONLY: , @Creator Object creator ) throws SAXException { int tablePos = findLastOrRoot(TreeBuilder.TABLE); int templatePos = findLastOrRoot(TreeBuilder.TEMPLATE); if (templatePos >= tablePos) { T child = createElement(ns, name, attributes, form, stack[templatePos].node // CPPONLY: , creator ); appendElement(child, stack[templatePos].node); return child; } StackNode<T> node = stack[tablePos]; return createAndInsertFosterParentedElement(ns, name, attributes, form, node.node, stack[tablePos - 1].node // CPPONLY: , creator ); }
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 appendVoidElementToCurrentMayFoster( @Local String name, HtmlAttributes attributes, T form) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] // Can't be called for custom elements T elt = createElement("http://www.w3.org/1999/xhtml", name, attributes, fragment ? null : form); StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); insertIntoFosterParent(elt); } else { appendElement(elt, current.node); } elementPushed("http://www.w3.org/1999/xhtml", name, elt); elementPopped("http://www.w3.org/1999/xhtml", name, elt); }
private void appendToCurrentNodeAndPushElementMayFoster(ElementName elementName, HtmlAttributes attributes, T form) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] // Can't be called for custom elements T elt = createElement("http://www.w3.org/1999/xhtml", elementName.name, attributes, fragment ? null : form); StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); insertIntoFosterParent(elt); } else { appendElement(elt, current.node); } StackNode<T> node = new StackNode<T>(elementName, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private void appendVoidElementToCurrentMayFoster( ElementName elementName, HtmlAttributes attributes) throws SAXException { @Local String popName = elementName.name; // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); if (elementName.isCustom()) { popName = checkPopName(popName); } // ]NOCPP] T elt = createElement("http://www.w3.org/1999/xhtml", popName, attributes); StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); insertIntoFosterParent(elt); } else { 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.camelCaseName; // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/2000/svg"); if (elementName.isCustom()) { popName = checkPopName(popName); } // ]NOCPP] T elt = createElement("http://www.w3.org/2000/svg", popName, attributes); StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); insertIntoFosterParent(elt); } else { appendElement(elt, current.node); } 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.name; // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1998/Math/MathML"); if (elementName.isCustom()) { popName = checkPopName(popName); } // ]NOCPP] T elt = createElement("http://www.w3.org/1998/Math/MathML", popName, attributes); StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); insertIntoFosterParent(elt); } else { appendElement(elt, current.node); } elementPushed("http://www.w3.org/1998/Math/MathML", popName, elt); elementPopped("http://www.w3.org/1998/Math/MathML", popName, elt); }