Skip to content

Commit f816b44

Browse files
[HTML] Pass and use better ancestor/root information to (re)moving steps whatwg/html@097be9f
1 parent 4fbffd9 commit f816b44

7 files changed

Lines changed: 92 additions & 65 deletions

DOM4-ja.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9625,7 +9625,7 @@ <h4 title="Mutation algorithms">4.2.3. 変異~algo</h4>
96259625
( 移動された`~node$【!movedNode】, [
96269626
旧-親である`~node$/~NULL
96279627
]【!oldParent】 )
9628-
を渡して呼出される。
9628+
を渡して呼出される
96299629
`挿入-時の手続き$と同様に,この手続きは:
96309630
</p>
96319631
<ul>
@@ -9644,6 +9644,12 @@ <h4 title="Mutation algorithms">4.2.3. 変異~algo</h4>
96449644
前項に挙げたものを非同期に行うための`大域~taskを~queueする$
96459645
</li>
96469646
</ul>
9647+
9648+
<p class="trans-note">【†
9649+
この~algoに渡される引数(旧-親)は`変更される予定にあり@https://github.com/whatwg/dom/commit/73de9e5e1bfe581397d58d0b10b4da448d973c8a$、
9650+
すでに `HTML$r からは それに従って利用されているが、
9651+
まだ,この仕様には反映されていない。
9652+
】</p>
96479653
96489654
Specifications may define moving steps for all or some nodes. The algorithm is passed a node movedNode, and a node-or-null oldParent as indicated in the move algorithm below. Like the insertion steps, these steps must not modify the node tree that movedNode participates in, create browsing contexts, fire events, or otherwise execute JavaScript. These steps may queue tasks to do these things asynchronously, however.
96499655
</div>
@@ -10281,11 +10287,17 @@ <h4 title="Mutation algorithms">4.2.3. 変異~algo</h4>
1028110287
( `~node$ %除去された~node, [
1028210288
`~node$/ ~NULL
1028310289
] %旧-親 )
10284-
が渡される。
10290+
が渡される
1028510291
1028610292
Specifications may define removing steps for all or some nodes. The algorithm is passed a node removedNode and a node-or-null oldParent, as indicated in the remove algorithm below.
1028710293
</p>
1028810294

10295+
<p class="trans-note">【†
10296+
この~algoに渡される引数(旧-親)は`変更される予定にあり@https://github.com/whatwg/dom/commit/73de9e5e1bfe581397d58d0b10b4da448d973c8a$,
10297+
すでに `HTML$r からは それに従って利用されているが、
10298+
まだ,この仕様には反映されていない。
10299+
】</p>
10300+
1028910301
<!--% 除去 -->
1029010302
<div class="algo">
1029110303
<p>

HTML-form-elements-ja.html

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@
158158

159159
●●options
160160

161-
spec_date:2026-01-16
162-
trans_update:2026-01-17
161+
spec_date:2026-02-25
162+
trans_update:2026-02-26
163163
source_checked:250314
164164
page_state_key:HTML
165165
spec_status:LS
@@ -996,9 +996,10 @@
996996

997997
%挿入された~node:insertedNode
998998
%挿入された~option_e:insertedOption
999-
%除去された~option_e:removedOption
999+
%除去された~node:removedNode
10001000
%移動された~node:movedNode
1001-
%-:oldParent
1001+
%下位treeの根か:isSubtreeRoot
1002+
%-先祖:oldAncestor
10021003
%所有者:-
10031004
%~select_e:-
10041005
%~select_e:selectElement
@@ -7081,23 +7082,23 @@ <h4 title="The option element">4.10.10. ``option^e 要素</h4>
70817082
<div class="algo">
70827083
`option$e 用の`~HTML要素~除去-時の手続き$は、
70837084
所与の
7084-
( %除去された~option_e, %旧-親 )
7085+
( %除去された~node, %下位treeの根か, %旧-先祖 )
70857086
に対し
70867087
7087-
`~option_eに最も近い先祖~select_eを更新する$( %除去された~option_e )
7088+
`~option_eに最も近い先祖~select_eを更新する$( %除去された~node )
70887089
7089-
The option HTML element removing steps, given removedOption and oldParent, are to run update an option's nearest ancestor select given removedOption.
7090+
The option HTML element removing steps, given removedNode, isSubtreeRoot, and oldAncestor are to run update an option's nearest ancestor select given removedNode.
70907091
</div>
70917092

