mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 21:30:58 +00:00 
			
		
		
		
	 f87041bf3a
			
		
	
	
		f87041bf3a
		
	
	
	
	
		
			
			Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
		
			
				
	
	
		
			44 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021-2024, Sam Atkins <sam@ladybird.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Function.h>
 | |
| #include <AK/NonnullRefPtr.h>
 | |
| #include <LibWeb/CSS/CSSRule.h>
 | |
| #include <LibWeb/CSS/CSSRuleList.h>
 | |
| #include <LibWeb/Forward.h>
 | |
| 
 | |
| namespace Web::CSS {
 | |
| 
 | |
| class CSSGroupingRule : public CSSRule {
 | |
|     WEB_PLATFORM_OBJECT(CSSGroupingRule, CSSRule);
 | |
| 
 | |
| public:
 | |
|     virtual ~CSSGroupingRule() = default;
 | |
| 
 | |
|     CSSRuleList const& css_rules() const { return m_rules; }
 | |
|     CSSRuleList& css_rules() { return m_rules; }
 | |
|     CSSRuleList* css_rules_for_bindings() { return m_rules; }
 | |
|     WebIDL::ExceptionOr<u32> insert_rule(StringView rule, u32 index = 0);
 | |
|     WebIDL::ExceptionOr<void> delete_rule(u32 index);
 | |
| 
 | |
|     virtual void for_each_effective_rule(TraversalOrder, Function<void(CSSRule const&)> const& callback) const;
 | |
| 
 | |
|     virtual void set_parent_style_sheet(CSSStyleSheet*) override;
 | |
| 
 | |
| protected:
 | |
|     CSSGroupingRule(JS::Realm&, CSSRuleList&, Type);
 | |
| 
 | |
|     virtual void initialize(JS::Realm&) override;
 | |
|     virtual void visit_edges(Cell::Visitor&) override;
 | |
|     virtual void clear_caches() override;
 | |
| 
 | |
| private:
 | |
|     GC::Ref<CSSRuleList> m_rules;
 | |
| };
 | |
| 
 | |
| }
 |