2012-05-29 19:52:43 +04: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-29 02:44:22 +04:00
|
|
|
|
|
|
|
#include "nsHtml5ReleasableElementName.h"
|
|
|
|
|
|
|
|
nsHtml5ReleasableElementName::nsHtml5ReleasableElementName(nsIAtom* name)
|
|
|
|
: nsHtml5ElementName(name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
nsHtml5ReleasableElementName::release()
|
|
|
|
{
|
|
|
|
delete this;
|
|
|
|
}
|
2009-09-21 17:18:20 +04:00
|
|
|
|
|
|
|
nsHtml5ElementName*
|
|
|
|
nsHtml5ReleasableElementName::cloneElementName(nsHtml5AtomTable* aInterner)
|
|
|
|
{
|
|
|
|
nsIAtom* l = name;
|
|
|
|
if (aInterner) {
|
2010-02-26 12:18:35 +03:00
|
|
|
if (!l->IsStaticAtom()) {
|
2009-09-21 17:18:20 +04:00
|
|
|
nsAutoString str;
|
|
|
|
l->ToString(str);
|
|
|
|
l = aInterner->GetAtom(str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return new nsHtml5ReleasableElementName(l);
|
|
|
|
}
|