diff options
Diffstat (limited to 'components/shared/script')
-rw-r--r-- | components/shared/script/lib.rs | 8 | ||||
-rw-r--r-- | components/shared/script/script_msg.rs | 28 | ||||
-rw-r--r-- | components/shared/script/serializable.rs | 2 |
3 files changed, 19 insertions, 19 deletions
diff --git a/components/shared/script/lib.rs b/components/shared/script/lib.rs index fac68c03745..325423a8013 100644 --- a/components/shared/script/lib.rs +++ b/components/shared/script/lib.rs @@ -288,7 +288,7 @@ pub enum UpdatePipelineIdReason { pub enum ConstellationControlMsg { /// Takes the associated window proxy out of "delaying-load-events-mode", /// used if a scheduled navigated was refused by the embedder. - /// https://html.spec.whatwg.org/multipage/#delaying-load-events-mode + /// <https://html.spec.whatwg.org/multipage/#delaying-load-events-mode> StopDelayingLoadEventsMode(PipelineId), /// Sends the final response to script thread for fetching after all redirections /// have been resolved @@ -344,7 +344,7 @@ pub enum ConstellationControlMsg { /// The expected origin of the target. target_origin: Option<ImmutableOrigin>, /// The source origin of the message. - /// https://html.spec.whatwg.org/multipage/#dom-messageevent-origin + /// <https://html.spec.whatwg.org/multipage/#dom-messageevent-origin> source_origin: ImmutableOrigin, /// The data to be posted. data: StructuredSerializedData, @@ -1016,7 +1016,7 @@ impl StructuredSerializedData { } } -/// A task on the https://html.spec.whatwg.org/multipage/#port-message-queue +/// A task on the <https://html.spec.whatwg.org/multipage/#port-message-queue> #[derive(Debug, Deserialize, MallocSizeOf, Serialize)] pub struct PortMessageTask { /// The origin of this task. @@ -1062,7 +1062,7 @@ impl Clone for BroadcastMsg { } /// The type of MediaSession action. -/// https://w3c.github.io/mediasession/#enumdef-mediasessionaction +/// <https://w3c.github.io/mediasession/#enumdef-mediasessionaction> #[derive(Clone, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize)] pub enum MediaSessionActionType { /// The action intent is to resume playback. diff --git a/components/shared/script/script_msg.rs b/components/shared/script/script_msg.rs index 7612d15c16a..5abef781743 100644 --- a/components/shared/script/script_msg.rs +++ b/components/shared/script/script_msg.rs @@ -87,7 +87,7 @@ pub enum LogEntry { Warn(String), } -/// https://html.spec.whatwg.org/multipage/#replacement-enabled +/// <https://html.spec.whatwg.org/multipage/#replacement-enabled> #[derive(Debug, Deserialize, Serialize)] pub enum HistoryEntryReplacement { /// Traverse the history with replacement enabled. @@ -197,7 +197,7 @@ pub enum ScriptMsg { /// The expected origin of the target. target_origin: Option<ImmutableOrigin>, /// The source origin of the message. - /// https://html.spec.whatwg.org/multipage/#dom-messageevent-origin + /// <https://html.spec.whatwg.org/multipage/#dom-messageevent-origin> source_origin: ImmutableOrigin, /// The data to be posted. data: StructuredSerializedData, @@ -245,7 +245,7 @@ pub enum ScriptMsg { /// Send messages from postMessage calls from serviceworker /// to constellation for storing in service worker manager ForwardDOMMessage(DOMMessage, ServoUrl), - /// https://w3c.github.io/ServiceWorker/#schedule-job-algorithm. + /// <https://w3c.github.io/ServiceWorker/#schedule-job-algorithm> ScheduleJob(Job), /// Get Window Informations size and position GetClientWindow(IpcSender<(DeviceIntSize, DeviceIntPoint)>), @@ -375,29 +375,29 @@ pub enum ServiceWorkerMsg { Timeout(ServoUrl), /// Message sent by constellation to forward to a running service worker ForwardDOMMessage(DOMMessage, ServoUrl), - /// https://w3c.github.io/ServiceWorker/#schedule-job-algorithm + /// <https://w3c.github.io/ServiceWorker/#schedule-job-algorithm> ScheduleJob(Job), /// Exit the service worker manager Exit, } #[derive(Debug, Deserialize, PartialEq, Serialize)] -/// https://w3c.github.io/ServiceWorker/#dfn-job-type +/// <https://w3c.github.io/ServiceWorker/#dfn-job-type> pub enum JobType { /// <https://w3c.github.io/ServiceWorker/#register> Register, /// <https://w3c.github.io/ServiceWorker/#unregister-algorithm> Unregister, - /// <https://w3c.github.io/ServiceWorker/#update-algorithm + /// <https://w3c.github.io/ServiceWorker/#update-algorithm> Update, } #[derive(Debug, Deserialize, Serialize)] /// The kind of error the job promise should be rejected with. pub enum JobError { - /// https://w3c.github.io/ServiceWorker/#reject-job-promise + /// <https://w3c.github.io/ServiceWorker/#reject-job-promise> TypeError, - /// https://w3c.github.io/ServiceWorker/#reject-job-promise + /// <https://w3c.github.io/ServiceWorker/#reject-job-promise> SecurityError, } @@ -405,9 +405,9 @@ pub enum JobError { /// Messages sent from Job algorithms steps running in the SW manager, /// in order to resolve or reject the job promise. pub enum JobResult { - /// https://w3c.github.io/ServiceWorker/#reject-job-promise + /// <https://w3c.github.io/ServiceWorker/#reject-job-promise> RejectPromise(JobError), - /// https://w3c.github.io/ServiceWorker/#resolve-job-promise + /// <https://w3c.github.io/ServiceWorker/#resolve-job-promise> ResolvePromise(Job, JobResultValue), } @@ -428,7 +428,7 @@ pub enum JobResultValue { } #[derive(Debug, Deserialize, Serialize)] -/// https://w3c.github.io/ServiceWorker/#dfn-job +/// <https://w3c.github.io/ServiceWorker/#dfn-job> pub struct Job { /// <https://w3c.github.io/ServiceWorker/#dfn-job-type> pub job_type: JobType, @@ -445,7 +445,7 @@ pub struct Job { } impl Job { - /// https://w3c.github.io/ServiceWorker/#create-job-algorithm + /// <https://w3c.github.io/ServiceWorker/#create-job-algorithm> pub fn create_job( job_type: JobType, scope_url: ServoUrl, @@ -466,7 +466,7 @@ impl Job { } impl PartialEq for Job { - /// Equality criteria as described in https://w3c.github.io/ServiceWorker/#dfn-job-equivalent + /// Equality criteria as described in <https://w3c.github.io/ServiceWorker/#dfn-job-equivalent> fn eq(&self, other: &Self) -> bool { // TODO: match on job type, take worker type and `update_via_cache_mode` into account. let same_job = self.job_type == other.job_type; @@ -488,6 +488,6 @@ impl PartialEq for Job { pub enum SWManagerMsg { /// Placeholder to keep the enum, /// as it will be needed when implementing - /// https://github.com/servo/servo/issues/24660 + /// <https://github.com/servo/servo/issues/24660> PostMessageToClient, } diff --git a/components/shared/script/serializable.rs b/components/shared/script/serializable.rs index 1b19201a73b..f580a7a824b 100644 --- a/components/shared/script/serializable.rs +++ b/components/shared/script/serializable.rs @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! This module contains implementations in script that are serializable, -//! as per https://html.spec.whatwg.org/multipage/#serializable-objects. +//! as per <https://html.spec.whatwg.org/multipage/#serializable-objects>. //! The implementations are here instead of in script //! so that the other modules involved in the serialization don't have //! to depend on script. |