ladybird/Userland/Libraries/LibWeb/DOM
Andreas Kling 646b37d1a9 LibWeb: Cache CSS rules in buckets to reduce number of rules checked
This patch introduces the StyleComputer::RuleCache, which divides all of
our (author) CSS rules into buckets.

Currently, there are two buckets:
- Rules where a specific class must be present.
- All other rules.

This allows us to check a significantly smaller set of rules for each
element, since we can skip over any rule that requires a class attribute
not present on the element.

This takes the typical numer of rules tested per element on Discord from
~16000 to ~550. :^)

We can definitely improve the cache invalidation. It currently happens
too often due to media queries. And we also need to make sure we
invalidate when mutating style through CSSOM APIs.
2022-02-10 20:52:11 +01:00
..
AbortController.cpp LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
AbortController.h LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
AbortController.idl
AbortSignal.cpp LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
AbortSignal.h LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
AbortSignal.idl
Attribute.cpp Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
Attribute.h
Attribute.idl
CharacterData.cpp
CharacterData.h
CharacterData.idl LibWeb: Implement ChildNode.replaceWith 2022-01-31 15:25:36 +01:00
ChildNode.h LibWeb: Implement ChildNode.replaceWith 2022-01-31 15:25:36 +01:00
Comment.cpp
Comment.h
Comment.idl
CustomEvent.cpp
CustomEvent.h
CustomEvent.idl
Document.cpp LibWeb: Cache CSS rules in buckets to reduce number of rules checked 2022-02-10 20:52:11 +01:00
Document.h LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
Document.idl LibWeb: Add Document.hasFocus() stub 2022-02-03 22:35:13 +01:00
DocumentFragment.cpp
DocumentFragment.h
DocumentFragment.idl LibWeb: Implement ParentNode.replaceChildren 2022-01-31 15:25:36 +01:00
DocumentLoadEventDelayer.cpp
DocumentLoadEventDelayer.h
DocumentType.cpp
DocumentType.h
DocumentType.idl LibWeb: Implement ChildNode.replaceWith 2022-01-31 15:25:36 +01:00
DOMException.h
DOMException.idl
DOMImplementation.cpp
DOMImplementation.h
DOMImplementation.idl
DOMTokenList.cpp Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
DOMTokenList.h Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
DOMTokenList.idl
Element.cpp LibWeb: Add a partial implementation of Element.setAttributeNS() 2022-02-05 22:50:39 +01:00
Element.h LibWeb: Perform CSS custom property cascade once instead of per-property 2022-02-10 20:52:11 +01:00
Element.idl LibWeb: Add a partial implementation of Element.setAttributeNS() 2022-02-05 22:50:39 +01:00
ElementFactory.cpp
ElementFactory.h
Event.cpp
Event.h
Event.idl
EventDispatcher.cpp LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
EventDispatcher.h
EventListener.h LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
EventTarget.cpp LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
EventTarget.h LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
EventTarget.idl
ExceptionOr.h
HTMLCollection.cpp
HTMLCollection.h
HTMLCollection.idl
LiveNodeList.cpp
LiveNodeList.h
NamedNodeMap.cpp Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
NamedNodeMap.h Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
NamedNodeMap.idl
Node.cpp LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
Node.h LibWeb: Compute element style in Layout::TreeBuilder 2022-02-05 22:50:39 +01:00
Node.idl
NodeList.h
NodeList.idl
NodeOperations.cpp LibWeb: Implement ParentNode.prepend 2022-01-31 15:25:36 +01:00
NodeOperations.h LibWeb: Implement ParentNode.prepend 2022-01-31 15:25:36 +01:00
NonDocumentTypeChildNode.h LibWeb: Implement EventHandler::focus_previous_element() 2022-02-08 22:15:10 +00:00
NonElementParentNode.h
ParentNode.cpp LibWeb: Implement ParentNode.replaceChildren 2022-01-31 15:25:36 +01:00
ParentNode.h LibWeb: Implement ParentNode.replaceChildren 2022-01-31 15:25:36 +01:00
Position.cpp
Position.h
ProcessingInstruction.cpp
ProcessingInstruction.h
ProcessingInstruction.idl
Range.cpp
Range.h
Range.idl
ShadowRoot.cpp LibWeb: Compute element style in Layout::TreeBuilder 2022-02-05 22:50:39 +01:00
ShadowRoot.h LibWeb: Compute element style in Layout::TreeBuilder 2022-02-05 22:50:39 +01:00
ShadowRoot.idl
StaticNodeList.cpp
StaticNodeList.h
Text.cpp LibWeb: Compute element style in Layout::TreeBuilder 2022-02-05 22:50:39 +01:00
Text.h LibWeb: Compute element style in Layout::TreeBuilder 2022-02-05 22:50:39 +01:00
Text.idl
Timer.cpp LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
Timer.h LibWeb: Rewrite EventTarget to more closely match the spec 2022-02-08 17:47:44 +00:00
Window.cpp LibWeb: Add Storage interface and window.localStorage 2022-02-08 21:53:20 +01:00
Window.h LibWeb: Add Storage interface and window.localStorage 2022-02-08 21:53:20 +01:00