private void pushHeadPointerOntoStack() throws SAXException { assert headPointer != null; assert !fragment; assert mode == AFTER_HEAD; fatal(); silentPush(new StackNode<T>(ElementName.HEAD, headPointer // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] )); }
/** * Reports the name and location of an unclosed element. * * @throws SAXException */ private final void reportUnclosedElementNameAndLocation(int pos) throws SAXException { StackNode<T> node = stack[pos]; if (node.isOptionalEndTag()) { return; } TaintableLocatorImpl locator = node.getLocator(); if (locator.isTainted()) { return; } locator.markTainted(); SAXParseException spe = new SAXParseException( "Unclosed element \u201C" + node.popName + "\u201D.", locator); errorHandler.error(spe); }
private void appendHtmlElementToDocumentAndPush(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T elt = createHtmlElementSetAsRoot(attributes); StackNode<T> node = new StackNode<T>(ElementName.HTML, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
/** * Reports the name and location of an unclosed element. * * @throws SAXException */ private final void reportUnclosedElementNameAndLocation(int pos) throws SAXException { StackNode<T> node = stack[pos]; if (node.isOptionalEndTag()) { return; } TaintableLocatorImpl locator = node.getLocator(); if (locator.isTainted()) { return; } locator.markTainted(); SAXParseException spe = new SAXParseException( "Unclosed element \u201C" + node.popName + "\u201D.", locator); errorHandler.error(spe); }
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); }
/** * Reports the name and location of an unclosed element. * * @throws SAXException */ private final void reportUnclosedElementNameAndLocation(int pos) throws SAXException { StackNode<T> node = stack[pos]; if (node.isOptionalEndTag()) { return; } TaintableLocatorImpl locator = node.getLocator(); if (locator.isTainted()) { return; } locator.markTainted(); SAXParseException spe = new SAXParseException( "Unclosed element \u201C" + node.popName + "\u201D.", locator); errorHandler.error(spe); }
private void pushHeadPointerOntoStack() throws SAXException { assert headPointer != null; assert mode == AFTER_HEAD; fatal(); silentPush(createStackNode(ElementName.HEAD, headPointer // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] )); }
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 void pushHeadPointerOntoStack() throws SAXException { assert headPointer != null; assert mode == AFTER_HEAD; fatal(); silentPush(createStackNode(ElementName.HEAD, headPointer // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] )); }
private void appendHtmlElementToDocumentAndPush(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T elt = createHtmlElementSetAsRoot(attributes); StackNode<T> node = createStackNode(ElementName.HTML, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private void appendHtmlElementToDocumentAndPush(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] T elt = createHtmlElementSetAsRoot(attributes); StackNode<T> node = createStackNode(ElementName.HTML, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
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 appendToCurrentNodeAndPushFormElementMayFoster( 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; StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); insertIntoFosterParent(elt); } else { appendElement(elt, current.node); } StackNode<T> node = new StackNode<T>(ElementName.FORM, 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 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 appendToCurrentNodeAndPushElementMayFoster(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); } StackNode<T> node = new StackNode<T>(elementName, elt, popName // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
private void appendToCurrentNodeAndPushFormattingElementMayFoster( 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); StackNode<T> current = stack[currentPtr]; if (current.isFosterParenting()) { fatal(); insertIntoFosterParent(elt); } else { appendElement(elt, current.node); } StackNode<T> node = new StackNode<T>(elementName, elt, attributes.cloneAttributes(null) // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); append(node); node.retain(); // append doesn't retain itself }
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 appendToCurrentNodeAndPushElementMayFosterSVG( 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); } StackNode<T> node = new StackNode<T>(elementName, popName, elt // [NOCPP[ , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer) // ]NOCPP] ); push(node); }
markAsHtmlIntegrationPoint , errorHandler == null ? null : new TaintableLocatorImpl(tokenizer)
, errorHandler == null ? null : new TaintableLocatorImpl(tokenizer)