Firefox 12 for developers
Firefox 12 は 米国時間 2012 年 4 月 24 日にリリースされました。この記事は開発者に影響がある Firefox 12 での変更点をまとめています。
Web 開発者向けの変更点一覧
HTML
CSS
text-align-lastプロパティに対応しました。(接頭辞付き)
JavaScript
- シャープ変数 (Netscape 由来の非標準拡張仕様) への対応が打ち切られました。
DOM
- DOMParser (en-US) が HTML ドキュメントのソース解析に対応しました。
XMLHttpRequestでtimeoutプロパティとXMLHttpRequestEventTargetインタフェース 上のontimeoutイベントハンドラである "timeout" イベントを用いた、タイムアウトがサポートされました。XMLHttpRequestがdata:URI から読み込めるようになりました。XMLHttpRequestで巨大なデータをダウンロードしているとき、responseTypeに "moz-blob" を設定していると、 これまでに受信したデータのすべてを含むBlobであるレスポンスを参照できる progress イベントハンドラが定期的に呼び出されるようになりました。これによって、progress ハンドラでデータのすべてが到着するまで待つことなしにデータを処理し始められます。- Gecko が Android 上で マルチタッチ をサポートしました。今までは一度に一つのタッチ操作しか認識しかできませんでした。
- エディタ (フォーム) 上で IME を使った文字入力を行っている場合、従来は確定後に
inputイベントが発生していましたが、Firefox 12 では、IME で編集中の文字列が変更されたことを示すcompositionupdateイベントの直後にもinputイベントが発生するようになりました。これにより、inputイベントハンドラを使って、日本語入力中にも未確定文字列を含めたフォームの入力内容を取得することが可能となりました。 - DOM 4 仕様で定義されている
DOMErrorが実装されました。 Document.createNodeIterator()メソッドが DOM 4 仕様に適合するように更新されました。これにより、whatToShowおよびfilter引数がオプションになり、非標準の 4 番目の引数であるentityReferenceExpansionが削除されます。Blobインタフェースのslice()メソッドは符号付き 64 ビット整数の範囲外のstartの値とendの値を正しく受け取れないバグによる影響を受けていましたが、この問題は修正されました。`element.getBoundingClientRect()メソッドが要素の矩形の境界を算出するときに CSS transforms の効果を考慮するようになりました。
新しい WebAPI
- Network Information API:
window.navigator.connectionの実験的サポートが追加されました。(接頭辞付き) - WebTelephony API:
window.navigator.mozTelephonyが実装されました。デバイス上での電話の発信、応答、管理をするためのサポートを提供します。 - WebSMS API: モバイルデバイスで SMS テキストメッセージを送信できる
window.navigator.mozSmsが利用可能になりました。
SVG
SVGTestsDOM API に対応しました。(Firefox バグ 607854)SVGStringListDOM インタフェースが非標準のlengthプロパティに対応しました。(Firefox バグ 711958)
MathML
- MathML 式の方向性を制御する
dir属性に対応しました。<math>、<mrow> (en-US)、<mstyle> (en-US)の各要素と、MathML トークン要素 で使用できます。これは特に一部の アラビア語数学的表記 で必要とされるものです。 - MathML3 で定義された配置属性
alignに対応しました。<munder>、<mover>、<munderover> (en-US)の各要素で使用できます。
ネットワーク
- 以前は、WebSocket チャンネルが、予期せぬエラーのためにクローズしたとき、あるいは、仕様がカバーしていないエラー状況のためにクローズした場合、Gecko は
CLOSE_NORMALクローズコードを報告していましたが、代わりにCLOSE_GOING_AWAY コードを報告するようになりました。
開発者ツール
- Web Console がコンソールが開いていない状態の場合にエラーメッセージと
console.log()を用いて追加したログエントリをキャッシュし、コンソールが開いたときにそれらを表示するようになりました。 - 3D view で "r" キーを押すことにより、ズームレベル、移動、回転をリセットできるようになりました。
- 3D view でノードを選択した後に "x" キーを押すことにより、そのノードを隠すことができるようになりました。
- ソースエディタ (en-US) にいくつかの新しい編集機能とキーボードショートカットが追加されました。詳細は、ソースエディタの利用 (en-US) を参照してください。
Mozilla は人気のアドオン Firebug に依存するだけではなく、自身の Web 開発者ツールの統合作業を進めています。これらのツールについてのさらなる情報および Firefox での Web 開発を支援する外部リソースの一覧は、Web developer tools にあります。
その他の変更点
- GEOSTD8 文字セットは、これまでも完全にはサポートされていませんでしたが、まったくサポートされなくなりました。
Mozilla 開発者とアドオン開発者向けの変更点
JavaScript code modules
source-editor.jsm
- The
resetUndo()method was added; this lets you clear the undo stack. - The source editor now offers methods for providing search capability:
find(),findNext(), andfindPrevious().
XUL
chromemargin属性の値の定義が若干変更されました。これにより、デフォルトのウィンドウ枠幅が異なる各プラットフォームで、クロスプラットフォームな XUL コードの見た目を簡単に揃えられるようになりました。
XPCOM
nsISupportsプロキシ が削除されました。代わりに runnable を使ってください。
- Firefox 11 changed the behavior of
Components.utils.getWeakReference()to throw an exception when the object reference is null; the previous behavior of silently failing has been restored.
XPConnect
インタフェースの変更
nsIScreen_MOZILLA_2_0_BRANCHインタフェースがnsIScreenへ統合されました。このインタフェースで定義されていた API (画面の最低輝度の調節) はこれまで文書化されていませんでしたが、これを機に文書化されました。- The
nsIScriptError2interface has been merged intonsIScriptError. nsIDownloadManager.addDownloadis now handled asynchronously rather than synchronously.- The
imgIContainerObserver.frameChangedmethod now receives as its first parameter animgIRequestobject identifying the corresponding request. - The
nsIDOMWindowUtils.sendTouchEventmethod has been added to allow synthesizing touch events. - You can now scroll the specified content to the vertical center of the view by specifying
SCROLL_CENTER_VERTICALLYas the scroll constant when callingnsISelectionController.scrollSelectionIntoView. - The new
nsIMemoryMultiReporter.explicitNonHeapattribute has been added; this is a more efficient way to obtain the sum of all of the multi-reporter's measurements that have a path that starts with "explicit" and are of the kindKIND_NONHEAP. - The
nsIDOMWindowUtils.paintingSuppressedattribute has been added; this boolean value indicates whether or not painting is currently suppressed on the window. This is used on mobile to prevent bouncy rendering that occurs when attempts to draw the page begin before enough content is available to do so smoothly. - The
nsIDocCharsetandnsIDocumentCharsetInfointerfaces have been merged intonsIDocShell. As part of this work, the oldforcedDetectorattribute has been removed; it never did anything.
SpiderMonkey
JSThreadhas been eliminated.JSThreadDatahas been merged intoJSRuntime.
Building
- When building on Windows, you must have the Windows 7 SDK installed.
Other changes
- The editor component (known as Midas) now only accepts events from privileged code.
関連記事
- Firefox 12 のサイト互換性に関わる修正のまとめ
- Firefox 12 のアドオン互換性に関わる修正のまとめ
- Aurora 12 is out – improvements and updated Developer Tools
- Firefox 11 for developers
- Firefox 10 for developers
- Firefox 9 for developers
- Firefox 8 for developers
- Firefox 7 for developers
- Firefox 6 for developers
- Firefox 5 for developers
- Firefox 4 for developers
- Firefox 3.6 for developers
- Firefox 3.5 for developers
- Firefox 3 for developers
- Firefox 2 for developers
- Firefox 1.5 for developers