LibWeb: Add opt-in tracing of set_needs_layout() calls with reason

This commit is contained in:
Andreas Kling 2025-03-07 00:09:57 +01:00 committed by Alexander Kalenik
parent 415079bc11
commit 2abbf99a95
Notes: github-actions[bot] 2025-03-08 02:39:00 +00:00
9 changed files with 50 additions and 12 deletions

View file

@ -111,7 +111,7 @@ u32 HTMLVideoElement::video_height() const
void HTMLVideoElement::set_video_track(GC::Ptr<HTML::VideoTrack> video_track)
{
set_needs_style_update(true);
document().set_needs_layout();
document().set_needs_layout(DOM::SetNeedsLayoutReason::HTMLVideoElementSetVideoTrack);
if (m_video_track)
m_video_track->pause_video({});