2020-01-18 09:38:21 +01:00
|
|
|
/*
|
2023-02-25 11:04:29 +01:00
|
|
|
* Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
|
2020-01-18 09:38:21 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2023-01-11 19:48:53 +01:00
|
|
|
#include <LibWeb/DOM/Range.h>
|
2020-03-07 10:32:51 +01:00
|
|
|
#include <LibWeb/Dump.h>
|
2023-02-25 11:04:29 +01:00
|
|
|
#include <LibWeb/Layout/Viewport.h>
|
2022-03-10 23:13:37 +01:00
|
|
|
#include <LibWeb/Painting/PaintableBox.h>
|
2020-06-18 21:39:27 +02:00
|
|
|
#include <LibWeb/Painting/StackingContext.h>
|
2023-08-18 15:52:40 +02:00
|
|
|
#include <LibWeb/Painting/ViewportPaintable.h>
|
2019-06-15 22:49:44 +02:00
|
|
|
|
2020-11-22 15:53:01 +01:00
|
|
|
namespace Web::Layout {
|
2020-03-07 10:27:02 +01:00
|
|
|
|
2023-02-25 11:04:29 +01:00
|
|
|
Viewport::Viewport(DOM::Document& document, NonnullRefPtr<CSS::StyleProperties> style)
|
2021-10-06 20:02:41 +02:00
|
|
|
: BlockContainer(document, &document, move(style))
|
2019-06-15 22:49:44 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-02-25 11:04:29 +01:00
|
|
|
Viewport::~Viewport() = default;
|
2019-06-16 21:35:03 +02:00
|
|
|
|
2023-08-18 15:52:40 +02:00
|
|
|
JS::GCPtr<Painting::Paintable> Viewport::create_paintable() const
|
|
|
|
{
|
|
|
|
return Painting::ViewportPaintable::create(*this);
|
|
|
|
}
|
|
|
|
|
2020-03-07 10:27:02 +01:00
|
|
|
}
|