Open Bug 593331 Opened 14 years ago Updated 2 years ago

csslogic shortSource can create duplicate names

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: jwalker, Unassigned)

References

Details

(Whiteboard: [computedview][ruleview])

If we have a page with a number of inline stylesheets or linked sheets with similar filenames:
- example.com/foo/styles.css
- example.com/bar/styles.css

Then CssSheet.shortSource will give them the same name. Worse, this linked sheet is indistinguishable from an inline one:
- example.com/bar/inline

Our approach of showing a friendly name to the user is helpful, however there are drawbacks. Perhaps we should use a full unique name in cases where the short name is non-unique.
This could be uncommon. It would be good to have more experience.
I suspect the multiple inline sheets case is the most important to fix.
Blocks: 586984
Showing the complete URL when the user hover the source column, I think, is sufficient. Why not mark this "BY DESIGN" (WONT FIX)? I mean, we could trouble ourselves for not much value.
I don't really see the problem here ... we either shorten the paths or we don't. It is true that we currently show only the filename but if you hover with the mouse you can see the full path.

I would say that the current implementation is correct ... can we close this?
It's not uncommon for web pages to have multiple inline stylesheets, it's going to be quite a pain to have to mouse-over them all to find the right one.

I can see that there are other bugs that are more important, but it's not a WONT-FIX to me.
Whiteboard: [hydra] → [styleinspector]
Bug triage, filter on PEGASUS.
Whiteboard: [styleinspector] → [computedview][ruleview]
Bug triage. Filter on PUMPKINS!
Component: Developer Tools → Developer Tools: Inspector
Bug triage. Filter on CLIMBING SHOES
Priority: -- → P3
I do not see what shortSource is but inline stylesheets are all named "inline" in the rule view:

On the following test page:
  data:text/html,<style>* {background: gray;}</style>foo%0A%0D<style>body {color:red;}</style>

You can see:
body {
    color: red;
}          >> inline:1
* {
    background: gray;
}          >> inline:1

The only thing strange here is that we specify the line number of the rule within the stylesheet,
not the linenumber in the HTML file. Chrome specify the document url and line in that document.

I think having "inline" is great. The line number story is still weird. I would have expected the line in the HTML file.
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.