Serenity Operating System
at master 30 lines 784 B view raw
1/* 2 * Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <LibGfx/Font/Font.h> 8#include <LibWeb/HTML/BrowsingContext.h> 9#include <LibWeb/HTML/HTMLInputElement.h> 10#include <LibWeb/Layout/CheckBox.h> 11#include <LibWeb/Layout/Label.h> 12#include <LibWeb/Painting/CheckBoxPaintable.h> 13 14namespace Web::Layout { 15 16CheckBox::CheckBox(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style) 17 : FormAssociatedLabelableNode(document, element, move(style)) 18{ 19 set_intrinsic_width(13); 20 set_intrinsic_height(13); 21} 22 23CheckBox::~CheckBox() = default; 24 25JS::GCPtr<Painting::Paintable> CheckBox::create_paintable() const 26{ 27 return Painting::CheckBoxPaintable::create(*this); 28} 29 30}