mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibWeb: Move set_needs_display() from layout node to paintable
For this method, there is no need to go through the layout node when we can directly reach the paintable.
This commit is contained in:
committed by
Andreas Kling
parent
814bed33b4
commit
7c2713c14f
@@ -16,6 +16,7 @@
|
||||
#include <LibWeb/HTML/HTMLVideoElement.h>
|
||||
#include <LibWeb/HTML/VideoTrack.h>
|
||||
#include <LibWeb/Layout/VideoBox.h>
|
||||
#include <LibWeb/Painting/Paintable.h>
|
||||
#include <LibWeb/Platform/ImageCodecPlugin.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
@@ -102,8 +103,8 @@ void HTMLVideoElement::set_video_track(JS::GCPtr<HTML::VideoTrack> video_track)
|
||||
void HTMLVideoElement::set_current_frame(Badge<VideoTrack>, RefPtr<Gfx::Bitmap> frame, double position)
|
||||
{
|
||||
m_current_frame = { move(frame), position };
|
||||
if (layout_node())
|
||||
layout_node()->set_needs_display();
|
||||
if (paintable())
|
||||
paintable()->set_needs_display();
|
||||
}
|
||||
|
||||
void HTMLVideoElement::on_playing()
|
||||
|
||||
Reference in New Issue
Block a user