mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #1221: Pass the original element into
nsXMLContentSerializer::CheckElementEnd so that we can properly determine whether it has children. This resolves #1221
This commit is contained in:
parent
90f6b97ecc
commit
f34f8ca034
10 changed files with 46 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue