mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Fix xml_child to include leaf types (attributes, PIs, etc.) in its result (313799, r=mrbkap).
This commit is contained in:
parent
c924848adc
commit
0fb916cac2
@ -5573,8 +5573,10 @@ xml_child(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
|
||||
JS_ASSERT(!JSVAL_IS_PRIMITIVE(v));
|
||||
vxml = (JSXML *) JS_GetPrivate(cx, JSVAL_TO_OBJECT(v));
|
||||
if (JSXML_LENGTH(vxml) != 0 && !Append(cx, list, vxml))
|
||||
if ((!JSXML_HAS_KIDS(vxml) || vxml->xml_kids.length != 0) &&
|
||||
!Append(cx, list, vxml)) {
|
||||
return JS_FALSE;
|
||||
}
|
||||
}
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user