Closed Bug 2035251 Opened 7 months ago Closed 5 months ago

Tab icon for PDF document should show new PDF icon

Categories

(Firefox :: PDF Viewer, enhancement)

Firefox 150
enhancement

Tracking

()

VERIFIED FIXED
153 Branch
Tracking Status
firefox153 --- verified
firefox154 --- verified

People

(Reporter: rcasey, Assigned: sfoster)

References

Details

Attachments

(2 files, 2 external files)

Attached image tab-screenshot.png —

Attach (recommended) or Link to PDF file here:

Steps to reproduce the problem:

  1. Open Firefox
  2. Open a PDF document: Either locally or via a website

What is the expected behavior?
The tab shows no icon (local file) or the website favicon when a PDF document is opened in Firefox.
'updated-icon-pdf.png'

What went wrong?
Currently, the tab displays no icon if it's a local file, or the website favicon when it's a file on a website.
See attached screenshot 'tab-screenshot.png'

PDF icon

Basic export settings definition for the SVG:
`<!-- This Source Code Form is subject to the terms of the Mozilla Public

  • License, v. 2.0. If a copy of the MPL was not distributed with this
  • file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#000" fill-rule="evenodd" d="M8.803.016a2 2 0 0 1 1.36.585l3.244 3.245c.375.374.585.882.585 1.412L14 13.042a2.764 2.764 0 0 1-2.416 2.732 28.6 28.6 0 0 1-7.198-.002A2.75 2.75 0 0 1 2 13.042V2.97C2 1.604 3.114.388 4.47.219A29 29 0 0 1 8 0c.168 0 .49.008.803.016M8.5 4.5a1 1 0 0 0 1 1h3.4L8.5 1.1z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M5.125 9.25c.621 0 1.125.504 1.125 1.125v.25c0 .621-.504 1.125-1.125 1.125H4.75v.875a.375.375 0 0 1-.75 0v-3c0-.207.168-.375.375-.375zM4.75 11h.375a.375.375 0 0 0 .375-.375v-.25A.375.375 0 0 0 5.125 10H4.75zm3.188-1.75c.758 0 1.375.616 1.375 1.375v1c0 .759-.617 1.375-1.376 1.375h-.625a.375.375 0 0 1-.375-.375v-3c0-.207.168-.375.375-.375zm-.25 3h.25c.344 0 .625-.28.625-.625v-1A.626.626 0 0 0 7.937 10h-.25z" clip-rule="evenodd"/><path fill="#fff" d="M11.625 9.25a.375.375 0 0 1 0 .75h-.75v.875h.625a.375.375 0 0 1 0 .75h-.625v1a.375.375 0 0 1-.75 0v-3c0-.207.168-.375.375-.375z"/></svg>`

This is not priority work, but @sfoster@mozilla.com Im tagging you since you mentioned it in the Slack thread.

Flags: needinfo?(sfoster)
Flags: needinfo?(mcastelluccio)
Flags: needinfo?(cdenizet)
Attached image updated-icon-pdf.png —

(In reply to Ryan Casey from comment #0)

What is the expected behavior?
The tab shows no icon (local file) or the website favicon when a PDF document is opened in Firefox.

Assuming you meant to say that we want to show the new icon both for local files and for websites?

Flags: needinfo?(mcastelluccio)

(In reply to Marco Castelluccio [:marco] from comment #2)

(In reply to Ryan Casey from comment #0)

What is the expected behavior?
The tab shows no icon (local file) or the website favicon when a PDF document is opened in Firefox.

Assuming you meant to say that we want to show the new icon both for local files and for websites?

Correct. Expected behavior is to show the PDF icon whether it's a local file or on a website, in place of the favicon.

So I guess the favicon here should really be associated with pdf.js rather than the mime-type of the resource or whatever?
And there's no trademark or license issues with the icon we need to chase down? Can we just land it in tree and hook it up?

Flags: needinfo?(sfoster)

(In reply to Sam Foster [:sfoster] (he/him) from comment #4)

So I guess the favicon here should really be associated with pdf.js rather than the mime-type of the resource or whatever?

Yes!

And there's no trademark or license issues with the icon we need to chase down? Can we just land it in tree and hook it up?

The icon was designed by our design team, we have a similar one for Windows files, so we are good to land it in tree.

Sam, are you helping with this?

Flags: needinfo?(sfoster)

(In reply to Marco Castelluccio [:marco] from comment #6)

Sam, are you helping with this?

Yeah I think that was the plan. I'll assign myself and investigate what needs to happen here.

Assignee: nobody → sfoster
Flags: needinfo?(sfoster)
Attachment #9591290 - Attachment description: WIP: Bug 2035251 - Add shared toolkit pdf.svg icon, use it in pdfjs viewer.html. → Bug 2035251 - Add shared toolkit pdf.svg icon for use in pdfjs. r?#desktop-theme-reviewers
Attachment #9591290 - Attachment description: Bug 2035251 - Add shared toolkit pdf.svg icon for use in pdfjs. r?#desktop-theme-reviewers → Bug 2035251 - Add shared toolkit pdf.svg icon for use in pdfjs. r?#desktop-theme-reviewers,calixte
Attachment #9591290 - Attachment description: Bug 2035251 - Add shared toolkit pdf.svg icon for use in pdfjs. r?#desktop-theme-reviewers,calixte → Bug 2035251 - Add shared toolkit pdf.svg icon and use for the save-as-pdf Quick Action. r?#desktop-theme-reviewers,calixte
Pushed by sfoster@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/41d3cd66fd2f https://hg.mozilla.org/integration/autoland/rev/6f67332f81db Add shared toolkit pdf.svg icon and use for the save-as-pdf Quick Action. r=desktop-theme-reviewers,calixte,urlbar-reviewers,dao
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
Status: RESOLVED → REOPENED
Flags: needinfo?(cdenizet)
Resolution: FIXED → ---
Target Milestone: 153 Branch → ---

Do we need to wait for the new icon to hit release before landing the pdf.js patch? Or is that now unblocked?

(In reply to Sam Foster [:sfoster] (he/him) from comment #12)

Do we need to wait for the new icon to hit release before landing the pdf.js patch? Or is that now unblocked?

Ah. That's exactly what the #if MOZCENTRAL block does. PR updated.

Depends on: 2045168
Depends on: 2045670
Status: REOPENED → RESOLVED
Closed: 6 months ago → 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
No longer depends on: 2045168
QA Whiteboard: [qa-ver-opt-c154/b153]
QA Contact: oardelean

Reproducible on a 2026-04-27 Firefox Nightly build on Windows 11.

Verified as fixed on Firefox Nightly 154.0a1 and Firefox 153.0b11 on Windows 11, macOS 13.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-ver-opt-c154/b153] → [qa-ver-done-c154/b153]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: