mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:42:43 +00:00 
			
		
		
		
	LibWeb: Stub getting the initial font instead of the root one
Previously this queried the root layout-node's font, which was both wrong and could crash if the layout wasn't ready yet. Now, it's just wrong. But at least all the font-related wrongness is grouped together in StyleComputer. :^)
This commit is contained in:
		
							parent
							
								
									870b835115
								
							
						
					
					
						commit
						332799fbcb
					
				
					 3 changed files with 13 additions and 8 deletions
				
			
		|  | @ -908,6 +908,12 @@ void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* ele | |||
|     style.set_computed_font(found_font.release_nonnull()); | ||||
| } | ||||
| 
 | ||||
| Gfx::Font const& StyleComputer::initial_font() const | ||||
| { | ||||
|     // FIXME: This is not correct.
 | ||||
|     return StyleProperties::font_fallback(false, false); | ||||
| } | ||||
| 
 | ||||
| void StyleComputer::absolutize_values(StyleProperties& style, DOM::Element const*, Optional<CSS::Selector::PseudoElement>) const | ||||
| { | ||||
|     auto viewport_rect = document().browsing_context()->viewport_rect(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sam Atkins
						Sam Atkins