Skip to content

Truly independent web browser

771 B
Raw Blame
/*
 * Copyright (c) 2018-2023, Andreas Kling <[email protected]>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <LibWeb/DOM/Document.h>
#include <LibWeb/Layout/SearchableText.h>
#include <LibWeb/Layout/Viewport.h>

namespace Web::Layout {

// The build stamps the viewport's row with the document's style, which it is handed before it starts, and makes this
// layout node for the row.
Viewport::Viewport(DOM::Document& document, BindToPreparedArenaSlot bind, Compositing::RustFFI::NodeSlotId slot, RustFFI::NodeKind kind)
    : Box(document, bind, slot, kind)
    , m_searchable_text_cache(*this)
{
}

Viewport::~Viewport() = default;

DOM::Document const& Viewport::dom_node() const
{
    return static_cast<DOM::Document const&>(*Node::dom_node());
}

}