Remove get_location_with_offset

Now that rust-cssparser reports 1-based locations, bump the required
cssparser version and remove get_location_with_offset.  Previously,
some code paths were not calling get_location_with_offset; see
https://bugzilla.mozilla.org/show_bug.cgi?id=1398869 for some
background.
This commit is contained in:
Tom Tromey 2017-09-11 14:19:04 -06:00
parent 61fac2c10d
commit 4768597b13
15 changed files with 31 additions and 41 deletions

View file

@ -12,7 +12,7 @@ doctest = false
[dependencies]
byteorder = "1.0"
app_units = "0.5"
cssparser = "0.20.2"
cssparser = "0.21.0"
euclid = "0.15"
html5ever = "0.19"
parking_lot = "0.4"

View file

@ -320,13 +320,13 @@ fn test_report_error_stylesheet() {
assert_eq!("Unsupported property declaration: 'invalid: true;', \
Custom(PropertyDeclaration(UnknownProperty(\"invalid\")))", error.message);
assert_eq!(9, error.line);
assert_eq!(8, error.column);
assert_eq!(9, error.column);
let error = errors.pop().unwrap();
assert_eq!("Unsupported property declaration: 'display: invalid;', \
Custom(PropertyDeclaration(InvalidValue(\"display\", None)))", error.message);
assert_eq!(8, error.line);
assert_eq!(8, error.column);
assert_eq!(9, error.column);
// testing for the url
assert_eq!(url, error.url);