libservo: Combine LoadStart, HeadParsed, and LoadComplete` messages (#35260)

These will be a single method in the upcoming `WebView` delegate, so it
makes sense to also combine the internal message to match this. In
addition, since `LoadStatus` is now exposed to the API if there is ever
the need to add more statuses or to move to an event-based version, the
API is already set up for this.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-02-03 23:31:17 +01:00 committed by GitHub
parent b8ab820e3c
commit fdfaf7b15c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 97 additions and 92 deletions

View file

@ -121,6 +121,8 @@ mod from_compositor {
}
mod from_script {
use embedder_traits::LoadStatus;
use super::LogTarget;
macro_rules! target {
@ -222,11 +224,17 @@ mod from_script {
Self::SetClipboardContents(..) => target_variant!("SetClipboardContents"),
Self::SetCursor(..) => target_variant!("SetCursor"),
Self::NewFavicon(..) => target_variant!("NewFavicon"),
Self::HeadParsed(..) => target_variant!("HeadParsed"),
Self::HistoryChanged(..) => target_variant!("HistoryChanged"),
Self::SetFullscreenState(..) => target_variant!("SetFullscreenState"),
Self::LoadStart(..) => target_variant!("LoadStart"),
Self::LoadComplete(..) => target_variant!("LoadComplete"),
Self::NotifyLoadStatusChanged(_, LoadStatus::Started) => {
target_variant!("NotifyLoadStatusChanged(LoadStatus::Started)")
},
Self::NotifyLoadStatusChanged(_, LoadStatus::HeadParsed) => {
target_variant!("NotifyLoadStatusChanged(LoadStatus::HeadParsed)")
},
Self::NotifyLoadStatusChanged(_, LoadStatus::Complete) => {
target_variant!("NotifyLoadStatusChanged(LoadStatus::Complete")
},
Self::Panic(..) => target_variant!("Panic"),
Self::GetSelectedBluetoothDevice(..) => {
target_variant!("GetSelectedBluetoothDevice")