mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Use a UrlExtraData type alias to unify url handling logic.
This commit is contained in:
parent
a097a293b5
commit
37585309e9
24 changed files with 166 additions and 272 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
use cssparser::{Parser, SourcePosition};
|
||||
use log;
|
||||
use servo_url::ServoUrl;
|
||||
use stylesheets::UrlExtraData;
|
||||
|
||||
/// A generic trait for an error reporter.
|
||||
pub trait ParseErrorReporter : Sync + Send {
|
||||
|
@ -20,7 +20,7 @@ pub trait ParseErrorReporter : Sync + Send {
|
|||
input: &mut Parser,
|
||||
position: SourcePosition,
|
||||
message: &str,
|
||||
url: &ServoUrl);
|
||||
url: &UrlExtraData);
|
||||
}
|
||||
|
||||
/// An error reporter that reports the errors to the `info` log channel.
|
||||
|
@ -32,7 +32,7 @@ impl ParseErrorReporter for StdoutErrorReporter {
|
|||
input: &mut Parser,
|
||||
position: SourcePosition,
|
||||
message: &str,
|
||||
url: &ServoUrl) {
|
||||
url: &UrlExtraData) {
|
||||
if log_enabled!(log::LogLevel::Info) {
|
||||
let location = input.source_location(position);
|
||||
info!("Url:\t{}\n{}:{} {}", url.as_str(), location.line, location.column, message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue