mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
LibWeb: Ensure CSSStyleSheet::css_rules() always returns the same object
Instead of having a method that replaces the stylesheet's CSSRuleList, we now have a method on CSSRuleList to modify it's underlying CSSRules.
This commit is contained in:
parent
811033ec19
commit
d209d5a84f
2 changed files with 2 additions and 1 deletions
|
@ -62,6 +62,8 @@ public:
|
|||
bool evaluate_media_queries(HTML::Window const&);
|
||||
void for_each_effective_keyframes_at_rule(Function<void(CSSKeyframesRule const&)> const& callback) const;
|
||||
|
||||
void set_rules(Badge<CSSStyleSheet>, Vector<JS::NonnullGCPtr<CSSRule>> rules) { m_rules = move(rules); }
|
||||
|
||||
Function<void()> on_change;
|
||||
|
||||
private:
|
||||
|
|
|
@ -44,7 +44,6 @@ public:
|
|||
|
||||
CSSRuleList const& rules() const { return *m_rules; }
|
||||
CSSRuleList& rules() { return *m_rules; }
|
||||
void set_rules(CSSRuleList& rules) { m_rules = &rules; }
|
||||
|
||||
CSSRuleList* css_rules() { return m_rules; }
|
||||
CSSRuleList const* css_rules() const { return m_rules; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue