mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Keep track of each CSSStyleSheet's CSSImportRules
This will be used to gather up a list of all loaded style sheets for the inspector.
This commit is contained in:
parent
b00137df38
commit
dd3b011f15
Notes:
github-actions[bot]
2024-09-03 09:13:16 +00:00
Author: https://github.com/AtkinsSJ
Commit: dd3b011f15
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1168
Reviewed-by: https://github.com/trflynn89
2 changed files with 30 additions and 15 deletions
|
@ -68,6 +68,8 @@ public:
|
|||
|
||||
Optional<FlyString> namespace_uri(StringView namespace_prefix) const;
|
||||
|
||||
Vector<JS::NonnullGCPtr<CSSImportRule>> const& import_rules() const { return m_import_rules; }
|
||||
|
||||
Optional<URL::URL> base_url() const { return m_base_url; }
|
||||
void set_base_url(Optional<URL::URL> base_url) { m_base_url = move(base_url); }
|
||||
|
||||
|
@ -87,7 +89,7 @@ private:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void recalculate_namespaces();
|
||||
void recalculate_rule_caches();
|
||||
|
||||
void set_constructed(bool constructed) { m_constructed = constructed; }
|
||||
void set_disallow_modification(bool disallow_modification) { m_disallow_modification = disallow_modification; }
|
||||
|
@ -97,6 +99,7 @@ private:
|
|||
JS::GCPtr<CSSRuleList> m_rules;
|
||||
JS::GCPtr<CSSNamespaceRule> m_default_namespace_rule;
|
||||
HashMap<FlyString, JS::GCPtr<CSSNamespaceRule>> m_namespace_rules;
|
||||
Vector<JS::NonnullGCPtr<CSSImportRule>> m_import_rules;
|
||||
|
||||
JS::GCPtr<StyleSheetList> m_style_sheet_list;
|
||||
JS::GCPtr<CSSRule> m_owner_css_rule;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue