1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:57:44 +00:00

LibWeb: Rename Layout::InitialContainingBlock to Layout::Viewport

The name "initial containing block" was wrong for this, as it doesn't
correspond to the HTML element, and that's specifically what it's
supposed to do! :^)
This commit is contained in:
Andreas Kling 2023-02-25 11:04:29 +01:00
parent 60f699338d
commit 7e76a51cb0
66 changed files with 121 additions and 128 deletions

View file

@ -24,7 +24,7 @@
#include <LibWeb/HTML/Scripting/ClassicScript.h>
#include <LibWeb/HTML/Storage.h>
#include <LibWeb/HTML/Window.h>
#include <LibWeb/Layout/InitialContainingBlock.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Loader/ContentFilter.h>
#include <LibWeb/Loader/ProxyMappings.h>
#include <LibWeb/Loader/ResourceLoader.h>
@ -204,15 +204,15 @@ void ConnectionFromClient::debug_request(DeprecatedString const& request, Deprec
if (request == "dump-layout-tree") {
if (auto* doc = page().top_level_browsing_context().active_document()) {
if (auto* icb = doc->layout_node())
Web::dump_tree(*icb);
if (auto* viewport = doc->layout_node())
Web::dump_tree(*viewport);
}
}
if (request == "dump-stacking-context-tree") {
if (auto* doc = page().top_level_browsing_context().active_document()) {
if (auto* icb = doc->layout_node()) {
if (auto* stacking_context = icb->paint_box()->stacking_context())
if (auto* viewport = doc->layout_node()) {
if (auto* stacking_context = viewport->paint_box()->stacking_context())
stacking_context->dump();
}
}

View file

@ -12,7 +12,7 @@
#include <LibGfx/SystemTheme.h>
#include <LibWeb/Cookie/ParsedCookie.h>
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Layout/InitialContainingBlock.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Platform/Timer.h>
#include <WebContent/WebContentClientEndpoint.h>
@ -96,7 +96,7 @@ ErrorOr<void> PageHost::connect_to_webdriver(DeprecatedString const& webdriver_i
return {};
}
Web::Layout::InitialContainingBlock* PageHost::layout_root()
Web::Layout::Viewport* PageHost::layout_root()
{
auto* document = page().top_level_browsing_context().active_document();
if (!document)

View file

@ -101,7 +101,7 @@ private:
explicit PageHost(ConnectionFromClient&);
Web::Layout::InitialContainingBlock* layout_root();
Web::Layout::Viewport* layout_root();
void setup_palette();
ConnectionFromClient& m_client;