mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:42:43 +00:00 
			
		
		
		
	 65ad6c35f0
			
		
	
	
		65ad6c35f0
		
	
	
	
	
		
			
			Also add some special variants for the table classes, to make it a bit more pleasant to write table code. :^)
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			672 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			672 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <LibHTML/Layout/LayoutBlock.h>
 | |
| 
 | |
| class LayoutTableCell final : public LayoutBlock {
 | |
| public:
 | |
|     LayoutTableCell(const Element&, NonnullRefPtr<StyleProperties>);
 | |
|     virtual ~LayoutTableCell() override;
 | |
| 
 | |
|     LayoutTableCell* next_cell() { return next_sibling_of_type<LayoutTableCell>(); }
 | |
|     const LayoutTableCell* next_cell() const { return next_sibling_of_type<LayoutTableCell>(); }
 | |
| 
 | |
| private:
 | |
|     virtual bool is_table_cell() const override { return true; }
 | |
|     virtual const char* class_name() const override { return "LayoutTableCell"; }
 | |
| };
 | |
| 
 | |
| template<>
 | |
| inline bool is<LayoutTableCell>(const LayoutNode& node)
 | |
| {
 | |
|     return node.is_table_cell();
 | |
| }
 |