diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-08-09 18:14:02 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-08-09 22:37:16 +0200 |
commit | 7382dad9399ae2bdabaf25ffc885ae2bb17dc2ee (patch) | |
tree | 1f04e036ee3f484ce8ad8acb51b2387d8b67fda3 /components/script_layout_interface/reporter.rs | |
parent | 32f835260cd3ea03a881f7a344a01f401c4db621 (diff) | |
download | servo-7382dad9399ae2bdabaf25ffc885ae2bb17dc2ee.tar.gz servo-7382dad9399ae2bdabaf25ffc885ae2bb17dc2ee.zip |
Update to cssparser 0.19, count line numbers during tokenization
Diffstat (limited to 'components/script_layout_interface/reporter.rs')
-rw-r--r-- | components/script_layout_interface/reporter.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/components/script_layout_interface/reporter.rs b/components/script_layout_interface/reporter.rs index ec3dfae91a9..1e8462603bc 100644 --- a/components/script_layout_interface/reporter.rs +++ b/components/script_layout_interface/reporter.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use cssparser::{Parser, SourcePosition}; +use cssparser::SourceLocation; use ipc_channel::ipc::IpcSender; use log; use msg::constellation_msg::PipelineId; @@ -22,18 +22,14 @@ pub struct CSSErrorReporter { } impl ParseErrorReporter for CSSErrorReporter { - fn report_error<'a>(&self, - input: &mut Parser, - position: SourcePosition, - error: ContextualParseError<'a>, - url: &ServoUrl, - line_number_offset: u64) { - let location = input.source_location(position); - let line_offset = location.line + line_number_offset as u32; + fn report_error(&self, + url: &ServoUrl, + location: SourceLocation, + error: ContextualParseError) { if log_enabled!(log::LogLevel::Info) { info!("Url:\t{}\n{}:{} {}", url.as_str(), - line_offset, + location.line, location.column, error.to_string()) } |