code wiki / _hdl_build / nx_render_page_gate.nx

nx_render_page_gate.nx

buildroot/runtime/_hdl_build/nx_render_page_gate.nx

7260 B125 linesdepth 8pulls 28 transitivereach 0 importersview sourcekind gate/prooftopic render
docsdependenciesstructsconstsfunctions

about

nx_render_page_gate.nx -- VERDICT gate for the PAINT + ENCODE back half of the sovereign HTML renderer (browser Phase 2-4). The float gate proved LAYOUT geometry; this proves a realistic page actually PAINTS and ENCODES correctly: render a mini-article (h1/h2 bars, float:right infobox, blue link, ul bullets, flex table) to a 24-bit BMP, read the BMP back, and assert dimensions + that every UA-sheet color is actually present in the pixels. Expectations are MEASURED (nx_render_page_probe), not guessed. LIAR-KILL: a color the page never uses (#00ff00) must be ABSENT -- proving the pixel scanner has teeth and "PRESENT" is not a rubber stamp. GREEN iff every assertion holds. 100% sovereign. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_render_html.nx nx_layout_block.nx nx_render_page_gate.nx

imports: nx_syscalls.nxnx_render_html.nxnx_layout_block.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap p_w sys_write nx_render_html_to_bmp sys_mmap ↻ _rh_to_fb rh_slen sys_mmap ↻ rh_extract_styles sys_mmap ↻ nx_html_cursor_init nx_html_next_token _scan_name _is_name _is_void_element _lc nx_html_is_raw_text_tag _lc ↻ nx_html_consume_raw_text _lc ↻ _is_ws _lfd_name_eq _lfd_lc _rh_copy_css rh_filter_media sys_mmap ↻ rh_find rh_media_matches rh_find ↻ rh_num_after rh_digit cx_expand sys_mmap ↻ cx_collect cx_ch cx_is_ws cx_find cx_emit_span cx_ch ↻

structs

none

consts

none

functions

12func p_w(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} sys_write(1,s,k); return 0 }
called by 4: chkchkvchk_colormain calls 1: sys_write
13func p_n(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 }
called by 3: chkvchk_colormain calls 2: sys_mmapsys_write
14func u32le(d: *u8, p: i64) -> i64 { return (d[p]&0xff) + ((d[p+1]&0xff)<<8) + ((d[p+2]&0xff)<<16) + ((d[p+3]&0xff)<<24) }
called by 1: main
17func color_present(data: *u8, off: i64, w: i64, h: i64, R: i64, G: i64, B: i64) -> i64
called by 1: chk_color
34func count_nonwhite(data: *u8, off: i64, w: i64, h: i64) -> i64
called by 1: main
55func chk(cond: i64, label: *u8, pass: *i64) -> i64
called by 1: main calls 1: p_w
60func chkv(got: i64, want: i64, label: *u8, pass: *i64) -> i64
called by 1: main calls 2: p_wp_n
68func chk_color(data: *u8, off: i64, w: i64, h: i64, R: i64, G: i64, B: i64, want_present: i64, label: *u8, pass: *i64) -> i64
called by 1: main calls 3: color_presentp_wp_n
76func main() -> i64