LibWeb: Go directly from DOM node to paintable in cursor blink timer

No need to go via the layout tree anymore.
This commit is contained in:
Andreas Kling 2024-01-16 12:01:29 +01:00
parent 8d80841e9c
commit 92b6edb35a
Notes: sideshowbarker 2024-07-17 06:51:48 +09:00

View File

@ -273,7 +273,7 @@ BrowsingContext::BrowsingContext(JS::NonnullGCPtr<Page> page, HTML::NavigableCon
m_cursor_blink_timer = Core::Timer::create_repeating(500, [this] {
if (!is_focused_context())
return;
if (m_cursor_position && m_cursor_position->node()->layout_node() && m_cursor_position->node()->layout_node()->paintable()) {
if (m_cursor_position && m_cursor_position->node()->paintable()) {
m_cursor_blink_state = !m_cursor_blink_state;
m_cursor_position->node()->paintable()->set_needs_display();
}