LibWeb: Bring back cache of intrinsic sizes across layout runs

12c6ac78e2 with fixed mistake when cache
slot is copied instead of being referenced:
```cpp
auto cache =
    box.cached_intrinsic_sizes().min_content_height.ensure(width);
```
while it should've been:
```cpp
auto& cache =
    box.cached_intrinsic_sizes().min_content_height.ensure(width);
```
This commit is contained in:
Aliaksandr Kalenik 2025-03-08 13:52:23 +01:00 committed by Andreas Kling
parent 73a4b176cf
commit a4463c45b9
Notes: github-actions[bot] 2025-03-08 13:53:25 +00:00
13 changed files with 108 additions and 102 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(DOM::SetNeedsLayoutReason::HTMLVideoElementSetVideoTrack);
set_needs_layout_update(DOM::SetNeedsLayoutReason::HTMLVideoElementSetVideoTrack);
if (m_video_track)
m_video_track->pause_video({});