From cb076cb7bfc073e2f7d268e23fb76c80ad9b1b6d Mon Sep 17 00:00:00 2001 From: apopiak Date: Wed, 13 Jan 2016 23:41:48 +0501 Subject: [PATCH] servo: Merge #9271 - Move `MozBrowserEvent` to `script_traits` (from apopiak:moveMozBrowserEvent_9225); r=KiChjang close #9225 Source-Repo: https://github.com/servo/servo Source-Revision: 897007f13447f6b34e220042e5cfd31f7686cfec --- servo/components/compositing/constellation.rs | 6 +- servo/components/compositing/pipeline.rs | 4 +- servo/components/msg/constellation_msg.rs | 55 ----------------- servo/components/script/dom/document.rs | 4 +- .../script/dom/htmliframeelement.rs | 5 +- .../components/script/dom/htmllinkelement.rs | 4 +- servo/components/script/dom/window.rs | 6 +- servo/components/script/script_thread.rs | 4 +- servo/components/script_traits/lib.rs | 59 ++++++++++++++++++- servo/components/script_traits/script_msg.rs | 4 +- 10 files changed, 74 insertions(+), 77 deletions(-) diff --git a/servo/components/compositing/constellation.rs b/servo/components/compositing/constellation.rs index 2daa652f6f40..90d244868ba6 100644 --- a/servo/components/compositing/constellation.rs +++ b/servo/components/compositing/constellation.rs @@ -30,8 +30,7 @@ use msg::constellation_msg::AnimationState; use msg::constellation_msg::WebDriverCommandMsg; use msg::constellation_msg::{FrameId, PipelineId}; use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData}; -use msg::constellation_msg::{MozBrowserEvent, NavigationDirection}; -use msg::constellation_msg::{PipelineNamespace, PipelineNamespaceId}; +use msg::constellation_msg::{PipelineNamespace, PipelineNamespaceId, NavigationDirection}; use msg::constellation_msg::{SubpageId, WindowSizeData}; use msg::constellation_msg::{self, ConstellationChan, Failure}; use msg::webdriver_msg; @@ -44,9 +43,8 @@ use profile_traits::mem; use profile_traits::time; use sandboxing; use script_traits::{CompositorEvent, ConstellationControlMsg, DocumentState, LayoutControlMsg}; -use script_traits::{IFrameLoadInfo, IFrameSandboxState}; +use script_traits::{IFrameLoadInfo, IFrameSandboxState, MozBrowserEvent, TimerEventRequest}; use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, ScriptThreadFactory}; -use script_traits::{TimerEventRequest}; use std::borrow::ToOwned; use std::collections::HashMap; use std::env; diff --git a/servo/components/compositing/pipeline.rs b/servo/components/compositing/pipeline.rs index 3c49bbf41db8..2a4e3b1999eb 100644 --- a/servo/components/compositing/pipeline.rs +++ b/servo/components/compositing/pipeline.rs @@ -16,14 +16,14 @@ use ipc_channel::router::ROUTER; use layers::geometry::DevicePixel; use layout_traits::{LayoutControlChan, LayoutThreadFactory}; use msg::constellation_msg::{ConstellationChan, Failure, FrameId, PipelineId, SubpageId}; -use msg::constellation_msg::{LoadData, MozBrowserEvent, WindowSizeData}; +use msg::constellation_msg::{LoadData, WindowSizeData}; use msg::constellation_msg::{PipelineNamespaceId}; use net_traits::ResourceThread; use net_traits::image_cache_thread::ImageCacheThread; use net_traits::storage_thread::StorageThread; use profile_traits::mem as profile_mem; use profile_traits::time; -use script_traits::{ConstellationControlMsg, InitialScriptState}; +use script_traits::{ConstellationControlMsg, InitialScriptState, MozBrowserEvent}; use script_traits::{LayoutControlMsg, LayoutMsg, NewLayoutInfo, ScriptMsg}; use script_traits::{ScriptToCompositorMsg, ScriptThreadFactory, TimerEventRequest}; use std::mem; diff --git a/servo/components/msg/constellation_msg.rs b/servo/components/msg/constellation_msg.rs index d1e9b39b02b9..46fda6511e02 100644 --- a/servo/components/msg/constellation_msg.rs +++ b/servo/components/msg/constellation_msg.rs @@ -219,61 +219,6 @@ pub enum AnimationState { NoAnimationCallbacksPresent, } -// https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API#Events -#[derive(Deserialize, Serialize)] -pub enum MozBrowserEvent { - /// Sent when the scroll position within a browser `