mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 04:32:44 +00:00 
			
		
		
		
	LibWeb: Add basic support for position:fixed
Fixed position elements have the ICB as their containing block. The magic of fixed positioning is implemented at the rendering stage, where we temporarily translate painting by the current scroll offset. Note that "absolutely positioned" includes both position:absolute and position:fixed.
This commit is contained in:
		
							parent
							
								
									bd33bfd120
								
							
						
					
					
						commit
						137f6d44ec
					
				
					 8 changed files with 27 additions and 11 deletions
				
			
		|  | @ -207,7 +207,7 @@ void PageView::paint_event(GUI::PaintEvent& event) | |||
|     painter.translate(frame_thickness(), frame_thickness()); | ||||
|     painter.translate(-horizontal_scrollbar().value(), -vertical_scrollbar().value()); | ||||
| 
 | ||||
|     RenderingContext context(painter, palette()); | ||||
|     RenderingContext context(painter, palette(), { horizontal_scrollbar().value(), vertical_scrollbar().value() }); | ||||
|     context.set_should_show_line_box_borders(m_should_show_line_box_borders); | ||||
|     context.set_viewport_rect(viewport_rect_in_content_coordinates()); | ||||
|     layout_root()->render(context); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling