mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 886390 part 2 - Disable foreign content breakout in the fragment case. r=wchen.
This commit is contained in:
parent
3e8d28c188
commit
24d6e9838a
@ -1694,20 +1694,17 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||
case P:
|
||||
case PRE_OR_LISTING:
|
||||
case TABLE:
|
||||
errHtmlStartTagInForeignContext(name);
|
||||
while (!isSpecialParentInForeign(stack[currentPtr])) {
|
||||
pop();
|
||||
}
|
||||
continue starttagloop;
|
||||
case FONT:
|
||||
if (attributes.contains(AttributeName.COLOR)
|
||||
|| attributes.contains(AttributeName.FACE)
|
||||
|| attributes.contains(AttributeName.SIZE)) {
|
||||
// re-check FONT to deal with the special case
|
||||
if (!(group == FONT && !(attributes.contains(AttributeName.COLOR)
|
||||
|| attributes.contains(AttributeName.FACE) || attributes.contains(AttributeName.SIZE)))) {
|
||||
errHtmlStartTagInForeignContext(name);
|
||||
while (!isSpecialParentInForeign(stack[currentPtr])) {
|
||||
pop();
|
||||
}
|
||||
continue starttagloop;
|
||||
if (!fragment) {
|
||||
while (!isSpecialParentInForeign(stack[currentPtr])) {
|
||||
pop();
|
||||
}
|
||||
continue starttagloop;
|
||||
} // else fall thru
|
||||
}
|
||||
// else fall thru
|
||||
default:
|
||||
|
@ -630,20 +630,16 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
||||
case NS_HTML5TREE_BUILDER_NOBR:
|
||||
case NS_HTML5TREE_BUILDER_P:
|
||||
case NS_HTML5TREE_BUILDER_PRE_OR_LISTING:
|
||||
case NS_HTML5TREE_BUILDER_TABLE: {
|
||||
errHtmlStartTagInForeignContext(name);
|
||||
while (!isSpecialParentInForeign(stack[currentPtr])) {
|
||||
pop();
|
||||
}
|
||||
NS_HTML5_CONTINUE(starttagloop);
|
||||
}
|
||||
case NS_HTML5TREE_BUILDER_TABLE:
|
||||
case NS_HTML5TREE_BUILDER_FONT: {
|
||||
if (attributes->contains(nsHtml5AttributeName::ATTR_COLOR) || attributes->contains(nsHtml5AttributeName::ATTR_FACE) || attributes->contains(nsHtml5AttributeName::ATTR_SIZE)) {
|
||||
if (!(group == NS_HTML5TREE_BUILDER_FONT && !(attributes->contains(nsHtml5AttributeName::ATTR_COLOR) || attributes->contains(nsHtml5AttributeName::ATTR_FACE) || attributes->contains(nsHtml5AttributeName::ATTR_SIZE)))) {
|
||||
errHtmlStartTagInForeignContext(name);
|
||||
while (!isSpecialParentInForeign(stack[currentPtr])) {
|
||||
pop();
|
||||
if (!fragment) {
|
||||
while (!isSpecialParentInForeign(stack[currentPtr])) {
|
||||
pop();
|
||||
}
|
||||
NS_HTML5_CONTINUE(starttagloop);
|
||||
}
|
||||
NS_HTML5_CONTINUE(starttagloop);
|
||||
}
|
||||
}
|
||||
default: {
|
||||
|
Loading…
Reference in New Issue
Block a user