ladybird/Userland/Libraries/LibWeb/Layout/Viewport.cpp
Andreas Kling 1987318cc2 LibWeb: Move selection state from layout tree to paint tree
Where we paint the selection is obviously paint-related information,
so let's keep it in the paint tree.
2024-03-18 13:42:16 +01:00

28 lines
677 B
C++

/*
* Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/DOM/Range.h>
#include <LibWeb/Dump.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Painting/StackingContext.h>
#include <LibWeb/Painting/ViewportPaintable.h>
namespace Web::Layout {
Viewport::Viewport(DOM::Document& document, NonnullRefPtr<CSS::StyleProperties> style)
: BlockContainer(document, &document, move(style))
{
}
Viewport::~Viewport() = default;
JS::GCPtr<Painting::Paintable> Viewport::create_paintable() const
{
return Painting::ViewportPaintable::create(*this);
}
}