Firefox 3 gets full-page zoom

The much-anticipated page zoom feature has finally landed in Firefox 3 nightly builds. Firefox 3 will now be able to zoom the entire page, including images as well as text, just like Opera and IE 7.

The page zoom feature request was originally filed in Bugzilla in 1999, but implementation was delayed because it wasn't considered practical in Gecko 1.8, the current version of Firefox's HTML rendering engine. Scheduled for inclusion in Firefox 3, the new version of the rendering engine—Gecko 1.9—leverages the open source Cairo vector graphics rendering framework and includes a number of extremely significant improvements to layout and rendering. The page zoom feature was implemented as part of the Gecko overhaul and will now be included in Firefox 3.

Although the page zoom feature is fully implemented, the user interface doesn't expose the page zoom functionality to the end user yet. Until menu items, toolbar buttons, or keyboard shortcuts are added to facilitate access to the page zoom functionality, most users probably won't be able to make much use of the new feature.

In order to test it ourselves with the latest nightly build, we poked around and figured out the underlying API so that we could alter the page zoom level with Javascript. Manipulating the page zoom requires high security access, so you can't do it directly in a web page or with a JavaScript bookmarklet. You could potentially implement support for controlling page zoom by making a custom Firefox plugin, but for simple testing purposes you can also just use Firefox's built-in JavaScript error console.

Launch the Javascript console by selecting Error Console from Firefox's Tools menu. Then, type the following into the code text box and click the Evaluate button:

Components.classes[";1"].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser").getBrowser().mCurrentBrowser.markupDocumentViewer.fullZoom = 3;
That will zoom in the current page to three times its normal size. You can experiment with various values to see the page at different zoom levels. If you want to zoom out, use decimals like 0.2 or 0.6. This very useful feature is yet another example of Firefox 3 improvements made possible by the excellent work that has gone into Gecko 1.9.


Post a Comment

There was an error in this gadget
This Day in History

Today's Birthday

In the News

Quote of the Day
There was an error in this gadget