mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:32:44 +00:00 
			
		
		
		
	Browser+LibWeb+WebContent: Show style for pseudo-elements :^)
This expands the InspectorWidget::Selection to include an optional PseudoElement, which is then passed over IPC to request style information for it. As noted, this has some pretty big limitations because pseudo-elements don't have DOM nodes: - Declared style has to be recalculated when it's requested. - We don't display the computed style. - We don't display custom properties.
This commit is contained in:
		
							parent
							
								
									2c970b9516
								
							
						
					
					
						commit
						0326ad34df
					
				
					 9 changed files with 69 additions and 20 deletions
				
			
		|  | @ -439,9 +439,9 @@ void OutOfProcessWebView::inspect_dom_tree() | |||
|     client().async_inspect_dom_tree(); | ||||
| } | ||||
| 
 | ||||
| Optional<OutOfProcessWebView::DOMNodeProperties> OutOfProcessWebView::inspect_dom_node(i32 node_id) | ||||
| Optional<OutOfProcessWebView::DOMNodeProperties> OutOfProcessWebView::inspect_dom_node(i32 node_id, Optional<CSS::Selector::PseudoElement> pseudo_element) | ||||
| { | ||||
|     auto response = client().inspect_dom_node(node_id); | ||||
|     auto response = client().inspect_dom_node(node_id, pseudo_element); | ||||
|     if (!response.has_style()) | ||||
|         return {}; | ||||
|     return DOMNodeProperties { | ||||
|  | @ -454,7 +454,7 @@ Optional<OutOfProcessWebView::DOMNodeProperties> OutOfProcessWebView::inspect_do | |||
| 
 | ||||
| void OutOfProcessWebView::clear_inspected_dom_node() | ||||
| { | ||||
|     client().inspect_dom_node(0); | ||||
|     client().inspect_dom_node(0, {}); | ||||
| } | ||||
| 
 | ||||
| i32 OutOfProcessWebView::get_hovered_node_id() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sam Atkins
						Sam Atkins