mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 05:32:44 +00:00 
			
		
		
		
	 04bc9b14d0
			
		
	
	
		04bc9b14d0
		
	
	
	
	
		
			
			`DeprecatedString::to_int` calls `StringUtils::convert_to_int` internally. However, the integer parsing is not done in an HTML spec-compliant way. For example, `colspan="2;"` is valid according to the spec. But, with the current implementation, we will fail to parse "2;", and instead fall back to using 1 as the colspan value. This patch changes the `HTMLTableCellElement::col_span` and `HTMLTableCellElement::row_span` methods to use the `Web::HTML::parse_non_negative_integer` function that will parse the attribute value in an HTML spec-compliant way.
		
			
				
	
	
		
			204 lines
		
	
	
	
		
			14 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			204 lines
		
	
	
	
		
			14 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| Viewport <#document> at (0,0) content-size 800x600 children: not-inline
 | |
|   BlockContainer <html> at (0,0) content-size 800x146.8125 [BFC] children: not-inline
 | |
|     BlockContainer <(anonymous)> at (0,0) content-size 800x0 children: inline
 | |
|       TextNode <#text>
 | |
|     BlockContainer <body> at (8,8) content-size 784x130.8125 children: not-inline
 | |
|       BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
 | |
|         TextNode <#text>
 | |
|       TableWrapper <(anonymous)> at (8,8) content-size 229.359375x130.8125 [BFC] children: not-inline
 | |
|         Box <table> at (9,9) content-size 227.359375x128.8125 table-box [TFC] children: not-inline
 | |
|           BlockContainer <(anonymous)> (not painted) children: inline
 | |
|             TextNode <#text>
 | |
|           Box <tbody> at (9,9) content-size 227.359375x128.8125 table-row-group children: not-inline
 | |
|             Box <tr> at (9,9) content-size 227.359375x21.46875 table-row children: not-inline
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <th> at (11,11) content-size 70.046875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 70.046875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 8, rect: [11,11 70.046875x17.46875]
 | |
|                     "Header 1"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <th> at (85.046875,11) content-size 72.515625x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 72.515625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 8, rect: [85.046875,11 72.515625x17.46875]
 | |
|                     "Header 2"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <th> at (161.5625,11) content-size 72.796875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 72.796875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 8, rect: [161.5625,11 72.796875x17.46875]
 | |
|                     "Header 3"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|             BlockContainer <(anonymous)> (not painted) children: inline
 | |
|               TextNode <#text>
 | |
|             Box <tr> at (9,30.46875) content-size 227.359375x21.46875 table-row children: not-inline
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (11,32.46875) content-size 70.046875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 41.84375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [25,32.46875 41.84375x17.46875]
 | |
|                     "Cell 1"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (85.046875,32.46875) content-size 72.515625x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 44.3125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [99.046875,32.46875 44.3125x17.46875]
 | |
|                     "Cell 2"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (161.5625,43.203125) content-size 72.796875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 44.59375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [175.5625,43.203125 44.59375x17.46875]
 | |
|                     "Cell 3"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|             BlockContainer <(anonymous)> (not painted) children: inline
 | |
|               TextNode <#text>
 | |
|             Box <tr> at (9,51.9375) content-size 227.359375x21.46875 table-row children: not-inline
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (11,53.9375) content-size 70.046875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 43.25, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [24,53.9375 43.25x17.46875]
 | |
|                     "Cell 4"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (85.046875,53.9375) content-size 72.515625x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 43.953125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [99.046875,53.9375 43.953125x17.46875]
 | |
|                     "Cell 5"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|             BlockContainer <(anonymous)> (not painted) children: inline
 | |
|               TextNode <#text>
 | |
|             Box <tr> at (9,73.40625) content-size 227.359375x21.46875 table-row children: not-inline
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (11,75.40625) content-size 70.046875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 44.234375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [24,75.40625 44.234375x17.46875]
 | |
|                     "Cell 6"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (85.046875,75.40625) content-size 72.515625x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 44.21875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [99.046875,75.40625 44.21875x17.46875]
 | |
|                     "Cell 7"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (161.5625,75.40625) content-size 72.796875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 44.984375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [175.5625,75.40625 44.984375x17.46875]
 | |
|                     "Cell 8"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|             BlockContainer <(anonymous)> (not painted) children: inline
 | |
|               TextNode <#text>
 | |
|             Box <tr> at (9,94.875) content-size 227.359375x21.46875 table-row children: not-inline
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (11,96.875) content-size 70.046875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 44.328125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 6, rect: [24,96.875 44.328125x17.46875]
 | |
|                     "Cell 9"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (85.046875,96.875) content-size 72.515625x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 51.4375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 7, rect: [96.046875,96.875 51.4375x17.46875]
 | |
|                     "Cell 10"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (161.5625,107.609375) content-size 72.796875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 48.1875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 7, rect: [173.5625,107.609375 48.1875x17.46875]
 | |
|                     "Cell 11"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|             BlockContainer <(anonymous)> (not painted) children: inline
 | |
|               TextNode <#text>
 | |
|             Box <tr> at (9,116.34375) content-size 227.359375x21.46875 table-row children: not-inline
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (11,118.34375) content-size 70.046875x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 50.65625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 7, rect: [21,118.34375 50.65625x17.46875]
 | |
|                     "Cell 12"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <td> at (85.046875,118.34375) content-size 72.515625x17.46875 table-cell [BFC] children: inline
 | |
|                 line 0 width: 50.9375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
 | |
|                   frag 0 from TextNode start: 0, length: 7, rect: [96.046875,118.34375 50.9375x17.46875]
 | |
|                     "Cell 13"
 | |
|                 TextNode <#text>
 | |
|               BlockContainer <(anonymous)> (not painted) children: inline
 | |
|                 TextNode <#text>
 | |
|             BlockContainer <(anonymous)> (not painted) children: inline
 | |
|               TextNode <#text>
 | |
|       BlockContainer <(anonymous)> at (8,138.8125) content-size 784x0 children: inline
 | |
|         TextNode <#text>
 | |
| 
 | |
| ViewportPaintable (Viewport<#document>) [0,0 800x600]
 | |
|   PaintableWithLines (BlockContainer<HTML>) [0,0 800x146.8125]
 | |
|     PaintableWithLines (BlockContainer(anonymous)) [0,0 800x0]
 | |
|     PaintableWithLines (BlockContainer<BODY>) [8,8 784x130.8125]
 | |
|       PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
 | |
|       PaintableWithLines (TableWrapper(anonymous)) [8,8 229.359375x130.8125]
 | |
|         PaintableBox (Box<TABLE>) [8,8 229.359375x130.8125]
 | |
|           PaintableBox (Box<TBODY>) [9,9 227.359375x128.8125]
 | |
|             PaintableBox (Box<TR>) [9,9 227.359375x21.46875]
 | |
|               PaintableWithLines (BlockContainer<TH>) [9,9 74.046875x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TH>) [83.046875,9 76.515625x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TH>) [159.5625,9 76.796875x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|             PaintableBox (Box<TR>) [9,30.46875 227.359375x21.46875] overflow: [9,30.46875 227.359375x42.9375]
 | |
|               PaintableWithLines (BlockContainer<TD>) [9,30.46875 74.046875x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TD>) [83.046875,30.46875 76.515625x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TD>) [159.5625,30.46875 76.796875x42.9375]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|             PaintableBox (Box<TR>) [9,51.9375 227.359375x21.46875]
 | |
|               PaintableWithLines (BlockContainer<TD>) [9,51.9375 74.046875x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TD>) [83.046875,51.9375 76.515625x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|             PaintableBox (Box<TR>) [9,73.40625 227.359375x21.46875]
 | |
|               PaintableWithLines (BlockContainer<TD>) [9,73.40625 74.046875x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TD>) [83.046875,73.40625 76.515625x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TD>) [159.5625,73.40625 76.796875x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|             PaintableBox (Box<TR>) [9,94.875 227.359375x21.46875] overflow: [9,94.875 227.359375x42.9375]
 | |
|               PaintableWithLines (BlockContainer<TD>) [9,94.875 74.046875x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TD>) [83.046875,94.875 76.515625x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TD>) [159.5625,94.875 76.796875x42.9375]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|             PaintableBox (Box<TR>) [9,116.34375 227.359375x21.46875]
 | |
|               PaintableWithLines (BlockContainer<TD>) [9,116.34375 74.046875x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|               PaintableWithLines (BlockContainer<TD>) [83.046875,116.34375 76.515625x21.46875]
 | |
|                 TextPaintable (TextNode<#text>)
 | |
|       PaintableWithLines (BlockContainer(anonymous)) [8,138.8125 784x0]
 |