ladybird/Userland/Libraries/LibWeb
Andreas Kling 3f4de06fc2 LibWeb: Cache the root element font metrics when calculating them
The root element font metrics were getting queried again and again
during style computation. Before this change we would do some work to
recalculate them each time.

This patch simply caches them in a StyleComputer member. Since style
updates always start with the root element, we know that it'll be
up-to-date by the time we look at any other element.

Before this change, we were spending ~5% of CPU time on Google Groups
in root_element_font_metrics().
2023-05-08 12:13:20 +02:00
..
ARIA Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case 2023-03-10 13:15:44 +01:00
Bindings LibJS+LibWeb: Add missing visit calls in visit_edges implementations 2023-04-30 06:04:33 +02:00
Cookie Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case 2023-03-10 13:15:44 +01:00
Crypto AK+Everywhere: Change AK::fill_with_random to accept a Bytes object 2023-04-03 15:53:49 +02:00
CSS LibWeb: Cache the root element font metrics when calculating them 2023-05-08 12:13:20 +02:00
DOM LibWeb: Don't include Layout/Node.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
DOMParsing LibWeb: Don't include DOM/NamedNodeMap.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
Encoding LibWeb/WebIDL: Store SimpleException message as a String{,View} variant 2023-03-03 19:50:36 +00:00
Fetch LibJS+LibWeb: Add missing visit calls in visit_edges implementations 2023-04-30 06:04:33 +02:00
FileAPI LibWeb: Fix a few const-ness issues 2023-03-06 13:05:43 +00:00
Geometry LibWeb: Don't divide by 0 in DOMMatrix::invert_self() 2023-05-04 15:39:34 +02:00
HighResolutionTime LibWeb: Implement performance.mark and performance.clearMarks 2023-03-23 21:00:43 +00:00
HTML LibWeb: Make HTMLObjectElement invalidate the document layout 2023-05-08 10:26:09 +02:00
Infra LibJS: Make intrinsics getters return NonnullGCPtr 2023-04-13 14:29:42 +02:00
IntersectionObserver LibWeb: Make factory method of IntersectionObserver fallible 2023-02-22 09:55:33 +01:00
Layout LibWeb: Don't include CSS/StyleComputer.h from Element.h and Document.h 2023-05-08 09:29:44 +02:00
Loader LibWeb: Move document loading into separate file 2023-05-03 09:39:49 +02:00
MimeSniff Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
NavigationTiming LibWeb: Add a list of the entry names in the PerformanceTiming interface 2023-03-23 21:00:43 +00:00
Page LibWeb: Clear the mouse event tracking node when it stops wanting events 2023-04-27 18:28:43 +02:00
Painting LibWeb: Use the new to_px() helpers in CSS, SVG and layout code 2023-05-06 18:41:34 +02:00
PerformanceTimeline LibWeb: Introduce Performance Timeline and its Performance functions 2023-03-23 21:00:43 +00:00
PermissionsPolicy LibWeb+LibWebView+WebContent: Add APIs to manage an autoplay allowlist 2023-04-18 16:30:02 +02:00
Platform LibWeb+Browser+Ladybird: Use JS::SafeFunction for EventLoop callbacks 2023-04-21 20:44:47 +01:00
ReferrerPolicy LibWeb: Add ReferrerPolicy::EmptyString 2023-04-25 12:54:01 +02:00
RequestIdleCallback LibWeb/HTML: Port Window.requestIdleCallback() to IDL 2023-03-07 23:33:34 +00:00
ResizeObserver LibWeb: Make factory method of ResizeObserver::ResizeObserver fallible 2023-02-22 09:55:33 +01:00
Scripts LibWeb: Store stylesheet sources as StringViews 2023-02-19 00:51:16 +01:00
SecureContexts Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Selection LibWeb: Make factory method of Selection::Selection fallible 2023-02-22 09:55:33 +01:00
SRI LibWeb: Implement integrity-metadata part of fetch algorithm 2023-04-21 20:44:47 +01:00
Streams LibWeb: Implement ReadableByteStreamController.error() 2023-04-27 07:57:53 +02:00
SVG LibWeb: Don't include Layout/Node.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
Tests Everywhere: Rename WrapperGenerator to BindingsGenerator 2022-09-21 23:06:08 +01:00
UIEvents LibWeb: Port {Mouse,UI,Wheel,}Event to new String 2023-04-07 22:41:01 +02:00
URL Everywhere: Change spelling of 'behaviour' to 'behavior' 2023-05-07 01:05:09 +02:00
UserTiming LibWeb: Implement performance.mark and performance.clearMarks 2023-03-23 21:00:43 +00:00
WebAssembly LibJS: Port Value::to_object() to NonnullGCPtr 2023-04-14 09:59:29 +02:00
WebDriver AK: Add new failable JsonArray::{append/set} functions 2023-04-24 09:21:51 +02:00
WebGL LibWeb: Don't include Layout/Node.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
WebIDL LibWeb: Implement IDL overload resolution steps to clamp argument counts 2023-05-07 06:30:27 +02:00
WebSockets LibWeb: Make WebSocket#send support typed arrays, Blob and DataView 2023-04-21 07:59:50 +02:00
XHR LibJS: Port create_iterator_result_object() to NonnullGCPtr 2023-04-15 16:26:42 +02:00
XML LibWeb: Make XMLDocumentBuilder create elements with the HTML namespace 2023-05-01 15:22:55 +02:00
CMakeLists.txt LibWeb: Don't include Layout/Node.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
Dump.cpp LibWeb: Show formatting context roots in layout tree dumps 2023-05-03 13:14:36 +02:00
Dump.h LibWeb+Browser+Ladybird: Add menu action to dump paint tree 2023-03-18 20:23:35 +01:00
FontCache.cpp LibWeb: Scale the font when painting the text on buttons 2023-03-15 23:29:00 +01:00
FontCache.h LibWeb: Scale the font when painting the text on buttons 2023-03-15 23:29:00 +01:00
Forward.h LibWeb: Don't include Layout/Node.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
idl_files.cmake LibWeb: Add an initial implementation of SVG <radialGradient> 2023-05-04 16:50:01 +02:00
Namespace.cpp LibWeb: Initialize static web strings during main-thread VM creation 2023-03-18 19:50:45 +01:00
Namespace.h LibWeb: Initialize static web strings during main-thread VM creation 2023-03-18 19:50:45 +01:00
PixelUnits.h LibWeb: VERIFY that nobody tries to hash a non-finite CSSPixels value 2023-05-06 18:41:34 +02:00
TreeNode.h LibJS+LibWeb: Move headers around to allow including Value from Cell 2023-01-29 00:02:45 +00:00