Privatize some items in EventTarget.

This commit is contained in:
Ms2ger 2017-01-09 10:21:50 +01:00
parent b8554abaa4
commit 63f0d3ecf5

View file

@ -69,7 +69,7 @@ pub enum ListenerPhase {
/// https://html.spec.whatwg.org/multipage/#internal-raw-uncompiled-handler
#[derive(JSTraceable, Clone, PartialEq)]
pub struct InternalRawUncompiledHandler {
struct InternalRawUncompiledHandler {
source: DOMString,
url: ServoUrl,
line: usize,
@ -77,7 +77,7 @@ pub struct InternalRawUncompiledHandler {
/// A representation of an event handler, either compiled or uncompiled raw source, or null.
#[derive(JSTraceable, PartialEq, Clone)]
pub enum InlineEventListener {
enum InlineEventListener {
Uncompiled(InternalRawUncompiledHandler),
Compiled(CommonEventHandler),
Null,
@ -308,7 +308,7 @@ impl EventTarget {
}
/// https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handlers-11
pub fn set_inline_event_listener(&self,
fn set_inline_event_listener(&self,
ty: Atom,
listener: Option<InlineEventListener>) {
let mut handlers = self.handlers.borrow_mut();
@ -363,7 +363,7 @@ impl EventTarget {
// https://html.spec.whatwg.org/multipage/#getting-the-current-value-of-the-event-handler
#[allow(unsafe_code)]
pub fn get_compiled_event_handler(&self,
fn get_compiled_event_handler(&self,
handler: InternalRawUncompiledHandler,
ty: &Atom)
-> Option<CommonEventHandler> {