mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Invalidate style (and rule cache) on MediaList changes
This makes dynamic changes to a style sheet's media attribute actually take effect immediately.
This commit is contained in:
parent
80c0a16597
commit
6606eecce5
Notes:
github-actions[bot]
2025-03-04 18:08:34 +00:00
Author: https://github.com/awesomekling
Commit: 6606eecce5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3798
12 changed files with 109 additions and 3 deletions
|
@ -36,11 +36,15 @@ public:
|
|||
bool evaluate(HTML::Window const&);
|
||||
bool matches() const;
|
||||
|
||||
void set_associated_style_sheet(GC::Ref<StyleSheet> style_sheet) { m_associated_style_sheet = style_sheet; }
|
||||
|
||||
private:
|
||||
MediaList(JS::Realm&, Vector<NonnullRefPtr<MediaQuery>>&&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
GC::Ptr<StyleSheet> m_associated_style_sheet;
|
||||
Vector<NonnullRefPtr<MediaQuery>> m_media;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue