| 
									
										
										
										
											2020-09-11 18:17:39 +02:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2024-10-04 13:19:50 +02:00
										 |  |  |  * Copyright (c) 2020-2022, Andreas Kling <andreas@ladybird.org> | 
					
						
							| 
									
										
										
										
											2020-09-11 18:17:39 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2021-04-22 01:24:48 -07:00
										 |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							| 
									
										
										
										
											2020-09-11 18:17:39 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-23 11:13:14 -04:00
										 |  |  | #include <LibWeb/DOM/Document.h>
 | 
					
						
							| 
									
										
										
										
											2022-02-15 19:16:57 +01:00
										 |  |  | #include <LibWeb/HTML/HTMLInputElement.h>
 | 
					
						
							| 
									
										
										
										
											2020-11-22 15:53:01 +01:00
										 |  |  | #include <LibWeb/Layout/CheckBox.h>
 | 
					
						
							| 
									
										
										
										
											2022-03-10 14:02:25 +01:00
										 |  |  | #include <LibWeb/Painting/CheckBoxPaintable.h>
 | 
					
						
							| 
									
										
										
										
											2020-09-11 18:17:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-22 15:53:01 +01:00
										 |  |  | namespace Web::Layout { | 
					
						
							| 
									
										
										
										
											2020-09-11 18:17:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  | GC_DEFINE_ALLOCATOR(CheckBox); | 
					
						
							| 
									
										
										
										
											2024-04-06 10:16:04 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-20 16:35:12 +01:00
										 |  |  | CheckBox::CheckBox(DOM::Document& document, HTML::HTMLInputElement& element, GC::Ref<CSS::ComputedProperties> style) | 
					
						
							| 
									
										
										
										
											2022-03-14 23:05:55 +00:00
										 |  |  |     : FormAssociatedLabelableNode(document, element, move(style)) | 
					
						
							| 
									
										
										
										
											2020-09-11 18:17:39 +02:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2023-06-08 15:56:28 +01:00
										 |  |  |     set_natural_width(13); | 
					
						
							|  |  |  |     set_natural_height(13); | 
					
						
							| 
									
										
										
										
											2020-11-22 13:38:18 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-14 13:21:51 -06:00
										 |  |  | CheckBox::~CheckBox() = default; | 
					
						
							| 
									
										
										
										
											2020-09-11 18:17:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 |  |  | GC::Ptr<Painting::Paintable> CheckBox::create_paintable() const | 
					
						
							| 
									
										
										
										
											2022-03-10 14:02:25 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     return Painting::CheckBoxPaintable::create(*this); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-11 18:17:39 +02:00
										 |  |  | } |