private int findLastOrRoot(int group) { for (int i = currentPtr; i > 0; i--) { if (stack[i].getGroup() == group) { return i; } } return 0; }
private int findLastInTableScopeOrRootTbodyTheadTfoot() { for (int i = currentPtr; i > 0; i--) { if (stack[i].getGroup() == TreeBuilder.TBODY_OR_THEAD_OR_TFOOT) { return i; } } return 0; }
private int findLastOrRoot(int group) { for (int i = currentPtr; i > 0; i--) { if (stack[i].getGroup() == group) { return i; } } return 0; }
private boolean isSecondOnStackBody() { return currentPtr >= 1 && stack[1].getGroup() == TreeBuilder.BODY; }
private int findLastOrRoot(int group) { for (int i = currentPtr; i > 0; i--) { if (stack[i].getGroup() == group) { return i; } } return 0; }
private boolean isSecondOnStackBody() { return currentPtr >= 1 && stack[1].getGroup() == TreeBuilder.BODY; }
private boolean isSecondOnStackBody() { return currentPtr >= 1 && stack[1].getGroup() == TreeBuilder.BODY; }
private void clearStackBackTo(int eltPos) throws SAXException { int eltGroup = stack[eltPos].getGroup(); while (currentPtr > eltPos) { // > not >= intentional if (stack[currentPtr].ns == "http://www.w3.org/1999/xhtml" && stack[currentPtr].getGroup() == TEMPLATE && (eltGroup == TABLE || eltGroup == TBODY_OR_THEAD_OR_TFOOT|| eltGroup == TR || eltPos == 0)) { return; } pop(); } }
private void clearStackBackTo(int eltPos) throws SAXException { int eltGroup = stack[eltPos].getGroup(); while (currentPtr > eltPos) { // > not >= intentional if (stack[currentPtr].ns == "http://www.w3.org/1999/xhtml" && stack[currentPtr].getGroup() == TEMPLATE && (eltGroup == TABLE || eltGroup == TBODY_OR_THEAD_OR_TFOOT|| eltGroup == TR || eltPos == 0)) { return; } pop(); } }
private int findLastInScopeHn() { for (int i = currentPtr; i > 0; i--) { if (stack[i].getGroup() == TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6) { return i; } else if (stack[i].isScoping()) { return TreeBuilder.NOT_FOUND_ON_STACK; } } return TreeBuilder.NOT_FOUND_ON_STACK; }
private int findLastInScopeHn() { for (int i = currentPtr; i > 0; i--) { if (stack[i].getGroup() == TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6) { return i; } else if (stack[i].isScoping()) { return TreeBuilder.NOT_FOUND_ON_STACK; } } return TreeBuilder.NOT_FOUND_ON_STACK; }
private int findLastInScopeHn() { for (int i = currentPtr; i > 0; i--) { if (stack[i].getGroup() == TreeBuilder.H1_OR_H2_OR_H3_OR_H4_OR_H5_OR_H6) { return i; } else if (stack[i].isScoping()) { return TreeBuilder.NOT_FOUND_ON_STACK; } } return TreeBuilder.NOT_FOUND_ON_STACK; }
private void generateImpliedEndTags() throws SAXException { for (;;) { switch (stack[currentPtr].getGroup()) { case P: case LI: case DD_OR_DT: case OPTION: case OPTGROUP: case RT_OR_RP: pop(); continue; default: return; } } }
private void generateImpliedEndTags() throws SAXException { for (;;) { switch (stack[currentPtr].getGroup()) { case P: case LI: case DD_OR_DT: case OPTION: case OPTGROUP: case RB_OR_RTC: case RT_OR_RP: pop(); continue; default: return; } } }
private boolean isSpecialParentInForeign(StackNode<T> stackNode) { @NsUri String ns = stackNode.ns; return ("http://www.w3.org/1999/xhtml" == ns) || (stackNode.isHtmlIntegrationPoint()) || (("http://www.w3.org/1998/Math/MathML" == ns) && (stackNode.getGroup() == MI_MO_MN_MS_MTEXT)); }
private boolean isSpecialParentInForeign(StackNode<T> stackNode) { @NsUri String ns = stackNode.ns; return ("http://www.w3.org/1999/xhtml" == ns) || (stackNode.isHtmlIntegrationPoint()) || (("http://www.w3.org/1998/Math/MathML" == ns) && (stackNode.getGroup() == MI_MO_MN_MS_MTEXT)); }
private boolean isSpecialParentInForeign(StackNode<T> stackNode) { @NsUri String ns = stackNode.ns; return ("http://www.w3.org/1999/xhtml" == ns) || (stackNode.isHtmlIntegrationPoint()) || (("http://www.w3.org/1998/Math/MathML" == ns) && (stackNode.getGroup() == MI_MO_MN_MS_MTEXT)); }
/** * Attempt to add attribute to the body element. * @param attributes the attributes * @return <code>true</code> iff the attributes were added * @throws SAXException */ private boolean addAttributesToBody(HtmlAttributes attributes) throws SAXException { // [NOCPP[ checkAttributes(attributes, "http://www.w3.org/1999/xhtml"); // ]NOCPP] if (currentPtr >= 1) { StackNode<T> body = stack[1]; if (body.getGroup() == TreeBuilder.BODY) { addAttributesToElement(body.node, attributes); return true; } } return false; }