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

LibWeb: Cache parsed inline style of DOM elements

Instead of invoking the CSS parser every time we compute the style for
an element that has a "style" attribute, we now cache the result of
parsing the inline style whenever the "style" attribute is set.

This is a nice boost to relayout performance since we no longer hit the
CSS parser at all.
This commit is contained in:
Andreas Kling 2020-12-07 19:56:53 +01:00
parent 867faa5d44
commit d65bebd8cf
4 changed files with 12 additions and 7 deletions

View file

@ -28,6 +28,7 @@
namespace Web::CSS {
class Selector;
class StyleDeclaration;
class StyleProperties;
class StyleResolver;
class StyleRule;