diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index 091db40eacc..31603220b5b 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -861,24 +861,6 @@ void Document::set_origin(URL::Origin const& origin) m_origin = origin; } -void Document::schedule_style_update() -{ - if (!browsing_context()) - return; - - // NOTE: Update of the style is a step in HTML event loop processing. - HTML::main_thread_event_loop().schedule(); -} - -void Document::schedule_layout_update() -{ - if (!browsing_context()) - return; - - // NOTE: Update of the layout is a step in HTML event loop processing. - HTML::main_thread_event_loop().schedule(); -} - bool Document::is_child_allowed(Node const& node) const { switch (node.type()) { @@ -1238,7 +1220,6 @@ void Document::invalidate_layout_tree(InvalidateLayoutTreeReason reason) if (m_layout_root) dbgln_if(UPDATE_LAYOUT_DEBUG, "DROP TREE {}", to_string(reason)); tear_down_layout_tree(); - schedule_layout_update(); } static void propagate_scrollbar_width_to_viewport(Element& root_element, Layout::Viewport& viewport) @@ -3426,8 +3407,6 @@ void Document::run_the_resize_steps() visual_viewport_resize_event->set_is_trusted(true); visual_viewport()->dispatch_event(visual_viewport_resize_event); } - - schedule_layout_update(); } // https://w3c.github.io/csswg-drafts/cssom-view-1/#document-run-the-scroll-steps diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h index c743a24e7d1..0942c97a452 100644 --- a/Libraries/LibWeb/DOM/Document.h +++ b/Libraries/LibWeb/DOM/Document.h @@ -349,9 +349,6 @@ public: Painting::ViewportPaintable const* paintable() const; Painting::ViewportPaintable* paintable(); - void schedule_style_update(); - void schedule_layout_update(); - GC::Ref get_elements_by_name(FlyString const&); GC::Ref applets(); diff --git a/Libraries/LibWeb/DOM/Node.cpp b/Libraries/LibWeb/DOM/Node.cpp index aabe2932d5d..186060e21ea 100644 --- a/Libraries/LibWeb/DOM/Node.cpp +++ b/Libraries/LibWeb/DOM/Node.cpp @@ -442,7 +442,6 @@ void Node::invalidate_style(StyleInvalidationReason reason) if (is_document()) { auto& document = static_cast(*this); document.set_needs_full_style_update(true); - document.schedule_style_update(); return; } @@ -493,8 +492,6 @@ void Node::invalidate_style(StyleInvalidationReason reason) for (auto* ancestor = parent_or_shadow_host(); ancestor; ancestor = ancestor->parent_or_shadow_host()) ancestor->m_child_needs_style_update = true; - - document().schedule_style_update(); } void Node::invalidate_style(StyleInvalidationReason reason, Vector const& properties, StyleInvalidationOptions options) @@ -558,8 +555,6 @@ void Node::invalidate_style(StyleInvalidationReason reason, Vectorm_child_needs_style_update = true; } - document().schedule_style_update(); } }