1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

LibWeb: Add Page abstraction between PageView and main Frame

* A PageView is a view onto a Page object.
* A Page always has a main Frame (root of Frame tree.)
* Page has a PageClient. PageView is a PageClient.

The goal here is to allow building another kind of view onto
a Page while keeping the rest of LibWeb intact.
This commit is contained in:
Andreas Kling 2020-06-08 20:31:49 +02:00
parent 5072d4e02d
commit 92392398a2
16 changed files with 351 additions and 179 deletions

View file

@ -115,10 +115,7 @@ void Window::did_set_location_href(Badge<Bindings::LocationObject>, const String
auto* frame = document().frame();
if (!frame)
return;
auto* view = frame->page_view();
if (!view)
return;
view->load(new_href);
frame->loader().load(new_href);
}
void Window::did_call_location_reload(Badge<Bindings::LocationObject>)
@ -126,10 +123,7 @@ void Window::did_call_location_reload(Badge<Bindings::LocationObject>)
auto* frame = document().frame();
if (!frame)
return;
auto* view = frame->page_view();
if (!view)
return;
view->reload();
frame->loader().load(document().url());
}
}