Commit Graph

2110 Commits

Author SHA1 Message Date
Pierre Tachoire
fa5d583657 fix space 2025-05-20 10:19:56 +02:00
Sjors
5e67f09583 Disclaimer feedback 2025-05-20 09:48:08 +02:00
Sjors
8b74d96f12 Playwright support disclaimer 2025-05-20 09:26:51 +02:00
Karl Seguin
769d99e7bd Tweak debug logging
1 - Add a log_level build option to control the default log level from
    the build (e.g. -Dlog_level=debug). Defaults to info

2 - Add a new boolean log_unknown_properties build option to enable
    logging unknown properties. Defautls to false.

3 - Remove the log debug for script eval - this can be a huge value
    (i.e. hundreds of KB), which makes the debug log unusable IMO.
2025-05-20 11:29:14 +08:00
Karl Seguin
812f4d2699 Merge pull request #650 from lightpanda-io/http_client_async_gzip
Add support for gzip responses in AsyncHandler
2025-05-20 11:26:58 +08:00
sjorsdonkers
f95defe82f Do not getComputedStyle 2025-05-19 17:52:00 +02:00
sjorsdonkers
226dafa9e3 refix rebase regressions 2025-05-19 16:53:59 +02:00
sjorsdonkers
6c92d50c68 elementsFromPoint cleanup 2025-05-19 16:53:59 +02:00
sjorsdonkers
384e74fe7e Also return body and html elements 2025-05-19 16:53:59 +02:00
sjorsdonkers
216f6cc8e8 handle detached elements 2025-05-19 16:53:59 +02:00
sjorsdonkers
333c377bc7 make elementFromPoint more robust against future changes 2025-05-19 16:53:59 +02:00
sjorsdonkers
59b33faf61 confirm data is retained in elementFromPoint 2025-05-19 16:53:59 +02:00
sjorsdonkers
b87003427c fix unset heap_ptr 2025-05-19 16:53:59 +02:00
sjorsdonkers
cb48000df7 elementsFromPoint 2025-05-19 16:53:59 +02:00
Pierre Tachoire
58cc5d8d1a Merge pull request #660 from lightpanda-io/implementation-update
implementation: remove the setTitle method call
2025-05-19 16:14:46 +02:00
Karl Seguin
39799d3006 Merge pull request #662 from lightpanda-io/fix_broken_test_build
fix broken test build
2025-05-19 22:14:16 +08:00
Karl Seguin
73bf4479b5 fix broken test build 2025-05-19 22:03:34 +08:00
Pierre Tachoire
9f0f84bbee Merge pull request #658 from lightpanda-io/ready_state
Add document.readyState
2025-05-19 15:49:31 +02:00
Karl Seguin
1ff422a29c Merge pull request #659 from lightpanda-io/dedup-document
Deduplicate document
2025-05-19 19:07:16 +08:00
Pierre Tachoire
8daa525cc1 implementation: remove the setTitle method call
Libdom uses the doc's body and title attributes by default.
But it fallback to the DOM tree if the attributes are NULL.

I think it's better to have only the DOM tree set on document creation.
2025-05-19 12:16:07 +02:00
sjorsdonkers
76f1fcb634 dedup document 2025-05-19 11:35:29 +02:00
Karl Seguin
2b6cf95752 Add document.readyState
To support this, add the ability to embedded data into libdom nodes, so that
we can extend libdom without having to alter it.
2025-05-19 16:48:11 +08:00
Pierre Tachoire
a99d193b12 Merge pull request #653 from lightpanda-io/document_default_view
add defaultView getter to HTMLDocument
2025-05-19 10:19:54 +02:00
Pierre Tachoire
a3b576abd8 Merge pull request #656 from lightpanda-io/module-exception
module: report module's evaluation error
2025-05-17 11:17:28 +02:00
Pierre Tachoire
2261eac288 expection: fix non-nullable return 2025-05-17 11:02:37 +02:00
Karl Seguin
9366729d7a Merge pull request #655 from lightpanda-io/dom-parser
Some checks failed
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / browser fetch (push) Blocked by required conditions
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
add DOMParser
2025-05-17 09:56:32 +08:00
Karl Seguin
ad1a4fe450 Merge pull request #652 from lightpanda-io/transfer_arena
Introduce a "transfer_arena"
2025-05-17 09:44:21 +08:00
Pierre Tachoire
9f97725894 module: report module's evaluation error 2025-05-16 20:27:41 +02:00
Muki Kiboigo
bff3d27518 add DOMParser 2025-05-16 09:56:18 -07:00
Karl Seguin
2bc1192ad3 reduce lifetime of transfer_arena 2025-05-16 22:04:13 +08:00
Karl Seguin
f165131da8 add defaultView getter to HTMLDocument 2025-05-16 20:33:28 +08:00
Karl Seguin
afd29fef81 Merge pull request #651 from lightpanda-io/html_all_collection
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Rework HTMLAllCollection
2025-05-16 17:26:26 +08:00
Karl Seguin
071a4f97e5 Introduce a "transfer_arena"
Some data has to exist specifically for the navigation of one page to another.
For example, if a hyperlink is clicked, the URL begins its life with the
original page, but is transferred to the new page. The page_arena cannot be used
for such data.

It's possible to use the session_arena, but it's lifetime is much longer and,
given enough navigation, could accumulate a lot of memory.

The new transfer_arena exists within the session, but only exists until the
next navigation.

While currently only used for the navigation URL, the main goal here is to have
a place to put the request body on form submission, which has a lifetime similar
to a click url.

While I'm at it, I promoted the existing session arena and the new transfer
arena to the browser, allowing better memory re-use between sessions.
2025-05-16 15:53:25 +08:00
Karl Seguin
04c990de89 Merge pull request #649 from lightpanda-io/html_collection_named_properties
Fix HTMLCollection named property issues
2025-05-16 14:47:02 +08:00
Karl Seguin
b08ffcc437 Rework HTMLAllCollection
Capture its unique properties:
1- instances are falsy, and
2- instance can be called as a function

The behavior is used for browser detection (i.e. duckduckgo treats us as a
legacy browser because we document.all != false)
2025-05-16 13:39:27 +08:00
Karl Seguin
7156df8d9a Add support for gzip responses in AsyncHandler
Compliments https://github.com/lightpanda-io/browser/pull/601 which added this
behavior to the SyncHandler.
2025-05-16 12:51:53 +08:00
Karl Seguin
1a83e69669 Fix HTMLCollection named property issues
1 - Named properties should not be enumerable
2 - Empty key should always result in a null/undefined (depending on the API)
    even if there's an element with an empty id/name

To address the first issue, we now require PropertyAttributes to be specified
when setting an object's value.
2025-05-16 11:31:52 +08:00
Karl Seguin
210d4f6aa1 Merge pull request #620 from lightpanda-io/upgrade_v8
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Upgrade v8
2025-05-16 08:17:15 +08:00
Karl Seguin
b559506d4e remove unecessary space 2025-05-16 08:10:16 +08:00
Karl Seguin
3fec6ff5bc Merge pull request #643 from lightpanda-io/add_event_listener_options
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Support the capture field of the addEventListener option
2025-05-15 22:48:55 +08:00
Karl Seguin
ce74307172 Merge pull request #646 from lightpanda-io/split_browser_file
Move Session, Page and Renderer into their own respective files
2025-05-15 22:48:35 +08:00
Karl Seguin
e44e68f8fc Move Session, Page and Renderer into their own respective files 2025-05-15 22:43:50 +08:00
Karl Seguin
eff1341088 Merge pull request #647 from lightpanda-io/form_data
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
add FormData web API
2025-05-15 17:34:02 +08:00
Karl Seguin
ddd35e3d80 Merge pull request #641 from lightpanda-io/js_debug_helpers
Make Callback.printFunc public
2025-05-15 16:44:31 +08:00
Karl Seguin
265272b9d3 move FormData to xhr folder 2025-05-15 16:39:49 +08:00
Karl Seguin
206e34ac80 Explicit error if an AddEventListenerOption flag is set that we dont' support 2025-05-15 13:32:40 +08:00
Karl Seguin
ea556ff201 Merge pull request #635 from lightpanda-io/http_proxy
add direct http proxy support
2025-05-15 12:58:54 +08:00
Karl Seguin
110dc751a4 add FormData web API 2025-05-15 12:44:24 +08:00
Karl Seguin
46546def28 Merge pull request #638 from lightpanda-io/DOM-scoll-and-quads
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
scrollIntoViewIfNeeded, getContentQuads, innerWidth/Heigh
2025-05-15 09:12:00 +08:00
sjorsdonkers
48de14ade3 null JS tests where we are not checking the output 2025-05-14 17:17:58 +02:00