ladybird/Userland/Libraries/LibWeb
Andreas Kling 3c3e591f03 LibWeb: Add a fast (iterative) selector matcher for trivial selectors
If we determine that a selector is simple enough, we now run it using a
special matching loop that traverses up the DOM ancestor chain without
recursion.

The criteria for this fast path are:

- All combinators involved must be either descendant or child.
- Only tag name, class, ID and attribute selectors allowed.

It's definitely possible to increase the coverage of this fast path,
but this first version already provides a substantial reduction in time
spent evaluating selectors.

48% of the selectors evaluated when loading our GitHub repo are now
using this fast path.

18% speed-up on the "Descendant and child combinators" subtest of
StyleBench. :^)
2024-03-19 16:48:22 +01:00
..
Animations LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
ARIA LibWeb: Return correct RoleType for composite ARIA role 2024-01-27 14:52:41 -05:00
Bindings LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
Clipboard LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
Cookie LibWeb: Fail to parse cookie date when date does not exist 2024-01-07 08:01:58 -05:00
Crypto LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
CSS LibWeb: Add a fast (iterative) selector matcher for trivial selectors 2024-03-19 16:48:22 +01:00
DOM LibWeb: Make Element::has_class() an inline function 2024-03-19 16:48:22 +01:00
DOMParsing LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
DOMURL AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Encoding LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
Fetch AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
FileAPI AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Geometry LibWeb: Add {,de}serialization steps for DOMRect 2024-03-17 17:16:09 +01:00
HighResolutionTime LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
HTML Revert "LibWeb: Run IntersectionObserver steps only when needed" 2024-03-19 13:04:39 +01:00
Infra LibWeb: Implement an AO to normalize newlines in a string 2024-03-16 13:11:57 +01:00
Internals LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
IntersectionObserver LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
Layout LibWeb: Skip cells layout in table box width calculation 2024-03-19 11:51:49 +01:00
Loader AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
MathML LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
MimeSniff LibWeb/MimeSniff: Add non-standard text or binary context sniffing 2024-02-02 14:34:17 -05:00
NavigationTiming LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
Page LibWeb: Add basic implementation of has_a_rendering_opportunity() 2024-03-19 07:54:14 +01:00
Painting LibWeb: Store "text for rendering" in TextPaintable 2024-03-18 13:42:16 +01:00
PerformanceTimeline LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
PermissionsPolicy AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Platform Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ReferrerPolicy AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
RequestIdleCallback LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
ResizeObserver LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
SecureContexts AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Selection LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
SRI
Streams LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
SVG LibWeb: Add basic implementation of has_a_rendering_opportunity() 2024-03-19 07:54:14 +01:00
UIEvents LibWeb: Add fast_is<T> for UIEvents::MouseEvent 2024-03-16 16:35:54 +01:00
UserTiming LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
WebAssembly LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
WebAudio LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
WebDriver LibWeb: Ignore window-forwarded document.body.onfoo in detached DOM 2024-03-11 18:29:10 +01:00
WebGL LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
WebIDL LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
WebSockets AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Worker AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
XHR AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
XLink LibWeb: Add Web::XLink::AttributeNames 2023-11-05 11:16:16 +00:00
XML LibWeb: Make the default XML namespace an empty Optional 2024-02-19 10:42:56 +01:00
CMakeLists.txt AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Dump.cpp AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Dump.h LibWeb+WebContent: Add option to dump session history of a traversable 2023-09-16 16:53:32 +02:00
Forward.h LibWeb+LibWebView+WebContent: Implement more <input type=file> behavior 2024-02-26 14:18:49 +01:00
idl_files.cmake LibWeb: Add an empty DataTransfer IDL implementation 2024-03-14 10:10:33 +01:00
Namespace.cpp LibWeb: Make Web::Namespace::Foo strings be FlyString 2023-11-04 21:28:30 +01:00
Namespace.h LibWeb: Make Web::Namespace::Foo strings be FlyString 2023-11-04 21:28:30 +01:00
PixelUnits.cpp LibWeb: Refactor int types in WebContentServer to DevicePixels 2023-12-15 17:01:16 +01:00
PixelUnits.h LibWeb: Properly round CSSPixels values in device_to_css_rect 2024-02-21 20:08:25 +01:00
TreeNode.h LibWeb: Remove all the unused functions from TreeNode 2023-08-20 05:02:59 +02:00