2012-05-29 08:52:43 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-06-28 15:44:22 -07:00
|
|
|
|
|
|
|
#include "nsHtml5ReleasableElementName.h"
|
|
|
|
|
|
|
|
nsHtml5ReleasableElementName::nsHtml5ReleasableElementName(nsIAtom* name)
|
|
|
|
: nsHtml5ElementName(name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
nsHtml5ReleasableElementName::release()
|
|
|
|
{
|
|
|
|
delete this;
|
|
|
|
}
|
2009-09-21 06:18:20 -07:00
|
|
|
|
|
|
|
nsHtml5ElementName*
|
|
|
|
nsHtml5ReleasableElementName::cloneElementName(nsHtml5AtomTable* aInterner)
|
|
|
|
{
|
|
|
|
nsIAtom* l = name;
|
|
|
|
if (aInterner) {
|
2010-02-26 01:18:35 -08:00
|
|
|
if (!l->IsStaticAtom()) {
|
2009-09-21 06:18:20 -07:00
|
|
|
nsAutoString str;
|
|
|
|
l->ToString(str);
|
|
|
|
l = aInterner->GetAtom(str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return new nsHtml5ReleasableElementName(l);
|
|
|
|
}
|