As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 734259 - Clicking a system stylesheet in the style inspector does not open the source
: Clicking a system stylesheet in the style inspector does not open the source
Product: Firefox
Classification: Client Software
Component: Developer Tools: Inspector (show other bugs)
: unspecified
: All All
: P2 normal (vote)
: Firefox 14
Assigned To: Michael Ratcliffe [:miker] [:mratcliffe]
: Patrick Brosset <:pbro>
Depends on:
  Show dependency treegraph
Reported: 2012-03-08 14:38 PST by Rob Campbell [:rc] (:robcee)
Modified: 2012-03-29 02:57 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (1.51 KB, patch)
2012-03-12 09:26 PDT, Michael Ratcliffe [:miker] [:mratcliffe]
no flags Details | Diff | Splinter Review
Tests now included (17.95 KB, patch)
2012-03-15 11:09 PDT, Michael Ratcliffe [:miker] [:mratcliffe]
mihai.sucan: review+
Details | Diff | Splinter Review
Fixed orange (234 bytes, patch)
2012-03-19 11:40 PDT, Michael Ratcliffe [:miker] [:mratcliffe]
no flags Details | Diff | Splinter Review
patch included (18.81 KB, patch)
2012-03-26 06:37 PDT, Michael Ratcliffe [:miker] [:mratcliffe]
no flags Details | Diff | Splinter Review

Description User image Rob Campbell [:rc] (:robcee) 2012-03-08 14:38:44 PST
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.
Comment 1 User image Michael Ratcliffe [:miker] [:mratcliffe] 2012-03-12 04:12:35 PDT
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.
Comment 2 User image Michael Ratcliffe [:miker] [:mratcliffe] 2012-03-12 09:26:54 PDT
Created attachment 604981 [details] [diff] [review]

We decided to open these links in view source because we don't want users to be editing UA css.
Comment 3 User image Michael Ratcliffe [:miker] [:mratcliffe] 2012-03-12 09:45:02 PDT
Comment on attachment 604981 [details] [diff] [review]

Missing tests
Comment 4 User image Michael Ratcliffe [:miker] [:mratcliffe] 2012-03-15 11:09:06 PDT
Created attachment 606294 [details] [diff] [review]
Tests now included
Comment 5 User image Mihai Sucan [:msucan] 2012-03-15 13:40:57 PDT
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?
Comment 6 User image Michael Ratcliffe [:miker] [:mratcliffe] 2012-03-19 11:40:05 PDT
Created attachment 607231 [details] [diff] [review]
Fixed orange
Comment 7 User image Mihai Sucan [:msucan] 2012-03-26 04:01:15 PDT
Mike: the latest patch you submitted here is empty.
Comment 8 User image Michael Ratcliffe [:miker] [:mratcliffe] 2012-03-26 06:37:55 PDT
Created attachment 609304 [details] [diff] [review]
patch included

Patch now included.
Comment 9 User image Panos Astithas [:past] 2012-03-28 04:17:37 PDT
Comment 10 User image Tim Taubert [:ttaubert] 2012-03-29 02:57:47 PDT

Note You need to log in before you can comment on or make changes to this bug.