formats: std/html formatting elements and the adoption agency (step 2b of #79) #734
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language#734
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #79 (step 2, second slice). Step 2a (#688) is on
main:HtmlNode,HtmlDocument.parse, the insertion modes of the document skeleton and plainin bodycontent, and the vendored html5lib tree-construction suite with a named skip list.Goal
std/htmlhandles formatting elements: the list of active formatting elements, "reconstruct the active formatting elements" and the adoption agency algorithm, so that misnested markup such as<b><p></b>textbuilds the tree the standard prescribes. Tables, foster parenting, foreign content,<template>,<select>/<frameset>and fragment parsing stay later slices.Acceptance criteria
a,b,big,code,em,font,i,nobr,s,small,strike,strong,tt,ufollow section 13.2.6.4.7 (in body): push onto the list of active formatting elements with the Noah's Ark clause (three identical entries), reconstruct the list before inserting text and other elements, and run the adoption agency algorithm (outer loop of at most 8 iterations, inner loop with its 3 iteration clamp) for their end tags and for the "any other end tag" fallthrough where the standard calls it.<a>inside an open<a>and<nobr>inside an in-scope<nobr>run the adoption agency first, as specified; markers forapplet,object,marquee(and latertd,th,caption) clear the list to the last marker.tree.test.trbtheformatting elementskip reason is removed fromreasonOfTag; every html5lib tree-construction case that was skipped only for that reason passes, includingadoption01,adoption02,tests1.datandtests2.datcases. Cases that also contain a table, foreign content, template, select or frameset tag stay skipped under that reason.NOTICE.mdand the skip-count assertion are updated to the new counts, read from CI.tree.trbname the formatting elements as built;tools/gates.sh agreen in CI.Design pointers
in body), 13.2.6.4.7 "adoption agency algorithm"; step 2a'sstd/html/src/tree.trb(insertion modes, stack of open elements) andstd/html/tests/tree.test.trb(reasonOfTag,skipReason, skip counts; 127 cases currently skipped asformatting element).HtmlNode,HtmlDocument; no type calledHtml.Seed
No. Only
std/htmlchanges; the compiler imports nostd/htmlname. If a compiler change turns out to be needed, split it into its own commit and stop: a seed touch means a teaching commit and a migration commit, and the seed refresh is the owner's step.Size
One PR, one or two Conventional Commits (
feat(html): ...for the formatting elements and the adoption agency,test(html): ...for the skip list change). About 2 to 3 hours.std/htmldocuments (epic) #79std/htmldocuments (epic) #79[loop:torbscript] claim implement by session:loop-torbscript-20261113 until 2026-11-13T12:50:00Z
[loop:torbscript] implement: the worker hit its time limit after opening PR #737 (head
3006ac8); CI is running, no red job yet, Argus is requested. Claim released.next: review
[loop:torbscript] claim implement by session:loop-torbscript-20261113 until 2026-11-13T13:55:00Z (CI red on PR #737: tier A, gates; fix on the existing branch)