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
		
			
				
	
	
		
			43 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2024, Sam Atkins <sam@ladybird.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWeb/CSS/CSSRule.h>
 | |
| 
 | |
| namespace Web::CSS {
 | |
| 
 | |
| class CSSNestedDeclarations final : public CSSRule {
 | |
|     WEB_PLATFORM_OBJECT(CSSNestedDeclarations, CSSRule);
 | |
|     GC_DECLARE_ALLOCATOR(CSSNestedDeclarations);
 | |
| 
 | |
| public:
 | |
|     [[nodiscard]] static GC::Ref<CSSNestedDeclarations> create(JS::Realm&, PropertyOwningCSSStyleDeclaration&);
 | |
| 
 | |
|     virtual ~CSSNestedDeclarations() override = default;
 | |
| 
 | |
|     PropertyOwningCSSStyleDeclaration const& declaration() const { return m_declaration; }
 | |
| 
 | |
|     CSSStyleDeclaration* style();
 | |
| 
 | |
|     CSSStyleRule const& parent_style_rule() const;
 | |
| 
 | |
| private:
 | |
|     CSSNestedDeclarations(JS::Realm&, PropertyOwningCSSStyleDeclaration&);
 | |
| 
 | |
|     virtual void initialize(JS::Realm&) override;
 | |
|     virtual void visit_edges(Cell::Visitor&) override;
 | |
|     virtual String serialized() const override;
 | |
|     virtual void clear_caches() override;
 | |
| 
 | |
|     GC::Ref<PropertyOwningCSSStyleDeclaration> m_declaration;
 | |
|     GC::Ptr<CSSStyleRule const> mutable m_parent_style_rule;
 | |
| };
 | |
| 
 | |
| template<>
 | |
| inline bool CSSRule::fast_is<CSSNestedDeclarations>() const { return type() == CSSRule::Type::NestedDeclarations; }
 | |
| 
 | |
| }
 |