Firefox 7 for developers
Firefox 7 shipped on September 27, 2011. This article provides information about the changes that affect developers -- both of web content and of Firefox add-ons.
profileproperty has been removed, this property has been deprecated since Gecko 2.0.
yproperties have been removed.
beforeparameter is now optional.
backgroundattribute is no longer resolved as a URI; this is in compliance with the current HTML specification.
labelattribute now reflects the value of the element's text content if the attribute isn't specified.
- As part of the Azure project the Direct2D Azure Backend has been implemented and will significantly improve the performance of the 2D canvas.
- Specifying invalid values when calling
arcTo()no longer throws an exception; these calls are now correctly silently ignored.
isPointInPath()method now correctly considers the transformation matrix when comparing the specified point to the current path.
strokeRect()with a zero width and height now correctly does nothing.
drawImage()with a zero width or height
drawImage()with non-finite coordinates no longer throws an exception.
toDataURL()method now accepts a second argument to control JPEG quality.
- Support for the non-standard
overhas been removed.
- Shadows are now only drawn for
- You can now configure the fill rule used by canvas by setting the
mozFillRuleattribute on the context.
- Support for the experimental
mozCurrentTransformInverseattributes has been added.
- Support for the non-standard methods
mozTextAlongPath()has been removed.
- XLink href has been restored and the MathML3
hrefattribute is now supported. Developers are encouraged to move to the latter syntax.
- Support for the
<mpadded>elements has been added and behavior of
lspaceattribute has been fixed.
- The top-level
<math>element now accepts any attributes of the
- Support for Asana Math fonts has been added.
mediumline thickness of fraction bars in
<mfrac>elements has been corrected to match the default thickness.
- Names for negative spaces are now supported.
Fileinterface's non-standard methods
getAsText()have been removed as well as the non-standard properties
FormDatainterface no longer reports the filename as an empty string when sending the
Content-DispositionHTTP header if the data was set using a
Blob. This fixes errors that were happening with some servers.
element.dirattribute now always returns its result as all lower-case, as required by the HTML specification.
readAsArrayBuffer()method is now implemented.
document.createEntityReferencehas been removed. It was never properly implemented and is not implemented in most other browsers.
document.normalizeDocumenthas been removed. Use
indexis out of bounds, previously it returned
Node.getFeaturehas been removed.
HTMLDelElementinterfaces have been removed, since the
<del>elements actually use the
- In a effort to conform to the upcoming DOM4 specification where
Attrdo not inherit from
Nodeanymore (it did in DOM Core 1, 2 and 3), many
Nodeproperties and methods on the
Attrinterface are now reporting warnings as we work toward removing them in a later version.
- Added support for the
window.moveByno longer apply to the main window.
network.websocket.max-connectionspreference is used to determine the maximum number of WebSocket connections that can be open at a time. The default value is 200.
- The underlying WebSocket protocol version 8 (as specified by IETF draft 10) is used now instead of the version 7 protocol used by Firefox 6.
- The WebSocket API is now available on Firefox Mobile.
- Message logged with
console.logwhile the web console isn't open are still logged, although they aren't displayed when the web console is opened.
- Initial implementation of the Navigation Timing specification which provides data that can be used to measure the performance of a website.
These changes affect add-on developers as well as developers working on or with Mozilla code itself. Add-on developers should see Updating extensions for Firefox 7 for additional information.
Note: Firefox 7 requires that binary components be recompiled, as do all major releases of Firefox. See Binary Interfaces for details.
- New method
openFileOutputStream()opens a file output stream, the non-safe variant, for writing.
<tree>elements can now persist the state of disclosure triangles if the nodes referenced by
datasourcesall have unique IDs specified by "id" attributes.
<panel>elements can now be configured to let the user drag them by clicking anywhere on their background by using the new
- The new
Support has been added for multi-reporters; that is, memory reporters that gather data on request and call a callback for each generated result. See
nsIMemoryMultiReporterCallback for the relevant interfaces, as well as the
nsISocketTransportnow offers a new connection flag:
DISABLE_IPV6; this causes a socket to only attempt to connect to IPv4 addresses, ignoring any available IPv6 addresses. In addition,
nsIDNSServicenow offers a new resolve flag:
RESOLVE_DISABLE_IPV6; this causes domain name resolution to only consider IPv4 hosts, ignoring any available IPv6 addresses. These changes are used to implement the "happy eyeballs" strategy for improving response time when attempting to connect on hosts that support both IPv4 and IPv6 (especially those that have broken IPv6 connectivity).
inIDOMUtilshas two new methods,
inIDOMUtils.getChildrenForNode()which returns a list of child nodes of a node and
inIDOMUtils.getUsedFontFaces()which returns a list of font faces used in a range.
nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCHinterface has been merged into the
nsIDOMWindow2interface has been merged into the
nsIDOMWindow_2_0_BRANCHinterface has been merged into the
nsINavHistoryObservermethods with URI parameters now require a GUID as well.
nsISHistory_2_0_BRANCHinterface has been merged into the
nsITelemetryhas a new method,
nsITelemetry.getHistogramById()which returns a histogram by its ID, and a new attribute,
canRecordwhich when set to
falsedisables recording of telemetry statistics. Telemetry statistics are no longer recorded when in Private Browsing Mode. (see bug 661574 and bug 661573) Telemetry histograms defined with
nsITelemetry.newHistogram()will not be reported in the telemetry ping.
nsIMemoryReporterinterface has been substantially changed; if you use it, you will need to make some adjustments to your code.
nsIXMLHttpRequest, headers set by
nsIXMLHttpRequest.setRequestHeader()are sent with the request when following a redirect. Previously these headers would not be sent.
nsIDocShellhas a new
true, the docshell's content is allowed to control the window (that is, to move or resize the window).
nsIThreadInternal2interface has been merged into the
Describes a single font face.
Describes a list of font faces, each represented by
The following interfaces were implementation details that are no longer needed:
The following interfaces were removed as part of the removal of the ActiveX embedding API:
- The structure of the library window (
places.xul) has been cleaned up. This may break extensions and themes.
- The look of the print preview window has been modernized and theme authors are encouraged to style it using the CSS pseudo-elements