mirror of
https://github.com/servo/servo.git
synced 2025-08-01 03:30:33 +01:00
parent
7c63c7d7c1
commit
14ac1ef75a
7 changed files with 24 additions and 70 deletions
|
@ -58,7 +58,6 @@ use net_traits::storage_task::StorageType;
|
|||
use script_traits::UntrustedNodeAddress;
|
||||
use serde::{Serialize, Deserialize};
|
||||
use smallvec::SmallVec;
|
||||
use msg::compositor_msg::ScriptListener;
|
||||
use msg::constellation_msg::ConstellationChan;
|
||||
use net_traits::image::base::Image;
|
||||
use profile_traits::mem::ProfilerChan;
|
||||
|
@ -342,13 +341,6 @@ impl<T> JSTraceable for IpcSender<T> where T: Deserialize + Serialize {
|
|||
}
|
||||
}
|
||||
|
||||
impl JSTraceable for ScriptListener {
|
||||
#[inline]
|
||||
fn trace(&self, _: *mut JSTracer) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
impl JSTraceable for Box<LayoutRPC+'static> {
|
||||
#[inline]
|
||||
fn trace(&self, _: *mut JSTracer) {
|
||||
|
|
|
@ -69,7 +69,7 @@ use dom::uievent::UIEvent;
|
|||
use dom::window::{Window, WindowHelpers, ReflowReason};
|
||||
|
||||
use layout_interface::{HitTestResponse, MouseOverResponse};
|
||||
use msg::compositor_msg::ScriptListener;
|
||||
use msg::compositor_msg::ScriptToCompositorMsg;
|
||||
use msg::constellation_msg::AnimationState;
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
use msg::constellation_msg::{ConstellationChan, FocusType, Key, KeyState, KeyModifiers, MozBrowserEvent, SubpageId};
|
||||
|
@ -85,7 +85,7 @@ use layout_interface::{ReflowGoal, ReflowQueryType};
|
|||
|
||||
use euclid::point::Point2D;
|
||||
use html5ever::tree_builder::{QuirksMode, NoQuirks, LimitedQuirks, Quirks};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use layout_interface::{LayoutChan, Msg};
|
||||
use string_cache::{Atom, QualName};
|
||||
use url::Url;
|
||||
|
@ -272,7 +272,7 @@ pub trait DocumentHelpers<'a> {
|
|||
key: Key,
|
||||
state: KeyState,
|
||||
modifiers: KeyModifiers,
|
||||
compositor: &mut ScriptListener);
|
||||
compositor: &mut IpcSender<ScriptToCompositorMsg>);
|
||||
fn node_from_nodes_and_strings(self, nodes: Vec<NodeOrString>)
|
||||
-> Fallible<Root<Node>>;
|
||||
fn get_body_attribute(self, local_name: &Atom) -> DOMString;
|
||||
|
@ -637,8 +637,8 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
|
|||
let window = self.window();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let window = window.r();
|
||||
let mut compositor = window.compositor();
|
||||
compositor.set_title(window.pipeline(), Some(self.Title()));
|
||||
let compositor = window.compositor();
|
||||
compositor.send(ScriptToCompositorMsg::SetTitle(window.pipeline(), Some(self.Title()))).unwrap();
|
||||
}
|
||||
|
||||
fn dirty_all_nodes(self) {
|
||||
|
@ -813,7 +813,7 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
|
|||
key: Key,
|
||||
state: KeyState,
|
||||
modifiers: KeyModifiers,
|
||||
compositor: &mut ScriptListener) {
|
||||
compositor: &mut IpcSender<ScriptToCompositorMsg>) {
|
||||
let window = self.window.root();
|
||||
let focused = self.get_focused_element();
|
||||
let body = self.GetBody();
|
||||
|
@ -864,7 +864,7 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
|
|||
}
|
||||
|
||||
if !prevented {
|
||||
compositor.send_key_event(key, state, modifiers);
|
||||
compositor.send(ScriptToCompositorMsg::SendKeyEvent(key, state, modifiers)).unwrap();
|
||||
}
|
||||
|
||||
// This behavior is unspecced
|
||||
|
|
|
@ -42,7 +42,7 @@ use webdriver_handlers::jsval_to_webdriver;
|
|||
|
||||
use devtools_traits::{ScriptToDevtoolsControlMsg, TimelineMarker, TimelineMarkerType};
|
||||
use devtools_traits::{TracingMetadata};
|
||||
use msg::compositor_msg::ScriptListener;
|
||||
use msg::compositor_msg::ScriptToCompositorMsg;
|
||||
use msg::constellation_msg::{LoadData, PipelineId, SubpageId, ConstellationChan, WindowSizeData, WorkerId};
|
||||
use msg::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
|
||||
use net_traits::ResourceTask;
|
||||
|
@ -121,7 +121,7 @@ pub struct Window {
|
|||
#[ignore_heap_size_of = "channels are hard"]
|
||||
image_cache_chan: ImageCacheChan,
|
||||
#[ignore_heap_size_of = "TODO(#6911) newtypes containing unmeasurable types are hard"]
|
||||
compositor: DOMRefCell<ScriptListener>,
|
||||
compositor: DOMRefCell<IpcSender<ScriptToCompositorMsg>>,
|
||||
browsing_context: DOMRefCell<Option<BrowsingContext>>,
|
||||
page: Rc<Page>,
|
||||
performance: MutNullableHeap<JS<Performance>>,
|
||||
|
@ -273,7 +273,7 @@ impl Window {
|
|||
&self.image_cache_task
|
||||
}
|
||||
|
||||
pub fn compositor<'a>(&'a self) -> RefMut<'a, ScriptListener> {
|
||||
pub fn compositor<'a>(&'a self) -> RefMut<'a, IpcSender<ScriptToCompositorMsg>> {
|
||||
self.compositor.borrow_mut()
|
||||
}
|
||||
|
||||
|
@ -1073,7 +1073,7 @@ impl Window {
|
|||
script_chan: MainThreadScriptChan,
|
||||
image_cache_chan: ImageCacheChan,
|
||||
control_chan: Sender<ConstellationControlMsg>,
|
||||
compositor: ScriptListener,
|
||||
compositor: IpcSender<ScriptToCompositorMsg>,
|
||||
image_cache_task: ImageCacheTask,
|
||||
resource_task: Arc<ResourceTask>,
|
||||
storage_task: StorageTask,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue