Closed
Bug 1033082
Opened 11 years ago
Closed 11 years ago
Media sidebar should display exact line numbers for @media rules
Categories
(DevTools :: Style Editor, defect)
DevTools
Style Editor
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 33
People
(Reporter: harth, Assigned: harth)
References
Details
Attachments
(1 file)
3.28 KB,
patch
|
bgrins
:
review+
|
Details | Diff | Splinter Review |
Right now each @media rule link is to the line number of the first rule within the media ruleset. It should be the line of the @media rule itself.
Currently prevented by bug 591303.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → fayearthur
Assignee | ||
Comment 1•11 years ago
|
||
The platform bug was fixed, so we can use getRuleLineFor with @media rules now, this patch uses that.
Attachment #8457833 -
Flags: review?(bgrinstead)
Comment 2•11 years ago
|
||
Comment on attachment 8457833 [details] [diff] [review]
Show exact line numbers for media queries
Review of attachment 8457833 [details] [diff] [review]:
-----------------------------------------------------------------
The code changes look fine.
I'm still seeing some weirdness on the line numbers on inline sheets but the weird thing is that it starts working once I add a new line in the style editor. Even with this, it is an improvement over the current situation, so I'm fine with dealing with this in a follow up if you'd like:
* Open http://bgrins.github.io/devtools-demos/styleeditor/media.html
* Open style editor to second sheet. Notice that the line #s are off a bit (4, 10, 25)
* Add a new line somewhere in the sheet. Notice that the line #s snap to correct places.
* Open style editor to third sheet (which has the same contents, but not inline). Notice the line #s (2, 8, 23)
May or may not be related, but I get a promise rejection after switching back and forth from the middle stylesheet: "Error: Unknown sheet source" (looks like that may be originating in sheetToUrl for csscoverage.js).
Attachment #8457833 -
Flags: review?(bgrinstead) → review+
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #2)
> * Open style editor to second sheet. Notice that the line #s are off a bit
> (4, 10, 25)
Yeah, getRuleLineFor reports line number from the top of the document ): There's a hacky function to account for this that we should use here.
> * Add a new line somewhere in the sheet. Notice that the line #s snap to
> correct places.
> May or may not be related, but I get a promise rejection after switching
> back and forth from the middle stylesheet: "Error: Unknown sheet source"
> (looks like that may be originating in sheetToUrl for csscoverage.js).
Yeah, doesn't sound related to this change.
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•