mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Support line number offsets for inline stylesheets
This commit is contained in:
parent
ea20bd6f63
commit
5d8cbd8e6a
11 changed files with 87 additions and 37 deletions
|
@ -26,12 +26,14 @@ impl ParseErrorReporter for CSSErrorReporter {
|
|||
input: &mut Parser,
|
||||
position: SourcePosition,
|
||||
message: &str,
|
||||
url: &ServoUrl) {
|
||||
url: &ServoUrl,
|
||||
line_number_offset: u64) {
|
||||
let location = input.source_location(position);
|
||||
let line_offset = location.line + line_number_offset as usize;
|
||||
if log_enabled!(log::LogLevel::Info) {
|
||||
info!("Url:\t{}\n{}:{} {}",
|
||||
url.as_str(),
|
||||
location.line,
|
||||
line_offset,
|
||||
location.column,
|
||||
message)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue