mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Record the frame type (IFrame or MozBrowserIFrame) in the pipeline.
This commit is contained in:
parent
cd1396fa9a
commit
d92dfe1b8c
6 changed files with 66 additions and 55 deletions
|
@ -56,7 +56,7 @@ use js::jsval::JSVal;
|
|||
use js::rust::Runtime;
|
||||
use layout_interface::{LayoutChan, LayoutRPC};
|
||||
use libc;
|
||||
use msg::constellation_msg::{PipelineId, SubpageId, WindowSizeData, WindowSizeType, ReferrerPolicy};
|
||||
use msg::constellation_msg::{FrameType, PipelineId, SubpageId, WindowSizeData, WindowSizeType, ReferrerPolicy};
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread};
|
||||
use net_traits::response::HttpsState;
|
||||
|
@ -290,7 +290,7 @@ no_jsmanaged_fields!(PropertyDeclarationBlock);
|
|||
no_jsmanaged_fields!(HashSet<T>);
|
||||
// These three are interdependent, if you plan to put jsmanaged data
|
||||
// in one of these make sure it is propagated properly to containing structs
|
||||
no_jsmanaged_fields!(SubpageId, WindowSizeData, WindowSizeType, PipelineId);
|
||||
no_jsmanaged_fields!(FrameType, SubpageId, WindowSizeData, WindowSizeType, PipelineId);
|
||||
no_jsmanaged_fields!(TimerEventId, TimerSource);
|
||||
no_jsmanaged_fields!(WorkerId);
|
||||
no_jsmanaged_fields!(QuirksMode);
|
||||
|
|
|
@ -34,7 +34,7 @@ use ipc_channel::ipc;
|
|||
use js::jsapi::{JSAutoCompartment, RootedValue, JSContext, MutableHandleValue};
|
||||
use js::jsval::{UndefinedValue, NullValue};
|
||||
use layout_interface::ReflowQueryType;
|
||||
use msg::constellation_msg::{LoadData, NavigationDirection, PipelineId, SubpageId};
|
||||
use msg::constellation_msg::{FrameType, LoadData, NavigationDirection, PipelineId, SubpageId};
|
||||
use net_traits::response::HttpsState;
|
||||
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
|
||||
use script_traits::{IFrameLoadInfo, MozBrowserEvent, ScriptMsg as ConstellationMsg};
|
||||
|
@ -123,6 +123,7 @@ impl HTMLIFrameElement {
|
|||
let (new_subpage_id, old_subpage_id) = self.generate_new_subpage_id();
|
||||
let new_pipeline_id = self.pipeline_id.get().unwrap();
|
||||
let private_iframe = self.privatebrowsing();
|
||||
let frame_type = if self.Mozbrowser() { FrameType::MozBrowserIFrame } else { FrameType::IFrame };
|
||||
|
||||
let load_info = IFrameLoadInfo {
|
||||
load_data: load_data,
|
||||
|
@ -132,6 +133,7 @@ impl HTMLIFrameElement {
|
|||
new_pipeline_id: new_pipeline_id,
|
||||
sandbox: sandboxed,
|
||||
is_private: private_iframe,
|
||||
frame_type: frame_type,
|
||||
};
|
||||
window.constellation_chan()
|
||||
.send(ConstellationMsg::ScriptLoadedURLInIFrame(load_info))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue