mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Redirect document loads manually
This commit is contained in:
parent
779edd7c4a
commit
541baafe1c
17 changed files with 376 additions and 52 deletions
|
@ -55,7 +55,7 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
|||
use libc::c_void;
|
||||
use msg::constellation_msg::{BrowsingContextId, TopLevelBrowsingContextId, FrameType, Key, KeyModifiers, KeyState};
|
||||
use msg::constellation_msg::{PipelineId, PipelineNamespaceId, TraversalDirection};
|
||||
use net_traits::{ReferrerPolicy, ResourceThreads};
|
||||
use net_traits::{FetchResponseMsg, ReferrerPolicy, ResourceThreads};
|
||||
use net_traits::image::base::Image;
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use net_traits::response::HttpsState;
|
||||
|
@ -232,6 +232,9 @@ pub enum UpdatePipelineIdReason {
|
|||
/// Messages sent from the constellation or layout to the script thread.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum ConstellationControlMsg {
|
||||
/// Sends the final response to script thread for fetching after all redirections
|
||||
/// have been resolved
|
||||
NavigationResponse(PipelineId, FetchResponseMsg),
|
||||
/// Gives a channel and ID to a layout thread, as well as the ID of that layout's parent
|
||||
AttachLayout(NewLayoutInfo),
|
||||
/// Window resized. Sends a DOM event eventually, but first we combine events.
|
||||
|
@ -304,6 +307,7 @@ impl fmt::Debug for ConstellationControlMsg {
|
|||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
use self::ConstellationControlMsg::*;
|
||||
let variant = match *self {
|
||||
NavigationResponse(..) => "NavigationResponse",
|
||||
AttachLayout(..) => "AttachLayout",
|
||||
Resize(..) => "Resize",
|
||||
ResizeInactive(..) => "ResizeInactive",
|
||||
|
|
|
@ -20,6 +20,7 @@ use ipc_channel::ipc::IpcSender;
|
|||
use msg::constellation_msg::{BrowsingContextId, TopLevelBrowsingContextId, FrameType, PipelineId, TraversalDirection};
|
||||
use msg::constellation_msg::{Key, KeyModifiers, KeyState};
|
||||
use net_traits::CoreResourceMsg;
|
||||
use net_traits::request::RequestInit;
|
||||
use net_traits::storage_thread::StorageType;
|
||||
use offscreen_gl_context::{GLContextAttributes, GLLimits};
|
||||
use servo_url::ImmutableOrigin;
|
||||
|
@ -67,6 +68,9 @@ pub enum LogEntry {
|
|||
/// Messages from the script to the constellation.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum ScriptMsg {
|
||||
/// Requests are sent to constellation and fetches are checked manually
|
||||
/// for cross-origin loads
|
||||
InitiateNavigateRequest(RequestInit, PipelineId),
|
||||
/// Broadcast a storage event to every same-origin pipeline.
|
||||
/// The strings are key, old value and new value.
|
||||
BroadcastStorageEvent(PipelineId, StorageType, ServoUrl, Option<String>, Option<String>, Option<String>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue