diff options
author | tanishka <109246904+taniishkaaa@users.noreply.github.com> | 2024-10-20 13:35:11 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-20 08:05:11 +0000 |
commit | a57b6a3f79314910543024c951d365e55efa154e (patch) | |
tree | 1a9ec5c4989abe059b638701fc39da1467505485 /components/script/webdriver_handlers.rs | |
parent | d0d02cd56cb646da1f2193e57561b78d5e4b6bdf (diff) | |
download | servo-a57b6a3f79314910543024c951d365e55efa154e.tar.gz servo-a57b6a3f79314910543024c951d365e55efa154e.zip |
CanGc fixes through focusevent.rs & hashchangeevent.rs (#33921)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
Diffstat (limited to 'components/script/webdriver_handlers.rs')
-rw-r--r-- | components/script/webdriver_handlers.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/webdriver_handlers.rs b/components/script/webdriver_handlers.rs index cbe74aa1263..489e071908c 100644 --- a/components/script/webdriver_handlers.rs +++ b/components/script/webdriver_handlers.rs @@ -677,6 +677,7 @@ pub fn handle_focus_element( pipeline: PipelineId, element_id: String, reply: IpcSender<Result<(), ErrorStatus>>, + can_gc: CanGc, ) { reply .send( @@ -684,7 +685,7 @@ pub fn handle_focus_element( match node.downcast::<HTMLElement>() { Some(element) => { // Need a way to find if this actually succeeded - element.Focus(); + element.Focus(can_gc); Ok(()) }, None => Err(ErrorStatus::UnknownError), @@ -1072,6 +1073,7 @@ pub fn handle_element_click( pipeline: PipelineId, element_id: String, reply: IpcSender<Result<Option<String>, ErrorStatus>>, + can_gc: CanGc, ) { reply .send( @@ -1122,7 +1124,7 @@ pub fn handle_element_click( // Step 8.5 match parent_node.downcast::<HTMLElement>() { - Some(html_element) => html_element.Focus(), + Some(html_element) => html_element.Focus(can_gc), None => return Err(ErrorStatus::UnknownError), } |