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

LibWeb: Add cached global attribute name FlyStrings

Instead of creating extremely common FlyStrings like "id" and "class"
on demand every time they are needed, we now have AttributeNames.h,
which provides Web::HTML::AttributeNames::{id,class_}

This avoids a bunch of string allocations during selector matching.
This commit is contained in:
Andreas Kling 2020-05-26 23:27:22 +02:00
parent 5069d380a8
commit 82444048de
7 changed files with 102 additions and 5 deletions

View file

@ -25,6 +25,7 @@ set(SOURCES
CSS/StyleRule.cpp
CSS/StyleSheet.cpp
CSS/StyleValue.cpp
DOM/AttributeNames.cpp
DOM/CanvasRenderingContext2D.cpp
DOM/CharacterData.cpp
DOM/Comment.cpp