1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:17:35 +00:00

LibWeb: Evaluate @media rules

We now evaluate the conditions of `@media` rules at the same point in
the HTML event loop as evaluation of `MediaQueryList`s. This is not
strictly to spec, but since the spec doesn't actually say when to do
this, it seems to make the most sense. In any case, it works! :^)
This commit is contained in:
Sam Atkins 2021-10-08 20:21:46 +01:00 committed by Andreas Kling
parent 57a25139a5
commit 5098cd22a4
8 changed files with 47 additions and 2 deletions

View file

@ -28,7 +28,8 @@ public:
void add_sheet(NonnullRefPtr<CSSStyleSheet>);
void remove_sheet(CSSStyleSheet&);
const NonnullRefPtrVector<CSSStyleSheet>& sheets() const { return m_sheets; }
NonnullRefPtrVector<CSSStyleSheet> const& sheets() const { return m_sheets; }
NonnullRefPtrVector<CSSStyleSheet>& sheets() { return m_sheets; }
RefPtr<CSSStyleSheet> item(size_t index) const
{