mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 21:14:59 +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:
parent
23f70535e2
commit
58bade25dd
3 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue