1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 18:28:10 +00:00
serenity/Userland/Libraries/LibWeb
Andreas Kling 22a858a0cb LibWeb: Don't parse inline style sheets during HTML fragment parsing
Some websites (like Reddit) like to instantiate "components" by setting
innerHTML to a huge chunk of stuff. Sometimes those huge chunks of stuff
contain inline style sheets (i.e `<style>` elements).

Before this change, we would end up parsing the CSS in those elements
multiple times, because we had no way of knowing that we were within
a fragment parser's temporary document.

This patch avoids the extra CSS parsing work by adding adding a flag to
Document that tells us it's being used by the fragment parser. Then, we
simply avoid parsing CSS for style elements in such documents. The CSS
then gets parsed immediately upon insertion into the proper DOM.
2023-08-09 17:09:28 +02:00
..
ARIA Userland: Prefer _string over _short_string 2023-08-08 07:37:21 +02:00
Bindings LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Cookie Userland: Remove remaining users of Duration::now_realtime() 2023-05-24 23:18:07 +02:00
Crypto LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
CSS LibWeb: Add table-layout CSS property 2023-08-09 08:33:02 +01:00
DOM LibWeb: Don't parse inline style sheets during HTML fragment parsing 2023-08-09 17:09:28 +02:00
DOMParsing LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Encoding LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Fetch LibJS: Make PrimitiveString::create() infallible 2023-08-09 17:09:16 +02:00
FileAPI LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Geometry LibJS: Make Value::to_string_without_side_effects() infallible 2023-08-09 17:09:16 +02:00
HighResolutionTime LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
HTML LibWeb: Don't parse inline style sheets during HTML fragment parsing 2023-08-09 17:09:28 +02:00
Infra LibJS: Make PrimitiveString::utf8_string() infallible 2023-08-09 17:09:16 +02:00
Internals LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
IntersectionObserver LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Layout LibWeb: Implement fixed table layout 2023-08-09 08:33:02 +01:00
Loader Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
MimeSniff Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
NavigationTiming LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Page LibWeb: Rename is_scrollable() to is_user_scrollable() 2023-08-08 16:55:14 +02:00
Painting LibWeb: Implement background-attachment: local 2023-08-09 05:37:43 +02:00
PerformanceTimeline LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
PermissionsPolicy LibWeb+LibWebView+WebContent: Add APIs to manage an autoplay allowlist 2023-04-18 16:30:02 +02:00
Platform LibWeb/Ladybird: Use the abstract audio output in a new audio plugin 2023-08-04 13:49:36 -06:00
ReferrerPolicy LibWeb: Add ReferrerPolicy::EmptyString 2023-04-25 12:54:01 +02:00
RequestIdleCallback LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
ResizeObserver LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Scripts LibWeb: Store stylesheet sources as StringViews 2023-02-19 00:51:16 +01:00
SecureContexts AK: Serialize URL hosts with 'concept-host-serializer' 2023-07-31 05:18:51 +02:00
Selection LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
SRI LibWeb: Implement integrity-metadata part of fetch algorithm 2023-04-21 20:44:47 +01:00
Streams LibJS: Make Value::to_string_without_side_effects() infallible 2023-08-09 17:09:16 +02:00
SVG LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
Tests Everywhere: Rename WrapperGenerator to BindingsGenerator 2022-09-21 23:06:08 +01:00
UIEvents LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
URL LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
UserTiming LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
WebAssembly LibJS: Make Value::to_string_without_side_effects() infallible 2023-08-09 17:09:16 +02:00
WebAudio LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
WebDriver LibJS: Make PrimitiveString::deprecated_string() infallible 2023-08-09 17:09:16 +02:00
WebGL LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
WebIDL LibJS: Make Value::to_string_without_side_effects() infallible 2023-08-09 17:09:16 +02:00
WebSockets LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
XHR LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
XML LibWeb: Detect when an XML document belongs in the SVG namespace 2023-06-09 01:12:48 +02:00
CMakeLists.txt LibWeb: Implement basic version of CSSOM View's VisualViewport 2023-08-06 16:29:24 +02:00
Dump.cpp LibWeb: Add namespaces to Attribute selectors 2023-08-08 20:49:45 +01:00
Dump.h LibWeb: Rough implementation of CSS namespace rule 2023-07-30 20:27:19 +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: Implement basic version of CSSOM View's VisualViewport 2023-08-06 16:29:24 +02:00
idl_files.cmake LibWeb: Implement basic version of CSSOM View's VisualViewport 2023-08-06 16:29:24 +02:00
Namespace.cpp AK: Make "foo"_fly_string infallible 2023-08-07 16:03:27 +02:00
Namespace.h AK: Make "foo"_fly_string infallible 2023-08-07 16:03:27 +02:00
PixelUnits.cpp LibWeb: Inline and constexpr most PixelUnits methods 2023-08-05 20:03:09 +02:00
PixelUnits.h LibWeb: Allow (explicitly) converting CSSPixels to float and int 2023-08-08 14:58:26 +02:00
TreeNode.h LibJS+LibWeb: Move headers around to allow including Value from Cell 2023-01-29 00:02:45 +00:00