mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +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:
parent
8be98af77c
commit
4190fd2199
43 changed files with 241 additions and 241 deletions
|
@ -20,7 +20,7 @@
|
|||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlockBox.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/Frame.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <WebContent/ClientConnection.h>
|
||||
#include <WebContent/PageHost.h>
|
||||
#include <WebContent/WebContentClientEndpoint.h>
|
||||
|
@ -171,19 +171,19 @@ void ClientConnection::key_down(i32 key, unsigned int modifiers, u32 code_point)
|
|||
void ClientConnection::debug_request(const String& request, const String& argument)
|
||||
{
|
||||
if (request == "dump-dom-tree") {
|
||||
if (auto* doc = page().main_frame().document())
|
||||
if (auto* doc = page().top_level_browsing_context().document())
|
||||
Web::dump_tree(*doc);
|
||||
}
|
||||
|
||||
if (request == "dump-layout-tree") {
|
||||
if (auto* doc = page().main_frame().document()) {
|
||||
if (auto* doc = page().top_level_browsing_context().document()) {
|
||||
if (auto* icb = doc->layout_node())
|
||||
Web::dump_tree(*icb);
|
||||
}
|
||||
}
|
||||
|
||||
if (request == "dump-style-sheets") {
|
||||
if (auto* doc = page().main_frame().document()) {
|
||||
if (auto* doc = page().top_level_browsing_context().document()) {
|
||||
for (auto& sheet : doc->style_sheets().sheets()) {
|
||||
Web::dump_sheet(sheet);
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ void ClientConnection::debug_request(const String& request, const String& argume
|
|||
if (request == "set-line-box-borders") {
|
||||
bool state = argument == "on";
|
||||
m_page_host->set_should_show_line_box_borders(state);
|
||||
page().main_frame().set_needs_display(page().main_frame().viewport_rect());
|
||||
page().top_level_browsing_context().set_needs_display(page().top_level_browsing_context().viewport_rect());
|
||||
}
|
||||
|
||||
if (request == "clear-cache") {
|
||||
|
@ -211,14 +211,14 @@ void ClientConnection::debug_request(const String& request, const String& argume
|
|||
|
||||
void ClientConnection::get_source()
|
||||
{
|
||||
if (auto* doc = page().main_frame().document()) {
|
||||
if (auto* doc = page().top_level_browsing_context().document()) {
|
||||
async_did_get_source(doc->url(), doc->source());
|
||||
}
|
||||
}
|
||||
|
||||
void ClientConnection::js_console_initialize()
|
||||
{
|
||||
if (auto* document = page().main_frame().document()) {
|
||||
if (auto* document = page().top_level_browsing_context().document()) {
|
||||
auto interpreter = document->interpreter().make_weak_ptr();
|
||||
if (m_interpreter.ptr() == interpreter.ptr())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue