Serenity Operating System
at master 34 lines 886 B view raw
1/* 2 * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <LibWeb/Layout/BlockContainer.h> 8#include <LibWeb/Painting/PaintableBox.h> 9 10namespace Web::Layout { 11 12BlockContainer::BlockContainer(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style) 13 : Box(document, node, move(style)) 14{ 15} 16 17BlockContainer::BlockContainer(DOM::Document& document, DOM::Node* node, CSS::ComputedValues computed_values) 18 : Box(document, node, move(computed_values)) 19{ 20} 21 22BlockContainer::~BlockContainer() = default; 23 24Painting::PaintableWithLines const* BlockContainer::paint_box() const 25{ 26 return static_cast<Painting::PaintableWithLines const*>(Box::paint_box()); 27} 28 29JS::GCPtr<Painting::Paintable> BlockContainer::create_paintable() const 30{ 31 return Painting::PaintableWithLines::create(*this); 32} 33 34}