mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 09:35:59 -04:00
Introduce Page (container)
Follow up to https://github.com/lightpanda-io/browser/pull/2200 This change is actually pretty mundane, but a bunch of files that used to take a *Session (e.g. every WebAPI releaseRef and deinit) now take a *Page. This aims to separate the 2 lifetimes currently managed by Session by moving the "Page" lifetime to a dedicated container: Page. Ultimately, the goal is to remove the 1-page-per-session limit of the current design. Not to explicitly support multiple pages per session (though, that's more possible now), but in order to better emulate Chrome where, during a navigation event, the old and new page both exist.
This commit is contained in:
@@ -726,7 +726,7 @@ test "SemanticTree backendDOMNodeId" {
|
||||
|
||||
var frame = try testing.pageTest("cdp/registry1.html", .{});
|
||||
defer testing.reset();
|
||||
defer frame._session.removeFrame();
|
||||
defer frame._session.removePage();
|
||||
|
||||
const st: Self = .{
|
||||
.dom_node = frame.window._document.asNode(),
|
||||
@@ -750,7 +750,7 @@ test "SemanticTree max_depth" {
|
||||
|
||||
var frame = try testing.pageTest("cdp/registry1.html", .{});
|
||||
defer testing.reset();
|
||||
defer frame._session.removeFrame();
|
||||
defer frame._session.removePage();
|
||||
|
||||
const st: Self = .{
|
||||
.dom_node = frame.window._document.asNode(),
|
||||
|
||||
Reference in New Issue
Block a user