Clicking a system stylesheet in the style inspector does not open the source

RESOLVED FIXED in Firefox 14

Status

()

Firefox
Developer Tools: Inspector
P2
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rc, Assigned: miker)

Tracking

unspecified
Firefox 14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [computedview][ruleview])

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

5 years ago
In the Inspector, click (deselect) Only Show User Styles in the Style Inspector (computed view). Expand a property to reveal a rule with a link to html.css.

Click the html.css link.

Expected: Should see html.css with the relevant rule displayed either in the source editor or view source.

Actual: Source Editor opens with an empty source editor.
Component: Developer Tools → Developer Tools: Inspector
Priority: -- → P2
QA Contact: developer.tools → developer.tools.inspector
Whiteboard: [computedview][ruleview]
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Test case:
1. Inspect the Google logo
2. Open computed view
3. Expand "display"
4. Click on html.css

The style editor will open with a list of inline stylesheets. Because html.css is not listed in the style editor we do not open it.

Seems like we need to be able to switch the style editor into system mode so that system stylesheets can be loaded.
Created attachment 604981 [details] [diff] [review]
Patch

We decided to open these links in view source because we don't want users to be editing UA css.
Attachment #604981 - Flags: review?(dcamp)
Comment on attachment 604981 [details] [diff] [review]
Patch

Missing tests
Attachment #604981 - Flags: review?(dcamp)
Created attachment 606294 [details] [diff] [review]
Tests now included
Attachment #604981 - Attachment is obsolete: true
Attachment #606294 - Flags: review?(mihai.sucan)
Comment on attachment 606294 [details] [diff] [review]
Tests now included

Review of attachment 606294 [details] [diff] [review]:
-----------------------------------------------------------------

Patch looks good and all tests pass.

One general comment: tests use arguments.callee which is deprecated.

::: browser/devtools/highlighter/inspector.jsm
@@ +1031,2 @@
>  
> +    // Array.prototype.indexOf always returns -1 here so we loop through

Is this comment needed?

::: browser/devtools/styleinspector/test/browser_ruleview_bug_703643_context_menu_copy.js
@@ -46,5 @@
>  
>    // Make sure the inspector is open.
>    ok(InspectorUI.inspecting, "Inspector is highlighting");
>    ok(!InspectorUI.treePanel.isOpen(), "Inspector Tree Panel is not open");
> -  ok(!InspectorUI.isSidebarOpen, "Inspector Sidebar is not open");

Why is this here?
Attachment #606294 - Flags: review?(mihai.sucan) → review+
Created attachment 607231 [details] [diff] [review]
Fixed orange
Attachment #606294 - Attachment is obsolete: true
Whiteboard: [computedview][ruleview] → [computedview][ruleview][land-in-fx-team]
Mike: the latest patch you submitted here is empty.
Created attachment 609304 [details] [diff] [review]
patch included

Patch now included.
Attachment #607231 - Attachment is obsolete: true
https://hg.mozilla.org/integration/fx-team/rev/7c1729f6ba3b
Whiteboard: [computedview][ruleview][land-in-fx-team] → [computedview][ruleview][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/7c1729f6ba3b
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [computedview][ruleview][fixed-in-fx-team] → [computedview][ruleview]
Target Milestone: --- → Firefox 14
You need to log in before you can comment on or make changes to this bug.