mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:37:34 +00:00
LibWeb: Add a simple StyleInvalidator class
This patch adds a simple, naive & inefficient class for document-wide style invalidation, e.g. after element attribute updates. During construction it collects a HashMap of a document's elements and their matching rules, during destruction it does the same and then compares the results; dirtying all elements that have a different number or order of matching rules afterwards. Much room for improvement, but it solves the problem of stale element styling after attribute updates for now :^) Fixes #4404.
This commit is contained in:
parent
9a9d655abe
commit
5e7945e26f
6 changed files with 142 additions and 16 deletions
|
@ -23,6 +23,7 @@ set(SOURCES
|
|||
CSS/Selector.cpp
|
||||
CSS/SelectorEngine.cpp
|
||||
CSS/StyleDeclaration.cpp
|
||||
CSS/StyleInvalidator.cpp
|
||||
CSS/StyleProperties.cpp
|
||||
CSS/StyleResolver.cpp
|
||||
CSS/StyleRule.cpp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue