Closed Bug 1387932 Opened 7 years ago Closed 7 years ago

stylo: column number of @supports rule is different from Gecko

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: xidorn, Assigned: ferjm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

layout/inspector/tests/test_getRelativeRuleLine.html fails because of this.

The test expects the @supports to be at line 2 column 15, while Stylo returns line 2 column 14. But I think neither of them is correct, actually!
For this specific case, given both are not exactly correct, I guess we can just change the test to cover both cases...
Assignee: nobody → ferjmoreno
What do you think is the correct value for the test?
Flags: needinfo?(xidorn+moz)
Gecko gets the column of the start of the opening parenthesis after the '@supports' keyword. While Stylo gets the column number right after the '@supports' keyword. This is the same behavior for all at-rule statements.

If we agree on a correct value, I can try to fix both implementations.

IMHO, the correct value should probably be 5, which is the start of the at-rule statement. This is what we do for other rules anyway.
In any case, the attached patch changes the test as suggested in comment 1.
Comment on attachment 8896379 [details]
Bug 1387932 - stylo: add exception to inspector's test_getRelativeRuleLine.

https://reviewboard.mozilla.org/r/167630/#review173030
Attachment #8896379 - Flags: review?(xidorn+moz) → review+
I think the patch is fine. We can refine the result later.
Flags: needinfo?(xidorn+moz)
Pushed by ferjmoreno@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8f507b2b4981
stylo: add exception to inspector's test_getRelativeRuleLine. r=xidorn
https://hg.mozilla.org/mozilla-central/rev/8f507b2b4981
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: