mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-12 01:47:00 +02:00
This makes the way we've implemented the CSS `revert` keyword a lot less expensive. Until now, we were making a deep copy of all property values at the start of each cascade origin. (Those are the values that `revert` would bring us back to if encountered.) With this patch, the revert property set becomes a shallow copy, and we only clone the property set if the cascade ends up writing something. This knocks a 5% profile item down to 1.3% on https://tailwindcss.com (cherry picked from commit e399b472e9254294f48a057d8848814bdf25b2af)
133 KiB
133 KiB