mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 14:37:45 +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:
parent
60f699338d
commit
7e76a51cb0
66 changed files with 121 additions and 128 deletions
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/Layout/BlockContainer.h>
|
||||
#include <LibWeb/Selection/Selection.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
class InitialContainingBlock final : public BlockContainer {
|
||||
JS_CELL(InitialContainingBlock, BlockContainer);
|
||||
|
||||
public:
|
||||
explicit InitialContainingBlock(DOM::Document&, NonnullRefPtr<CSS::StyleProperties>);
|
||||
virtual ~InitialContainingBlock() override;
|
||||
|
||||
const DOM::Document& dom_node() const { return static_cast<const DOM::Document&>(*Node::dom_node()); }
|
||||
|
||||
void paint_all_phases(PaintContext&);
|
||||
|
||||
JS::GCPtr<Selection::Selection> selection() const;
|
||||
|
||||
void build_stacking_context_tree_if_needed();
|
||||
void recompute_selection_states();
|
||||
|
||||
private:
|
||||
void build_stacking_context_tree();
|
||||
virtual bool is_initial_containing_block_box() const override { return true; }
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<InitialContainingBlock>() const { return is_initial_containing_block_box(); }
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue