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