Bug 1380890 - stylo: make GetRuleColumn report a 1-based value. r?jdm
MozReview-Commit-ID: mBrm9arKTX
--- a/servo/components/style/stylesheets/rule_parser.rs
+++ b/servo/components/style/stylesheets/rule_parser.rs
@@ -511,11 +511,12 @@ impl<'a, 'b, 'i> QualifiedRuleParser<'i>
/// Calculates the location of a rule's source given an offset.
fn get_location_with_offset(
location: SourceLocation,
offset: u64
) -> SourceLocation {
SourceLocation {
line: location.line + offset as u32,
- column: location.column,
+ // Column offsets are not yet supported, but Gecko devtools expect 1-based columns.
+ column: location.column + 1,
}
}