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:
@@ -10,6 +10,7 @@ use dom_struct::dom_struct;
|
||||
use embedder_traits::{EmbedderControlRequest, InputMethodRequest, InputMethodType};
|
||||
use fonts::{ByteIndex, TextByteRange};
|
||||
use html5ever::{LocalName, Prefix, local_name, ns};
|
||||
use js::context::JSContext;
|
||||
use js::rust::HandleObject;
|
||||
use layout_api::wrapper_traits::{ScriptSelection, SharedSelection};
|
||||
use script_bindings::codegen::GenericBindings::CharacterDataBinding::CharacterDataMethods;
|
||||
@@ -558,13 +559,13 @@ impl HTMLTextAreaElementMethods<crate::DomTypeHolder> for HTMLTextAreaElement {
|
||||
}
|
||||
|
||||
/// <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