11211 Commits
Author SHA1 Message Date
Karl Seguin 46ec342591 Merge pull request #4236 from lightpanda-io/flex-shrink
css: flex-shrink handling
2026-10-28 07:12:18 +08:00
Karl Seguin 6676867fe4 css: flex-shrink handling
Builds ontop of recent width improvements (1) and adds flex-shrink handling.
Horizontal margins are now also considered in width calculation and flex free
space.

Also, all flex rows now go through the flex path, not just growers. And the
flex path considers things like clipped content and absolutely positioned
children.

(1) https://github.com/lightpanda-io/browser/pull/4078
    https://github.com/lightpanda-io/browser/pull/4189
    https://github.com/lightpanda-io/browser/pull/4221
2026-10-28 06:41:47 +08:00
Karl Seguin 7b12874e03 Merge pull request #4235 from lightpanda-io/sub-sib-sel-speed
perf: optimize some subsequent sibling selector cases
2026-10-28 06:38:06 +08:00
Karl Seguin fb7c855dfd Merge pull request #4234 from lightpanda-io/better-websocket-proxy-support
webapi: WebSocket (webapi) ignores connect header
2026-10-28 06:37:35 +08:00
Karl Seguin 682c7c8c53 Merge pull request #4233 from lightpanda-io/dummy-path2d
webapi: Add dummy Path2D
2026-10-28 06:37:24 +08:00
Karl Seguin 2b6c90a070 Merge pull request #4224 from lightpanda-io/exec-command-shell
webapi: add an always-returning-false execCommand
2026-10-28 06:37:11 +08:00
Karl Seguin 57f991f5f7 Merge pull request #4223 from lightpanda-io/remove-touch-events
webapi: remove touch events
2026-10-28 06:36:59 +08:00
Karl Seguin 9fd20750fd Merge pull request #4222 from lightpanda-io/range-getClientRects
webapi: Fix Range.getClientRects
2026-10-28 06:36:43 +08:00
Karl Seguin 5bea97e912 Merge pull request #4221 from lightpanda-io/width-relative-container
webapi: width is relative to its boxed container, not its parent
2026-10-28 06:36:25 +08:00
Karl Seguin 1347ff4875 Merge pull request #4220 from lightpanda-io/rellist-support
webapi: correct rellist.support <a>, <area>, and <form>
2026-10-28 06:36:09 +08:00
Karl Seguin a8890115d9 Merge pull request #4219 from lightpanda-io/element-from-point-viewport
webapi: element(s)FromPoint returns null for points outside viewport
2026-10-28 06:35:52 +08:00
Karl Seguin 0bbadfa9a2 Merge pull request #4218 from lightpanda-io/known-css-properties
webapi: Extends like of known CSS properties
2026-10-28 06:34:45 +08:00
Karl Seguin 4697d95d0c Merge pull request #4217 from lightpanda-io/test-cross-validate
Test cross validate
2026-10-28 06:34:15 +08:00
Adrià Arrufat 92eb451400 Merge pull request #4237 from lightpanda-io/isocline-hangup
deps: bump isocline so the agent REPL exits when its terminal goes away
2026-10-27 16:52:13 +01:00
Adrià Arrufat 51d4387349 deps: bump isocline to 41bb0c5
An agent REPL whose terminal went away kept running. Killing the tmux
session it ran in, or dropping the ssh connection, left read() returning
0 on stdin while select() kept reporting it readable, and isocline
treated that as "no key yet": the editor redrew and read again in a tight
loop, allocating each time. Two of them left behind by a screencast had
grown past 4 GiB each within minutes.

isocline now ends the edit on EOF or a read error, as Ctrl-D on an empty
line does, so the REPL quits. Its signal handler also stops swallowing
termination signals it has no previous handler to chain to, which is
what let the SIGHUP from that hangup go unnoticed.

SIGTERM in the REPL still behaves like Ctrl-C: that is Sighandler's
no_hard_exit, and isocline never sees it.
2026-10-27 16:36:21 +01:00
Karl Seguin ce0a1f155d Merge pull request #4232 from starboy-3/fix/is-equal-node-namespace
webapi: compare element namespace URIs in isEqualNode
2026-10-27 22:25:21 +08:00
Karl Seguin 0a7af7f825 keep enum namespace comparison for known enums 2026-10-27 20:40:02 +08:00
Karl Seguin 87e043ea94 perf: optimize some subsequent sibling selector cases
Normally a ~ selector has to check all if it's siblings (it doesn't just check
its immediately proceeding sibling, it checks them all). But, there are common
cases where if the first sibling doesn't match, none of them can:

If the first .b sibling doesn't match (because its parent isn't #a) then none
of the other siblings can match, because they all share the same parent.

There are common cases where a subsequent sibling selector (~)
2026-10-27 20:16:14 +08:00
Karl Seguin 30ea188950 zig fmt 2026-10-27 19:27:10 +08:00
Karl Seguin 68a4dfff66 Merge pull request #4230 from lucoffe/fix/arena-reset-frees-oversized-block
arena: a reset frees the block it can't keep instead of shrinking it in place
2026-10-27 19:19:18 +08:00
Karl Seguin acc12dea4f webapi: WebSocket (webapi) ignores connect header
WebSocket (the webapi, not the CDP server) no longer receives the connect header
and thus no longer tries to interpret it as the handshake response.
2026-10-27 18:35:02 +08:00
Karl Seguin c29f58c620 webapi: Add dummy Path2D
Aligns with our dummy canvas. Unblocks scripts that get a ReferenceError trying
to use Path2D.
2026-10-27 18:20:41 +08:00
Ayub 34b0b5ec2f webapi: compare element namespace URIs in isEqualNode 2026-10-27 11:14:35 +01:00
Karl Seguin 4330a05ccb [de]compression stream validation
Skip brotli test if it isn't supported (Chrome).

WritableStreamDefaultWriter: writer.close() on an errored stream now rejects
with a new TypeError, not the stored error.
2026-10-27 17:01:01 +08:00
Karl Seguin fdd53f0bf4 record divergence in Chrome's (incorrect) HTMLCollections enumerability 2026-10-27 16:23:33 +08:00
Karl Seguin a5aedfd288 webapi: Cache mutable response headers
Spec says a cached response's headers should be immutable, but both Chrome
and Firefox allow setting to it. I couldn't find a WPT test that enforces it
either way, so I'm changing this to copy Chrome since some sites might
reasonably expect that behavior.
2026-10-27 16:17:15 +08:00
Karl Seguin 0251ef89bd Merge pull request #4225 from jayhemnani9910/fix/email-validation
Validate type=email like Chrome: dotless hosts, label rules and multiple
2026-10-27 16:10:41 +08:00
Karl Seguin 44a9c6432e Merge pull request #4226 from jayhemnani9910/fix/dataset-invalid-name
dataset: reject invalid names and map a leading capital to data--
2026-10-27 15:32:24 +08:00
Karl Seguin 5aa61f2a4c webapi: add an always-returning-false execCommand
I think we should start to implement this API, but returning false is a good
first step. Returning `false` for an unsupported or disabled command is the
spec-correct solution.

Marginally helps: https://github.com/lightpanda-io/browser/issues/4216
2026-10-27 12:59:17 +08:00
Karl Seguin 09ffaa6095 webapi: remove touch events
We're inconsistent in whether or not we support touch events.
navigator.maxTouchPoints is 0 and `'ontouchstart' in window` isn't in window
but it is in document.

This removes the touch handlers from document and element - we aren't emulating
a touch device.
2026-10-27 12:41:40 +08:00
Karl Seguin 7cdb42e400 webapi: Fix Range.getClientRects
Our range.getClientRects would *never* return more than one rect. We now walk
the range and emit the rect for each selected element whose parent isn't
selected, and a measureText rect for each selected text node.
2026-10-27 12:37:34 +08:00
Karl Seguin 454d3d5060 webapi: width is relative to its boxed container, not its parent
Fixes https://github.com/lightpanda-io/browser/issues/4213
2026-10-27 12:21:28 +08:00
Karl Seguin 4cfb7382ec webapi: correct rellist.support <a>, <area>, and <form>
Previously, we only knew about rel on <link>, and were returning its supported
values for all "rel" attributes.
2026-10-27 11:54:57 +08:00
Karl Seguin ce5065c52c webapi: element(s)FromPoint returns null for points outside viewport 2026-10-27 11:41:44 +08:00
Karl Seguin 4c4409e5a5 webapi: Extends like of known CSS properties
This is just about indicating whether we know the property or not, e.g. erroring
on an unknown property correctly, better CSS.support(...) answers and, similarly
the correctness of 'x' in getComputedStyle(el).

This is largely for ~5K WPT cases though it does open the door for more advanced
CSS work, including `@support` rules.

Also, we still don't parse / understand most values, so checks are limited to
property names.
2026-10-27 11:37:15 +08:00
Karl Seguin e2046f933d Merge pull request #4207 from jayhemnani9910/fix/script-main-world
scripts: run in the main world when inserted from an isolated world
2026-10-27 11:18:53 +08:00
Karl Seguin da414c1dde more timing fixes 2026-10-27 10:57:16 +08:00
Karl Seguin 04f0fb3eae ci: do more chrome test cross validation
Almost all fixes are either test fixture issues (timing differences) or expected
divergences.

ImageData just changed the error message for a Float16Array (now TypeError).
2026-10-27 10:32:34 +08:00
Karl Seguin 6c44d0871a Merge pull request #4215 from lightpanda-io/orderfile-regen
orderfile: regenerate the hot-code profile
2026-10-27 10:11:58 +08:00
muki eddbb047ed Merge pull request #4214 from lightpanda-io/zig-deps-regen 2026-10-26 18:34:27 -07:00
github-actions[bot] edf097e66d orderfile: regenerate the hot-code profile
hot set 16352KB resident at 4KB fault-around: 22041 text, 23522 rodata symbols
2026-10-27 01:05:03 +00:00
github-actions[bot] 08c0fbc278 nix: regenerate zig-deps.nix 2026-10-27 00:56:58 +00:00
Jay Hemnani e58cfbd448 scripts: run in the main world when inserted from an isolated world
Script.eval used frame.js, which is the isolated world's context while a
world call runs. Playwright's setContent writes the HTML with
document.write from its utility world, so inline scripts ran there and
their globals were missing for page.evaluate. Evaluate in frame.main_js.
2026-10-27 08:48:30 +08:00
Karl Seguin 6d71524a2f Merge pull request #4209 from lightpanda-io/feat/xai-provider-v2
agent: add xAI provider support
2026-10-27 07:08:32 +08:00
Karl Seguin 18dd85fa9c Merge pull request #4205 from lightpanda-io/cdp-error-message
cdp: on context not found, return the same code & message as Chrome
2026-10-27 07:03:00 +08:00
Karl Seguin 9148d5aeb2 Merge pull request #4203 from lightpanda-io/empty-form-action
webapi: support empty form action
2026-10-27 07:02:48 +08:00
Karl Seguin 33dbdb5783 Merge pull request #4202 from lightpanda-io/css-setFloat-undefined
webapi: Apply LegacyNullToEmptyString to setFloat
2026-10-27 07:02:32 +08:00
Karl Seguin fe1d90d5a9 Merge pull request #4201 from lightpanda-io/robots-cache-time-limit
robots: limit robot cache to 24 hours
2026-10-27 07:02:03 +08:00
Karl Seguin 13908ea453 Merge pull request #4200 from lightpanda-io/color-parsing
css: add color parsing
2026-10-27 07:01:48 +08:00
Karl Seguin 82a56c2117 Merge pull request #4199 from lightpanda-io/test-cross-validate
webapi: cross validate more tests with chrome
2026-10-27 07:01:24 +08:00