1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +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

@ -11,10 +11,10 @@
#include <LibWeb/HTML/HTMLHtmlElement.h>
#include <LibWeb/Layout/BlockContainer.h>
#include <LibWeb/Layout/FormattingContext.h>
#include <LibWeb/Layout/InitialContainingBlock.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Layout/TableBox.h>
#include <LibWeb/Layout/TextNode.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Platform/FontPlugin.h>
namespace Web::Layout {
@ -62,7 +62,7 @@ bool Node::can_contain_boxes_with_position_absolute() const
if (computed_values().position() != CSS::Position::Static)
return true;
if (is<InitialContainingBlock>(*this))
if (is<Viewport>(*this))
return true;
// https://w3c.github.io/csswg-drafts/css-transforms-1/#propdef-transform
@ -163,13 +163,13 @@ HTML::BrowsingContext& Node::browsing_context()
return *m_browsing_context;
}
InitialContainingBlock const& Node::root() const
Viewport const& Node::root() const
{
VERIFY(document().layout_node());
return *document().layout_node();
}
InitialContainingBlock& Node::root()
Viewport& Node::root()
{
VERIFY(document().layout_node());
return *document().layout_node();