private void clearStackBackTo(int eltPos) throws SAXException { while (currentPtr > eltPos) { // > not >= intentional pop(); } }
private void endTagTemplateInHead() throws SAXException { int eltPos = findLast("template"); if (eltPos == TreeBuilder.NOT_FOUND_ON_STACK) { errStrayEndTag("template"); return; } generateImpliedEndTagsThoroughly(); if (errorHandler != null && !isCurrent("template")) { errUnclosedElements(eltPos, "template"); } while (currentPtr >= eltPos) { pop(); } clearTheListOfActiveFormattingElementsUpToTheLastMarker(); popTemplateMode(); resetTheInsertionMode(); }
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 void endTagTemplateInHead() throws SAXException { int eltPos = findLast("template"); if (eltPos == TreeBuilder.NOT_FOUND_ON_STACK) { errStrayEndTag("template"); return; } generateImpliedEndTagsThoroughly(); if (errorHandler != null && !isCurrent("template")) { errUnclosedElements(eltPos, "template"); } while (currentPtr >= eltPos) { pop(); } clearTheListOfActiveFormattingElementsUpToTheLastMarker(); popTemplateMode(); resetTheInsertionMode(); }
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 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 void removeFromStack(StackNode<T> node) throws SAXException { if (stack[currentPtr] == node) { pop(); } else { int pos = currentPtr - 1; while (pos >= 0 && stack[pos] != node) { pos--; } if (pos == -1) { // dead code? return; } fatal(); node.release(this); System.arraycopy(stack, pos + 1, stack, pos, currentPtr - pos); currentPtr--; } }
private void removeFromStack(int pos) throws SAXException { if (currentPtr == pos) { pop(); } else { fatal(); stack[pos].release(); System.arraycopy(stack, pos + 1, stack, pos, currentPtr - pos); assert clearLastStackSlot(); currentPtr--; } }
private void removeFromStack(int pos) throws SAXException { if (currentPtr == pos) { pop(); } else { fatal(); stack[pos].release(this); System.arraycopy(stack, pos + 1, stack, pos, currentPtr - pos); assert debugOnlyClearLastStackSlot(); currentPtr--; } }
private void removeFromStack(StackNode<T> node) throws SAXException { if (stack[currentPtr] == node) { pop(); } else { int pos = currentPtr - 1; while (pos >= 0 && stack[pos] != node) { pos--; } if (pos == -1) { // dead code? return; } fatal(); node.release(); System.arraycopy(stack, pos + 1, stack, pos, currentPtr - pos); currentPtr--; } }
private void removeFromStack(int pos) throws SAXException { if (currentPtr == pos) { pop(); } else { fatal(); stack[pos].release(this); System.arraycopy(stack, pos + 1, stack, pos, currentPtr - pos); assert debugOnlyClearLastStackSlot(); currentPtr--; } }
private void generateImpliedEndTagsExceptFor(@Local String name) throws SAXException { for (;;) { StackNode<T> node = stack[currentPtr]; switch (node.getGroup()) { case P: case LI: case DD_OR_DT: case OPTION: case OPTGROUP: case RB_OR_RTC: case RT_OR_RP: if (node.ns == "http://www.w3.org/1999/xhtml" && node.name == name) { return; } pop(); continue; default: return; } } }
private void closeTheCell(int eltPos) throws SAXException { generateImpliedEndTags(); if (errorHandler != null && eltPos != currentPtr) { errUnclosedElementsCell(eltPos); } while (currentPtr >= eltPos) { pop(); } clearTheListOfActiveFormattingElementsUpToTheLastMarker(); mode = IN_ROW; return; }
private void closeTheCell(int eltPos) throws SAXException { generateImpliedEndTags(); if (errorHandler != null && eltPos != currentPtr) { errUnclosedElementsCell(eltPos); } while (currentPtr >= eltPos) { pop(); } clearTheListOfActiveFormattingElementsUpToTheLastMarker(); mode = IN_ROW; return; }
private void closeTheCell(int eltPos) throws SAXException { generateImpliedEndTags(); if (errorHandler != null && eltPos != currentPtr) { errUnclosedElementsCell(eltPos); } while (currentPtr >= eltPos) { pop(); } clearTheListOfActiveFormattingElementsUpToTheLastMarker(); mode = IN_ROW; return; }
/** * @throws SAXException * */ private void implicitlyCloseP() throws SAXException { int eltPos = findLastInButtonScope("p"); if (eltPos == TreeBuilder.NOT_FOUND_ON_STACK) { return; } generateImpliedEndTagsExceptFor("p"); if (errorHandler != null && eltPos != currentPtr) { errUnclosedElementsImplied(eltPos, "p"); } while (currentPtr >= eltPos) { pop(); } }
/** * @throws SAXException * */ private void implicitlyCloseP() throws SAXException { int eltPos = findLastInButtonScope("p"); if (eltPos == TreeBuilder.NOT_FOUND_ON_STACK) { return; } generateImpliedEndTagsExceptFor("p"); if (errorHandler != null && eltPos != currentPtr) { errUnclosedElementsImplied(eltPos, "p"); } while (currentPtr >= eltPos) { pop(); } }
/** * @throws SAXException * */ private void implicitlyCloseP() throws SAXException { int eltPos = findLastInButtonScope("p"); if (eltPos == TreeBuilder.NOT_FOUND_ON_STACK) { return; } generateImpliedEndTagsExceptFor("p"); if (errorHandler != null && eltPos != currentPtr) { errUnclosedElementsImplied(eltPos, "p"); } while (currentPtr >= eltPos) { pop(); } }