Firefox 7 for developers

  • Revision slug: Firefox_7_for_developers
  • Revision title: Firefox 7 for developers
  • Revision id: 44355
  • Created:
  • Creator: trevorh
  • Is current revision? No
  • Comment bug 662000; 56 words added

Revision Content

{{ draft() }}

Firefox 7, based on Gecko 7.0, will ship in the third quarter of 2011. This article provides links to information about the changes that affect developers in this release. Nightly builds of what will become Firefox 7 are currently available on the Nightly channel (that is, mozilla-central).

Note: Items listed here are tentatively slated for Firefox 7; however, they may be held for a future release if testing shows they're not ready by the time Firefox 7 is due to ship. Please keep an eye on this page to stay up to date on the plans for Firefox 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") }})

Canvas improvements

  • Specifying invalid values when calling setTransform(), bezierCurveTo(), or arcTo() no longer throws an exception; these calls are now correctly silently ignored.
  • 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") }})
  • toDataURL() method now accepts a second argument to control JPEG quality (see {{ bug("564388") }})

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

  • The top-level {{ MathMLElement("math") }} element now accepts any attributes of the {{ MathMLElement("mstyle") }} element.

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.
  • {{ 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") }})

JavaScript

  • The Function.arity() function has been removed; use Function.length instead.
  • The JSON parser has been re-written for improved speed and compliance. This includes a fix for {{ bug("572279") }}.

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

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.
  • {{ interface("nsINavHistoryObserver") }} methods with URI parameters now require a GUID as well.

New interfaces

{{ interface("nsIDOMFontFace") }}
{{ interface("nsIDOMFontFaceList") }}

Removed interfaces

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

  • 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:

  • {{ interface("IDispatch") }} (see {{ bug("662000") }})
  • {{ interface("nsIDispatchSupport") }} (see {{ bug("662000") }})
  • nsIActiveXSecurityPolicy (see {{ bug("662000") }})

See also

Revision Source

<p>{{ draft() }}</p>
<p>Firefox 7, based on Gecko 7.0, will ship in the third quarter of 2011. This article provides links to information about the changes that affect developers in this release. Nightly builds of what will become Firefox 7 are <a class=" link-ftp" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/" title="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/">currently available</a> on the Nightly channel (that is, <a href="/En/Developer_Guide/Source_Code/Mercurial#mozilla-central_(main_development_tree)" title="en/Mozilla Source Code (Mercurial)#mozilla-central (main development tree)">mozilla-central</a>).</p>
<div class="note"><strong>Note:</strong> Items listed here are tentatively slated for Firefox 7; however, they may be held for a future release if testing shows they're not ready by the time Firefox 7 is due to ship. Please keep an eye on this page to stay up to date on the plans for Firefox 7.</div>
<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>
</ul>
<h4>Canvas improvements</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>Calling <code>strokeRect</code> with a zero width and height now correctly does nothing. (see {{ bug("663190") }})</li> <li>Calling <code>drawImage</code> with a zero width or height {{ HTMLElement("canvas") }} now throws <code>INVALID_STATE_ERR</code>. (see {{ bug("663194") }})</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>
</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>The top-level {{ MathMLElement("math") }} element now accepts any attributes of the {{ MathMLElement("mstyle") }} element.</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>{{ 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>
</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> function 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> <li>The JSON parser has been re-written for improved speed and compliance. This includes a fix for {{ bug("572279") }}.</li>
</ul><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>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>{{ interface("nsINavHistoryObserver") }} methods with URI parameters now require a GUID as well.</li>
</ul>
<h4>New interfaces</h4>
<dl> <dt>{{ interface("nsIDOMFontFace") }}</dt> <dd> </dd><dt>{{ interface("nsIDOMFontFaceList") }}</dt> <dd>
</dd></dl>
<h4>Removed interfaces</h4>
<p>The following interfaces were implementation details that are no longer needed:</p>
<ul> <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>{{ interface("IDispatch") }} (see {{ bug("662000") }})</li> <li>{{ interface("nsIDispatchSupport") }} (see {{ bug("662000") }})</li> <li><code>nsIActiveXSecurityPolicy</code> (see {{ bug("662000") }})</li>
</ul><h3>See also</h3>
<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 class="internal" href="/En/Firefox_3.5_for_developers" title="En/Firefox 3.5 for developers">Firefox 3.5 for developers</a></li> <li><a class="internal" href="/en/Firefox_3_for_developers" title="en/Firefox 3 for developers">Firefox 3 for developers</a></li> <li><a class="internal" href="/en/Firefox_2_for_developers" title="en/Firefox 2 for developers">Firefox 2 for developers</a></li> <li><a class="internal" 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