code wiki / _hdl_build / nx_rawtext_layout_gate.nx
nx_rawtext_layout_gate.nx
buildroot/runtime/_hdl_build/nx_rawtext_layout_gate.nx
about
nx_rawtext_layout_gate.nx -- PROOF (re-runnable) of the google-blank root fix: a bare `<` inside a
<script>/<style> body (e.g. JS `a<b`, `if (x<y)`) must NOT eat the closing tag and suppress the rest of
the page. Before the fix, layout_from_dom relied on a `suppress` counter and let the tokenizer parse
`<b` as a start tag whose attribute-skip consumed `</script>` -> script never closed -> all following
visible text dropped (google.com rendered blank while laying out 3378px). Fix = layout_from_dom now
consumes raw-text bodies via the HTML5 scanner, like the 3 other tokenizer consumers already did.
Each test lays out an inline fixture through the REAL br_layout and asserts the post-script text renders.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_browser_render.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
| 12 | func rt_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func rt_n(v: i64) -> i64 { let t: *u8=sys_mmap(24); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} 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} let b: *u8=sys_mmap(24); var j: i64=0; while j<k{b[j]=t[k-1-j];j=j+1} sys_write(1,b,k); return 0 } |
| 14 | func rt_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 15 | func rt_box(t: *LayoutTree, i: i64) -> *LayoutBox called by 1: rt_renders |
| 18 | func rt_has(src: *u8, off: i64, len: i64, m: *u8) -> i64 |
| 32 | func rt_renders(html: *u8, marker: *u8) -> i64 |
| 49 | func rt_case(html: *u8, marker: *u8, label: *u8) -> i64 |
| 56 | func main() -> i64 |