format script_layout_interface

This commit is contained in:
Anshul Malik 2018-09-12 12:39:38 +05:30
parent 8c3b192466
commit ae469b016d
3 changed files with 123 additions and 82 deletions

View file

@ -22,24 +22,28 @@ pub struct CSSErrorReporter {
}
impl ParseErrorReporter for CSSErrorReporter {
fn report_error(&self,
url: &ServoUrl,
location: SourceLocation,
error: ContextualParseError) {
fn report_error(&self, url: &ServoUrl, location: SourceLocation, error: ContextualParseError) {
if log_enabled!(log::Level::Info) {
info!("Url:\t{}\n{}:{} {}",
url.as_str(),
location.line,
location.column,
error)
info!(
"Url:\t{}\n{}:{} {}",
url.as_str(),
location.line,
location.column,
error
)
}
//TODO: report a real filename
let _ = self.script_chan.lock().unwrap().send(
ConstellationControlMsg::ReportCSSError(self.pipelineid,
"".to_owned(),
location.line,
location.column,
error.to_string()));
let _ = self
.script_chan
.lock()
.unwrap()
.send(ConstellationControlMsg::ReportCSSError(
self.pipelineid,
"".to_owned(),
location.line,
location.column,
error.to_string(),
));
}
}