mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Propagate CanGc arguments through HTMLCollection constructors (#36180)
Signed-off-by: dericko681 <abonghoderick@gmail.com>
This commit is contained in:
parent
83da63f638
commit
40133ce29a
11 changed files with 125 additions and 53 deletions
|
@ -2616,7 +2616,12 @@ impl ElementMethods<crate::DomTypeHolder> for Element {
|
|||
// https://dom.spec.whatwg.org/#dom-element-getelementsbytagname
|
||||
fn GetElementsByTagName(&self, localname: DOMString) -> DomRoot<HTMLCollection> {
|
||||
let window = self.owner_window();
|
||||
HTMLCollection::by_qualified_name(&window, self.upcast(), LocalName::from(&*localname))
|
||||
HTMLCollection::by_qualified_name(
|
||||
&window,
|
||||
self.upcast(),
|
||||
LocalName::from(&*localname),
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-element-getelementsbytagnamens
|
||||
|
@ -2626,13 +2631,13 @@ impl ElementMethods<crate::DomTypeHolder> for Element {
|
|||
localname: DOMString,
|
||||
) -> DomRoot<HTMLCollection> {
|
||||
let window = self.owner_window();
|
||||
HTMLCollection::by_tag_name_ns(&window, self.upcast(), localname, maybe_ns)
|
||||
HTMLCollection::by_tag_name_ns(&window, self.upcast(), localname, maybe_ns, CanGc::note())
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-element-getelementsbyclassname
|
||||
fn GetElementsByClassName(&self, classes: DOMString) -> DomRoot<HTMLCollection> {
|
||||
let window = self.owner_window();
|
||||
HTMLCollection::by_class_name(&window, self.upcast(), classes)
|
||||
HTMLCollection::by_class_name(&window, self.upcast(), classes, CanGc::note())
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#dom-element-getclientrects
|
||||
|
@ -3112,7 +3117,7 @@ impl ElementMethods<crate::DomTypeHolder> for Element {
|
|||
// https://dom.spec.whatwg.org/#dom-parentnode-children
|
||||
fn Children(&self) -> DomRoot<HTMLCollection> {
|
||||
let window = self.owner_window();
|
||||
HTMLCollection::children(&window, self.upcast())
|
||||
HTMLCollection::children(&window, self.upcast(), CanGc::note())
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-parentnode-firstelementchild
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue