mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:08:12 +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
|
@ -61,6 +61,9 @@ public:
|
|||
static NonnullRefPtr<Document> create(const URL& url = "about:blank") { return adopt(*new Document(url)); }
|
||||
virtual ~Document() override;
|
||||
|
||||
bool should_invalidate_styles_on_attribute_changes() const { return m_should_invalidate_styles_on_attribute_changes; }
|
||||
void set_should_invalidate_styles_on_attribute_changes(bool b) { m_should_invalidate_styles_on_attribute_changes = b; }
|
||||
|
||||
void set_url(const URL& url) { m_url = url; }
|
||||
URL url() const { return m_url; }
|
||||
|
||||
|
@ -283,6 +286,8 @@ private:
|
|||
bool m_ready_for_post_load_tasks { false };
|
||||
|
||||
NonnullRefPtr<DOMImplementation> m_implementation;
|
||||
|
||||
bool m_should_invalidate_styles_on_attribute_changes { true };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue