1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

LibWeb: Compress specificity into a 32-bit unsigned int

Instead of storing the three-part specificy for every selector,
just mash them together into a 32-bit value instead.
This saves both space and time, and matches the behavior of other
browser engines.
This commit is contained in:
Andreas Kling 2020-06-25 16:43:49 +02:00
parent 8be74ea65c
commit 49dd4b7e8a
4 changed files with 6 additions and 68 deletions

View file

@ -91,7 +91,7 @@ public:
const Vector<ComplexSelector>& complex_selectors() const { return m_complex_selectors; }
Specificity specificity() const;
u32 specificity() const;
private:
Vector<ComplexSelector> m_complex_selectors;