mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
add CanGc as argument to methods in Element (#36464)
add CanGc as argument to methods in Element 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
3c5da6588d
commit
c8ecb57d97
9 changed files with 61 additions and 52 deletions
|
@ -679,7 +679,7 @@ pub(crate) fn handle_find_element_element_tag_name(
|
|||
element_id: String,
|
||||
selector: String,
|
||||
reply: IpcSender<Result<Option<String>, ErrorStatus>>,
|
||||
_can_gc: CanGc,
|
||||
can_gc: CanGc,
|
||||
) {
|
||||
reply
|
||||
.send(
|
||||
|
@ -687,7 +687,7 @@ pub(crate) fn handle_find_element_element_tag_name(
|
|||
.downcast::<Element>(
|
||||
) {
|
||||
Some(element) => Ok(element
|
||||
.GetElementsByTagName(DOMString::from(selector))
|
||||
.GetElementsByTagName(DOMString::from(selector), can_gc)
|
||||
.elements_iter()
|
||||
.next()
|
||||
.map(|x| x.upcast::<Node>().unique_id())),
|
||||
|
@ -742,7 +742,7 @@ pub(crate) fn handle_find_element_elements_tag_name(
|
|||
element_id: String,
|
||||
selector: String,
|
||||
reply: IpcSender<Result<Vec<String>, ErrorStatus>>,
|
||||
_can_gc: CanGc,
|
||||
can_gc: CanGc,
|
||||
) {
|
||||
reply
|
||||
.send(
|
||||
|
@ -750,7 +750,7 @@ pub(crate) fn handle_find_element_elements_tag_name(
|
|||
.downcast::<Element>(
|
||||
) {
|
||||
Some(element) => Ok(element
|
||||
.GetElementsByTagName(DOMString::from(selector))
|
||||
.GetElementsByTagName(DOMString::from(selector), can_gc)
|
||||
.elements_iter()
|
||||
.map(|x| x.upcast::<Node>().unique_id())
|
||||
.collect::<Vec<String>>()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue