mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibWeb: Route repaint requests through paintables, not Document
Rename Document::set_needs_display() to set_needs_repaint() and make it private. External callers must now go through Node/Paintable which route the request to the document internally. Fix one existing misuse in AnimationEffect that was calling document-level set_needs_display() instead of routing through the target element's paintable. This is preparation for per-paintable display list command caching: repaint requests must go through specific paintables so their cached command lists can be invalidated.
This commit is contained in:
committed by
Alexander Kalenik
parent
0356f1b510
commit
eae94a8a46
Notes:
github-actions[bot]
2026-03-04 18:37:01 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/eae94a8a466 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8271
@@ -432,7 +432,7 @@ void HTMLMediaElement::set_duration(double duration)
|
||||
|
||||
upon_has_ended_playback_possibly_changed();
|
||||
|
||||
set_needs_display();
|
||||
set_needs_repaint();
|
||||
}
|
||||
|
||||
GC::Ref<WebIDL::Promise> HTMLMediaElement::play()
|
||||
@@ -1330,7 +1330,7 @@ void HTMLMediaElement::update_video_frame_and_timeline()
|
||||
auto sink_update_result = m_selected_video_track_sink->update();
|
||||
if (sink_update_result == Media::DisplayingVideoSinkUpdateResult::NewFrameAvailable) {
|
||||
ensure_external_content_source().update(m_selected_video_track_sink->current_frame());
|
||||
set_needs_display();
|
||||
set_needs_repaint();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ void HTMLMediaElement::on_video_track_added(Media::Track const& track)
|
||||
auto event = TrackEvent::create(realm, HTML::EventNames::addtrack, move(event_init));
|
||||
m_video_tracks->dispatch_event(event);
|
||||
|
||||
set_needs_display();
|
||||
set_needs_repaint();
|
||||
}
|
||||
|
||||
void HTMLMediaElement::on_metadata_parsed()
|
||||
@@ -2100,7 +2100,7 @@ void HTMLMediaElement::set_show_poster(bool show_poster)
|
||||
|
||||
m_show_poster = show_poster;
|
||||
|
||||
set_needs_display();
|
||||
set_needs_repaint();
|
||||
}
|
||||
|
||||
void HTMLMediaElement::set_paused(bool paused)
|
||||
@@ -2118,7 +2118,7 @@ void HTMLMediaElement::set_paused(bool paused)
|
||||
document().page().client().page_did_change_audio_play_state(AudioPlayState::Paused);
|
||||
}
|
||||
|
||||
set_needs_display();
|
||||
set_needs_repaint();
|
||||
set_needs_style_update(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user