LibWeb: Lay out the fieldset's rendered legend

This commit is contained in:
Kostya Farber 2024-11-23 15:47:32 +00:00 committed by Tim Ledbetter
commit 81f8866606
Notes: github-actions[bot] 2024-11-29 12:51:25 +00:00
12 changed files with 356 additions and 15 deletions

View file

@ -0,0 +1,32 @@
/*
* Copyright (c) 2024, Kostya Farber <kostya.farber@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Forward.h>
#include <LibWeb/Layout/FieldSetBox.h>
#include <LibWeb/Painting/PaintContext.h>
#include <LibWeb/Painting/PaintableBox.h>
namespace Web::Painting {
class FieldSetPaintable final : public PaintableBox {
GC_CELL(FieldSetPaintable, PaintableBox);
GC_DECLARE_ALLOCATOR(FieldSetPaintable);
public:
static GC::Ref<FieldSetPaintable> create(Layout::FieldSetBox const&);
virtual void paint(PaintContext&, PaintPhase) const override;
private:
Layout::FieldSetBox& layout_box();
Layout::FieldSetBox const& layout_box() const;
explicit FieldSetPaintable(Layout::FieldSetBox const&);
};
}