code wiki / _hdl_build / nx_browser_darkmode_gate.nx

nx_browser_darkmode_gate.nx

buildroot/runtime/_hdl_build/nx_browser_darkmode_gate.nx

6987 B130 linesdepth 9pulls 29 transitivereach 0 importersview sourcekind gate/prooftopic browser
docsdependenciesstructsconstsfunctions

about

nx_browser_darkmode_gate.nx -- DARK MODE (the "OLED look" the operator framed the visual push around), a UX-census ADMIT flipped by BUILD + evidence. Renders the SAME bench page through the real core in LIGHT (dark_mode=0) and DARK (dark_mode=1); proves: (T1) the light page is majority-LIGHT; (T2) the dark page is majority-DARK -- the theme actually FLIPPED (CAN-FAIL control: if the flag did nothing the two renders would be identical and this fails); (T3) dark page still has LIGHT TEXT ink (readable, not an all-black void); (T4) the browser chrome went dark too (coherent, not a light bar on a dark page); (T5) evidence PNGs written (light + dark + a side-by-side) for the eyeball. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_browser_render.nx nx_browser_darkmode_gate.nx

imports: nx_browser_render.nx

imported by: nobody (leaf or entry point)

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

main dm_puts sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close dm_render br_layout br_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

structs

none

consts

13const DM_W: i64 = 900

functions

10func dm_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
11func dm_num(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main
15func dm_render(html: *u8, hlen: i64, dark: i64, hout: *i64) -> *u8
34func dm_counts(px: *u8, W: i64, H: i64, out: *i64) -> i64
55func dm_rgb_write(px: *u8, W: i64, H: i64, path: *u8) -> i64
63func dm_chrome_lum(px: *u8, W: i64) -> i64
71func main() -> i64