Closed Bug 455086 Opened 11 years ago Closed 3 months ago

Set up windows file associations for .SVG


(Firefox :: Installer, enhancement, P3)




Firefox 70
Tracking Status
firefox70 --- fixed


(Reporter: duncan.loveday, Assigned: priyanksingh8)


(Keywords: good-first-bug, parity-ie)


(2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/2008070208 Firefox/3.0.1

Starting with a PC that has no SVG viewer installed (i.e. no Firefox, ASV, Opera, Safari etc), if I install Firefox then no windows file associations are created to let me double-click a .svg or .svgz file or email attachment.

Reproducible: Always

Steps to Reproduce:
1. On a windows XP PC, Go to My Computer->Tools->Folder Options
2. Scroll down to find the SVG and SVGZ file extensions.
3. Remove the file associations for these two file extensions if they exist.
4. Install Firefox 3.0.1, making it the default browser
5. Go back to My Computer->Tools->Folder Options and scroll down again to find the SVG and SVGZ file extensions.
Actual Results:  
No file associations are created for file extensions .svg or .svgz

Expected Results:  
It would be helpful if file associations were created for these extensions. I can't think of a good reason not to do this where no previous associations exist and there might also be a case for overwriting existing associations if Firefox is being made the default browser.

Whilst this can be done later, the first time a .svg/.svgz is opened - by choosing "Select the program from a list" and navigating to firefox.exe etc, this is an unnecessary burden on the user and also the associations added via this route are not always reliable. The only reliable way I've found is to uninstall and reinstall ASV which associates .svg and .svgz with whatever the current default browser is. Below is the command it created in the association (plus some clever stuff in the DDE pane) - I don't understand all the switches or but the quotes round %1 are important. For example if a .svg is opened as a mail attachment in outlook it gets saved in C:/documents and settings/... which has spaces in it.

"C:\Program Files\Mozilla Firefox\firefox.exe" -requestPending -osint -url "%1"
Firefox will not display local .svgz files so it shouldn't set itself as the viewer for them.
agreed...unless and until it is enhanced to do that.
(In reply to comment #1)
> Firefox will not display local .svgz files so it shouldn't set itself as the
> viewer for them.

Regarding that, I'd say this issue should depend on bug 52282... :-)

Also, this issue is pretty much related with bug 215889 and, in my opinion, should be coordinated with it.
I think this would be useful for the majority of users who don't have other applications to open SVG files.  IE10 does this already BTW so Windows 8 users will be directed there by default.

Installer-related code is here:
Component: SVG → Shell Integration
Ever confirmed: true
Product: Core → Firefox
Hardware: x86 → All
Whiteboard: [parity-ie]
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-ie
Whiteboard: [parity-ie]

Moving to installer since that is what actually sets the defaults and this bug should get a decision in that component.

Component: Shell Integration → Installer

Comment 1 is still correct, we cannot open SVGZ files, but I don't have any objection to registering as a .svg handler.

Keywords: good-first-bug
OS: Windows XP → Windows
Priority: -- → P3
Summary: Set up windows file associations for .SVG and .SVGZ when making Firefox the default browser → Set up windows file associations for .SVG

I'd like to work on this issue as my first step into open source.

Flags: needinfo?(mhowell)

That's great! Have a look at our introductory guide, and it should take you through the whole process of getting started working on Firefox. If you run into any problems with anything in there, follow its advice about asking in the #introduction IRC channel, and if that fails you can contact me directly. Note that to work on this bug you'll need a Windows computer, since this is a Windows installer thing. To build an installer and try out your changes, you'll need to run ./mach package after ./mach build is finished, and then you'll find the packaged installers in the directory obj-x86_64-pc-mingw32/dist/install/sea/.

For this specific bug, what needs to be done is pretty simple: in a few different places there are lists of file extensions that we install (and uninstall), and .svg just needs to be added to those lists. For example, one of those lists is here. There are a couple of others in that file, and also one when we uninstall the associations in uninstaller.nsi. To fix this bug, just follow the patterns that are already there to add lines for .svg. Then follow the instructions for submitting a patch for review (with me as the reviewer). Thanks!

Flags: needinfo?(mhowell)

should I use phabricator for submitting my patch for review?

ideally, yes if you can.

(In reply to Robert Longson [:longsonr] from comment #11)

ideally, yes if you can.

Is there any other way apart from phabricator?

What's the problem with phabricator?

Depends on D41477

Assignee: nobody → priyanksingh8
Attachment #9084519 - Attachment is obsolete: true
Attachment #9084490 - Attachment is obsolete: true
Pushed by
Set up windows file associations for .SVG. r=mhowell
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.