mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Replace HTMLScriptElement::mark_script_already_started by set_script_already_started
This commit is contained in:
parent
e8e7c6545d
commit
2ef1437457
3 changed files with 5 additions and 5 deletions
|
@ -538,8 +538,8 @@ impl HTMLScriptElement {
|
||||||
is_js
|
is_js
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mark_already_started(&self) {
|
pub fn set_already_started(&self, already_started: bool) {
|
||||||
self.already_started.set(true);
|
self.already_started.set(already_started);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dispatch_event(&self,
|
fn dispatch_event(&self,
|
||||||
|
@ -599,7 +599,7 @@ impl VirtualMethods for HTMLScriptElement {
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#already-started
|
// https://html.spec.whatwg.org/multipage/#already-started
|
||||||
if self.already_started.get() {
|
if self.already_started.get() {
|
||||||
copy.downcast::<HTMLScriptElement>().unwrap().mark_already_started();
|
copy.downcast::<HTMLScriptElement>().unwrap().set_already_started(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ impl<'a> TreeSink for servohtmlparser::Sink {
|
||||||
|
|
||||||
fn mark_script_already_started(&mut self, node: JS<Node>) {
|
fn mark_script_already_started(&mut self, node: JS<Node>) {
|
||||||
let script = node.downcast::<HTMLScriptElement>();
|
let script = node.downcast::<HTMLScriptElement>();
|
||||||
script.map(|script| script.mark_already_started());
|
script.map(|script| script.set_already_started(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn complete_script(&mut self, node: JS<Node>) -> NextParserState {
|
fn complete_script(&mut self, node: JS<Node>) -> NextParserState {
|
||||||
|
|
|
@ -107,7 +107,7 @@ impl<'a> TreeSink for servoxmlparser::Sink {
|
||||||
fn mark_script_already_started(&mut self, node: Self::Handle) {
|
fn mark_script_already_started(&mut self, node: Self::Handle) {
|
||||||
let script = node.downcast::<HTMLScriptElement>();
|
let script = node.downcast::<HTMLScriptElement>();
|
||||||
if let Some(script) = script {
|
if let Some(script) = script {
|
||||||
script.mark_already_started();
|
script.set_already_started(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue