Skip to content

Commit 1593a58

Browse files
[HTML] Account for User-Agent not starting with Mozilla/ in appVersion getter whatwg/html@a93c6fa
1 parent a039a9a commit 1593a58

File tree

1 file changed

+45
-41
lines changed

1 file changed

+45
-41
lines changed

HTML-navigator-ja.html

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
case 'rph':
6868
text = `"<code class="literal">${text}</code>"`;
6969
break;
70+
case 'bl': // byte literal
71+
text = `\`<code class="literal">${text}</code>\``;
72+
break;
7073
case 'm':
7174
case 'pA':
7275
case 'mA':
@@ -124,8 +127,8 @@
124127

125128
●●options
126129

127-
spec_date:2025-06-18
128-
trans_update:2025-06-19
130+
spec_date:2025-09-17
131+
trans_update:2025-09-18
129132
source_checked:240712
130133
page_state_key:HTML
131134
spec_status:LS
@@ -335,6 +338,7 @@
335338
~index群:~INFRA#list-get-the-indices
336339
~ASCII英小文字:~INFRA#ascii-lower-alpha
337340
~ASCII小文字~化する:~INFRA#ascii-lowercase
341+
同型に復号する:~INFRA#isomorphic-decode
338342

339343
凍結d配列:~WEBIDL#dfn-frozen-array-type
340344
新たな~obj:~WEBIDLjs#new
@@ -360,7 +364,7 @@
360364
~passwordを設定する:~URL1#set-the-password
361365

362366
~HTTP_S~scheme:~FETCH#http-scheme
363-
既定の~User-Agent値:~FETCH#default-user-agent-value
367+
環境~既定の~User-Agent値:~FETCH#environment-default-user-agent-value
364368

365369
信用に価し得る~URL:~SECURE-CONTEXT#potentially-trustworthy-url
366370

@@ -516,6 +520,7 @@
516520
%~plugin~list:plugins
517521
%~plugin:plugin
518522
%結果:trail
523+
%~User-Agent:userAgent
519524

520525
●未分類
521526
Navigator:
@@ -530,6 +535,7 @@
530535
所在-:locate::~
531536
alphabet::::アルファベット
532537
~alphabet順に挙げられ:ordered alphabetically
538+
同型:isomorphic::~
533539

534540
~view用の/~viewする:viewing
535541
再利用-:re-use
@@ -566,14 +572,14 @@
566572
指す/指せる/指して:point/:pointing
567573
大域~obj:global
568574
0 番:0th
575+
から先頭の〜を除去した結果:substring of that follows the prefix
569576

570577
-:naturally now the data is stale
571578
happen
572579
見た:has seen
573580
:gather
574581
object^jt:Object
575582

576-
●指示語
577583
各部:parts
578584
一連の:collection of
579585
多数の:large number of
@@ -867,31 +873,42 @@ <h5 title="Client identification">8.9.1.1. ~clientの識別</h5>
867873
<p>
868874
`appVersion@m
869875
取得子~手続きは:
876+
877+
The appVersion getter steps are:
870878
</p>
871879
<ol>
872880
<li>
873-
%結果 ~LET `既定の~User-Agent値$
874-
</li>
875-
<li>
876-
~Assert:
877-
%結果 は文字列 `Mozilla/^l から開始している†
881+
%~User-Agent ~LET `環境~既定の~User-Agent値$( コレに`関連な設定群~obj$ )
882+
883+
Let userAgent be this's relevant settings object's environment default `User-Agent` value.
878884
</li>
879885
<li>
880-
%結果 ~LET %結果 から,頭部を成す `Mozilla/^l を除去した結果
886+
~IF[
887+
%~User-Agent は~byte列【!文字列】 `Mozilla/^bl から開始していない
888+
889+
890+
~RET 空~文字列
891+
892+
If userAgent does not start with `Mozilla/5.0 (`, then return the empty string.
881893
</li>
882894
<li>
883-
~Assert:
884-
%結果 は文字列 `5.0 (^l から開始している†
895+
%結果 ~LET `同型に復号する$( %~User-Agent から先頭の `Mozilla/^bl を除去した結果 )
896+
897+
Let trail be the substring of userAgent, isomorphic decoded, that follows the "Mozilla/" prefix.
885898
</li>
886899
<li>
887900
<p>
888901
`~navigator互換性~mode$に応じて:
889-
</p>
902+
903+
</p>
890904
<ul class="switch">
891905
<li>
892906
`Chrome^i / `WebKit^i
893907
894908
~RET %結果
909+
910+
If the navigator compatibility mode is Chrome or WebKit
911+
• Return trail.
895912
</li>
896913
<li>
897914
<p>
@@ -906,10 +923,10 @@ <h5 title="Client identification">8.9.1.1. ~clientの識別</h5>
906923
~RET `5.0 (Windows)^l
907924
</li>
908925
<li>
909-
~Assert:
910-
%結果 内に文字 `003B^U `;^smb が在る
911-
</li>
912-
<li>
926+
~IF[
927+
%結果 内に文字 `003B^U `;^smb が在る
928+
929+
913930
%結果 ~SET %結果 から最初の `003B^U `;^smb 以降の文字列を除去した結果
914931
</li>
915932
<li>
@@ -921,29 +938,14 @@ <h5 title="Client identification">8.9.1.1. ~clientの識別</h5>
921938
`5.0 (X11)^l
922939
</li>
923940
</ol>
924-
</li>
941+
942+
If the navigator compatibility mode is Gecko
943+
• If trail starts with "5.0 (Windows", then return "5.0 (Windows)".
944+
• Otherwise, return the prefix of trail up to but not including the first U+003B (;), concatenated with the character U+0029 RIGHT PARENTHESIS. For example, "5.0 (Macintosh)", "5.0 (Android 10)", or "5.0 (X11)".
945+
</li>
925946
</ul>
926947
</li>
927948
</ol>
928-
929-
<p class="trans-note">【†
930-
これらの ~Assert は、
931-
この訳による補完
932-
— 原文は、
933-
これらの条件を満たすかのように記されている
934-
(満たさない場合の挙動が指定されていない
935-
— `既定の~User-Agent値$は`実装定義$なので、
936-
理論上は満たさない可能性もあるにもかかわらず)。
937-
</p>
938-
939-
940-
The appVersion getter steps are to return the appropriate string that starts with "5.0 (", as follows:
941-
• Let trail be the substring of default `User-Agent` value that follows the "Mozilla/" prefix.
942-
• If the navigator compatibility mode is Chrome or WebKit
943-
•• Return trail.
944-
• If the navigator compatibility mode is Gecko
945-
•• If trail starts with "5.0 (Windows", then return "5.0 (Windows)".
946-
•• Otherwise, return the prefix of trail up to but not including the first U+003B (;), concatenated with the character U+0029 RIGHT PARENTHESIS. For example, "5.0 (Macintosh)", "5.0 (Android 10)", or "5.0 (X11)".
947949
</div>
948950

949951
<div class="algo">
@@ -999,9 +1001,9 @@ <h5 title="Client identification">8.9.1.1. ~clientの識別</h5>
9991001
`userAgent@m
10001002
取得子~手続きは
10011003
1002-
~RET `既定の~User-Agent値$
1004+
~RET `環境~既定の~User-Agent値$( コレに`関連な設定群~obj$ )
10031005
1004-
The userAgent getter steps are to return the default `User-Agent` value.
1006+
The userAgent getter steps are to return this's relevant settings object's environment default `User-Agent` value.
10051007
</div>
10061008

10071009
<div class="algo">
@@ -1402,7 +1404,7 @@ <h5 title="Custom scheme handlers: the registerProtocolHandler() method">8.9.1.4
14021404
例えば,~online-telephone-messaging~serviceは、
14031405
自身を
14041406
`sms:@~RFCx/rfc5724#section-2$sc ~scheme用の~handlerとして登録することもできる
1405-
— 利用者がそのような~linkを~clickしたとき,その~web~siteを利用する機会が与えられるように
1407+
— 利用者がそのような~linkを~clickしたとき,その~web~siteを利用する機会が与えられるよう
14061408
`SMS$r
14071409
14081410
Registers a handler for scheme at url. For example, an online telephone messaging service could register itself as a handler of the sms: scheme, so that if the user clicks on such a link, they are given the opportunity to use that web site. [SMS]
@@ -2236,7 +2238,8 @@ <h5 title="PDF viewing support">8.9.1.6. ~PDF~view用の~support</h5>
22362238
Although these days detecting PDF viewer support can be done via navigator.pdfViewerEnabled, for historical reasons, there are a number of complex and intertwined interfaces that provide the same capability, which legacy code relies on. This section specifies both the simple modern variant and the complicated historical one.
22372239
</p>
22382240

2239-
<p>
2241+
<p id="fingerprint-pdfViewerEnabled">
2242+
◎追跡路
22402243
各~UAは、
22412244
真偽値をとる
22422245
`~PDF~viewerは~supportされるか@
@@ -2245,6 +2248,7 @@ <h5 title="PDF viewing support">8.9.1.6. ~PDF~view用の~support</h5>
22452248
`実装定義$とする
22462249
(加えて、利用者-選好に則って変わり得る)。
22472250
2251+
(This is a tracking vector.)
22482252
Each user agent has a PDF viewer supported boolean, whose value is implementation-defined (and might vary according to user preferences).
22492253
</p>
22502254

0 commit comments

Comments
 (0)