mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
CanGc fixes through focusevent.rs & hashchangeevent.rs (#33921)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
d0d02cd56c
commit
a57b6a3f79
20 changed files with 140 additions and 69 deletions
|
@ -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),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue