mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 07:22:22 +00:00
LibWeb/CSS: Make CSSStyleRule be a CSSGroupingRule
As part of this, we can now fill in the missing serialization steps. The parsing is a stub for now, and will be filled out in a subsequent commit.
This commit is contained in:
parent
9241f37823
commit
7723873016
Notes:
github-actions[bot]
2024-10-14 06:09:48 +00:00
Author: https://github.com/AtkinsSJ
Commit: 7723873016
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1729
5 changed files with 59 additions and 40 deletions
|
@ -8,18 +8,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibWeb/CSS/CSSRule.h>
|
||||
#include <LibWeb/CSS/CSSGroupingRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleDeclaration.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
class CSSStyleRule final : public CSSRule {
|
||||
WEB_PLATFORM_OBJECT(CSSStyleRule, CSSRule);
|
||||
class CSSStyleRule final : public CSSGroupingRule {
|
||||
WEB_PLATFORM_OBJECT(CSSStyleRule, CSSGroupingRule);
|
||||
JS_DECLARE_ALLOCATOR(CSSStyleRule);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<CSSStyleRule> create(JS::Realm&, Vector<NonnullRefPtr<Selector>>&&, PropertyOwningCSSStyleDeclaration&);
|
||||
[[nodiscard]] static JS::NonnullGCPtr<CSSStyleRule> create(JS::Realm&, Vector<NonnullRefPtr<Selector>>&&, PropertyOwningCSSStyleDeclaration&, CSSRuleList&);
|
||||
|
||||
virtual ~CSSStyleRule() override = default;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public:
|
|||
[[nodiscard]] FlyString const& qualified_layer_name() const { return parent_layer_internal_qualified_name(); }
|
||||
|
||||
private:
|
||||
CSSStyleRule(JS::Realm&, Vector<NonnullRefPtr<Selector>>&&, PropertyOwningCSSStyleDeclaration&);
|
||||
CSSStyleRule(JS::Realm&, Vector<NonnullRefPtr<Selector>>&&, PropertyOwningCSSStyleDeclaration&, CSSRuleList&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue