mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 15:20:58 +00:00 
			
		
		
		
	Since each selector can only have zero or one pseudo-element, we match against it as a separate step, before matching the rest of the selector. This should be faster, but mostly I did this because I could not figure out how else to stop selectors without a pseudo-element from matching the pseudo-element, eg so `.foo` styles don't affect `.foo::before`.
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			335 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			335 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: BSD-2-Clause
 | 
						|
 */
 | 
						|
 | 
						|
#pragma once
 | 
						|
 | 
						|
#include <LibWeb/CSS/Selector.h>
 | 
						|
#include <LibWeb/DOM/Element.h>
 | 
						|
 | 
						|
namespace Web::SelectorEngine {
 | 
						|
 | 
						|
bool matches(CSS::Selector const&, DOM::Element const&, Optional<CSS::Selector::PseudoElement> = {});
 | 
						|
 | 
						|
}
 |