mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:42:43 +00:00 
			
		
		
		
	LibWeb: Do not crash if "fill: none" is specified for svg text
This commit is contained in:
		
							parent
							
								
									e2c5e31292
								
							
						
					
					
						commit
						ca50da63e4
					
				
					 3 changed files with 12 additions and 0 deletions
				
			
		
							
								
								
									
										8
									
								
								Tests/LibWeb/Layout/expected/svg/text-fill-none.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Tests/LibWeb/Layout/expected/svg/text-fill-none.txt
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| Viewport <#document> at (0,0) content-size 800x600 children: not-inline | ||||
|   BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline | ||||
|     BlockContainer <body> at (8,8) content-size 784x163 children: inline | ||||
|       line 0 width: 300, height: 163, bottom: 163, baseline: 13.53125 | ||||
|         frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,21 300x150] | ||||
|       SVGSVGBox <svg> at (8,21) content-size 300x150 [SVG] children: not-inline | ||||
|         SVGTextBox <text> at (8,21) content-size 0x0 children: not-inline | ||||
|       TextNode <#text> | ||||
							
								
								
									
										1
									
								
								Tests/LibWeb/Layout/input/svg/text-fill-none.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								Tests/LibWeb/Layout/input/svg/text-fill-none.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| <svg><text fill="none"></text></svg> | ||||
| After Width: | Height: | Size: 37 B | 
|  | @ -31,6 +31,9 @@ void SVGTextPaintable::paint(PaintContext& context, PaintPhase phase) const | |||
|     if (!is_visible()) | ||||
|         return; | ||||
| 
 | ||||
|     if (!layout_node().computed_values().fill().has_value()) | ||||
|         return; | ||||
| 
 | ||||
|     SVGGraphicsPaintable::paint(context, phase); | ||||
| 
 | ||||
|     if (phase != PaintPhase::Foreground) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Aliaksandr Kalenik
						Aliaksandr Kalenik