If you are looking at the list of style rules for a node in the DOM inspector,
you should be able to right click on the rule row and copy the URI to the clipboard.
(It would also be cool if you could right click and select "go to stylesheet" or
some such to jump to the relevant place in the Stylesheets list.)

There was already a hack that attempted to open notepad.exe on the URI for the selected style rule, so I changed it to call the toolkit source viewer. This has the added benefit that if the app is configured to use an external editor, it will use that (unless you're on 1.9.0). I also added a menuitem to copy the URI to the clipboard, as requested.
There was also a comment in styleRules.js about not using anonymous functions, so I changed them all to named functions. I hope this isn't too spammy in the patch.

It just occurred to me that the string "Open File in Editor" didn't make sense when external editors aren't configured, and that the corresponding function name was a misnomer. Also, some of the function names didn't match the property names they were attached to, so I fixed that.

Regarding line wrapping:
I work within 80 columns, but many (most?) of the files in the inspector use a mixture of manual linebreaks and allowing lines to span 100+ columns. You'll see lines in the sections immediately preceding and following the altered lines in styleRules.xul breaking the 80 column barrier, for example. Should a code style bug be filed on the whole of the inspector codebase to fix this?

I only care about 80 characters if you are touching the line, or for new code. No need to fix the old code unless we are already there. Now, if you want to fix the rest in a different bug, that's OK too.

Comment on attachment 382082[details][diff][review]
third revision; fix problems identified by sdwilsh
>+ onPopupShowing: function onPopupShowing(commandsetId)
nit: aCommandSetId please
> StyleRuleView.prototype.__defineGetter__("rowCount",
>-function()
>+function getRowCount()
this can actually stay anonymous
>+++ b/resources/content/viewers/styleRules/styleRules.xul Sun Jun 07 23:05:18 2009 >+ <script type="application/x-javascript"
>+ src="chrome://global/content/viewSourceUtils.js"/>
nit: just use application/javascript here please
In general, you want to name the functions with a prefix to avoid conflicts too. For example, everything that is part of StyleRuleView would pre prefixed with SRV_ and then the function name.
r=sdwilsh with these changes. You'll want to request sr from neil@httl with your new patch.

The style rules viewer behaves differently if the left pane is set to the stylesheets viewer. I made this change for another bug, but testing the patch with the latest changes made for your last review gave warnings in the error console. I see it's not because of something that I introduced, so I suppose it really should stay in the fix for the other bug.