diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-08-28 14:39:17 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-08-28 14:39:17 +0200 |
commit | b58a8779c02e8d4abdaae49e1fcc11efeb407bee (patch) | |
tree | dc251f391fe9657bc08341dc4cbcfd0ca431b636 /dom/base/nsXMLContentSerializer.cpp | |
parent | 31def0da05280ab834c3585c37ec1b5cde29c89c (diff) | |
download | UXP-b58a8779c02e8d4abdaae49e1fcc11efeb407bee.tar UXP-b58a8779c02e8d4abdaae49e1fcc11efeb407bee.tar.gz UXP-b58a8779c02e8d4abdaae49e1fcc11efeb407bee.tar.lz UXP-b58a8779c02e8d4abdaae49e1fcc11efeb407bee.tar.xz UXP-b58a8779c02e8d4abdaae49e1fcc11efeb407bee.zip |
Issue #1221: Pass the original element into
nsXMLContentSerializer::CheckElementEnd so that we can properly
determine whether it has children.
This resolves #1221
Diffstat (limited to 'dom/base/nsXMLContentSerializer.cpp')
-rw-r--r-- | dom/base/nsXMLContentSerializer.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/dom/base/nsXMLContentSerializer.cpp b/dom/base/nsXMLContentSerializer.cpp index 54fadaa94..f12bb8fdc 100644 --- a/dom/base/nsXMLContentSerializer.cpp +++ b/dom/base/nsXMLContentSerializer.cpp @@ -1028,6 +1028,7 @@ nsXMLContentSerializer::AppendEndOfElementStart(Element* aElement, NS_IMETHODIMP nsXMLContentSerializer::AppendElementEnd(Element* aElement, + Element* aOriginalElement, nsAString& aStr) { NS_ENSURE_ARG(aElement); @@ -1035,7 +1036,7 @@ nsXMLContentSerializer::AppendElementEnd(Element* aElement, nsIContent* content = aElement; bool forceFormat = false, outputElementEnd; - outputElementEnd = CheckElementEnd(aElement, forceFormat, aStr); + outputElementEnd = CheckElementEnd(aElement, aOriginalElement, forceFormat, aStr); nsIAtom *name = content->NodeInfo()->NameAtom(); @@ -1161,16 +1162,14 @@ nsXMLContentSerializer::CheckElementStart(nsIContent * aContent, bool nsXMLContentSerializer::CheckElementEnd(Element* aElement, + Element* aOriginalElement, bool& aForceFormat, nsAString& aStr) { // We don't output a separate end tag for empty element aForceFormat = false; - // XXXbz this is a bit messed up, but by now we don't have our fixed-up - // version of aElement anymore. Let's hope fixup never changes the localName - // or namespace... - return ElementNeedsSeparateEndTag(aElement, aElement); + return ElementNeedsSeparateEndTag(aElement, aOriginalElement); } bool |