// Isolates the proposed mechanism (Gecko's 1/60-CSS-px app units versus Blink/WebKit's // 1/64-CSS-px LayoutUnit, docs/firefox-app-units.md "The likely mechanism") from anything // DPR-dependent, by reproducing the harness's exact worst-case shape -- // `recipe_nesting_depth` in crates/harness/src/cases.rs, twelve levels of `width: // 83.333%` nested inside each other, viewport 800x600 -- and reading back the raw // sub-pixel width at DPR 1, 1.5, 2 and 3. // // Layout-time quantization (app units, LayoutUnit) is expressed in CSS pixels, which do // not change with device pixel ratio; only paint-time device-pixel snapping does. If the // disagreement's magnitude is identical across all four DPRs, that is direct evidence the // mechanism is the CSS-pixel unit grid and not anything resolution-dependent. import fs from 'node:fs'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { launchAll, closeAll, openPages, measureOnPages, doc, ENGINE_NAMES } from './engines.mjs'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const resultsDir = path.join(__dirname, 'results'); fs.mkdirSync(resultsDir, { recursive: true }); const DEPTH = 12; const STEP_PCT = '83.333%'; // recipe_nesting_depth's pool[0] -- the enumerated harness case's exact value function buildHtml() { let inner = `
`; for (let i = 0; i < DEPTH - 1; i++) inner = `