Closed Bug 1430001 Opened 2 years ago Closed 2 years ago

Not all used fonts are displayed differently

Categories

(DevTools :: Inspector: Rules, defect, P2)

defect

Tracking

(firefox59- verified)

VERIFIED FIXED
Firefox 59
Tracking Status
firefox59 - verified

People

(Reporter: sebo, Assigned: pbro)

References

()

Details

Attachments

(1 file)

Which font is used for a text node is decided on a per-character basis, i.e. several fonts may be used within the same element (see also bug 760048 comment 3).

With the changes of bug 994559 only the first used font is highlighted, though.

That means, in the following example, both 'fontawesome' and one of the other fonts (depending on OS) should be underlined when inspecting the <p> element:

data:text/html,<style>@font-face {font-family: "FontAwesome";font-style: normal;font-weight: 400;src: url("https://cdn.mdn.mozilla.net/static/styles/libs/font-awesome/fonts/fontawesome-webfont.fdf491ce5ff5.woff?v=4.1.0") format("woff")} p{font-family: fontawesome, arial, helvetica, sans-serif;}</style><p>Down %26%2361655%3B</p>

Note that you can see both fonts being listed within the Fonts side panel.

Sebastian
Thanks for catching that Sebastian. I missed it during the review.

I think this is just 3 lines to remove and it should be fixed.
Writing the test will take a bit more time, but should be easy enough.
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
Priority: -- → P2
Comment on attachment 8942169 [details]
Bug 1430001 - Highlight all used fonts in the rule-view, not just the first one;

https://reviewboard.mozilla.org/r/212444/#review218326

r+ assuming you can change try to green.
Attachment #8942169 - Flags: review?(mratcliffe) → review+
The test fails on Linux because both Georgia and Arial, which I thought would be supported across all our testing platforms, aren't.
I tested on 2 different versions of Linux this morning, and both had different fallbacks. So I think it might actually be safer just to limit this part of the test to Mac and Windows only.
Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f13e1bf54640
Highlight all used fonts in the rule-view, not just the first one; r=miker
Comment on attachment 8942169 [details]
Bug 1430001 - Highlight all used fonts in the rule-view, not just the first one;

https://reviewboard.mozilla.org/r/212444/#review218546

Looking good!
https://hg.mozilla.org/mozilla-central/rev/f13e1bf54640
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Tested in Nightly 59.0a1 2018-01-16 and it works fine for me. Thank you for the very quick fix!

Sebastian
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.