icecat: add release icecat-140.10.1-1gnu1 for ecne
This commit is contained in:
parent
a5f93cb214
commit
ff85d7c623
1256 changed files with 63469 additions and 24141 deletions
|
|
@ -151,40 +151,7 @@ void HTMLAllCollection::NamedGetter(
|
|||
}
|
||||
|
||||
void HTMLAllCollection::GetSupportedNames(nsTArray<nsString>& aNames) {
|
||||
// XXXbz this is very similar to nsContentList::GetSupportedNames,
|
||||
// but has to check IsAllNamedElement for the name case.
|
||||
AutoTArray<nsAtom*, 8> atoms;
|
||||
for (uint32_t i = 0; i < Length(); ++i) {
|
||||
nsIContent* content = Item(i);
|
||||
if (content->HasID()) {
|
||||
nsAtom* id = content->GetID();
|
||||
MOZ_ASSERT(id != nsGkAtoms::_empty, "Empty ids don't get atomized");
|
||||
if (!atoms.Contains(id)) {
|
||||
atoms.AppendElement(id);
|
||||
}
|
||||
}
|
||||
|
||||
nsGenericHTMLElement* el = nsGenericHTMLElement::FromNode(content);
|
||||
if (el) {
|
||||
// Note: nsINode::HasName means the name is exposed on the document,
|
||||
// which is false for options, so we don't check it here.
|
||||
const nsAttrValue* val = el->GetParsedAttr(nsGkAtoms::name);
|
||||
if (val && val->Type() == nsAttrValue::eAtom &&
|
||||
IsAllNamedElement(content)) {
|
||||
nsAtom* name = val->GetAtomValue();
|
||||
MOZ_ASSERT(name != nsGkAtoms::_empty, "Empty names don't get atomized");
|
||||
if (!atoms.Contains(name)) {
|
||||
atoms.AppendElement(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t atomsLen = atoms.Length();
|
||||
nsString* names = aNames.AppendElements(atomsLen);
|
||||
for (uint32_t i = 0; i < atomsLen; ++i) {
|
||||
atoms[i]->ToString(names[i]);
|
||||
}
|
||||
Collection()->GetSupportedNames(aNames, IsAllNamedElement);
|
||||
}
|
||||
|
||||
JSObject* HTMLAllCollection::WrapObject(JSContext* aCx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue