1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:37:36 +00:00

LibWeb: Rename Web::Frame to Web::BrowsingContext

Our "frame" concept very closely matches what the web specs call a
"browsing context", so let's rename it to that. :^)

The "main frame" becomes the "top-level browsing context",
and "sub-frames" are now "nested browsing contexts".
This commit is contained in:
Andreas Kling 2021-05-30 12:36:53 +02:00
parent 8be98af77c
commit 4190fd2199
43 changed files with 241 additions and 241 deletions

View file

@ -10,7 +10,7 @@
#include <LibGfx/SystemTheme.h>
#include <LibWeb/Cookie/ParsedCookie.h>
#include <LibWeb/Layout/InitialContainingBlockBox.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/Page/BrowsingContext.h>
#include <WebContent/WebContentClientEndpoint.h>
namespace WebContent {
@ -48,7 +48,7 @@ void PageHost::set_palette_impl(const Gfx::PaletteImpl& impl)
Web::Layout::InitialContainingBlockBox* PageHost::layout_root()
{
auto* document = page().main_frame().document();
auto* document = page().top_level_browsing_context().document();
if (!document)
return nullptr;
return document->layout_node();
@ -73,7 +73,7 @@ void PageHost::paint(const Gfx::IntRect& content_rect, Gfx::Bitmap& target)
void PageHost::set_viewport_rect(const Gfx::IntRect& rect)
{
page().main_frame().set_viewport_rect(rect);
page().top_level_browsing_context().set_viewport_rect(rect);
}
void PageHost::page_did_invalidate(const Gfx::IntRect& content_rect)