mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #11430 - asajeffrey:constellation-record-mozbrowser-parent-info, r=ConnorGBrewster
Record the frame type (IFrame or MozBrowserIFrame) in the pipeline. Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because this is a refactoring Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. This is a first step towards supporting the notion of multiple top-level browsing contexts in Servo, by making the constellation aware of which content is loaded in a mozbrowser iframe. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11430) <!-- Reviewable:end -->
This commit is contained in:
commit
64cca225e5
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