Bug 612528 - Make <option> and <optgroup> imply </option> in the "in body" insertion mode only if the current node is "option". rs=jonas, a=blocking2.0-betaN.

This commit is contained in:
Henri Sivonen
2010-12-09 11:27:58 +02:00
parent 034b529d7e
commit befa73c918
3 changed files with 4 additions and 58 deletions

View File

@@ -1205,26 +1205,8 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
}
case NS_HTML5TREE_BUILDER_OPTGROUP:
case NS_HTML5TREE_BUILDER_OPTION: {
if (findLastInScope(nsHtml5Atoms::option) != NS_HTML5TREE_BUILDER_NOT_FOUND_ON_STACK) {
for (; ; ) {
if (isCurrent(nsHtml5Atoms::option)) {
pop();
NS_HTML5_BREAK(optionendtagloop);
}
eltPos = currentPtr;
for (; ; ) {
if (stack[eltPos]->name == nsHtml5Atoms::option) {
generateImpliedEndTags();
while (currentPtr >= eltPos) {
pop();
}
NS_HTML5_BREAK(optionendtagloop);
}
eltPos--;
}
}
optionendtagloop_end: ;
if (isCurrent(nsHtml5Atoms::option)) {
pop();
}
reconstructTheActiveFormattingElements();
appendToCurrentNodeAndPushElementMayFoster(elementName, attributes);