/
946.txt
185 lines (150 loc) · 9.78 KB
/
946.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
[26] [[Web]] における[DFN[[RUBYB[プラットフォーム][platform]]]]とは、
[[Webブラウザー]]の動作環境である [[OS]] 等全体を指します。
* プラットフォームの範囲
[20] ここでいう[[プラットフォーム]]とは、 [[Webブラウザー]]が動作する環境を指します。
[21] [[Windows]] や [[Android]] などの [[OS]] が該当します。
[[GNOME]] などの[[デスクトップ環境]]や [[GUIツールキット]]も含まれることがあります。
[29] 厳密に言えば[[Webブラウザー]]の[[下位層]]には当たらず、
[[Webブラウザー]]側の独自の設計の一部であっても「プラットフォーム」
に含めることがあります。
[EG[
[30] [[Windows]] 版の [[Chrome]] は、[[メニュー]]の表示色の決定に
[[Windows]] 全体の配色を (完全には) 使っていません。
]EG]
* プラットフォームの機能
[24] [[プラットフォーム]]は [[Webブラウザー]]を介して [[Webアプリケーション]]に色々な機能を提供しています。
[FIG(short list)[
- [[プロセス]]・[[スレッド]]
-- [[イベントループ]]
-- [[ワーカー]]
- [[描画]]エンジンと[[ウィンドウマネージャー]]
-- [[画面]]
-- [[窓][窓 (Web)]]
-- [[色]]、[[フォント]]等表示設定
-- [[ウィジェット]]
-- [[文脈メニュー]]
- [[装置][装置 (Web)]]
-- 各種[[センサー]]
- [[IME]]
- [[ネットワーク]]
-- [[ネットワーク設定]]
-- [[名前解決]]
-- [[TCP]]
-- [[UDP]]
-- [[Unix domain socket]]
- [[証明書データベース]]
- [[ストレージ]]
- [[クリップボード]]
- [[ファイルシステム]]
-- [[ダウンロード]]
-- [CODE(HTML)@en[<input type=file>]]
-- [[File API]]
- [[DnD]]
- [[通知]]
- [[印刷]]
- 外部アプリケーションからの [[navigate]]
- [[ハンドラー]]
- [[Webサイトとネイティブアプリケーション]]
- [[AT]]
- [[標準のWebブラウザー]]
]FIG]
* プラットフォームの慣習
[22] [[プラットフォーム]]ごとに、明示的または暗示的な[[アプリケーション]]設計の指針が用意されていると考えられます。
例えば、
[FIG(list)[
- [[マウス]]の右ボタンの[[クリック]]で操作の実行を示す
- [[OK]]ボタンと[[取り消し]]ボタンは左と右に置く
- [[アクセスキー]]は [KBD[Alt]] と同時に押下する
- [[ボタン]]は飛び出した立体のように表示する
- 文字列入力欄で右クリックしたら、[[クリップボード]]操作のメニューを表示する
]FIG]
... といったようなものです。
[27] その一部は[[プラットフォーム]]レベルで[[利用者]]が設定可能かもしれません。
例えば、
[FIG(list)[
- [[マウス]]の左ボタンと右ボタンのどちらを主操作に割り当てるか
- [[マウス]]の連打を[[ダブルクリック]]と判断する最大の間隔は何 [[s]] か
- [[スクロールバー]]の[[色]]を何色とするか
- 標準の[[フォント]]をどれにするか
- ページ遷移が発生したら効果音を再生するか
]FIG]
... といった項目が設定画面に用意されているかもしれません。
* プラットフォーム依存の動作
[1] [[Web]] 関連仕様では、[[レンダリング]]や動作などを[[プラットフォーム]]依存とし、
特定の挙動を定義していないことがあります。
[18] 仕様上は「platform-specific」であったり、「platform [[conventions]]」に拠るとされていたりすることもあれば、
[[利用者エージェント]]に任せるとだけ記載されていることもあります。実際問題としてもどこまでが[[プラットフォーム]]の慣習で、
どこからが[[利用者エージェント]]固有の性質であるのか判断しがたいケースもあります。
- [[利用者エージェントの識別]]
-- [[navigator互換性モード]]
-- [CODE[navigator.appVersion]]
-- [CODE[navigator.platform]]
-- [CODE[navigator.oscpu]]
-- [CODE[endings=native]] の挙動
- [16] [CODE(DOMi)@en[[[Plugin]]]] の有する値は[[プラットフォーム]]に依ることがあります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#dom-plugin>
- [2] [[プラットフォーム]]の制限のために実装固有の制限を設けても構いません。
-- <http://www.whatwg.org/specs/web-apps/current-work/#conformance-requirements>
-- <http://www.whatwg.org/specs/web-apps/current-work/#timer-initialization-steps>
- [3] [[プラグイン]]とのやり取りの仕組みは[[利用者エージェント]]と[[プラットフォーム]]に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#plugin>
- [4] [[ダウンロード]]の際の[[ファイル名]]の決定は[[プラットフォーム]]の慣習に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#as-a-download>
- [6] [CODE(HTMLa)@en[[[accept]]]] [[属性]]による[[ファイル]]の絞り込みは[[プラットフォーム]]に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#attr-input-accept>
- [11] [[プラットフォーム]]の慣習により任意の領域を[[フォーカス可能領域]]にできます。
-- <http://www.whatwg.org/specs/web-apps/current-work/#focusable-area>
-- <http://www.whatwg.org/specs/web-apps/current-work/#attr-tabindex>
- [12] [[フォーカス]]を得た時の挙動は[[プラットフォーム]]に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#focus-update-steps>
- [10] [CODE(DOMm)@en[[[drawFocusIfNeeded]]]] [DEL[[CODE(DOMm)@en[[[drawSystemFocusRing]]]]]] の[[レンダリング]]は[[プラットフォーム]]に依ります。
- [19] [[活性化動作]]の呼び出し方法は[[利用者エージェント]]に依ります。
-- <https://html.spec.whatwg.org/#activation>
- [13] [[アクセスキー]]の割り当ては[[プラットフォーム]]に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#the-accesskey-attribute>
- [8] [[フォーム]]の暗示的な[[提出]]の方法は[[プラットフォーム]]に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#default-button>
- [9] [CODE(DOMe)@en[[[contextmenu]]]] 前後の[[イベント]]の順序は[[プラットフォーム]]に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#processing-model-3>
- [5] [CODE(HTMLe)@en[[[label]]]] [[要素]]の [[activation behavior]] は[[プラットフォーム]]のものに沿うべきです。
-- <http://www.whatwg.org/specs/web-apps/current-work/#the-label-element>
- [7] [[選択]]や[[カーソル位置]]の扱いは[[プラットフォーム]]に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#textFieldSelection>
-- <http://www.whatwg.org/specs/web-apps/current-work/#focus-update-steps>
- [14] [[DnD]] 中の挙動は[[プラットフォーム]]に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#concept-platform-dropeffect-override>
-- <http://www.whatwg.org/specs/web-apps/current-work/#drag-and-drop-processing-model>
- [17] [[束縛]]によって[[レンダリング]]が定められている場合、実際どう[[レンダリング]]するかは[[プラットフォーム]]の慣習に依ります。
-- <http://www.whatwg.org/specs/web-apps/current-work/#bindings>
- [CODE[inputmode]]
- [CODE[autocapitalize]]
[28] [[ハードウェア制限条項]]も参照。
* プラットフォームと統合された特権アプリケーション
[25] [[Vibration API]] には (「[[NOTE]]」ながら)
「A trusted (also known as privileged) application that integrates closely with the operating system's functionality」
について通常と異なる動作をすることを認めています。
* 関連
[23] [[Webプラットフォーム]]は、 [[Webブラウザー]]をアプリケーション実行環境として捉えた時その上 (および[[サーバー]]とその間の[[ネットワーク]]) に構築された[[プラットフォーム]]を表しています。
本項でいう[[プラットフォーム]]とは異なります。
* 歴史
[31] [CITE@en[Require text entry cursor at the beginning of controls initially]]
([[domenic]]著, [TIME[2017-06-24 01:34:33 +09:00]])
<https://github.com/whatwg/html/commit/dd0fb780a96e603f32ff8537d2b465d49ec06e27>
[32] [CITE@en[mathcing capabilities: fix list of well-known systems]]
([[andreastt]]著, [TIME[2017-08-31 08:31:32 +09:00]])
<https://github.com/w3c/webdriver/commit/06d2e5d066bdb35f1d8e30006e82855f3f6ddbb5>
[33] [CITE@en[mathcing capabilities: fix list of well-known systems by andreastt · Pull Request #1077 · w3c/webdriver]]
([TIME[2017-12-21 12:02:08 +09:00]])
<https://github.com/w3c/webdriver/pull/1077>
[15] [CITE@en[Minor editorial: change "for hardware" to "for hardware and platforms"]]
([[patrickhlauke]]著, [TIME[2018-08-29 21:29:50 +09:00]])
<https://github.com/w3c/pointerevents/commit/14353f37388e2577e69e3a58e853a262d016f96a>
[34] [CITE@en[Add informative note about tangential pressure and Windows by patrickhlauke · Pull Request #262 · w3c/pointerevents]]
([TIME[2018-09-20 23:51:25 +09:00]])
<https://github.com/w3c/pointerevents/pull/262>
[35] [CITE@en[Fix respec errors, minor editorial changes "for devices"/"for hardware", add Navid Zolghadr as co-editor by patrickhlauke · Pull Request #264 · w3c/pointerevents]]
([TIME[2018-09-20 23:51:49 +09:00]])
<https://github.com/w3c/pointerevents/pull/264>
[36] [CITE@en[Minor editorial: reword "For devices" to "For hardware and platforms"]]
([[patrickhlauke]]著, [TIME[2018-08-29 21:35:30 +09:00]])
<https://github.com/w3c/pointerevents/commit/a4f7ca13a4309da3fdcfe3e23eddee86f69f0951>