mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
parent
db3b6b5884
commit
dba59f0317
5 changed files with 121 additions and 14 deletions
|
|
@ -333,6 +333,24 @@ CustomElementRegistry::RegisterUnresolvedElement(Element* aElement, nsIAtom* aTy
|
|||
return;
|
||||
}
|
||||
|
||||
void
|
||||
CustomElementRegistry::UnregisterUnresolvedElement(Element* aElement,
|
||||
nsIAtom* aTypeName)
|
||||
{
|
||||
nsTArray<nsWeakPtr>* candidates;
|
||||
if (mCandidatesMap.Get(aTypeName, &candidates)) {
|
||||
MOZ_ASSERT(candidates);
|
||||
// We don't need to iterate the candidates array and remove the element from
|
||||
// the array for performance reason. It'll be handled by bug 1396620.
|
||||
for (size_t i = 0; i < candidates->Length(); ++i) {
|
||||
nsCOMPtr<Element> elem = do_QueryReferent(candidates->ElementAt(i));
|
||||
if (elem && elem.get() == aElement) {
|
||||
candidates->RemoveElementAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ UniquePtr<CustomElementCallback>
|
||||
CustomElementRegistry::CreateCustomElementCallback(
|
||||
nsIDocument::ElementCallbackType aType, Element* aCustomElement,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue