mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Minor refactoring of mouse event types
* Move some types into the `msg` crate so they can be shared more. * Use MouseEventType instead of duplicating it in other enums.
This commit is contained in:
parent
2be60be062
commit
8c4fed42b0
13 changed files with 43 additions and 64 deletions
|
@ -82,13 +82,14 @@ use msg::compositor_msg::ScriptToCompositorMsg;
|
|||
use msg::constellation_msg::ScriptMsg as ConstellationMsg;
|
||||
use msg::constellation_msg::{ALT, CONTROL, SHIFT, SUPER};
|
||||
use msg::constellation_msg::{AnimationState, PipelineId};
|
||||
use msg::constellation_msg::{ConstellationChan, FocusType, Key, KeyModifiers, KeyState, MozBrowserEvent, SubpageId};
|
||||
use msg::constellation_msg::{ConstellationChan, FocusType, Key, KeyModifiers, KeyState};
|
||||
use msg::constellation_msg::{MouseButton, MouseEventType, MozBrowserEvent, SubpageId};
|
||||
use net_traits::ControlMsg::{GetCookiesForUrl, SetCookiesForUrl};
|
||||
use net_traits::CookieSource::NonHTTP;
|
||||
use net_traits::{AsyncResponseTarget, PendingAsyncLoad};
|
||||
use num::ToPrimitive;
|
||||
use script_task::{MainThreadScriptMsg, Runnable};
|
||||
use script_traits::{MouseButton, TouchEventType, TouchId, UntrustedNodeAddress};
|
||||
use script_traits::{TouchEventType, TouchId, UntrustedNodeAddress};
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::boxed::FnBox;
|
||||
|
@ -1362,14 +1363,6 @@ impl Document {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(HeapSizeOf)]
|
||||
pub enum MouseEventType {
|
||||
Click,
|
||||
MouseDown,
|
||||
MouseUp,
|
||||
}
|
||||
|
||||
|
||||
#[derive(PartialEq, HeapSizeOf)]
|
||||
pub enum DocumentSource {
|
||||
FromParser,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue