ladybird/Userland/Libraries/LibWeb/HTML/Parser
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
..
Entities.cpp Everywhere: Use nested namespace qualifiers 2023-07-12 10:05:42 +03:30
Entities.h Everywhere: Use nested namespace qualifiers 2023-07-12 10:05:42 +03:30
HTMLEncodingDetection.cpp
HTMLEncodingDetection.h
HTMLParser.cpp LibWeb: Don't parse inline style sheets during HTML fragment parsing 2023-08-09 17:09:28 +02:00
HTMLParser.h LibWeb: Add Web::HTML::parse_legacy_color_value 2023-05-28 13:24:37 +02:00
HTMLToken.cpp
HTMLToken.h Everywhere: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes 2023-06-18 08:47:51 +01:00
HTMLTokenizer.cpp LibWeb: Don't include Layout/Node.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
HTMLTokenizer.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
ListOfActiveFormattingElements.cpp
ListOfActiveFormattingElements.h Everywhere: Remove NonnullRefPtr.h includes 2023-03-06 23:46:35 +01:00
StackOfOpenElements.cpp
StackOfOpenElements.h Everywhere: Remove NonnullRefPtr.h includes 2023-03-06 23:46:35 +01:00