Firefox 3.6 offers support for new and developing web standards, increased performance, and an overall better experience for web users and developers. This page provides links to articles covering the new capabilities of Firefox 3.6.
For web site and application developers
CSS
- Using gradients
- Firefox 3.6 adds support for the proposed
-moz-linear-gradient
and-moz-radial-gradient
properties forbackground
. - Multiple backgrounds
- The
background
property (as well asbackground-color
,background-image
,background-position
,background-repeat
, andbackground-attachment
) now supports multiple backgrounds. This lets you specify multiple backgrounds that are rendered atop one another in layers. - Mozilla-specific media features
- Media features have been added for Mozilla-specific system metrics, so that media queries can be used to more safely check on the availability of features such as touch support.
- Scaling background images
- The
background-size
property from the CSS 3 Backgrounds and Borders draft is now supported under the name-moz-background-size
. - WOFF font support
@font-face
now supports the WOFF downloadable font file format.- Pointer events
- The
pointer-events
property lets content specify whether or not an element may be the target of mouse pointer events.
Miscellaneous CSS changes
- The
rem
length unit from CSS3 Values and Units is now supported. bug 472195 image-rendering
is supported for images, background images, videos and canvases. bug 423756text-align
:end is now supported. bug 299837- DOM changes to elements using the table
display
types now work much better. - Added
:-moz-locale-dir(ltr)
and:-moz-locale-dir(rtl)
to make it easier to customize layouts based on whether the user interface is being displayed using a left-to-right or a right-to-left locale. bug 478416 - Added support for the
:indeterminate
pseudo-class, which matchescheckbox
input
elements whoseindeterminate
attribute istrue
. - Windowed plugins are no longer displayed in CSS transforms, because they can't be transformed properly by the compositor.
HTML
- Using files from web applications
- Support for the new HTML5 File API has been added to Gecko, making it possible for web applications to access local files selected by the user. This includes support for selecting multiple files using the
input type="file"
HTML element's newmultiple
attribute. - HTML5 video supports poster frames
- The
poster
attribute is now supported for thevideo
element, allowing content to specify a poster frame to be displayed until the video begins to play. - Checkboxes and radio buttons support the
indeterminate
property - HTML
input
elements of typescheckbox
andradio
now support the indeterminate property, which allows a third, "indeterminate" state. - Canvas image smoothing can be controlled
- The new
mozImageSmoothingEnabled
property can be used to turn on and off image smoothing when scaling incanvas
elements. - Asynchronous script execution
- By setting the
async
attribute on ascript
element, thescript
will not block loading or display of the rest of the page. Instead thescript
executes as soon as it is downloaded.
JavaScript
Gecko 1.9.2 introduces JavaScript 1.8.2, which adds a number of language features from the ECMAScript 5 standard:
Date.parse()
can now parse ISO 8601 dates like YYYY-MM-DD.-
The
prototype
property of function instances is no longer enumerable.
DOM
- Web workers can now self-terminate
- Workers now support the
nsIWorkerScope.close()
method, which allows them to terminate themselves. - Drag and drop now supports files
- The
DataTransfer
object provided to drag listeners now includes a list of files that were dragged. - Checking to see if an element matches a specified CSS selector
- The new
element.mozMatchesSelector
method lets you determine whether or not an element matches a specified CSS selector. See bug 518003. - Detecting device orientation
- Content can now detect the orientation of the device if it has a supported accelerometer, using the
MozOrientation
event. Firefox 3.6 supports the accelerometer in Mac laptops. - Detecting document width and height changes
- The new
MozScrollAreaChanged
event is dispatched whenever the document'sscrollWidth
and/orscrollHeight
properties change.
Miscellaneous DOM changes
- The
getBoxObjectFor()
method has been removed, as it was non-standard and exposed even more non-standard stuff to the web. See bug 340571. Also affects MooTools which uses this call for Gecko detection; this has been fixed in the latest version of MooTools, so be sure to update. - The new
mozInnerScreenX
andmozInnerScreenY
properties on DOM windows have been added; these return the screen coordinates of the top-left corner of the window's viewport. - The new
mozScreenPixelsPerCSSPixel
attribute on thensIDOMWindowUtils
interface, accessible only to chrome, provides a conversion factor between CSS pixels and screen pixels; this value can vary based on the zoom level of the content. - When the page's URI's document fragment identifier (the part after the "#" (hash) character) changes, a new
hashchange
event is sent to the page. See window.onhashchange for more information. bug 385434 - The attribute
document.readyState
is now supported. bug 347174 - Support for HTML5's
element.classList
to allow easier handling of the class attribute. bug 501257 localName
andnamespaceURI
in HTML documents now behave like they do in XHTML documents:localName
returns in lower case andnamespaceURI
for HTML elements is"http://www.w3.org/1999/xhtml"
.element.getElementsByTagNameNS
no longer lowercases its argument, so upper-case ASCII letters in the argument make matches against HTML elements fail. The same is true fordocument.getElementsByTagNameNS
.- Support has been added for addresses in geolocation via the
nsIDOMGeoPositionAddress
interface and a new field added tonsIDOMGeoPosition
. - The
window.getComputedStyle
function now returns quotes withinurl()
values.
XPath
- The choose() XPath method is now supported
- The
choose()
method is now supported by our implementation of XPath.
For XUL and add-on developers
If you're an extension developer, you should start by reading Updating extensions for Firefox 3.6, which offers a helpful overview of what changes may affect your extension. Plug-in developers should read Updating plug-ins for Firefox 3.6.
New features
- Detecting device orientation
- Content can now detect the orientation of the device if it has a supported accelerometer, using the
MozOrientation
event. Firefox 3.6 supports the accelerometer in Mac laptops. - Monitoring HTTP activity
- You can now monitor HTTP transactions to observe requests and responses in real time.
- Working with the Windows taskbar
- It's now possible to customize the appearance of windows in the taskbar in Windows 7 or later. This has been disabled by default in Firefox 3.6.
Places
- Places queries can now use the
redirectsMode
attribute on thensINavHistoryQueryOptions
interface to specify whether or not to include redirected pages in results. - Added the new
nsIFaviconService.expireAllFavicons()
method to thensIFaviconService
interface.
Storage
- Locale-aware collation of data is now supported by the Storage API
- Gecko 1.9.2 added several new collation methods to provide optimized collation (sorting) of results using locale-aware techniques.
- Properties on a statement can now be enumerated
- You can now use a
for..in
enumeration to enumerate all the properties on a statement. - mozIStorageStatement's getParameterIndex changed behavior between 3.5 and 3.6.
- See bug 528166 for details.
- Asynchronously bind multiple sets of parameters and execute a statement.
- See bug 490085 for details. Documentation coming soon.
Preferences
- The
nsIContentPrefService
interface has two new methods:nsIContentPrefService.getPrefsByName()
andnsIContentPrefService.removePrefsByName()
.
Themes
See Updating themes for Firefox 3.6 for a list of changes related to themes.
- Lightweight themes
- Firefox 3.6 supports lightweight themes; these are easy-to-create themes that simply apply a background to the top (URL bar and button bar) and bottom (status bar) of browser windows. This is an integration of the existing Personas theme architecture into Firefox.
Miscellaneous
- Firefox will no longer load third-party components installed in its internal components directory. This helps to ensure stability by preventing buggy third-party components from being executed. Developers that install components this way must repackage their components as XPI packages so they can be installed as standard add-ons.
contents.rdf
is no longer supported for registering chrome in extensions. You must now use thechrome.manifest
file instead. See bug 492008.- Added support for hiding the menu bar automatically. See bug 477256.
- Added support for the
container-live-role
attribute to objects. See bug 391829. - The
tabs-closebutton
binding has been removed. See bug 500971. - Added support to
nsISound
for playing sounds based on events that have occurred. See bug 502799. - The syntax for the
nsITreeView
methodsnsITreeView.canDrop()
andnsITreeView.drop()
has changed to support the new drag & drop API introduced in Gecko 1.9. See bug 455590. - Added support to snap the mouse cursor to the default button of dialog or wizard on Windows, see bug 76053. This is processed automatically by dialog and wizard element. But if a XUL application creates a window using the
window
element and it has a default button, it needs to callnsIDOMChromeWindow.notifyDefaultButtonLoaded()
during the window'sonload
event handler. - The
nsILocalFileMac
interface has had two methods removed:setFileTypeAndCreatorFromMIMEType()
andsetFileTypeAndCreatorFromExtension()
. - The new
NetUtils.jsm
code module provides an easy-to-use method for asynchronously copying data from an input stream to an output stream. - The new
openLocationLastURL.jsm
code module makes it easy to read and change the value of the "Open Location" dialog box's remembered URL while properly taking private browsing mode into account. - On Windows, the
nsIScreen
interface now reports 24 bit per pixel color depths when the graphics driver claims 32 bits, since 24 more accurately represents the actual number of color pixels in use. - Menu bars can now be hidden on Windows, using the new
autohide
attribute on thetoolbar
XUL element. - The
loadOneTab
andaddTab
methods now accept a newrelatedToCurrent
parameter and, in addition, allow the parameters to be specified by name, since nearly all of the parameters are optional. - The "hidden" property is no longer supported in install manifests; it's no longer possible to prevent the user from seeing add-ons in the add-on manager window.
- The
@mozilla.org/webshell;1
component no longer exists; you need to use@mozilla.org/docshell;1
instead. - You can now register with the update-timer category to schedule timer events without having to instantiate the object that the timer will eventually call into; it will instead be instantiated when it's needed. See
nsIUpdateTimerManager.registerTimer()
for details. - The
NPN_GetValue()
function no longer provides access to XPCOM through the variable valuesNPNVserviceManager
,NPNVDOMelement
, andNPNVDOMWindow
. This is part of the work toward making plugins run in separate processes in a future version of Gecko. - Plugins are no longer scriptable through XPCOM (IDL) interfaces, NPRuntime is the API to use for making plugins scriptable, and
NPP_GetValue()
is no longer called to with the valueNPPVpluginScriptableInstance
orNPPVpluginScriptableIID
. This is part of the work toward making plugins run in separate processes in a future version of Gecko.
For Firefox/Gecko developers
Certain changes are only really interesting if you work on the internals of Firefox itself.
Interfaces merged
The following interfaces have been combined together:
nsIPluginTagInfo2
has been merged intonsIPluginTagInfo
.nsIPluginInstanceInternal
,nsIPPluginInstancePeer
,nsIPluginInstancePeer1
,nsIPluginInstancePeer2
, andnsIPluginInstancePeer3
have all been merged intonsIPluginInstance
.nsIWindowlessPlugInstPeer
has been merged intonsIPluginInstance
.nsIPluginManager
andnsIPluginManager2
have been merged intonsIPluginHost
.
Interfaces removed
The following interfaces have been removed entirely because they were unused, unimplemented, or obsolete:
nsIFullScreen
nsIDOMSVGListener
nsIDOMSVGZoomListener
nsIInternetConfigService
nsIDKey
nsIEventHandler
nsIJRILiveConnectPIPeer
nsIJRILiveConnectPlugin
nsIScriptablePlugin
nsIClassicPluginFactory
nsIFileUtilities
Interfaces moved
The following interfaces have been relocated from their previous IDL files into new ones:
nsIDOMNSCSS2Properties
is now located in its own IDL file (dom/interfaces/css/nsIDOMCSS2Properties.idl
).nsIUpdateTimerManager
is now located in its own IDL file.
A large number of interfaces have been moved. See Interfaces moved in Firefox 3.6 for a complete list.
Other interface changes
The following assorted changes have been made:
- The
nsIPlugin
interface now inherits fromnsISupports
instead ofnsIFactory
. - The
nsIPluginHost
interface now inherits fromnsISupports
instead ofnsIFactory
. - The
nsIFrame
interface now inherits fromnsQueryFrame
instead ofnsISupports
. - The
nsIDeviceContext
methodgetPaletteInfo()
has been removed, as it was never implemented. - The
nsIScriptContext
methodreportPendingException()
has been removed, since it was no longer being used.
Changes in accessibility code
- The
EVENT_REORDER
accessibility event is now sent when the children of frames and iframes change, as well as when the main document's children change. See bug 420845. - The
nsIAccessibleTable.selectRow()
now correctly removes any current selection before selecting the specified row.