1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 15:54:58 +00:00
serenity/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp
Andreas Kling c01c4b41e2 LibWeb: Add ViewportPaintable to represent viewports in the paint tree
This patch just adds the new root paintable and updates the tests
expectations. The next patch will move painting logic from the layout
viewport to the paint viewport.
2023-08-20 05:02:59 +02:00

24 lines
604 B
C++

/*
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/ViewportPaintable.h>
namespace Web::Painting {
JS::NonnullGCPtr<ViewportPaintable> ViewportPaintable::create(Layout::Viewport const& layout_viewport)
{
return layout_viewport.heap().allocate_without_realm<ViewportPaintable>(layout_viewport);
}
ViewportPaintable::ViewportPaintable(Layout::Viewport const& layout_viewport)
: PaintableWithLines(layout_viewport)
{
}
ViewportPaintable::~ViewportPaintable() = default;
}