Firefox 15 for developers

  • Revision slug: Firefox_15_for_developers
  • Revision title: Firefox 15 for developers
  • Revision id: 319995
  • Created:
  • Creator: Sol_Shkr
  • Is current revision? No
  • Comment

Revision Content

{{ draft() }}

Firefox 15 shipped on August 28, 2012. This article lists key changes that are useful for not only Web developers to know about, but also Firefox and Gecko developers as well as add-on developers.

Want to help document Firefox 15? See the list of bugs that need to be written about and pitch in!

Changes for Web developers

HTML

  • The size attribute of the {{ HTMLElement("font") }} element is now handled according to the HTML5 specification. It means that all integer values greater than 10 or less than -10 are now considered equivalent to 10 and -10, respectively.
  • Support for font-weight and point-size attributes on the <font> element has been removed; these were non-standard and Gecko was the only engine that supported them.
  • The Opus codec is now supported for audio in Ogg containers for the HTML {{ HTMLElement("audio") }} and {{ HTMLElement("video") }} elements.
  • The {{ HTMLElement("source") }} element now supports the media attribute.
  • The {{ HTMLElement("audio") }} and {{ HTMLElement("video") }} elements now support the played attribute, which provides a {{ domxref("TimeRanges") }} object listing the time ranges of the media that have been played back so far.

CSS

  • The {{ cssxref("font-feature-settings") }} property has been updated to the latest syntax: font-feature-settings: "lnum" 1;
  • The CSS {{ cssxref("text-transform") }} property has been extended to correctly handle Unicode ligature characters (like ).
  • The CSS {{ cssxref("word-break") }} property has been implemented.
  • The {{ cssxref("border-image") }} property has been updated to match the latest Specification and properties have been unprefixed. (bug 713643)
  • The skew() {{ cssxref("transform") }} function dropped in Firefox 14 has been restored due to existing site compatibility. Authors are however, advised to use skewX() and skewY() functions instead.

DOM

  • The DOM Events Level 3 methods KeyboardEvent.getModifierState() and MouseEvent.getModifierState(), which let you query the state of modifier keys, like Ctrl or Shift, have been implemented (bugs 630811 and 731878). But the behavior conforms to the latest D3E draft. So, some modifier key names are different from IE ({{ bug("769190") }}).
  • On mouse events, support for querying the state of the mouse buttons using the MouseEvent.buttons attribute, has been implemented.
  • On keyboard events, support for querying the key location (standard, left or right of modifier key, in the Numpad) using the KeyboardEvent.location attribute, has been implemented ({{ bug("166240") }}).
  • KeyboardEvent.keycode result has been computed from better rules which were almost same on Windows/Linux/Mac. And now they are available on some keyboard layouts which are not ASCII capable layouts on Linux and Mac, such as Arabic, Cyrillic, Thai and so on. See the document for virtual key codes.
  • The range.detach() method has been transformed in a no-op and will probably be removed in the future.
  • The method HTMLVideoElement.mozHasAudio() has been implemented. It indicates if there is an audio track associated to a given video element. (bug 480376)
  • The Performance API has a new method, now(), supporting high resolution timers of type DOMHighResTimeStamp. (bug 539095).
  • The WebSMS API has been updated and now supports a read attribute indicating whether an SMS text message is read or unread.
  • The FileHandle API has been implemented.
  • The Blob constructor now takes ArrayBufferView as a member of blobParts parameter in addition to ArrayBuffer. (bug 752402)
  • The {{domxref("DeviceLightEvent")}} specified in the Ambient Light Events Working Draft has been implemented.
  • The {{domxref("DeviceProximityEvent")}} and {{domxref("UserProximityEvent")}} Proximity Events have been implemented.

JavaScript

  • Support for the DataView interface from the Typed Arrays specification has been added. This provides low-level access to the data contained in an ArrayBuffer.
  • Support for ECMAScript Harmony Number.isNaN(), Number.toInteger(), Number.isInteger(), Number.isFinite() has been added. (bug 749818, bug 761495, bug 761480)
  • Support for ECMAScript Harmony default parameters has been added. (bug 757676)
  • Support for ECMAScript Harmony rest parameters has been added. (bug 574132)

WebGL

  • Support for the WEBGL_compressed_texture_s3tc extension has been added. Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures.

MathML

  • Mathematical operators can now use downloadable fonts specified with {{ cssxref("@font-face") }}. This makes the MathML-fonts add-on work with stretchy operators too.
  • The selection attribute of the {{ MathMLElement("maction") }} is now only taken into account with the toggle actiontype.
  • Deprecated namedspace binding has been removed ({{ bug("673759") }}).
  • Supported syntax for Length and {{ MathMLElement("mpadded") }} values have been made closer to the one specified in MathML3 spec.
  • New MathML mirrorable operators for Arabic math have been added to the operator dictionary ({{bug("757125")}}).

Network

  • Support for the SPDY v3 protocol has landed. It is disabled by default and can be enabled by setting the preference network.http.spdy.enabled.v3 to true. (bug 737470)

Changes for add-on and Mozilla developers

Interface changes

{{ interface("nsIDOMWindowUtils") }}
aModifiers of sendMouseEvent(), sendTouchEvent(), sendMouseEventToWindow(), sendMouseScrollEvent() and sendKeyEvent() supports all modifier keys which are supported by KeyboardEvent.getModifierState(). Use MODIFIER_* values. And now the 5th parameter of sendKeyEvent() is changed from boolean to unsigned long. For backward compatibility, if caller passes true or false to it, the behavior isn't changed. This change allows callers to specify the key's location.
{{ interface("nsIBrowserHistory") }}
The hidePage() method was never implemented, and has been removed entirely in this release. The addPageWithDetails() method has also been removed as part of the ongoing work to make all Places APIs asynchronous; use {{ ifmethod("mozIAsyncHistory", "updatePlaces") }} instead. Also, the count attribute was removed; it had not returned an actual count in some time (instead, it was simply indicating whether or not any entries existed). You can use {{ ifattribute("nsINavHistoryService", "hasHistoryEntries") }} instead.
{{interface("inIDOMUtils")}}
The parseStyleSheet() method has been added and allows the (re-)parsing of Cascading Style Sheets.

New interfaces

{{ interface("nsISpeculativeConnect") }}
Provides a way to hint to the networking layer that you are likely to ask to open a connection to a given URI sometime in the near future. This lets the network layer begin the sometimes high-latency process of opening a new network connection ahead of time.

Removed interfaces

The following interfaces have been removed.

  • {{ interface("nsIGlobalHistory") }}

See also

 

Revision Source

<div>
  {{ draft() }}</div>
<div>
  <p>Firefox 15 shipped on August 28, 2012. This article lists key changes that are useful for not only Web developers to know about, but also Firefox and Gecko developers as well as add-on developers.</p>
  <p>Want to help document Firefox 15? See the <a class="external" href="http://beta.elchi3.de/doctracker/#list=fx&amp;version=15.0" title="http://beta.elchi3.de/doctracker/#list=fx&amp;version=15.0">list of bugs that need to be written about</a> and pitch in!</p>
  <h2 id="Changes_for_Web_developers">Changes for Web developers</h2>
  <h3 id="HTML">HTML</h3>
  <ul>
    <li>The <code>size</code> attribute of the {{ HTMLElement("font") }} element is now handled according to the HTML5 specification. It means that all integer values greater than 10 or less than -10 are now considered equivalent to 10 and -10, respectively.</li>
    <li>Support for <code>font-weight</code> and <code>point-size</code> attributes on the <code>&lt;font&gt;</code> element has been removed; these were non-standard and Gecko was the only engine that supported them.</li>
    <li>The <a class="external" href="http://www.opus-codec.org/" title="http://www.opus-codec.org/">Opus codec</a> is now supported for audio in Ogg containers for the HTML {{ HTMLElement("audio") }} and {{ HTMLElement("video") }} elements.</li>
    <li>The {{ HTMLElement("source") }} element now supports the <code>media</code> attribute.</li>
    <li>The {{ HTMLElement("audio") }} and {{ HTMLElement("video") }} elements now support the played attribute, which provides a {{ domxref("TimeRanges") }} object listing the time ranges of the media that have been played back so far.</li>
  </ul>
  <h3 id="CSS">CSS</h3>
  <ul>
    <li>The {{ cssxref("font-feature-settings") }} property has been updated to the latest syntax: <code>font-feature-settings: "lnum" 1;</code></li>
    <li>The CSS {{ cssxref("text-transform") }} property has been extended to correctly handle Unicode ligature characters (like <code>fi</code>).</li>
    <li>The CSS {{ cssxref("word-break") }} property has been implemented.</li>
    <li>The {{ cssxref("border-image") }} property has been updated to match the latest Specification and properties have been unprefixed. (<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=713643">bug 713643</a>)</li>
    <li>The <code>skew()</code> {{ cssxref("transform") }} function dropped in Firefox 14 has been restored due to existing site compatibility. Authors are however, advised to use <code>skewX()</code> and <code>skewY(</code>) functions instead.</li>
  </ul>
  <h3 id="DOM">DOM</h3>
  <ul>
    <li>The DOM Events Level 3 methods <a href="/en-US/docs/DOM/KeyboardEvent#getModifierState%28%29" title="https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent#getModifierState%28%29"><code>KeyboardEvent.getModifierState()</code></a> and <a href="/en-US/docs/DOM/MouseEvent#getModifierState%28%29" title="https://developer.mozilla.org/en-US/docs/DOM/MouseEvent#getModifierState%28%29"><code>MouseEvent.getModifierState()</code></a>, which let you query the state of modifier keys, like <code>Ctrl</code> or <code>Shift</code>, have been implemented (bugs <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=630811" title="https://bugzilla.mozilla.org/show_bug.cgi?id=630811">630811</a> and <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=731878" title="https://bugzilla.mozilla.org/show_bug.cgi?id=731878">731878</a>). But the behavior conforms to the latest D3E draft. So, some modifier key names are different from IE ({{ bug("769190") }}).</li>
    <li>On mouse events, support for querying the state of the mouse buttons using the <a href="/en-US/docs/DOM/MouseEvent" title="DOM/MouseEvent"><code>MouseEvent.buttons</code></a> attribute, has been implemented.</li>
    <li>On keyboard events, support for querying the key location (standard, left or right of modifier key, in the Numpad) using the <a href="/en-US/docs/DOM/KeyboardEvent#Attributes_location" title="https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent#Attributes_location">KeyboardEvent.location</a> attribute, has been implemented ({{ bug("166240") }}).</li>
    <li>KeyboardEvent.keycode result has been computed from better rules which were almost same on Windows/Linux/Mac. And now they are available on some keyboard layouts which are not ASCII capable layouts on Linux and Mac, such as Arabic, Cyrillic, Thai and so on. See <a href="/en-US/docs/DOM/KeyboardEvent#Virtual_key_codes" title="DOM/KeyboardEvent#Virtual_key_codes">the document for virtual key codes</a>.</li>
    <li>The <a href="/en-US/docs/DOM/range.detach" title="https://developer.mozilla.org/en-US/docs/DOM/range.detach"><code>range.detach()</code></a> method has been transformed in a no-op and will probably be removed in the future.</li>
    <li>The method <code>HTMLVideoElement.mozHasAudio()</code> has been implemented. It indicates if there is an audio track associated to a given video element. (<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=480376" title="https://bugzilla.mozilla.org/show_bug.cgi?id=480376">bug </a><a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=480376" title="https://bugzilla.mozilla.org/show_bug.cgi?id=480376">480376</a>)</li>
    <li>The <code>Performance</code> API has a new method, <code>now()</code>, supporting high resolution timers of type<code> DOMHighResTimeStamp</code>. (<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=539095" title="https://bugzilla.mozilla.org/show_bug.cgi?id=539095">bug 539095</a>).</li>
    <li>The <a href="/en-US/docs/API/WebSMS" title="API/WebSMS">WebSMS API</a> has been updated and now supports a <code>read </code>attribute indicating whether an SMS text message is read or unread.</li>
    <li>The <a class="link-https" href="https://wiki.mozilla.org/WebAPI/FileHandleAPI" title="https://wiki.mozilla.org/WebAPI/FileHandleAPI">FileHandle API</a> has been implemented.</li>
    <li>The <a href="/en-US/docs/DOM/Blob" title="DOM/Blob"><code>Blob</code></a> constructor now takes <code>ArrayBufferView</code> as a member of <code><var>blobParts</var></code> parameter in addition to <code>ArrayBuffer</code>. (<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=752402">bug 752402</a>)</li>
    <li>The {{domxref("DeviceLightEvent")}} specified in the <a href="http://www.w3.org/TR/ambient-light/" title="http://www.w3.org/TR/ambient-light/">Ambient Light Events Working Draft</a> has been implemented.</li>
    <li>The {{domxref("DeviceProximityEvent")}} and {{domxref("UserProximityEvent")}} <a href="http://www.w3.org/TR/proximity/" title="http://www.w3.org/TR/proximity/">Proximity Events</a> have been implemented.</li>
  </ul>
  <h3 id="JavaScript">JavaScript</h3>
  <ul>
    <li>Support for the <a href="/en-US/docs/JavaScript_typed_arrays/DataView" title="JavaScript_typed_arrays/DataView"><code>DataView</code></a> interface from the Typed Arrays specification has been added. This provides low-level access to the data contained in an <a href="/en-US/docs/JavaScript_typed_arrays/ArrayBuffer" title="JavaScript_typed_arrays/ArrayBuffer"><code>ArrayBuffer</code></a>.</li>
    <li>Support for ECMAScript Harmony <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Number/isNaN" title="/en-US/docs/JavaScript/Reference/Global_Objects/isNaN"><code>Number.isNaN()</code></a>, <code>Number.toInteger()</code>, <code>Number.isInteger()</code>, <code>Number.isFinite()</code> has been added. (<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=749818" title="https://bugzilla.mozilla.org/show_bug.cgi?id=749818">bug 749818</a>, <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=749818" title="https://bugzilla.mozilla.org/show_bug.cgi?id=761495">bug 761495</a>, <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=749818" title="https://bugzilla.mozilla.org/show_bug.cgi?id=761480">bug 761480</a>)</li>
    <li>Support for ECMAScript Harmony default parameters has been added. (<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=757676" title="https://bugzilla.mozilla.org/show_bug.cgi?id=757676">bug 757676</a>)</li>
    <li>Support for ECMAScript Harmony rest parameters has been added. (<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=574132" title="https://bugzilla.mozilla.org/show_bug.cgi?id=574132">bug 574132</a>)</li>
  </ul>
  <h3 id="WebGL">WebGL</h3>
  <ul>
    <li>Support for the <a href="/en-US/docs/WebGL/Using_Extensions#WEBGL_compressed_texture_s3tc" title="WebGL/Using_Extensions#WEBGL_compressed_texture_s3tc"><code>WEBGL_compressed_texture_s3tc</code></a> extension has been added. Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures.</li>
  </ul>
  <h3 id="MathML">MathML</h3>
  <ul>
    <li>Mathematical operators can now use downloadable fonts specified with {{ cssxref("@font-face") }}. This makes the <a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/" title="https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/">MathML-fonts add-on</a> work with stretchy operators too.</li>
    <li>The <code>selection</code> attribute of the {{ MathMLElement("maction") }} is now only taken into account with the <code>toggle</code> actiontype.</li>
    <li><a class="external" href="http://www.w3.org/TR/MathML3/chapter3.html#id.3.3.4.2.1" title="http://www.w3.org/TR/MathML3/chapter3.html#id.3.3.4.2.1"><span id="summary_alias_container"><span id="short_desc_nonedit_display">Deprecated namedspace binding</span></span></a> has been removed ({{ bug("673759") }}).</li>
    <li>Supported syntax for <a href="/en-US/docs/MathML/Attributes/Values" title="Values">Length</a> and {{ MathMLElement("mpadded") }} values have been made closer to the one specified in MathML3 spec.</li>
    <li>New MathML mirrorable operators for Arabic math have been added to the operator dictionary ({{bug("757125")}}).</li>
  </ul>
  <h3 id="Network">Network</h3>
  <ul>
    <li>Support for the SPDY v3 protocol has landed. It is disabled by default and can be enabled by setting the preference <code>network.http.spdy.enabled.v3</code> to true. (<a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=737470">bug 737470</a>)</li>
  </ul>
  <h2 id="Changes_for_add-on_and_Mozilla_developers">Changes for add-on and Mozilla developers</h2>
  <h3 id="Interface_changes">Interface changes</h3>
  <dl>
    <dt>
      {{ interface("nsIDOMWindowUtils") }}</dt>
    <dd>
      <code>aModifiers</code> of <code>sendMouseEvent()</code>, <code>sendTouchEvent()</code>, <code>sendMouseEventToWindow()</code>, <code>sendMouseScrollEvent()</code> and <code>sendKeyEvent()</code> supports all modifier keys which are supported by <a href="/en-US/docs/DOM/KeyboardEvent#getModifierState%28%29" title="https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent#getModifierState%28%29"><code>KeyboardEvent.getModifierState()</code></a>. Use <code>MODIFIER_*</code> values. And now the 5th parameter of <code>sendKeyEvent()</code> is changed from <code>boolean</code> to <code>unsigned long</code>. For backward compatibility, if caller passes <code>true</code> or <code>false</code> to it, the behavior isn't changed. This change allows callers to specify the key's location.</dd>
    <dt>
      {{ interface("nsIBrowserHistory") }}</dt>
    <dd>
      The <code>hidePage()</code> method was never implemented, and has been removed entirely in this release. The <code>addPageWithDetails()</code> method has also been removed as part of the ongoing work to make all <a href="/en-US/docs/Places" title="Places">Places</a> APIs asynchronous; use {{ ifmethod("mozIAsyncHistory", "updatePlaces") }} instead. Also, the <code>count</code> attribute was removed; it had not returned an actual count in some time (instead, it was simply indicating whether or not any entries existed). You can use {{ ifattribute("nsINavHistoryService", "hasHistoryEntries") }} instead.</dd>
    <dt>
      {{interface("inIDOMUtils")}}</dt>
    <dd>
      The parseStyleSheet() method has been added and allows the (re-)parsing of Cascading Style Sheets.</dd>
  </dl>
  <h4 id="New_interfaces">New interfaces</h4>
  <dl>
    <dt>
      {{ interface("nsISpeculativeConnect") }}</dt>
    <dd>
      Provides a way to hint to the networking layer that you are likely to ask to open a connection to a given URI sometime in the near future. This lets the network layer begin the sometimes high-latency process of opening a new network connection ahead of time.</dd>
  </dl>
  <h4 id="Removed_interfaces">Removed interfaces</h4>
  <p>The following interfaces have been removed.</p>
  <ul>
    <li>{{ interface("nsIGlobalHistory") }}</li>
  </ul>
  <h2 id="See_also">See also</h2>
  <ul>
    <li><a href="/en-US/docs/Firefox_14_for_developers" title="Firefox_14_for_developers">Firefox 14 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_13_for_developers" title="Firefox_13_for_developers">Firefox 13 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_12_for_developers" title="Firefox_12_for_developers">Firefox 12 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_11_for_developers" title="Firefox 11 for developers">Firefox 11 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_10_for_developers" title="Firefox 10 for developers">Firefox 10 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_9_for_developers" title="Firefox 9 for developers">Firefox 9 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_8_for_developers" title="Firefox 8 for developers">Firefox 8 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_7_for_developers" title="Firefox 7 for developers">Firefox 7 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_6_for_developers" title="Firefox 6 for developers">Firefox 6 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_5_for_developers" title="Firefox 5 for developers">Firefox 5 for developers </a></li>
    <li><a href="/en-US/docs/Firefox_4_for_developers" title="Firefox 4 for developers">Firefox 4 for developers </a></li>
    <li><a href="/en-US/docs/Firefox_3.6_for_developers" title="Firefox 3.6 for developers">Firefox 3.6 for developers </a></li>
    <li><a href="/en-US/docs/Firefox_3.5_for_developers" title="Firefox 3.5 for developers">Firefox 3.5 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_3_for_developers" title="Firefox 3 for developers">Firefox 3 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_2_for_developers" title="Firefox 2 for developers">Firefox 2 for developers</a></li>
    <li><a href="/en-US/docs/Firefox_1.5_for_developers" title="Firefox 1.5 for developers">Firefox 1.5 for developers</a></li>
  </ul>
</div>
<p>&nbsp;</p>
Revert to this revision