Skip to content

Commit 9f2e258

Browse files
[HTML] Queue a task to resolve createImageBitmap() whatwg/html@e288a0e
1 parent 1f6defb commit 9f2e258

3 files changed

Lines changed: 68 additions & 47 deletions

File tree

HTML-global-api-ja.html

Lines changed: 65 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122

123123
●●options
124124

125-
spec_date:2025-05-23
126-
trans_update:2025-05-24
125+
spec_date:2025-05-26
126+
trans_update:2025-05-26
127127
source_checked:240712
128128
page_state_key:HTML
129129
spec_status:LS
@@ -450,6 +450,8 @@
450450
~NEQ ε:~INFRA#map-exists
451451
~SET:~INFRA#map-set
452452

453+
新たな~obj:~WEBIDLjs#new
454+
453455
並列的:~HTMLINFRA#in-parallel
454456
l.cross-origin-isolated:~HTMLINFRA#cross-origin-isolated-feature
455457

@@ -473,6 +475,7 @@
473475
●ImageBitmap
474476
~bitmap~dataを取得する:#_get-a-bitmap-data-from-image
475477
代表する~bitmap~data:#_get-a-bitmap-data-from-animated-image
478+
~bitmap~task~source:#bitmap-task-source
476479

477480
矩形な~bitmapを表現する:#concept-imagedata-bitmap-representation
478481
画像~dataを初期化する:#initialize-an-imagedata-object
@@ -572,6 +575,9 @@
572575
連結-:concatenate:~
573576
連結した結果:concatenation of
574577
setTimeout-setInterval:setTimeout/setInterval
578+
決着-:settle::~
579+
580+
~promise:Promise
575581

576582
●変数
577583
%大域~obj:global
@@ -613,7 +619,7 @@
613619
%直列形:serialized
614620
%宛先~realm:targetRealm
615621
%xywh:-
616-
%~bitmapを得る手続き
622+
%~bitmapを取得する手続き
617623
%~bitmap~data:-
618624
%生成元cleanか:-
619625
%image:-
@@ -3894,6 +3900,15 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
38943900

38953901
<hr>
38963902

3903+
<p>
3904+
`createImageBitmap()$m ~methodは、
3905+
それが返す~promiseを決着する際に
3906+
`~bitmap~task~source@
3907+
を利用する。
3908+
3909+
The createImageBitmap method uses the bitmap task source to settle its returned Promise.
3910+
</p>
3911+
38973912
<div class="algo">
38983913
<p>
38993914
@@ -3977,7 +3992,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
39773992
<li>
39783993
%promise ~LET `新たな~promise$
39793994
3980-
Let p be a new promise.
3995+
Let promise be a new promise.
39813996
</li>
39823997
<li>
39833998
<p>
@@ -3986,13 +4001,13 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
39864001

39874002
<p class="trans-note">
39884003
この訳では,原文の~algoを再構成している
3989-
その重複している~logicを この段の中に集約して,
3990-
重複していない部分を 下の “`~bitmap~dataを取得する$” に抜き出すことにより
4004+
それを成す重複している~logicを この段の中に集約して,
4005+
重複していない部分を “`~bitmap~dataを取得する$” 下位-手続きに抜き出すことにより
39914006
</p>
39924007
<ol>
39934008
<li class="algo">
39944009
<p>
3995-
%~bitmapを得る手続き ~LET 次を走らす手続き:
4010+
%~bitmapを取得する手続き ~LET 次を走らす手続き:
39964011
</p>
39974012
<ol>
39984013
<li>
@@ -4006,7 +4021,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
40064021
~RET ε
40074022
</li>
40084023
<li>
4009-
%O ~LET 新たな `ImageBitmap$I ~obj
4024+
%O ~LET `新たな~obj$( `ImageBitmap$I【, コレに`関連な大域~obj$】 )
40104025
</li>
40114026
<li>
40124027
%O の`~bitmap~data$ ~SET `~source矩形に切抜いて整形する$( %~bitmap~data )
@@ -4018,7 +4033,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
40184033
~RET %O
40194034
</li>
40204035
</ol>
4021-
</li>
4036+
</li>
40224037
<li>
40234038
<p>
40244039
~IF[
@@ -4033,19 +4048,27 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
40334048
</p>
40344049
<ol>
40354050
<li>
4036-
%~bitmap ~LET %~bitmapを得る手続き()
4051+
%~bitmap ~LET %~bitmapを取得する手続き()
40374052
</li>
40384053
<li>
4039-
~IF[
4040-
%~bitmap ~NEQ ε
4041-
4054+
<p>
4055+
%手続き ~LET %~bitmap に応じて:
4056+
</p>
4057+
<ul class="switch">
4058+
<li class="algo">
4059+
ε ならば次を走らす手続き
4060+
4061+
`~promiseを却下する$( %promise, `InvalidStateError$E 例外 )
4062+
</li>
4063+
<li class="algo">
4064+
~ELSE_ 次を走らす手続き
40424065
40434066
`~promiseを解決する$( %promise, %~bitmap )
40444067
</li>
4068+
</ul>
4069+
</li>
40454070
<li>
4046-
~ELSE
4047-
4048-
`~promiseを却下する$( %promise, `InvalidStateError$E 例外 )
4071+
`大域~taskを~queueする$( `~bitmap~task~source$【, コレに`関連な大域~obj$】, %手続き )
40494072
</li>
40504073
</ol>
40514074
</li>
@@ -4057,7 +4080,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
40574080
</p>
40584081
<ol>
40594082
<li>
4060-
%~bitmap ~LET %~bitmapを得る手続き()
4083+
%~bitmap ~LET %~bitmapを取得する手続き()
40614084
</li>
40624085
<li>
40634086
~IF[
@@ -4066,11 +4089,17 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
40664089
40674090
~RET `却下される~promise$( `InvalidStateError$E 例外 )
40684091
</li>
4069-
<li class="algo">
4070-
次を`並列的$に走らす
4092+
<li>
4093+
<p>
4094+
`大域~taskを~queueする$( `~bitmap~task~source$【, コレに`関連な大域~obj$】, 次の手続き )
4095+
</p>
4096+
4097+
<div class="algo">
4098+
手続きは
40714099
40724100
`~promiseを解決する$( %promise, %~bitmap )
4073-
</li>
4101+
</div>
4102+
</li>
40744103
</ol>
40754104
</li>
40764105
<li>
@@ -4089,7 +4118,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
40894118
所与の
40904119
( %image )
40914120
に対し,
4092-
%image に応じて次を走らす
4121+
%image に応じて
40934122
40944123
Let imageBitmap be a new ImageBitmap object.
40954124
@@ -4150,8 +4179,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
41504179
<li>
41514180
~RET ( %~bitmap~data, %生成元cleanか )
41524181
4153-
Run this step in parallel:
4154-
• Resolve p with imageBitmap.
4182+
Queue a global task, using the bitmap task source, to resolve promise with imageBitmap.
41554183
</li>
41564184
</ol>
41574185
</dd>
@@ -4188,8 +4216,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
41884216
<li>
41894217
~RET ( %~bitmap~data, %生成元cleanか )
41904218
4191-
Run this step in parallel:
4192-
• Resolve p with imageBitmap.
4219+
Queue a global task, using the bitmap task source, to resolve promise with imageBitmap.
41934220
</li>
41944221
</ol>
41954222
</dd>
@@ -4204,8 +4231,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
42044231
42054232
Set the origin-clean flag of the imageBitmap's bitmap to the same value as the origin-clean flag of image's bitmap.
42064233
4207-
Run this step in parallel:
4208-
• Resolve p with imageBitmap.
4234+
Queue a global task, using the bitmap task source, to resolve promise with imageBitmap.
42094235
</li>
42104236
</ol>
42114237
</dd>
@@ -4222,16 +4248,13 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
42224248
~RET ( ε, ε )
42234249
42244250
Run these steps in parallel:
4225-
4226-
Let imageData be the result of reading image's data. If an error occurs during reading of the object, then reject p with an "InvalidStateError" DOMException and abort these steps.
4251+
• Let imageData be the result of reading image's data. If an error occurs during reading of the object, then queue a global task, using the bitmap task source, to reject promise with an "InvalidStateError" DOMException and abort these steps.
42274252
</li>
42284253
<li>
4229-
%画像~data の公式的な型 ~LET [
4230-
%image の `type$m 属性で与えられる~MIME型
4231-
]を与える下で,`画像を特定的に~sniffするための規則$を適用して、
4232-
%画像~data の~file形式を決定した結果
4254+
%画像~data の公式的な型 ~LET %画像~data の~file形式を決定した結果
4255+
— ~MIME型として %image の `type$m 属性を与える下で,`画像を特定的に~sniffするための規則$を適用することにより
42334256
4234-
Apply the image sniffing rules to determine the file format of imageData, with MIME type of image (as given by image's type attribute) giving the official type.
4257+
Apply the image sniffing rules to determine the file format of imageData, with MIME type of image (as given by image's type attribute) giving the official type.
42354258
</li>
42364259
<li>
42374260
<p>
@@ -4258,16 +4281,17 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
42584281
~RET ( ε, ε )
42594282
</p>
42604283
4261-
If imageData is not in a supported image file format (e.g., it's not an image at all), or if imageData is corrupted in some fatal way such that the image dimensions cannot be obtained (e.g., a vector graphic with no natural size), then reject p with an "InvalidStateError" DOMException and abort these steps.
4284+
If imageData is not in a supported image file format (e.g., it's not an image at all), or if imageData is corrupted in some fatal way such that the image dimensions cannot be obtained (e.g., a vector graphic with no natural size), then reject p with an "InvalidStateError" DOMException and abort these steps.
42624285
</li>
42634286
<li>
42644287
%~bitmap~data ~LET %画像~data を`代表する~bitmap~data$
42654288
4266-
Set imageBitmap's bitmap data to imageData, cropped to the source rectangle with formatting. If this is an animated image, imageBitmap's bitmap data must only be taken from the default image of the animation (the one that the format defines is to be used when animation is not supported or is disabled), or, if there is no such image, the first frame of the animation.
4289+
Set imageBitmap's bitmap data to imageData, cropped to the source rectangle with formatting. If this is an animated image, imageBitmap's bitmap data must only be taken from the default image of the animation (the one that the format defines is to be used when animation is not supported or is disabled), or, if there is no such image, the first frame of the animation.
42674290
</li>
42684291
<li>
42694292
~RET ( %~bitmap~data, ~T )
42704293
4294+
• Queue a global task, using the bitmap task source, to resolve promise with imageBitmap.
42714295
Resolve p with imageBitmap.
42724296
</li>
42734297
</ol>
@@ -4288,12 +4312,11 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
42884312
If IsDetachedBuffer(buffer) is true, then return a promise rejected with an "InvalidStateError" DOMException.
42894313
</li>
42904314
<li>
4291-
~RET ( %image が与える画像~data, ~T )
4315+
~RET ( %image が`表現する画像~data@#concept-imagedata-bitmap-representation$, ~T )
42924316
42934317
Set imageBitmap's bitmap data to image's image data, cropped to the source rectangle with formatting.
42944318
4295-
Run this step in parallel:
4296-
• Resolve p with imageBitmap.
4319+
Queue a global task, using the bitmap task source, to resolve promise with imageBitmap.
42974320
</li>
42984321
</ol>
42994322
</dd>
@@ -4308,8 +4331,7 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
43084331
43094332
Set the origin-clean flag of imageBitmap's bitmap to the same value as the origin-clean flag of image's bitmap.
43104333
4311-
Run this step in parallel:
4312-
• Resolve p with imageBitmap.
4334+
Queue a global task, using the bitmap task source, to resolve promise with imageBitmap.
43134335
</li>
43144336
</ol>
43154337
</dd>
@@ -4322,16 +4344,15 @@ <h4 title="The ImageBitmap interface">8.10.2. `ImageBitmap^I ~interface</h4>
43224344
43234345
Set imageBitmap's bitmap data to a copy of image's visible pixel data, cropped to the source rectangle with formatting.
43244346
4325-
Run this step in parallel:
4326-
• Resolve p with imageBitmap.
4347+
Queue a global task, using the bitmap task source, to resolve promise with imageBitmap.
43274348
</li>
43284349
</ol>
43294350
</dd>
43304351
</dl>
43314352

43324353
<p>
43334354
4334-
↑↑Return p.
4355+
↑↑Return promise.
43354356
</p>
43364357
</div>
43374358

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ <h2>日本語訳ページ一覧</h2>
375375
HTML
376376
<a id="spec-list-html" href="#spec-list-html"></a>
377377
<p>
378-
(原文日付:<time>2025-05-20</time>
378+
(原文日付:<time>2025-05-26</time>
379379
<small>
380380
個々のページに示される これより過去の原文日付は、
381381
この日付まで,概ね(有意な)更新は無いことを表す。

webappapis-ja.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117

118118
●●options
119119

120-
spec_date:2025-04-09
120+
spec_date:2025-05-26
121121
trans_update:2025-03-28
122122
source_checked:240712
123123
page_state_key:HTML
@@ -16113,7 +16113,7 @@ <h5 title="Generic task sources">8.1.7.4. 汎用な~task~source</h5>
1611316113
は、
1611416114
`利用者ヤリトリ~task~source$により`~queueされ$る`~task$を利用して発火するモノトスル。
1611516115
16116-
Events sent in response to user input (e.g. click events) must be fired using tasks queued with the user interaction task source. [UIEVENTS]
16116+
Events sent in response to user input (e.g., click events) must be fired using tasks queued with the user interaction task source. [UIEVENTS]
1611716117
</dd>
1611816118

1611916119
<dt>

0 commit comments

Comments
 (0)