mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:22:45 +00:00 
			
		
		
		
	 65ad6c35f0
			
		
	
	
		65ad6c35f0
		
	
	
	
	
		
			
			Also add some special variants for the table classes, to make it a bit more pleasant to write table code. :^)
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			782 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			782 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <LibHTML/DOM/Element.h>
 | |
| #include <LibHTML/Layout/LayoutTableCell.h>
 | |
| #include <LibHTML/Layout/LayoutTableRow.h>
 | |
| 
 | |
| LayoutTableRow::LayoutTableRow(const Element& element, NonnullRefPtr<StyleProperties> style)
 | |
|     : LayoutBox(&element, move(style))
 | |
| {
 | |
| }
 | |
| 
 | |
| LayoutTableRow::~LayoutTableRow()
 | |
| {
 | |
| }
 | |
| 
 | |
| void LayoutTableRow::layout()
 | |
| {
 | |
|     LayoutBox::layout();
 | |
| }
 | |
| 
 | |
| LayoutTableCell* LayoutTableRow::first_cell()
 | |
| {
 | |
|     return first_child_of_type<LayoutTableCell>();
 | |
| }
 | |
| 
 | |
| const LayoutTableCell* LayoutTableRow::first_cell() const
 | |
| {
 | |
|     return first_child_of_type<LayoutTableCell>();
 | |
| }
 | |
| 
 | |
| LayoutTableRow* LayoutTableRow::next_row()
 | |
| {
 | |
|     return next_sibling_of_type<LayoutTableRow>();
 | |
| }
 | |
| 
 | |
| const LayoutTableRow* LayoutTableRow::next_row() const
 | |
| {
 | |
|     return next_sibling_of_type<LayoutTableRow>();
 | |
| }
 |