mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
Script: Use &mut JSContext in CheckValidity and ReportValidity Methods (#42820)
This is part of replacing can_gc with the new &JSContext/&mut JSContext method. We modify CheckValidity and ReportValidity in various HTML Elements to use the context instead of CanGc. Testing: Compilation is the test as this is mostly mechanical. --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@ use std::default::Default;
|
||||
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix, local_name, ns};
|
||||
use js::context::JSContext;
|
||||
use js::rust::HandleObject;
|
||||
use pixels::RasterImage;
|
||||
use servo_arc::Arc;
|
||||
@@ -111,13 +112,13 @@ impl HTMLObjectElementMethods<crate::DomTypeHolder> for HTMLObjectElement {
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-cva-checkvalidity>
|
||||
fn CheckValidity(&self, can_gc: CanGc) -> bool {
|
||||
self.check_validity(can_gc)
|
||||
fn CheckValidity(&self, cx: &mut JSContext) -> bool {
|
||||
self.check_validity(cx)
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-cva-reportvalidity>
|
||||
fn ReportValidity(&self, can_gc: CanGc) -> bool {
|
||||
self.report_validity(can_gc)
|
||||
fn ReportValidity(&self, cx: &mut JSContext) -> bool {
|
||||
self.report_validity(cx)
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-cva-validationmessage>
|
||||
|
||||
Reference in New Issue
Block a user