mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:02:44 +00:00 
			
		
		
		
	LibWeb: Change paint_all_borders() to accept only device pixel values
By consistently accepting only device pixel values instead of a mix of CSSPixels and DevicePixels values, we can simplify the implementation of paint_border() and paint_all_borders().
This commit is contained in:
		
							parent
							
								
									ae8c98104a
								
							
						
					
					
						commit
						70353b79af
					
				
					 9 changed files with 152 additions and 88 deletions
				
			
		|  | @ -246,7 +246,7 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const | |||
|             border_radius_data.inflate(outline_width + outline_offset_y, outline_width + outline_offset_x, outline_width + outline_offset_y, outline_width + outline_offset_x); | ||||
|             borders_rect.inflate(outline_width + outline_offset_y, outline_width + outline_offset_x, outline_width + outline_offset_y, outline_width + outline_offset_x); | ||||
| 
 | ||||
|             paint_all_borders(context, context.rounded_device_rect(borders_rect), border_radius_data, borders_data.value()); | ||||
|             paint_all_borders(context.painter(), context.rounded_device_rect(borders_rect), border_radius_data.as_corners(context), borders_data->to_device_pixels(context)); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | @ -313,7 +313,7 @@ void PaintableBox::paint_border(PaintContext& context) const | |||
|         .bottom = box_model().border.bottom == 0 ? CSS::BorderData() : computed_values().border_bottom(), | ||||
|         .left = box_model().border.left == 0 ? CSS::BorderData() : computed_values().border_left(), | ||||
|     }; | ||||
|     paint_all_borders(context, context.rounded_device_rect(absolute_border_box_rect()), normalized_border_radii_data(), borders_data); | ||||
|     paint_all_borders(context.painter(), context.rounded_device_rect(absolute_border_box_rect()), normalized_border_radii_data().as_corners(context), borders_data.to_device_pixels(context)); | ||||
| } | ||||
| 
 | ||||
| void PaintableBox::paint_backdrop_filter(PaintContext& context) const | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Aliaksandr Kalenik
						Aliaksandr Kalenik