Auto merge of #18449 - tromey:remove-get_location_with_offset, r=jdm

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.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1398869 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because tests are in rust-cssparser and/or M-C

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18449)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-09-12 09:44:53 -05:00 committed by GitHub
commit 7746896bc4
15 changed files with 31 additions and 41 deletions

View file

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
cssparser = "0.20.2"
cssparser = "0.21.0"
gfx = {path = "../../../components/gfx"}
ipc-channel = "0.8"
style = {path = "../../../components/style"}

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);

View file

@ -13,7 +13,7 @@ doctest = false
[dependencies]
atomic_refcell = "0.1"
cssparser = "0.20.2"
cssparser = "0.21.0"
env_logger = "0.4"
euclid = "0.15"
geckoservo = {path = "../../../ports/geckolib"}