70927093
<div class="algo">
70937094
`option$e 用の`~HTML要素~移動-時の手続き$は、
70947095
所与の
7095-
( %移動された~node, %旧-親 )
7096+
( %移動された~node, %下位treeの根か, %旧-先祖 )
70967097
に対し
70977098
70987099
`~option_eに最も近い先祖~select_eを更新する$( %移動された~node )
70997100
7100-
The option HTML element moving steps, given movedNode and oldParent, are to run update an option's nearest ancestor select given movedNode.
7101+
The option HTML element moving steps, given movedNode, isSubtreeRoot, and oldAncestor are to run update an option's nearest ancestor select given movedNode.
71017102
</div>
71027103

71037104
<div class="algo">
@@ -11319,19 +11320,19 @@ <h4 title="The selectedcontent element">4.10.17. ``selectedcontent^e 要素</h4>
1131911320
<p>
1132011321
`selectedcontent$e 用の`~HTML要素~除去-時の手続き$は、
1132111322
所与の
11322-
( %~selectedcontent_e, %旧-親 )
11323+
( %除去された~node, %下位treeの根か, %旧-先祖 )
1132311324
に対し:
1132411325
</p>
1132511326
<ol>
1132611327
<li>
1132711328
~IF[
11328-
%~selectedcontent_e の``不能化されたか$ ~EQ ~T
11329+
%除去された~node の``不能化されたか$ ~EQ ~T
1132911330
1133011331
1133111332
~RET
1133211333
</li>
1133311334
<li>
11334-
%先祖 ~LET %~selectedcontent_e の`親$
11335+
%先祖 ~LET %除去された~node の`親$
1133511336
</li>
1133611337
<li>
1133711338
~WHILE[
@@ -11350,7 +11351,7 @@ <h4 title="The selectedcontent element">4.10.17. ``selectedcontent^e 要素</h4>
1135011351
~RET
1135111352
</li>
1135211353
<li>
11353-
%先祖 ~SET %旧-
11354+
%先祖 ~SET %旧-先祖
1135411355
</li>
1135511356
<li>
1135611357
~WHILE[
@@ -11370,11 +11371,11 @@ <h4 title="The selectedcontent element">4.10.17. ``selectedcontent^e 要素</h4>
1137011371
</li>
1137111372
</ol>
1137211373
11373-
The selectedcontent HTML element removing steps, given selectedcontent and oldParent, are:
11374-
• If selectedcontent's disabled is true, then return.
11375-
• For each ancestor of selectedcontent's ancestors, in reverse tree order:
11374+
The selectedcontent HTML element removing steps, given removedNode, isSubtreeRoot, and oldAncestor are:
11375+
• If removedNode's disabled is true, then return.
11376+
• For each ancestor of removedNode's ancestors, in reverse tree order:
1137611377
•• If ancestor is a select element, then return.
11377-
• For each ancestor of oldParent's inclusive ancestors, in reverse tree order:
11378+
• For each ancestor of oldAncestor's inclusive ancestors, in reverse tree order:
1137811379
•• If ancestor is a select element, then run update a select's selectedcontent given ancestor and return.
1137911380
</div>
1138011381

HTML-images-ja.html

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@
130130

131131
●●options
132132

133-
spec_date:2025-10-17
134-
trans_update:2025-10-18
133+
spec_date:2026-02-25
134+
trans_update:2026-02-26
135135
source_checked:230602
136136
page_state_key:HTML
137137
spec_status:LS
@@ -856,8 +856,9 @@
856856
%挿入された~node:insertedNode
857857
%移動された~node:movedNode
858858
%除去された~node:removedNode
859+
%下位treeの根か:isSubtreeRoot
860+
%-先祖:oldAncestor
859861
%:-
860-
%-:oldParent
861862
%要素:el
862863
%~source集合:sourceSet
863864
%~source集合:source set
@@ -2237,18 +2238,20 @@ <h4 title="The source element">4.8.2. `source^e 要素</h4>
22372238
<p>
22382239
`source$e 用の`~HTML要素~移動-時の手続き$は、
22392240
所与の
2240-
( %移動された~node, %旧-親 )
2241+
( %移動された~node, %下位treeの根か, %旧-先祖 )
22412242
に対し:
22422243
2243-
The source HTML element moving steps, given movedNode and oldParent, are:
2244+
The source HTML element moving steps, given movedNode, isSubtreeRoot, and oldAncestor are:
22442245
</p>
22452246
<ol>
22462247
<li>
22472248
~IF[
2248-
%旧-親 は `picture$e 要素である
2249+
%下位treeの根か ~EQ ~T
2250+
]~AND[
2251+
%旧-先祖 は `picture$e 要素である
22492252
22502253
2251-
%旧- の`子~群$を成す
2254+
%旧-先祖 の`子~群$を成す
22522255
~EACH( %子 )
22532256
に対し
22542257
@@ -2258,7 +2261,7 @@ <h4 title="The source element">4.8.2. `source^e 要素</h4>
22582261
22592262
%子 は`関連な変異$を経たものとして~~扱う
22602263
2261-
If oldParent is a picture element, then for each child of oldParent's children, if child is an img element, then count this as a relevant mutation for child.
2264+
If isSubtreeRoot is true and oldAncestor is a picture element, then for each child of oldAncestor's children: if child is an img element, then count this as a relevant mutation for child.
22622265
</li>
22632266
</ol>
22642267
</div>
@@ -2267,18 +2270,20 @@ <h4 title="The source element">4.8.2. `source^e 要素</h4>
22672270
<p>
22682271
`source$e 用の`~HTML要素~除去-時の手続き$は、
22692272
所与の
2270-
( %除去された~node, %旧-親 )
2273+
( %除去された~node, %下位treeの根か, %旧-先祖 )
22712274
に対し:
22722275
2273-
The source HTML element removing steps, given removedNode and oldParent, are:
2276+
The source HTML element removing steps, given removedNode, isSubtreeRoot, and oldAncestor are:
22742277
</p>
22752278
<ol>
22762279
<li>
22772280
~IF[
2278-
%旧-親 は `picture$e 要素である
2281+
%下位treeの根か ~EQ ~T
2282+
]~AND[
2283+
%旧-先祖 は `picture$e 要素である
22792284
22802285
2281-
%旧- の`子~群$を成す
2286+
%旧-先祖 の`子~群$を成す
22822287
~EACH( %子 )
22832288
に対し
22842289
@@ -2288,7 +2293,7 @@ <h4 title="The source element">4.8.2. `source^e 要素</h4>
22882293
22892294
%子 は`関連な変異$を経たものとして~~扱う
22902295
2291-
If oldParent is a picture element, then for each child of oldParent's children, if child is an img element, then count this as a relevant mutation for child.
2296+
If isSubtreeRoot is true and oldAncestor is a picture element, then for each child of oldAncestor's children: if child is an img element, then count this as a relevant mutation for child.
22922297
</li>
22932298
</ol>
22942299
</div>
@@ -2899,20 +2904,22 @@ <h4 title="The img element">4.8.3. `img^e 要素</h4>
28992904
<p>
29002905
`img$e 用の`~HTML要素~移動-時の手続き$は、
29012906
所与の
2902-
( %移動された~node, %旧-親 )
2907+
( %移動された~node, %下位treeの根か, %旧-先祖 )
29032908
に対し:
29042909
2905-
The img HTML element moving steps, given movedNode and oldParent, are:
2910+
The img HTML element moving steps, given movedNode, isSubtreeRoot, and oldAncestor are:
29062911
</p>
29072912
<ol>
29082913
<li>
29092914
~IF[
2910-
%旧-親 は `picture$e 要素である
2915+
%下位treeの根か ~EQ ~T
2916+
]~AND[
2917+
%旧-先祖 は `picture$e 要素である
29112918
29122919
29132920
%移動された~node は`関連な変異$を経たものとして~~扱う
29142921
2915-
If oldParent is a picture element, then, count this as a relevant mutation for movedNode.
2922+
If isSubtreeRoot is true and oldAncestor is a picture element, then count this as a relevant mutation for movedNode.
29162923
</li>
29172924
</ol>
29182925
</div>
@@ -2921,20 +2928,22 @@ <h4 title="The img element">4.8.3. `img^e 要素</h4>
29212928
<p>
29222929
`img$e 用の`~HTML要素~除去-時の手続き$は、
29232930
所与の
2924-
( %除去された~node, %旧-親 )
2931+
( %除去された~node, %下位treeの根か, %旧-先祖 )
29252932
に対し:
29262933
2927-
The img HTML element removing steps, given removedNode and oldParent, are:
2934+
The img HTML element removing steps, given removedNode, oldAncestor, and isSubtreeRoot are:
29282935
</p>
29292936
<ol>
29302937
<li>
29312938
~IF[
2932-
%旧-親 は`picture$e 要素である
2939+
%下位treeの根か ~EQ ~T
2940+
]~AND[
2941+
%旧-先祖 は `picture$e 要素である
29332942
29342943
29352944
%除去された~node は`関連な変異$を経たものとして~~扱う
29362945
2937-
If oldParent is a picture element, then, count this as a relevant mutation for removedNode.
2946+
If isSubtreeRoot is true and oldAncestor is a picture element, then count this as a relevant mutation for removedNode.
29382947
</li>
29392948
</ol>
29402949
</div>

HTML-infrastructure-ja.html

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898

9999
●●options
100100

101-
spec_date:2025-07-16
102-
trans_update:2025-07-16
101+
spec_date:2026-02-25
102+
trans_update:2026-02-26
103103
source_checked:240619
104104
page_state_key:HTML
105105
spec_status:LS
@@ -364,7 +364,8 @@
364364
%挿入された~node:insertedNode
365365
%除去された~node:removedNode
366366
%移動された~node:movedNode
367-
%-:oldParent
367+
%下位treeの根か:isSubtreeRoot
368+
%-先祖:oldAncestor
368369
%大域~obj:global
369370

370371
●構文/形式
@@ -1254,8 +1255,8 @@ <h4 title="DOM trees">2.1.4. ~DOM~tree</h4>
12541255

12551256
<div>
12561257
<p>
1257-
~HTML要素には
1258-
`局所~名$elごとに,次に挙げる特有な手続きが定義され得る:
1258+
`~HTML要素$には
1259+
その`局所~名$elごとに,次に挙げる特有な手続きが定義され得る:
12591260
</p>
12601261
<ul>
12611262
<li>
@@ -1388,10 +1389,10 @@ <h4 title="DOM trees">2.1.4. ~DOM~tree</h4>
13881389
<p>
13891390
~HTML標準~用の`除去-時の手続き$は、
13901391
所与の
1391-
( %除去される~node, %旧-親 )
1392+
( %除去される~node, %下位treeの根か, %旧-先祖 )
13921393
に対し,次に従うものと定義される:
13931394
1394-
The removing steps for the HTML Standard, given removedNode and oldParent, are defined as the following:
1395+
The removing steps for the HTML Standard, given removedNode, isSubtreeRoot, and oldAncestor, are defined as the following:
13951396
</p>
13961397
<ol>
13971398
<li>
@@ -1452,10 +1453,10 @@ <h4 title="DOM trees">2.1.4. ~DOM~tree</h4>
14521453
<p>
14531454
…ならば
14541455
1455-
%手続き( %除去される~node, %旧-親 )
1456+
%手続き( %除去される~node, %下位treeの根か, %旧-先祖 )
14561457
</p>
14571458
1458-
If removedNode is an element whose namespace is the HTML namespace, and this standard defines HTML element removing steps for removedNode's local name, then run the corresponding HTML element removing steps given removedNode and oldParent.
1459+
If removedNode is an element whose namespace is the HTML namespace, and this standard defines HTML element removing steps for removedNode's local name, then run the corresponding HTML element removing steps given removedNode, isSubtreeRoot, and oldAncestor.
14591460
</li>
14601461
<li>
14611462
<p>
@@ -1500,10 +1501,10 @@ <h4 title="DOM trees">2.1.4. ~DOM~tree</h4>
15001501
<p>
15011502
~HTML標準~用の`移動-時の手続き$は、
15021503
所与の
1503-
( %移動された~node )
1504+
( %移動された~node, %下位treeの根か, %旧-先祖 )
15041505
に対し,次に従うものと定義される:
15051506
1506-
The moving steps for the HTML Standard, given movedNode, are defined as the following:
1507+
The moving steps for the HTML Standard, given movedNode, isSubtreeRoot, and oldAncestor, are defined as the following:
15071508
</p>
15081509
<ol>
15091510
<li>
@@ -1526,10 +1527,10 @@ <h4 title="DOM trees">2.1.4. ~DOM~tree</h4>
15261527
<p>
15271528
…ならば
15281529
1529-
%手続き( %移動された~node )
1530+
%手続き( %移動された~node, %下位treeの根か, %旧-先祖 )
15301531
</p>
15311532
1532-
If movedNode is an element whose namespace is the HTML namespace, and this standard defines HTML element moving steps for movedNode's local name, then run the corresponding HTML element moving steps given movedNode.
1533+
If movedNode is an element whose namespace is the HTML namespace, and this standard defines HTML element moving steps for movedNode's local name, then run the corresponding HTML element moving steps given movedNode, isSubtreeRoot, and oldAncestor.
15331534
</li>
15341535
<li>
15351536
<p>

HTML-interactive-elements-ja.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@
301301
%結果:result
302302
%~modalであったか:wasModal
303303
%除去された~node:removedNode
304-
%旧-親:oldParent
304+
%下位treeの根か:isSubtreeRoot
305+
%旧-先祖:oldAncestor
305306
%旧-状態:oldState
306307
%新-状態:newState
307308
%閉じる必要がある要素:-
@@ -3512,10 +3513,10 @@ <h4 title="The dialog element">4.11.4. ``dialog^e 要素</h4>
35123513
<p>
35133514
`dialog$e 要素~用の`~HTML要素~除去-時の手続き$は、
35143515
所与の
3515-
( %除去された~node, %旧-親 )
3516+
( %除去された~node, %下位treeの根か, %旧-先祖 )
35163517
に対し:
35173518
3518-
The dialog HTML element removing steps, given removedNode and oldParent, are:
3519+
The dialog HTML element removing steps, given removedNode, isSubtreeRoot, and oldAncestor are:
35193520
</p>
35203521
<ol>
35213522
<li>

0 commit comments

Comments
 (0)