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
|
@ -25,6 +25,7 @@ use crate::dom::node::{window_from_node, Node};
|
|||
use crate::dom::nodelist::NodeList;
|
||||
use crate::dom::validation::{is_barred_by_datalist_ancestor, Validatable};
|
||||
use crate::dom::validitystate::{ValidationFlags, ValidityState};
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[derive(Clone, JSTraceable, MallocSizeOf)]
|
||||
enum SubmissionValue {
|
||||
|
@ -324,11 +325,11 @@ impl ElementInternalsMethods for ElementInternals {
|
|||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage#dom-elementinternals-reportvalidity>
|
||||
fn ReportValidity(&self) -> Fallible<bool> {
|
||||
fn ReportValidity(&self, can_gc: CanGc) -> Fallible<bool> {
|
||||
if !self.is_target_form_associated() {
|
||||
return Err(Error::NotSupported);
|
||||
}
|
||||
Ok(self.report_validity())
|
||||
Ok(self.report_validity(can_gc))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue