Firefox 9 for developers

Firefox 9 は Windows 向けに 2011 年 12 月 20 日にリリースされました。その直後に見つかったクラッシュバグを修正した Mac 版および Linux 版のバージョン 9.0.1 は、2011 年 12 月 21 日にリリースされました。

Web 開発者向けの変更点一覧

HTML

  • <li> 要素の value 属性が負の値を取れるようになりました。これは HTML5 仕様に基づくもので、HTML5 以前は 0 に変換されていました。
  • <audio><video> 要素を用いるときのメディアの URI において、メディアの開始時間と終了時間を指定 できるようになりました。
  • <input> 要素と <textarea> 要素が、スペルチェッカーの実行において lang 属性の値を加味 (en-US)するようになりました。
  • Android 版 Firefox において、 type="file"accept="image/*" を指定している<input> 要素のときに、ユーザがブラウザからアプリを切り替えることなく電話のカメラを用いて写真を撮れるようになりました。
  • Windows Vista スタイル PNG ICO イメージがサポートされるようになりました。
  • CORS が許可されているときに、CORS アクセスを要求するために crossorigin 属性 を用いた画像を描いても、不正に Canvas を制限状態にしないようになりました。
  • rowspan 属性に指定できる値の最大値が 8190 から 65,534 になりました。

CSS

  • font-stretch プロパティがサポートされました。
  • columns プロパティが -moz (en-US) 接頭辞付きでサポートされました。このプロパティは column-widthcolumn-count をまとめて記述する短縮形プロパティです。
  • <link> 要素を用いて取り込まれたスタイルシートが完全にロードされてパースされたとき (しかしまだドキュメントに適用されていない状態)、load イベント (en-US) が発生するようになりました。また、スタイルシートの処理においてエラーが起きた場合、error イベントが発生します。
  • text-overflow 向けの 2 つの値を指定できる新しい構文を用いて、左端と右端の両方のオーバフロー設定を指定できるようになりました。

DOM

フルスクリーンモードの利用

新しい full-screen API は、ブラウザインターフェースを表示せずに、画面全体を用いてコンテンツを表示する方法を提供します。これはビデオおよびゲームにとって素晴らしいものです。この API は現在実験的かつプレフィックス付きです。

  • Node.contains() メソッドがサポートされました。このメソッドによって、あるノードが別のノードの子孫であるかを調べられます。
  • Node.parentElement 属性が実装されました。このメソッドは DOM ノードの親 Element 、または、親が要素ではない場合は null を返します。
  • DOM Level 3 Composition イベント がサポートされました。
  • Document.scripts 属性が実装されました。このメソッドはドキュメントのすべての <script> 要素の HTMLCollection を返します。
  • Document.queryCommandSupported() メソッドが実装されました。
  • 標準 IDL インターフェースとして Event ハンドラが実装されました。多くのケースで、これはコンテンツに影響を及ぼさないはずですが、例外が存在します。 (en-US)
  • 新しいレスポンスタイプ、 "moz-json" が XMLHttpRequest に追加されました。 そのタイプを用いると、 XMLHttpRequest に自動的に JSON 文字列をパースさせられます。つまり、このタイプをリクエストしたときはパースされた JSON 文字列が返るので、response プロパティの値がパース結果の JavaScript オブジェクトになります。
  • XMLHttpRequest の progress イベント が受け取ったデータの各チャンクに対して確実に送信されるようになりました。つまり、以前のバージョンでは受け取ったデータの最後のチャンクが progeress イベントを発生させない可能性がありました。データの最後のチャンクを受け取ったかを判定するために load イベントも監視する必要はもう無くなり、progress イベントだけで進捗を追えるようになります。
  • 過去に、null のリスナーを指定した addEventListener() の呼び出しは例外を投げていましたが、エラーを出すことなく、何の影響も及ぼさずに処理を戻すようになりました。
  • 新しい navigator.doNotTrack プロパティを用いることで、コンテンツ中で簡単にユーザが do-no-track 設定を有効にしているかを判定できます。この値が "yes" ならば、ユーザを追跡するべきではありません。
  • splitText()normalize() が呼び出されたとき、Range オブジェクトや Selection オブジェクトがとる挙動が仕様通りになりました。
  • doctype ノードに対しての Node.ownerDocument の値が、null ではなく、ノードを作成するために呼ばれた createDocumentType() (en-US) 上のドキュメントになるようになりました。
  • window.navigator.taintEnabled が削除されました。このプロパティは長年サポートされていませんでした。

Workers

  • Firefox 8 では、blob URL で実装された Workers が壊れていましたが、Firefox 9 から再び動作するようになりました。

MathML

  • <maction> (en-US) 要素の actiontype 属性における非推奨な値 restyle が削除されました。
  • まだ要素自体はサポートされていませんが、<mlabeledtr> 要素を用いても、描画を完全に壊さないようになりました。この要素の実際のサポートの進捗は バグ 689641 を参照してください。

Networking

  • You can now send the contents of JavaScript typed arrays (that is, the contents of an ArrayBuffer object) using XMLHttpRequest.
  • WebSocket connections now permit non-characters in otherwise valid UTF-8 data frames to be received, instead of failing.
  • The HTTP Accept header for XSLT requests has been changed to simply "*/*" for simplicity. Since fetching XSLT has always fallen back to "*/*" anyway, it made sense to simplify the initial request.
  • Attempts by a server to use the 301 Moved Permanently or 307 Temporary Redirect response codes to redirect the user to a javascript: URI now result in a "bad connection" error instead of actually redirecting. This prevents certain types of cross-site scripting attacks.
  • Content served with an empty Content-Disposition were previously treated as if the Content-Disposition were "attachment"; this didn't always work as expected. These are now handled as if the Content-Disposition were "inline".
  • The default maximum size of an item in the disk cache has been increased to 50 MB; previously, only items up to 5 MB were cached.

Developer tools

Mozilla 開発者とアドオン開発者向けの変更点

See Updating add-ons for Firefox 9 for an overview of the changes you may need to make to get your add-ons working in Firefox 9.

XUL

  • The tab element now has a pending attribute, whose value is true, when the tab is in the process of being restored by the session store service. This can be used for styling the tab in themes. The attribute isn't present on tabs that aren't pending.
  • The tab element now has an unread attribute, whose value is true, when the tab has changed since the last time it was the active tab or if it hasn't been selected since the current session began. The attribute isn't present on tabs that are not unread.
  • You can now use a panel as a drag image for DOM drag and drop operations. This lets you use the standard drag & drop API for drag and drop of XUL content.
  • The notificationbox element's appendNotification method now lets you specify a callback that gets called for interesting events related to the notification box. Currently, the only event is "removed", which tells you the box has been removed from its window.

JavaScript code module changes

  • FileUtils.jsm now has a File constructor that returns an nsIFile object representing a file specified by its pathname.

Service changes

Interface changes

Removed interfaces

  • nsIGlobalHistory3 has been removed during streamlining of the Places and DocShell code.

Miscellaneous interface changes

  • nsISound インタフェースに新しい定数 EVENT_EDITOR_MAX_LEN が導入され、テキスト欄に入力された文字数が制限を超えた場合にシステム効果音を鳴らせるようになりました。今のところ、これは Windows のみで使用されています。
  • nsIScriptError2 インタフェースに新しいプロパティ timeStampinnerWindowID が追加されました。また、initWithWindowID() メソッドが、外部ウィンドウ ID の代わりに内部ウィンドウ ID を受け取るようになりました。
  • nsIBidiKeyboard インタフェースに haveBidiKeyboards 属性が追加されました。これは、OS に少なくともひとつ各方向 (LTR もしくは RTL) のキーボードがインストールされているかどうかを判別できるものです。.
  • The new nsIEditor.isSelectionEditable attribute lets you determine if the current selection anchor is editable. This helps to support cases where only parts of the document are editable, by letting you see if the current selection is in an editable section.
  • The nsIBrowserHistory.registerOpenPage() and nsIBrowserHistory.unregisterOpenPage() methods have been removed as part of a performance overhaul in the Places system. You can use the corresponding methods in mozIPlacesAutoComplete instead.
  • The nsIDOMWindowUtils.wrapDOMFile() method has been added; this returns a DOM File object for a given nsIFile.
  • The nsIChromeFrameMessageManager.removeDelayedFrameScript() method was added to support removing delayed load scripts. Bootstrapped add-ons should use this, at shutdown, to remove any scripts it loaded using nsIChromeFrameMessageManager.loadFrameScript() with the delayed load flag set. This is exposed to add-ons as browser.messageManager.removeDelayedFrameScript().
  • The nsIAppStartup interface has a new interrupted attribute, which lets you know if the startup process was interrupted at any point by an interactive prompt. This can be helpful, for example, when timing startups during performance evaluation, to be able to drop numbers from sessions that were interrupted.
  • The nsIEditorSpellCheck interface has been revised to support per-site selection of spell checker dictionaries.

IDL パーサ

IDL パーサから、これまで完全に実装されたことのなかったユニークポインタの概念が削除されました。

Build system changes

  • The --enable-application=standalone option for building standalone XPConnect has been removed; it hasn't worked since 2007 anyway.
  • The build system now looks for .mozconfig at $topsrcdir/.mozconfig or $topsrcdir/mozconfig, and nowhere else, unless you override the .mozconfig path using the MOZCONFIG environment variable.
  • The xpidl utility has been replaced in the SDK with pyxpidl.

Other changes

  • The spell checker no longer has an arbitrary 130-character word-length limit on the length of words it will attempt to spell check. This limit was previously in place to prevent crashes that were occurring in the spell checker, but the underlying bugs have since been fixed.
  • You can now register components to add features to the window.navigator object by using the "JavaScript-navigator-property" category. See Adding APIs to the navigator object for details and examples.

参考