Update xml5ever and html5ever

This commit is contained in:
Bastien Orivel 2019-05-19 21:29:26 +02:00
parent 32ddc420a4
commit 00ac887862
10 changed files with 30 additions and 38 deletions

View file

@ -40,18 +40,9 @@ impl Tokenizer {
}
pub fn feed(&mut self, input: &mut BufferQueue) -> Result<(), DomRoot<HTMLScriptElement>> {
if !input.is_empty() {
while let Some(chunk) = input.pop_front() {
self.inner.feed(chunk);
if let Some(script) = self.inner.sink.sink.script.take() {
return Err(script);
}
}
} else {
self.inner.run();
if let Some(script) = self.inner.sink.sink.script.take() {
return Err(script);
}
self.inner.run(input);
if let Some(script) = self.inner.sink.sink.script.take() {
return Err(script);
}
Ok(())
}