mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			1,010 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			1,010 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: BSD-2-Clause
 | 
						|
 */
 | 
						|
 | 
						|
#pragma once
 | 
						|
 | 
						|
#include <LibWeb/CSS/CSSStyleDeclaration.h>
 | 
						|
 | 
						|
namespace Web::CSS {
 | 
						|
 | 
						|
class ResolvedCSSStyleDeclaration final : public CSSStyleDeclaration {
 | 
						|
public:
 | 
						|
    static NonnullRefPtr<ResolvedCSSStyleDeclaration> create(DOM::Element& element)
 | 
						|
    {
 | 
						|
        return adopt_ref(*new ResolvedCSSStyleDeclaration(element));
 | 
						|
    }
 | 
						|
 | 
						|
    virtual ~ResolvedCSSStyleDeclaration() override = default;
 | 
						|
 | 
						|
    virtual size_t length() const override;
 | 
						|
    virtual String item(size_t index) const override;
 | 
						|
    virtual Optional<StyleProperty> property(PropertyID) const override;
 | 
						|
    virtual bool set_property(PropertyID, StringView css_text) override;
 | 
						|
 | 
						|
    virtual String serialized() const override;
 | 
						|
 | 
						|
private:
 | 
						|
    explicit ResolvedCSSStyleDeclaration(DOM::Element&);
 | 
						|
 | 
						|
    RefPtr<StyleValue> style_value_for_property(Layout::NodeWithStyle const&, PropertyID) const;
 | 
						|
 | 
						|
    NonnullRefPtr<DOM::Element> m_element;
 | 
						|
};
 | 
						|
 | 
						|
}
 |