code wiki / _hdl_build / nx_grid_gate.nx
nx_grid_gate.nx
buildroot/runtime/_hdl_build/nx_grid_gate.nx
about
nx_grid_gate.nx -- VERDICT gate for the GRID rung (display:grid + grid-template-columns) of the
sovereign HTML renderer. Runs the REAL render pipeline prefix on controlled grid fixtures and ASSERTS
exact box geometry (measured via nx_grid_test, not guessed). Proves: N equal columns from an explicit
track list `1fr 1fr 1fr` AND from `repeat(3, 1fr)`; ROW-MAJOR WRAPPING (4 kids / 2 cols -> row 2 at
y=10); and a DIFFERENTIAL no-grid control (same markup STACKS without display:grid -> a no-op grid
can't pass both). LIAR-KILL: the checker fed a wrong expectation must reject it. GREEN iff all hold.
Also exercises the CSS multi-token value capture (grid-template-columns is a multi-value property).
100% sovereign (no gcc/V8/Chrome). license_tier: ORIGINAL
dependencies 14 imports · 0 importers
diagram shows first 10 each side; +4 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_css_tokenize.nxnx_css_parse.nxnx_css_apply.nxnx_css_color_decode.nxnx_css_dimension_to_px.nxnx_css_selector_match.nxnx_html_tokenizer.nxnx_dom_query.nxnx_layout_box.nxnx_layout_default_display.nxnx_layout_from_dom.nxnx_layout_block.nxnx_render_html.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 24 | func g_w(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} sys_write(1,s,k); return 0 } |
| 25 | func pn(v0: i64) -> i64 { var v: i64=v0; if v<0 { let m: *u8=sys_mmap(8); m[0]=45 as u8; sys_write(1,m,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48;k=1} while v>0 {b[k]=(48+(v%10)) as u8; v=v/10; k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k {o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 } |
| 28 | func run_layout(html: *u8, css: *u8, vw: i64) -> *LayoutTree called by 1: main calls 13: sys_mmapnx_layout_tree_initnx_layout_from_dom_stack_initnx_layout_from_domrh_extractrh_is_elem+7 |
| 91 | func geom_match(tree: *LayoutTree, i: i64, ex: i64, ey: i64, ew: i64, eh: i64) -> i64 |
| 99 | func chk(tree: *LayoutTree, i: i64, ex: i64, ey: i64, ew: i64, eh: i64, label: *u8, pass: *i64) -> i64 |
| 111 | func main() -> i64 |