LibWeb: Fix layout invalidation debug logging (UPDATE_LAYOUT_DEBUG)

This was broken in a recent refactoring and no longer printed for
anything but document invalidations.
This commit is contained in:
Andreas Kling 2025-03-24 22:46:25 +00:00
parent 6b9e8cf40c
commit 0a3df372db

View file

@ -1446,7 +1446,7 @@ void Node::set_needs_layout_update(SetNeedsLayoutReason reason)
if constexpr (UPDATE_LAYOUT_DEBUG) {
// NOTE: We check some conditions here to avoid debug spam in documents that don't do layout.
auto navigable = this->navigable();
if (navigable && navigable->active_document() == this)
if (navigable && navigable->active_document() == &document())
dbgln_if(UPDATE_LAYOUT_DEBUG, "NEED LAYOUT {}", to_string(reason));
}