Index: Source/WebCore/html/parser/HTMLTreeBuilder.cpp |
=================================================================== |
--- Source/WebCore/html/parser/HTMLTreeBuilder.cpp (revision 81435) |
+++ Source/WebCore/html/parser/HTMLTreeBuilder.cpp (working copy) |
@@ -994,7 +994,7 @@ |
adjustMathMLAttributes(token); |
adjustForeignAttributes(token); |
m_tree.insertForeignElement(token, MathMLNames::mathmlNamespaceURI); |
- if (m_insertionMode != InForeignContentMode) |
+ if (m_insertionMode != InForeignContentMode && !token.selfClosing()) |
setInsertionMode(InForeignContentMode); |
return; |
} |
@@ -1003,7 +1003,7 @@ |
adjustSVGAttributes(token); |
adjustForeignAttributes(token); |
m_tree.insertForeignElement(token, SVGNames::svgNamespaceURI); |
- if (m_insertionMode != InForeignContentMode) |
+ if (m_insertionMode != InForeignContentMode && !token.selfClosing()) |
setInsertionMode(InForeignContentMode); |
return; |
} |