mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
add CanGc as argument to methods in HTMLCollection, HTMLDataListElement, HTMLDialogElement, HTMLElement, HTMLFieldSetElement, HTMLFormControlsCollection, HTMLFormElement, HTMLIFrameElement (#36495)
add CanGc as argument to methods in HTMLCollection, HTMLDataListElement, HTMLDialogElement, HTMLElement, HTMLFieldSetElement, HTMLFormControlsCollection, HTMLFormElement, HTMLIFrameElement Testing: These changes do not require tests because they are a refactor. Addresses part of https://github.com/servo/servo/issues/34573. Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
06f86f88a2
commit
3babf74986
14 changed files with 69 additions and 60 deletions
|
@ -590,7 +590,7 @@ impl HTMLIFrameElementMethods<crate::DomTypeHolder> for HTMLIFrameElement {
|
|||
make_setter!(SetSrcdoc, "srcdoc");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-iframe-sandbox
|
||||
fn Sandbox(&self) -> DomRoot<DOMTokenList> {
|
||||
fn Sandbox(&self, can_gc: CanGc) -> DomRoot<DOMTokenList> {
|
||||
self.sandbox.or_init(|| {
|
||||
DOMTokenList::new(
|
||||
self.upcast::<Element>(),
|
||||
|
@ -603,7 +603,7 @@ impl HTMLIFrameElementMethods<crate::DomTypeHolder> for HTMLIFrameElement {
|
|||
Atom::from("allow-scripts"),
|
||||
Atom::from("allow-top-navigation"),
|
||||
]),
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
)
|
||||
})
|
||||
}
|
||||
|
@ -718,7 +718,7 @@ impl VirtualMethods for HTMLIFrameElement {
|
|||
// trigger the processing of iframe attributes whenever "srcdoc" attribute is set, changed or removed
|
||||
if self.upcast::<Node>().is_connected_with_browsing_context() {
|
||||
debug!("iframe srcdoc modified while in browsing context.");
|
||||
self.process_the_iframe_attributes(ProcessingMode::NotFirstTime, CanGc::note());
|
||||
self.process_the_iframe_attributes(ProcessingMode::NotFirstTime, can_gc);
|
||||
}
|
||||
},
|
||||
local_name!("src") => {
|
||||
|
@ -732,7 +732,7 @@ impl VirtualMethods for HTMLIFrameElement {
|
|||
// the child browsing context to be created.
|
||||
if self.upcast::<Node>().is_connected_with_browsing_context() {
|
||||
debug!("iframe src set while in browsing context.");
|
||||
self.process_the_iframe_attributes(ProcessingMode::NotFirstTime, CanGc::note());
|
||||
self.process_the_iframe_attributes(ProcessingMode::NotFirstTime, can_gc);
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue