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

LibWeb: Invalidate style after CSSStyleSheet.{insert,remove}Rule()

When rules are inserted or removed via the CSSOM API, we now invalidate
document style to ensure that any changes made are reflected.

1% progression on ACID3. :^)
This commit is contained in:
Andreas Kling 2022-03-09 19:57:15 +01:00
parent 0e758b4da8
commit a13079f757
5 changed files with 36 additions and 2 deletions

View file

@ -16,6 +16,7 @@ namespace Web::CSS {
class StyleSheetList
: public RefCounted<StyleSheetList>
, public Weakable<StyleSheetList>
, public Bindings::Wrappable {
public:
using WrapperType = Bindings::StyleSheetListWrapper;
@ -45,6 +46,9 @@ public:
int generation() const { return m_generation; }
void bump_generation() { ++m_generation; }
DOM::Document& document() { return m_document; }
DOM::Document const& document() const { return m_document; }
private:
explicit StyleSheetList(DOM::Document&);