mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Backed out changeset fec394734f83 (bug 17624) for build bustage a=backout CLOSED TREE
Backs out https://github.com/servo/servo/pull/17624
This commit is contained in:
parent
585468da9a
commit
32269fa7cc
30 changed files with 5277 additions and 6865 deletions
|
@ -8,9 +8,6 @@
|
|||
|
||||
use cssparser::{Parser, SourcePosition, BasicParseError, Token};
|
||||
use cssparser::ParseError as CssParseError;
|
||||
#[cfg(feature = "gecko")] use gecko::error_reporter::ErrorReporter;
|
||||
#[cfg(feature = "gecko")] use gecko_bindings::structs::Loader;
|
||||
#[cfg(feature = "gecko")] use gecko_bindings::structs::ServoStyleSheet;
|
||||
use log;
|
||||
use style_traits::ParseError;
|
||||
use stylesheets::UrlExtraData;
|
||||
|
@ -79,8 +76,8 @@ impl<'a> ContextualParseError<'a> {
|
|||
Token::ParenthesisBlock => format!("parenthesis ("),
|
||||
Token::SquareBracketBlock => format!("square bracket ["),
|
||||
Token::CurlyBracketBlock => format!("curly bracket {{"),
|
||||
Token::BadUrl(ref _u) => format!("bad url parse error"),
|
||||
Token::BadString(ref _s) => format!("bad string parse error"),
|
||||
Token::BadUrl => format!("bad url parse error"),
|
||||
Token::BadString => format!("bad string parse error"),
|
||||
Token::CloseParenthesis => format!("unmatched close parenthesis"),
|
||||
Token::CloseSquareBracket => format!("unmatched close square bracket"),
|
||||
Token::CloseCurlyBracket => format!("unmatched close curly bracket"),
|
||||
|
@ -91,11 +88,11 @@ impl<'a> ContextualParseError<'a> {
|
|||
match *err {
|
||||
CssParseError::Basic(BasicParseError::UnexpectedToken(ref t)) =>
|
||||
format!("found unexpected {}", token_to_str(t)),
|
||||
CssParseError::Basic(BasicParseError::ExpectedToken(ref t)) =>
|
||||
format!("expected {}", token_to_str(t)),
|
||||
CssParseError::Basic(BasicParseError::EndOfInput) =>
|
||||
format!("unexpected end of input"),
|
||||
CssParseError::Basic(BasicParseError::AtRuleInvalid(ref i)) =>
|
||||
format!("@ rule invalid: {}", i),
|
||||
CssParseError::Basic(BasicParseError::AtRuleBodyInvalid) =>
|
||||
CssParseError::Basic(BasicParseError::AtRuleInvalid) =>
|
||||
format!("@ rule invalid"),
|
||||
CssParseError::Basic(BasicParseError::QualifiedRuleInvalid) =>
|
||||
format!("qualified rule invalid"),
|
||||
|
@ -193,15 +190,6 @@ impl ParseErrorReporter for NullReporter {
|
|||
}
|
||||
|
||||
/// Create an instance of the default error reporter.
|
||||
#[cfg(feature = "servo")]
|
||||
pub fn create_error_reporter() -> RustLogReporter {
|
||||
RustLogReporter
|
||||
}
|
||||
|
||||
/// Create an instance of the default error reporter for Stylo.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn create_error_reporter(sheet: *mut ServoStyleSheet,
|
||||
loader: *mut Loader)
|
||||
-> ErrorReporter {
|
||||
ErrorReporter::new(loader, sheet)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue