Firefox 7 for developers

  • Revision slug: Firefox_7_for_developers
  • Revision title: Firefox 7 for developers
  • Revision id: 44397
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 22 words added

Revision Content

{{ draft() }}

{{ ReleaseChannelInfo("7") }}

Changes for web developers

HTML

  • The {{ domxref("HTMLHeadElement") }} profile property has been removed, this property has been deprecated since {{ gecko("2.0") }}. (see {{ bug("664544") }})
  • The {{ domxref("HTMLImageElement") }} x and y properties have been removed. (see {{ bug("587021") }})
  • The {{ domxref("HTMLSelectElement") }} add() method before parameter is now optional. (see {{ bug("182279") }})
  • The {{ HTMLElement("body") }} element's {{ htmlattrxref("background", "body") }} attribute is no longer resolved as a URI; this is in compliance with the current HTML specification.

Canvas changes

  • Specifying invalid values when calling setTransform(), bezierCurveTo(), or arcTo() no longer throws an exception; these calls are now correctly silently ignored.
  • The isPointInPath() method now correctly considers the transformation matrix when comparing the specified point to the current path.
  • Calling strokeRect() with a zero width and height now correctly does nothing. (see {{ bug("663190") }})
  • Calling drawImage() with a zero width or height {{ HTMLElement("canvas") }} now throws INVALID_STATE_ERR. (see {{ bug("663194") }})
  • Calling drawImage() with non-finite coordinates no longer throws an exception.
  • toDataURL() method now accepts a second argument to control JPEG quality (see {{ bug("564388") }})
  • Support for the non-standard globalCompositeOperation operations clear and over has been removed (see {{ bug("629870") }}).

CSS

  • {{ cssxref("text-overflow") }} is now supported.
  • The {{ cssxref("orient", "-moz-orient") }} property has been fixed so that {{ HTMLElement("progress") }} elements that are vertically oriented have appropriate default dimensions.

MathML

  • XLink href has been restored and the MathML3 href attribute is now supported. Developers are encouraged to move to the latter syntax.
  • Support for the voffset attribute on {{ MathMLElement("mpadded") }} elements has been added and behavior of lspace attribute has been fixed.
  • The top-level {{ MathMLElement("math") }} element now accepts any attributes of the {{ MathMLElement("mstyle") }} element.
  • Support for Asana Math fonts has been added.
  • The medium line thickness of fraction bars in {{ MathMLElement("mfrac") }} elements has been corrected to match the default thickness.
  • Names for negative spaces are now supported.

DOM

  • The {{ domxref("File") }} interface's non-standard methods getAsBinary(), getAsDataURL(), and getAsText() have been removed as well as the non-standard properties fileName and fileSize.
  • The {{ domxref("element.dir") }} attribute now always returns its result as all lower-case, as required by the HTML specification.
  • The {{ domxref("FileReader") }} readAsArrayBuffer() method is now implemented. (see {{ bug("632255") }})
  • {{ domxref("document.createEntityReference") }} has been removed. It was never properly implemented and is not implemented in most other browsers. (see {{ bug("611983") }})
  • document.normalizeDocument has been removed. Use {{ domxref("Node.normalize") }} instead. (see {{ bug("641190") }})
  • {{ domxref("DOMTokenList.item") }} now returns undefined if the index is out of bounds, previously it returned null. (see {{ bug("529328") }})
  • Node.getFeature has been removed (see {{ bug("659053") }}).
  • The HTMLInsElement and HTMLDelElement interfaces have been removed, since the {{ HTMLElement("ins") }} and {{ HTMLElement("del") }} elements actually use the {{ domxref("HTMLModElement") }} interface.

JavaScript

WebSockets

  • The network.websocket.max-connections preference 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 IETF-08 is used now instead of the IETF-07 protocol used by Firefox 6.
  • WebSockets are now available on Firefox Mobile. (see {{ bug("537787") }})

console API

Web timing

  • Initial implementation of the Navigation Timing specification (see {{ bug("570341") }}).

Changes for Mozilla and add-on developers

Note: Firefox 7 requires that binary components be recompiled, as do all major releases of Firefox. See Binary Interfaces for details.

JavaScript code modules

FileUtils.jsm

  • New method openFileOutputStream() opens a file output stream, the non-safe variant, for writing. (see {{ bug("662253") }})

User experience changes

Changes to the build system

  • The ActiveX embedding API is no longer built and support has been removed from the build system. Supporting interfaces have also been removed; see {{ anch("Removed interfaces") }}.

Interface changes

  • {{ interface("inIDOMUtils") }} has two new methods, {{ ifmethod("inIDOMUtils","getChildrenForNode") }} which returns a list of child nodes of a node and {{ ifmethod("inIDOMUtils","getUsedFontFaces") }} which returns a list of font faces used in a range. (see {{ bug("467669") }})
  • The nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH interface has been merged into the {{ interface("nsIMarkupDocumentViewer") }} interface.
  • The nsIDOMWindow2 interface has been merged into the {{ interface("nsIDOMWindow") }} interface. (see {{ bug("664543") }})
  • The nsIDOMWindow_2_0_BRANCH interface has been merged into the {{ interface("nsIDOMWindowInternal") }} interface. (see {{ bug("664543") }})
  • {{ interface("nsINavHistoryObserver") }} methods with URI parameters now require a GUID as well.
  • The nsISHistory_2_0_BRANCH interface has been merged into the {{ interface("nsISHistory") }} interface. (see {{ bug("664979") }})
  • {{ interface("nsITelemetry") }} has a new method, {{ ifmethod("nsITelemetry","getHistogramById") }} which returns a histogram by its ID, and a new attribute, canRecord which when set to false disables 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 {{ ifmethod("nsITelemetry","newHistogram") }} will not be reported in the telemetry ping. (see {{ bug("668312") }})
  • The {{ interface("nsIMemoryReporter") }} interface has been substantially changed; if you use it, you will need to make some adjustments to your code.
  • {{ interface("nsIXMLHttpRequest") }}, headers set by {{ ifmethod("nsIXMLHttpRequest","setRequestHeader") }} are sent with the request when following a redirect. Previously these headers would not be sent.

New interfaces

{{ interface("nsIDOMFontFace") }}
(see {{ bug("467669") }})
{{ interface("nsIDOMFontFaceList") }}
(see {{ bug("467669") }})

Removed interfaces

The following interfaces were implementation details that are no longer needed:

  • nsIDOM3Attr (see {{ bug("666968") }})
  • nsIDOM3Node (see {{ bug("659053") }})
  • nsIDOM3TypeInfo (see {{ bug("660539") }})
  • nsIDOM3Text (see {{ bug("641333") }})
  • nsIDOMDocumentStyle (see {{ bug("658904") }})
  • nsIDOMNSDocument (see {{ bug("658906") }})
  • nsIDOMNSFeatureFactory (see {{ bug("659053") }})
  • {{ interface("nsIDOMNSHTMLDocument") }} (see {{ bug("659113") }})
  • nsIDOMNSHTMLFormElement (see {{ bug("660433") }})
  • nsIDOMNSHTMLHRElement (see {{ bug("659990") }})
  • nsIDOMNSHTMLTextAreaElement (see {{ bug("660433") }})

The following interfaces were removed as part of the removal of the ActiveX embedding API:

  • DITestScriptHelper (see {{ bug("662023") }})
  • DWebBrowserEvents (see {{ bug("662023") }})
  • DWebBrowserEvents2 (see {{ bug("662023") }})
  • {{ interface("IDispatch") }} (see {{ bug("662000") }})
  • IMozControlBridge (see {{ bug("662023") }})
  • IMozPluginHostCtrl (see {{ bug("662023") }})
  • IWebBrowser (see {{ bug("662023") }})
  • IWebBrowser2 (see {{ bug("662023") }})
  • IWebBrowserApp (see {{ bug("662023") }})
  • IXMLDocument (see {{ bug("662023") }})
  • IXMLElement (see {{ bug("662023") }})
  • IXMLElementCollection (see {{ bug("662023") }})
  • IXMLError (see {{ bug("662023") }})
  • nsIActiveXSecurityPolicy (see {{ bug("662000") }})
  • {{ interface("nsIDispatchSupport") }} (see {{ bug("662000") }})
  • nsIMozAxPlugin (see {{ bug("662023") }})
  • nsIScriptEventHandler (see {{ bug("383383") }})
  • nsIScriptEventManager (see {{ bug("383383") }})

See also

Revision Source

<p>{{ draft() }}</p>
<p>{{ ReleaseChannelInfo("7") }}</p>
<h2>Changes for web developers</h2>
<h3>HTML</h3>
<ul> <li>The {{ domxref("HTMLHeadElement") }} <code>profile</code> property has been removed, this property has been deprecated since {{ gecko("2.0") }}. (see {{ bug("664544") }})</li> <li>The {{ domxref("HTMLImageElement") }} <code>x</code> and <code>y</code> properties have been removed. (see {{ bug("587021") }})</li> <li>The {{ domxref("HTMLSelectElement") }} <code>add()</code> method <code>before</code> parameter is now optional. (see {{ bug("182279") }})</li> <li>The {{ HTMLElement("body") }} element's {{ htmlattrxref("background", "body") }} attribute is no longer resolved as a URI; this is in compliance with the current HTML specification.</li>
</ul>
<h4>Canvas changes</h4>
<ul> <li>Specifying invalid values when calling <code>setTransform()</code>, <code>bezierCurveTo()</code>, or <code>arcTo()</code> no longer throws an exception; these calls are now correctly silently ignored.</li> <li>The <a href="/en/DOM/CanvasRenderingContext2D#isPointInPath()" title="en/DOM/CanvasRenderingContext2D#isPointInPath()"><code>isPointInPath()</code></a> method now correctly considers the transformation matrix when comparing the specified point to the current path.</li> <li>Calling <code>strokeRect()</code> with a zero width and height now correctly does nothing. (see {{ bug("663190") }})</li> <li>Calling <a href="/en/DOM/CanvasRenderingContext2D#drawImage()" title="en/DOM/CanvasRenderingContext2D#drawImage()"><code>drawImage()</code></a> with a zero width or height {{ HTMLElement("canvas") }} now throws <code>INVALID_STATE_ERR</code>. (see {{ bug("663194") }})</li> <li>Calling <a href="/en/DOM/CanvasRenderingContext2D#drawImage()" title="en/DOM/CanvasRenderingContext2D#drawImage()"><code>drawImage()</code></a> with non-finite coordinates no longer throws an exception.</li> <li><span id="summary_alias_container"><span id="short_desc_nonedit_display"><code>toDataURL()</code> method now accepts</span></span> a second argument to control JPEG quality (see {{ bug("564388") }})</li> <li>Support for the non-standard <code>globalCompositeOperation</code> operations <code>clear</code> and <code>over</code> has been removed (see {{ bug("629870") }}).</li>
</ul><h3>CSS</h3>
<ul> <li>{{ cssxref("text-overflow") }} is now supported.</li> <li>The {{ cssxref("orient", "-moz-orient") }} property has been fixed so that {{ HTMLElement("progress") }} elements that are vertically oriented have appropriate default dimensions.</li>
</ul>
<h3>MathML</h3>
<ul> <li>XLink href has been restored and the MathML3 <code>href</code> attribute is now supported. Developers are encouraged to move to the latter syntax.</li> <li>Support for the <code>voffset</code> attribute on {{ MathMLElement("mpadded") }} elements has been added and behavior of <code>lspace</code> attribute has been fixed.</li> <li>The top-level {{ MathMLElement("math") }} element now accepts any attributes of the {{ MathMLElement("mstyle") }} element.</li> <li>Support for <a class=" external" href="http://www.ctan.org/tex-archive/fonts/Asana-Math/" title="http://www.ctan.org/tex-archive/fonts/Asana-Math/">Asana Math</a> fonts has been added.</li> <li>The <code>medium</code> line thickness of fraction bars in {{ MathMLElement("mfrac") }} elements has been corrected to match the default thickness.</li> <li><a href="/en/MathML/Attributes/Values#Constants_(namedspaces)" title="en/MathML/Attributes/Values#Constants_(namedspaces)">Names for negative spaces</a> are now supported.</li>
</ul>
<h3>DOM</h3>
<ul> <li>The {{ domxref("File") }} interface's non-standard methods <code>getAsBinary()</code>, <code>getAsDataURL()</code>, and <code>getAsText()</code> have been removed as well as the non-standard properties <code>fileName</code> and <code>fileSize</code>.</li> <li>The {{ domxref("element.dir") }} attribute now always returns its result as all lower-case, as required by the HTML specification.</li> <li>The {{ domxref("FileReader") }} <code>readAsArrayBuffer()</code> method is now implemented. (see {{ bug("632255") }})</li> <li>{{ domxref("document.createEntityReference") }} has been removed. It was never properly implemented and is not implemented in most other browsers. (see {{ bug("611983") }})</li> <li><code>document.normalizeDocument</code> has been removed. Use {{ domxref("Node.normalize") }} instead. (see {{ bug("641190") }})</li> <li>{{ domxref("DOMTokenList.item") }} now returns <code>undefined</code> if the <code>index</code> is out of bounds, previously it returned <code>null</code>. (see {{ bug("529328") }})</li> <li><code>Node.getFeature</code> has been removed (see {{ bug("659053") }}).</li> <li>The HTMLInsElement and HTMLDelElement interfaces have been removed, since the {{ HTMLElement("ins") }} and {{ HTMLElement("del") }} elements actually use the {{ domxref("HTMLModElement") }} interface.</li>
</ul><h3>JavaScript</h3>
<ul> <li>The <code><a href="/en/JavaScript/Reference/Global_Objects/Function/arity" title="en/JavaScript/Reference/Global Objects/Function/arity">Function.arity</a></code> property has been removed; use <code><a href="/en/JavaScript/Reference/Global_Objects/Function/length" title="en/JavaScript/Reference/Global Objects/Function/length">Function.length</a></code> instead.</li>
</ul><h3>WebSockets</h3>
<ul> <li>The <code>network.websocket.max-connections</code> preference is used to determine the maximum number of WebSocket connections that can be open at a time. The default value is 200.</li> <li>The underlying WebSocket protocol version IETF-08 is used now instead of the IETF-07 protocol used by Firefox 6.</li> <li><code>WebSockets</code> are now available on Firefox Mobile. (see {{ bug("537787") }})</li>
</ul><h3>console API</h3>
<ul> <li>Implement <code>console.<a class=" external" href="http://getfirebug.com/wiki/index.php/Console_API#console.dir.28object.29">dir()</a></code>, <code>console.<a class=" external" href="http://getfirebug.com/wiki/index.php/Console_API#console.time.28name.29">time()</a></code>, <code>console.<a class=" external" href="http://getfirebug.com/wiki/index.php/Console_API#console.timeEnd.28name.29">timeEnd()</a></code>, <code>console.<a class=" external" href="http://getfirebug.com/wiki/index.php/Console_API#console.group.28object.5B.2C_object.2C_....5D.29">group()</a></code> and <code>console.<a class=" external" href="http://getfirebug.com/wiki/index.php/Console_API#console.groupEnd.28.29">groupEnd()</a></code> methods.</li> <li>Message logged with console.log before the <a class=" link-https" href="https://wiki.mozilla.org/DevTools/Features/WebConsole7" title="https://wiki.mozilla.org/DevTools/Features/WebConsole7">WebConsole</a> is opened are now stored and displayed once the <a class=" link-https" href="https://wiki.mozilla.org/DevTools/Features/WebConsole7" title="https://wiki.mozilla.org/DevTools/Features/WebConsole7">WebConsole</a> is opened.</li>
</ul>
<div class="changelog">
<h3>Web timing</h3>
<ul> <li>Initial implementation of the <a class=" external" href="http://hacks.mozilla.org/2011/07/aurora7/dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html">Navigation Timing</a> specification (see {{ bug("570341") }}).</li>
</ul></div>
<h2>Changes for Mozilla and add-on developers</h2>
<div class="note"><strong>Note:</strong> Firefox 7 requires that binary components be recompiled, as do all major releases of Firefox. See <a href="/En/Developer_Guide/Interface_Compatibility#Binary_Interfaces" title="En/Developer Guide/Interface Compatibility#Binary Interfaces">Binary Interfaces</a> for details.</div>
<h3>JavaScript code modules</h3>
<h4>FileUtils.jsm</h4>
<ul> <li>New method <code>openFileOutputStream()</code> opens a file output stream, the non-safe variant, for writing. (see {{ bug("662253") }})</li>
</ul>
<h3>User experience changes</h3>
<ul> <li>Extension options can now be <a href="/en/Extensions/Inline_Options" title="en/Extensions/Inline Options">displayed inside the Add-on Manager</a> for both restartless and traditional extensions.</li> <li>The destination of downloads is now remembered on a site-by-site basis. This data can be accessed using <a href="/en/JavaScript_code_modules/DownloadLastDir.jsm" title="https://developer.mozilla.org/en/JavaScript/Code_modules/DownloadLastDir.jsm">DownloadLastDir.jsm</a>.</li>
</ul>
<h3>Changes to the build system</h3>
<ul> <li>The ActiveX embedding API is no longer built and support has been removed from the build system. Supporting interfaces have also been removed; see {{ anch("Removed interfaces") }}.</li>
</ul><h3>Interface changes</h3>
<ul> <li>{{ interface("inIDOMUtils") }} has two new methods, {{ ifmethod("inIDOMUtils","getChildrenForNode") }} which returns a list of child nodes of a node and {{ ifmethod("inIDOMUtils","getUsedFontFaces") }} which returns a list of font faces used in a range. (see {{ bug("467669") }})</li> <li>The <code>nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH</code> interface has been merged into the {{ interface("nsIMarkupDocumentViewer") }} interface.</li> <li>The <code>nsIDOMWindow2</code> interface has been merged into the {{ interface("nsIDOMWindow") }} interface. (see {{ bug("664543") }})</li> <li>The <code>nsIDOMWindow_2_0_BRANCH</code> interface has been merged into the {{ interface("nsIDOMWindowInternal") }} interface. (see {{ bug("664543") }})</li> <li>{{ interface("nsINavHistoryObserver") }} methods with URI parameters now require a GUID as well.</li> <li>The <code>nsISHistory_2_0_BRANCH</code> interface has been merged into the {{ interface("nsISHistory") }} interface. (see {{ bug("664979") }})</li> <li>{{ interface("nsITelemetry") }} has a new method, {{ ifmethod("nsITelemetry","getHistogramById") }} which returns a histogram by its ID, and a new attribute, <code>canRecord</code> which when set to <code>false</code> disables recording of telemetry statistics. Telemetry statistics are no longer recorded when in Private Browsing Mode. (see {{ bug("661574") }} and {{ bug("661573") }})<br> Telemetry histograms defined with {{ ifmethod("nsITelemetry","newHistogram") }} will not be reported in the telemetry ping. (see {{ bug("668312") }})</li> <li>The {{ interface("nsIMemoryReporter") }} interface has been substantially changed; if you use it, you will need to make some adjustments to your code.</li> <li>{{ interface("nsIXMLHttpRequest") }}, headers set by {{ ifmethod("nsIXMLHttpRequest","setRequestHeader") }} are sent with the request when following a redirect. Previously these headers would not be sent.</li>
</ul>
<h4>New interfaces</h4>
<dl> <dt>{{ interface("nsIDOMFontFace") }}</dt> <dd>(see {{ bug("467669") }})</dd> <dt>{{ interface("nsIDOMFontFaceList") }}</dt> <dd>(see {{ bug("467669") }})</dd>
</dl>
<h4>Removed interfaces</h4>
<p>The following interfaces were implementation details that are no longer needed:</p>
<ul> <li><code>nsIDOM3Attr</code> (see {{ bug("666968") }})</li> <li><code>nsIDOM3Node</code> (see {{ bug("659053") }})</li> <li><code>nsIDOM3TypeInfo</code> (see {{ bug("660539") }})</li> <li><code>nsIDOM3Text</code> (see {{ bug("641333") }})</li> <li><code>nsIDOMDocumentStyle</code> (see {{ bug("658904") }})</li> <li><code>nsIDOMNSDocument</code> (see {{ bug("658906") }})</li> <li><code>nsIDOMNSFeatureFactory</code> (see {{ bug("659053") }})</li> <li>{{ interface("nsIDOMNSHTMLDocument") }} (see {{ bug("659113") }})</li> <li><code>nsIDOMNSHTMLFormElement</code> (see {{ bug("660433") }})</li> <li><code>nsIDOMNSHTMLHRElement</code> (see {{ bug("659990") }})</li> <li><code>nsIDOMNSHTMLTextAreaElement</code> (see {{ bug("660433") }})</li>
</ul>
<p>The following interfaces were removed as part of the removal of the ActiveX embedding API:</p>
<ul> <li><code>DITestScriptHelper</code> (see {{ bug("662023") }})</li> <li><code>DWebBrowserEvents</code> (see {{ bug("662023") }})</li> <li><code>DWebBrowserEvents2</code> (see {{ bug("662023") }})</li> <li>{{ interface("IDispatch") }} (see {{ bug("662000") }})</li> <li><code>IMozControlBridge</code> (see {{ bug("662023") }})</li> <li><code>IMozPluginHostCtrl</code> (see {{ bug("662023") }})</li> <li><code>IWebBrowser</code> (see {{ bug("662023") }})</li> <li><code>IWebBrowser2</code> (see {{ bug("662023") }})</li> <li><code>IWebBrowserApp</code> (see {{ bug("662023") }})</li> <li><code>IXMLDocument</code> (see {{ bug("662023") }})</li> <li><code>IXMLElement</code> (see {{ bug("662023") }})</li> <li><code>IXMLElementCollection</code> (see {{ bug("662023") }})</li> <li><code>IXMLError</code> (see {{ bug("662023") }})</li> <li><code>nsIActiveXSecurityPolicy</code> (see {{ bug("662000") }})</li> <li>{{ interface("nsIDispatchSupport") }} (see {{ bug("662000") }})</li> <li><code>nsIMozAxPlugin</code> (see {{ bug("662023") }})</li> <li><code>nsIScriptEventHandler</code> (see {{ bug("383383") }})</li> <li><code>nsIScriptEventManager</code> (see {{ bug("383383") }})</li>
</ul><h2>See also</h2>
<ul> <li><a href="/en/Firefox_6_for_developers" title="en/Firefox 6 for developers">Firefox 6 for developers</a></li> <li><a href="/en/Firefox_5_for_developers" title="en/Firefox 5 for developers">Firefox 5 for developers </a></li> <li><a href="/en/Firefox_4_for_developers" title="en/Firefox 4 for developers">Firefox 4 for developers </a></li> <li><a href="/en/Firefox_3.6_for_developers" title="en/Firefox 3.6 for developers">Firefox 3.6 for developers </a></li> <li><a href="/En/Firefox_3.5_for_developers" title="en/Firefox 3.5 for developers">Firefox 3.5 for developers</a></li> <li><a href="/en/Firefox_3_for_developers" title="en/Firefox 3 for developers">Firefox 3 for developers</a></li> <li><a href="/en/Firefox_2_for_developers" title="en/Firefox 2 for developers">Firefox 2 for developers</a></li> <li><a href="/en/Firefox_1.5_for_developers" title="en/Firefox 1.5 for developers">Firefox 1.5 for developers</a></li>
</ul>
Revert to this revision