mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-17 05:06:46 +00:00
LibWeb: Add hack to disable StyleInvalidator while parsing document
Running a StyleInvalidator for every attribute set in a new document was making it impossible to load larger sites. :^)
This commit is contained in:
@@ -122,11 +122,13 @@ HTMLDocumentParser::HTMLDocumentParser(DOM::Document& document, const StringView
|
||||
: m_tokenizer(input, encoding)
|
||||
, m_document(document)
|
||||
{
|
||||
m_document->set_should_invalidate_styles_on_attribute_changes(false);
|
||||
m_document->set_encoding(TextCodec::get_standardized_encoding(encoding));
|
||||
}
|
||||
|
||||
HTMLDocumentParser::~HTMLDocumentParser()
|
||||
{
|
||||
m_document->set_should_invalidate_styles_on_attribute_changes(true);
|
||||
}
|
||||
|
||||
void HTMLDocumentParser::run(const URL& url)
|
||||
|
||||
Reference in New Issue
Block a user