mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:18:12 +00:00
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.
This commit is contained in:
parent
136ac1a6a5
commit
c01c4b41e2
389 changed files with 441 additions and 384 deletions
24
Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp
Normal file
24
Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue