Commit Graph
248 Commits
Author SHA1 Message Date
SGavrl 68f20cf525 Improve render lifecycle, geometry, and PDF parity 2026-08-04 00:32:43 +00:00
SGavrl ede14b7740 Speed up retained rendering and honor PDF backgrounds 2026-08-03 22:08:44 +00:00
SGavrl 222b50e480 Reduce render latency and improve headless input 2026-08-03 21:17:17 +00:00
SGavrl c8a5477296 Improve modern rendering and output parity 2026-08-03 19:46:24 +00:00
SGavrl 51a3eb1a81 Prepare fast document-space captures 2026-08-03 16:33:47 +00:00
SGavrl 478f888a6b Implement renderer-backed nested scrolling 2026-08-03 15:58:33 +00:00
SGavrl 33923da61e Honor standard image source selection 2026-08-03 14:07:25 +00:00
SGavrl a3f3c32392 Align fallback CSS feature truth 2026-08-03 13:48:24 +00:00
SGavrl edb1785313 Implement document title and referrer semantics 2026-08-03 13:46:11 +00:00
SGavrl f1b1f5af5e Trust client-side hydration mutations 2026-08-03 13:35:09 +00:00
SGavrl 26a78a91c8 Implement CSS text truncation 2026-08-03 13:29:16 +00:00
SGavrl d41a4b88e6 Unify CSS feature query truth 2026-08-03 13:11:28 +00:00
SGavrl 41a8e1c1a6 Preserve script execution state across DOM moves 2026-08-03 11:49:08 +00:00
SGavrl 34373c309e Support current document import maps 2026-08-03 11:25:54 +00:00
SGavrl b1aec0c0bb Unify page module graph fetching 2026-07-31 11:16:43 +00:00
SGavrl 4d459c2125 Upgrade the HTML parser foundation 2026-07-31 10:59:02 +00:00
SGavrl 6fdcd19898 Match selectors inside ShadowRoot trees 2026-07-31 10:34:06 +00:00
SGavrl a4a3ea49ba Complete ShadowRoot child mutation semantics 2026-07-31 10:20:22 +00:00
SGavrl 2117fa0b8c Fix ShadowRoot child tree semantics 2026-07-31 10:14:48 +00:00
SGavrl 3e377cef67 Match inline font fragment geometry 2026-07-31 10:02:59 +00:00
SGavrl 61d61feb50 Fix ordinary inline used sizing 2026-07-31 09:30:58 +00:00
SGavrl 5f67bad4fe Expose live computed CSS variables to scripts 2026-07-31 08:26:08 +00:00
SGavrl 2343681497 Expose live browser geometry and computed styles 2026-07-31 07:51:57 +00:00
SGavrl 9bacacc60d Run custom element upgrades through real constructors 2026-07-31 06:47:56 +00:00
SGavrl b744b9b437 Honor Fetch credentials across origins 2026-07-31 03:52:05 +00:00
SGavrl 5c34e74f10 Connect document font faces to rendering 2026-07-31 03:31:21 +00:00
SGavrl 9455d18439 Allow reusing disconnected intersection observers 2026-07-31 02:56:06 +00:00
SGavrl bae1259afe Track responsive image candidates in lifecycle 2026-07-31 01:55:25 +00:00
SGavrl c5210b1684 Connect image elements to render resources 2026-07-31 01:32:19 +00:00
SGavrl 139d4e77e1 Preserve root scrolling overflow geometry 2026-07-31 01:23:47 +00:00
SGavrl 90ed9afcad Clone DOM elements without reparsing 2026-07-31 00:54:22 +00:00
SGavrl be700f545b Propagate ES module failures 2026-07-31 00:38:47 +00:00
SGavrl f61493fbd1 Reject unsuccessful script responses 2026-07-30 23:25:09 +00:00
SGavrl 5057715358 Share prepared layout with CSSOM 2026-07-30 22:08:01 +00:00
SGavrl 917da17410 Correct intersection observer parity oracle 2026-07-30 20:33:03 +00:00
SGavrl 10b8492116 Improve modern layout and viewport rendering 2026-07-30 20:24:57 +00:00
SGavrl fa6503c560 dom: apply dynamically linked stylesheets 2026-07-26 22:33:36 +00:00
SGavrl 9c71700824 dom: support live select option construction 2026-07-26 22:11:29 +00:00
SGavrl 9ffc071ce0 dom: settle async inline style updates 2026-07-26 21:31:14 +00:00
SGavrl 9dfc67af74 dom: expose browser window constructor identity 2026-07-26 20:07:45 +00:00
SGavrl 3d02525f35 dom: expose media text track cues 2026-07-26 14:50:57 +00:00
SGavrl ec5950da06 dom: deliver standalone event target listeners 2026-07-26 14:27:29 +00:00
SGavrl 3618549842 render: unify responsive geometry and inline gradients 2026-07-26 11:51:44 +00:00
SGavrl 29d0bce3f5 render: expose WebGL as unavailable without backend 2026-07-26 11:14:43 +00:00
SGavrl 228a5723ce render: support modern framework content and geometry 2026-07-26 10:50:31 +00:00
SGavrl 5de5d07c24 render: support streamed framework hydration
Make attribute maps live, preserve parser script execution state, and expose
element scrolling used by React commit callbacks. Connect fallback web streams
so React Router and Remix hydration payloads flow through codec transforms.
2026-07-23 10:59:51 +00:00
SGavrl 2652ee64a4 render: real-world CSS rendering parity
Colors: oklch()/oklab() and color-mix(); linear-gradient backgrounds.
Grid: named-line placement, repeat() expansion, drop whitespace-only
grid items; upgrade taffy 0.7 -> 0.12 so aspect-ratio images in
auto-height rows no longer collapse to slivers.
CSS: @layer, nesting, @property, :is()/:where(), clamp(), @media not all;
source/track/param/area and svg desc/metadata as display:none.
Images: webp + intrinsic sizing, srcset/picture, browser UA + Accept for
CDN fetches, grey placeholder on failure; width/height HTML attributes
rank below author CSS with aspect-ratio preserved for auto axes.
2026-07-11 19:52:36 +00:00
SGavrl cdd52ade43 render: PNG screenshots via CLI and CDP
End-to-end rasterization behind the render feature (which now enables
obscura-render/paint):

- obscura-render: screenshot_png(dom, viewport) paints and encodes to PNG
  via tiny-skia's encode_png (no extra dep).
- obscura-browser: Page::screenshot renders the live DOM at a viewport.
- CLI: obscura fetch --screenshot out.png writes the settled page to a PNG.
- CDP: Page.captureScreenshot returns the PNG base64-encoded, so
  Puppeteer/Playwright page.screenshot() works. captureSnapshot still
  errors (it is a DOM/layer snapshot, not an image).

Verified: both paths produce correct 1280x720 RGBA PNGs with elements
laid out and colored as the CSS specifies (block stacking, backgrounds,
white page). Default build unchanged; obstacle course 33/33.

Text, borders, and images are not yet painted; the box layout and
background colors are rendered.
2026-07-01 21:34:15 +00:00
SGavrl 399181b975 render: expose real geometry to JS behind the render feature
getBoundingClientRect, offsetWidth/Height, and offsetTop/Left now read
real box geometry from the obscura-render layout cache when the render
feature is compiled in. elementFromPoint inherits correct hit-testing
because it already delegates to getBoundingClientRect per element.

Adds a render feature on obscura-js (propagated through obscura-browser
and obscura-cli), a lazily-computed layout cache and viewport in
ObscuraState (feature-gated, cleared on navigation), and an
op_layout_geometry op. bootstrap.js probes the op with typeof, so the
default scraping build is unchanged and falls through to the synthetic
rect.

With --features render, block siblings stack and flex children place
horizontally at correct positions, and elementFromPoint resolves the
right element. Default build returns the synthetic rect unchanged.
Obstacle course 33/33; obscura-js unit failures identical to main.
2026-06-30 20:36:43 +00:00
SGavrl 9d0e7d63dc Merge pull request #515 from mnaza/fix/domparser-xml-504
fix(js): surface a parsererror for malformed XML in DOMParser
2026-08-07 16:52:28 +00:00