mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
55
Libraries/LibWeb/CSS/CSSStyleRule.h
Normal file
55
Libraries/LibWeb/CSS/CSSStyleRule.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibWeb/CSS/CSSGroupingRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleDeclaration.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
class CSSStyleRule final : public CSSGroupingRule {
|
||||
WEB_PLATFORM_OBJECT(CSSStyleRule, CSSGroupingRule);
|
||||
JS_DECLARE_ALLOCATOR(CSSStyleRule);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<CSSStyleRule> create(JS::Realm&, SelectorList&&, PropertyOwningCSSStyleDeclaration&, CSSRuleList&);
|
||||
|
||||
virtual ~CSSStyleRule() override = default;
|
||||
|
||||
SelectorList const& selectors() const { return m_selectors; }
|
||||
SelectorList const& absolutized_selectors() const;
|
||||
PropertyOwningCSSStyleDeclaration const& declaration() const { return m_declaration; }
|
||||
|
||||
String selector_text() const;
|
||||
void set_selector_text(StringView);
|
||||
|
||||
CSSStyleDeclaration* style();
|
||||
|
||||
[[nodiscard]] FlyString const& qualified_layer_name() const { return parent_layer_internal_qualified_name(); }
|
||||
|
||||
private:
|
||||
CSSStyleRule(JS::Realm&, SelectorList&&, PropertyOwningCSSStyleDeclaration&, CSSRuleList&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
virtual void clear_caches() override;
|
||||
virtual String serialized() const override;
|
||||
|
||||
CSSStyleRule const* parent_style_rule() const;
|
||||
|
||||
SelectorList m_selectors;
|
||||
mutable Optional<SelectorList> m_cached_absolutized_selectors;
|
||||
JS::NonnullGCPtr<PropertyOwningCSSStyleDeclaration> m_declaration;
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool CSSRule::fast_is<CSSStyleRule>() const { return type() == CSSRule::Type::Style; }
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue