mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove unused Stylesheet::from_bytes_iter
This commit is contained in:
parent
8eeaef5b1c
commit
f4dcc38816
1 changed files with 0 additions and 16 deletions
|
@ -170,21 +170,6 @@ impl ToCss for StyleRule {
|
|||
|
||||
|
||||
impl Stylesheet {
|
||||
pub fn from_bytes_iter<I: Iterator<Item=Vec<u8>>>(
|
||||
input: I, base_url: ServoUrl, protocol_encoding_label: Option<&str>,
|
||||
environment_encoding: Option<EncodingRef>, origin: Origin,
|
||||
error_reporter: Box<ParseErrorReporter + Send>,
|
||||
extra_data: ParserContextExtraData) -> Stylesheet {
|
||||
let mut bytes = vec![];
|
||||
// TODO: incremental decoding and tokenization/parsing
|
||||
for chunk in input {
|
||||
bytes.extend_from_slice(&chunk)
|
||||
}
|
||||
Stylesheet::from_bytes(&bytes, base_url, protocol_encoding_label,
|
||||
environment_encoding, origin, error_reporter,
|
||||
extra_data)
|
||||
}
|
||||
|
||||
pub fn from_bytes(bytes: &[u8],
|
||||
base_url: ServoUrl,
|
||||
protocol_encoding_label: Option<&str>,
|
||||
|
@ -192,7 +177,6 @@ impl Stylesheet {
|
|||
origin: Origin, error_reporter: Box<ParseErrorReporter + Send>,
|
||||
extra_data: ParserContextExtraData)
|
||||
-> Stylesheet {
|
||||
// TODO: bytes.as_slice could be bytes.container_as_bytes()
|
||||
let (string, _) = decode_stylesheet_bytes(
|
||||
bytes, protocol_encoding_label, environment_encoding);
|
||||
Stylesheet::from_str(&string, base_url, origin, error_reporter, extra_data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue