IT翻訳 Nobuyuki の仕事部屋

ボランティアでソフトウエアーローカライズのために翻訳をしている。

Gecko Info for Windows Accessibility Vendors校正その12

2005-04-30 07:23:00 | InReview
昨日は、あたかも夏の一日のようにお暑うございました。まだ 4 月でございますよ。今朝は丁度よい程度に涼しくてよかったです。それでは朝の一仕事として校正作業を。・・・・・・・その前に昨日好評であった Mozilla VS Gecko 仮面 を再びどうぞ。


原題: Gecko Info for Windows Accessibility Vendors

訳題: Windows アクセシビリティベンダー向け Gecko 情報

原文:  青色表示
訳文:  黒色表示
校正文: 赤色表示
校正対象範囲: 黒色太字表示

The get_computedStyle method is used to find out the cumulative, computed results for all style rules applied to a node. The return value numStyleProperties specifies the number of style properties for this node, and the last 2 parameters return 2 arrays corresponding to style property name and style property value. Another [in] parameter, useAlternativeMediaProperties, indicates whether you want style information for the default media type (usually screen), or a set of alternative media types specified in nsISimpleDOMDocument::set_alternateViewMediaType(mediaTypeString) . See the W3C's website for a list of official media type name . Unfortunately, at this time the argument useAlternateView is ignored.
HRESULT get_computedStyle(
/* [in] */ unsigned short maxStyleProperties,
/* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
/* [out] */ BSTR *styleProperties,
/* [out] */ BSTR *styleValues,
/* [out] */ unsigned short *numStyleProperties);


get_computedStyle メソッドはノードに適用されるすべてのスタイルルールのために累積//→蓄積され//、計算された結果を見出すのに使われます。戻り値 numStyleProperties はこのノード用のスタイルプロパティーの数を決め、//訳抜け→最後の 2 つのパラメーターは//スタイルプロパティー名とスタイルプロパティー値に対応する 2 つの配列を返します。もう一つのパラメータ(値)//→[in]パラメーター// useAlternativeMediaProperties は初期設定メディア方式(ふつうは画面)用に、もしくは nsISimpleDOMDocument::set_alternateViewMediaType(mediaTypeString) に決められた代替メディア方式用にスタイル情報を必要とするかどうか//→用のスタイル情報を必要とするか、もしくは nsISimpleDOMDocument::set_alternateViewMediaType(mediaTypeString) に定められた代替メディア方式を必要とするかどうか*1//を示します。公式なメディア方式名の一覧表は W3C のウェブサイトを見てください。残念ながら、今回は引数 useAlternateView は無視されます。
HRESULT get_computedStyle(
/* [in] */ unsigned short maxStyleProperties,
/* [in] */ boolean useAlternateView, // TRUE なら、nsIDOMDocument::set_alternateViewMediaTypes におけるセットとして//→に設定された*2//メディア用プロパティを返す。
/* [out] */ BSTR *styleProperties,
/* [out] */ BSTR *styleValues,
/* [out] */ unsigned short *numStyleProperties);


*1→indicate whether you want style information for the default media type (usually screen), or a set of alternative media types と whetehr A or B の構文である
*2→*1にあるように、初期設定メディア方式ではなく、代替方式を指示する

A variation on this method is get_computedStyleForProperties, which lets turns the styleProperties array into an [in] parameter, letting you specify only those style properties you're interested in. This helps minimize the cost of marshalling for those times in which you're interested in only a few style properties per node.
HRESULT get_computedStyleForProperties(
/* [in] */ unsigned short numStyleProperties,
/* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
/* [in] */ BSTR *styleProperties,
/* [out] */ BSTR *styleValues);


このメソッドの仲間のひとつは get_computedStyleForProperties であり、興味//*→関心//のある属性だけを決定させることで、このメソッドは styleProperties 配列をパラメーターへと変えさせます//*3→styleProperties 配列を[IN]パラメーターへと変えさせます//。この事は、ノードあたり興味のあったスタイルプロパティの//→関心のあるごくわずかなスタイルプロパティの//回数分のみで済むので、マーシャリングのコストを最小限に抑えます。
HRESULT get_computedStyleForProperties(
/* [in] */ unsigned short numStyleProperties,
/* [in] */ boolean useAlternateView, // TRUE なら、nsIDOMDocument::set_alternateViewMediaTypes におけるセットとしてメディア用プロパティを返す。
/* [in] */ BSTR *styleProperties,
/* [out] */ BSTR *styleValues);


*3→「このメソッドは」がなくても、styleProperties が「変えさせます」の主語になるようです

To scroll the document in order make a specific element visible in the window, use scrollTo(boolean placeTopLeft). If the parameter placeTopLeft is TRUE the document will be scrolled so that the element is placed in the top left corner of the window. If placeTopLeft is FALSE, the document will only be scrolled if the element is not already visible, or the document will be scrolled the minimum amount to make the element visible anywhere within the current window.
HRESULT scrollTo([in] boolean placeTopLeft);


ウィンドウで見える特定の要素を作るためにドキュメントをスクロールするために//*→ウィンドウで特定の要素が見えるよう順繰りにドキュメントをスクロールするには//、scrollTo(boolean placeTopLeft) を使って下さい。パラメーター placeTopLeft が TRUE ならエレメントがウィンドウの上部左角に来るようにドキュメントがスクロールされます。placeTopLeft が FALSE ならばもしエレメントがもう見えなければ、ドキュメントはスクロールされるだけか、また現在のウィンドウのどこかにエレメントを見せるために最低限の移動分だけスクロールされます。
HRESULT scrollTo([in] boolean placeTopLeft);


You can also get to any other node by traversing the ISimpleDOMNode structure. The DOM content tree is a superset of the MSAA tree. In other words, you can always QueryInterface from an IAccessible to an ISimpleDOMNode, but often not the other way around.
HRESULT get_parentNode (/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT get_firstChild (/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT get_lastChild (/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT get_previousSibling(/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT get_nextSibling (/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT childAt(/* [in] */ unsigned childIndex, /* [out] */ ISimpleDOMNode **newNodePtr);


ISimpleDOMNode 構造を探索することでまたどこか他のノードへ移動できます。DOM コンテンツツリーは MSAA ツリーの上位集合です。つまり、IAccessible から ISimpleDOMNode へ必ず QueryInterface できますが、その逆は簡単には出来ません。
HRESULT get_parentNode (/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT get_firstChild (/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT get_lastChild (/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT get_previousSibling(/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT get_nextSibling (/* [in] */ ISimpleDOMNode *newNodePtr);
HRESULT childAt(/* [in] */ unsigned childIndex, /* [out] */ ISimpleDOMNode **newNodePtr);


Finally we provide a convenience method for getting the actual HTML within a DOM subtree. This only applies if the node is HTML.

HRESULT innerHTML([out, retval] BSTR *innerHTML);

Please look at the ISimpleDOMNode.idl file for parameter types and the definitions of the node type constants.


最終的に、DOM 従ツリー内に実際の HTML を取得するための便利なメソッドを提供します。このメソッドはノードが HTML であれば適用します。

HRESULT innerHTML([out, retval] BSTR *innerHTML);

ノードタイプの定数の定義とパラメータータイプとを調べるためにどうか ISimpleDOMNode.idl を見てください;//→パラメーターの型と、ノードタイプの定数の定義については ISimpleDOMNode.idl ファイルを見てください。//


本日はここまでにしましょうね。