diff options
author | Andriy Sultanov <53952748+last-genius@users.noreply.github.com> | 2024-09-09 23:38:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 22:38:01 +0000 |
commit | e5150dbda1f89ff07294dbd1ca4e8f4f08cf4874 (patch) | |
tree | e77fae25f33905e1c8c626cf532e7222f521335c /components/script/dom/domimplementation.rs | |
parent | 10e5bb72d9e16655b625b8971e346ff479b17fd2 (diff) | |
download | servo-e5150dbda1f89ff07294dbd1ca4e8f4f08cf4874.tar.gz servo-e5150dbda1f89ff07294dbd1ca4e8f4f08cf4874.zip |
Propagate `CanGc` from `Document::new()` (#33386)
* Add canGc as a parameter to autogenerated trait methods
Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
* Propagate CanGc from Document::new()
Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
---------
Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
Diffstat (limited to 'components/script/dom/domimplementation.rs')
-rw-r--r-- | components/script/dom/domimplementation.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs index 00224056009..9266445ef17 100644 --- a/components/script/dom/domimplementation.rs +++ b/components/script/dom/domimplementation.rs @@ -28,6 +28,7 @@ use crate::dom::htmltitleelement::HTMLTitleElement; use crate::dom::node::Node; use crate::dom::text::Text; use crate::dom::xmldocument::XMLDocument; +use crate::script_runtime::CanGc; // https://dom.spec.whatwg.org/#domimplementation #[dom_struct] @@ -74,6 +75,7 @@ impl DOMImplementationMethods for DOMImplementation { maybe_namespace: Option<DOMString>, qname: DOMString, maybe_doctype: Option<&DocumentType>, + can_gc: CanGc, ) -> Fallible<DomRoot<XMLDocument>> { let win = self.document.window(); let loader = DocumentLoader::new(&self.document.loader()); @@ -108,7 +110,7 @@ impl DOMImplementationMethods for DOMImplementation { }); match doc .upcast::<Document>() - .CreateElementNS(maybe_namespace, qname, options) + .CreateElementNS(maybe_namespace, qname, options, can_gc) { Err(error) => return Err(error), Ok(elem) => Some(elem), @@ -137,7 +139,7 @@ impl DOMImplementationMethods for DOMImplementation { } // https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument - fn CreateHTMLDocument(&self, title: Option<DOMString>) -> DomRoot<Document> { + fn CreateHTMLDocument(&self, title: Option<DOMString>, can_gc: CanGc) -> DomRoot<Document> { let win = self.document.window(); let loader = DocumentLoader::new(&self.document.loader()); @@ -157,6 +159,7 @@ impl DOMImplementationMethods for DOMImplementation { None, None, Default::default(), + can_gc, ); { |