Skip to content

Commit 21d2241

Browse files
committed
Remove TreeSink::complete_script
1 parent 275bec3 commit 21d2241

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

src/tree_builder/interface.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ pub enum NodeOrText<Handle> {
3838
AppendText(StrTendril),
3939
}
4040

41-
/// Whether to interrupt further parsing of the current input until
42-
/// the next explicit resumption of the tokenizer, or continue without
43-
/// any interruption.
44-
#[derive(PartialEq, Eq, Copy, Clone, Hash, Debug)]
45-
pub enum NextParserState {
46-
Suspend,
47-
Continue,
48-
}
49-
5041
/// Types which can process tree modifications from the tree builder.
5142
pub trait TreeSink {
5243
/// The overall result of parsing.
@@ -142,11 +133,6 @@ pub trait TreeSink {
142133
/// Mark a HTML `<script>` element as "already started".
143134
fn mark_script_already_started(&mut self, node: Self::Handle);
144135

145-
/// Indicate that a `<script>` element is complete.
146-
fn complete_script(&mut self, _node: Self::Handle) -> NextParserState {
147-
NextParserState::Continue
148-
}
149-
150136
// Returns true if the adjusted current node is an HTML integration point
151137
// and the token is a start tag
152138
fn is_mathml_annotation_xml_integration_point(&self, handle: Self::Handle) -> bool {

src/tree_builder/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
pub use self::interface::{QuirksMode, Quirks, LimitedQuirks, NoQuirks};
1515
pub use self::interface::{NodeOrText, AppendNode, AppendText};
16-
pub use self::interface::{TreeSink, Tracer, NextParserState};
16+
pub use self::interface::{TreeSink, Tracer};
1717

1818
use self::types::*;
1919
use self::actions::TreeBuilderActions;

src/tree_builder/rules.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use tree_builder::types::*;
1313
use tree_builder::tag_sets::*;
1414
use tree_builder::actions::{NoPush, Push, TreeBuilderActions};
15-
use tree_builder::interface::{TreeSink, Quirks, AppendNode, NextParserState};
15+
use tree_builder::interface::{TreeSink, Quirks, AppendNode};
1616

1717
use tokenizer::{Attribute, EndTag, StartTag, Tag};
1818
use tokenizer::states::{Rcdata, Rawtext, ScriptData, Plaintext};
@@ -765,10 +765,7 @@ impl<Handle, Sink> TreeBuilderStep
765765
let node = self.pop();
766766
self.mode = self.orig_mode.take().unwrap();
767767
if tag.name == local_name!("script") {
768-
warn!("FIXME: </script> not fully implemented");
769-
if self.sink.complete_script(node) == NextParserState::Suspend {
770-
return Quiescent;
771-
}
768+
return Quiescent;
772769
}
773770
Done
774771
}

0 commit comments

Comments
 (0)