diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-06-04 16:01:13 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-06-04 16:04:35 +0200 |
commit | be334efe2fac39e0be29790ee06b00ddb652a40f (patch) | |
tree | cdad955c260962592d09f31c2510c5fb934d95d8 | |
parent | c87aa399ed082cd751b8947037a5ab16af604d7e (diff) | |
download | servo-be334efe2fac39e0be29790ee06b00ddb652a40f.tar.gz servo-be334efe2fac39e0be29790ee06b00ddb652a40f.zip |
Fix all the links to the UI Events spec
DOM3Events is no more.
-rw-r--r-- | components/script/dom/document.rs | 10 | ||||
-rw-r--r-- | components/script/dom/keyboardevent.rs | 10 | ||||
-rw-r--r-- | components/script/dom/uievent.rs | 2 | ||||
-rw-r--r-- | components/script/dom/webidls/KeyboardEvent.webidl | 10 | ||||
-rw-r--r-- | components/script/dom/webidls/MouseEvent.webidl | 6 | ||||
-rw-r--r-- | components/script/dom/webidls/SharedMouseAndKeyboardEventInit.webidl | 2 | ||||
-rw-r--r-- | components/script/dom/webidls/UIEvent.webidl | 6 | ||||
-rw-r--r-- | components/script/script_thread.rs | 1 | ||||
-rw-r--r-- | tests/html/test_UIEvent_resize.html | 2 |
9 files changed, 24 insertions, 25 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 9272c7f6da1..0897ccc24ae 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -577,7 +577,7 @@ impl Document { } /// Return the element that currently has focus. - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#events-focusevent-doc-focus + // https://w3c.github.io/uievents/#events-focusevent-doc-focus pub fn get_focused_element(&self) -> Option<Root<Element>> { self.focused.get() } @@ -706,7 +706,7 @@ impl Document { self.begin_focus_transaction(); } - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#event-type-click + // https://w3c.github.io/uievents/#event-type-click let client_x = client_point.x as i32; let client_y = client_point.y as i32; let clickCount = 1; @@ -728,7 +728,7 @@ impl Document { None); let event = event.upcast::<Event>(); - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#trusted-events + // https://w3c.github.io/uievents/#trusted-events event.set_trusted(true); // https://html.spec.whatwg.org/multipage/#run-authentic-click-activation-steps match mouse_event_type { @@ -1093,9 +1093,9 @@ impl Document { event.fire(target); let mut prevented = event.DefaultPrevented(); - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#keys-cancelable-keys + // https://w3c.github.io/uievents/#keys-cancelable-keys if state != KeyState::Released && props.is_printable() && !prevented { - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#keypress-event-order + // https://w3c.github.io/uievents/#keypress-event-order let event = KeyboardEvent::new(&self.window, DOMString::from("keypress"), true, diff --git a/components/script/dom/keyboardevent.rs b/components/script/dom/keyboardevent.rs index e5616257863..4cfa1a61011 100644 --- a/components/script/dom/keyboardevent.rs +++ b/components/script/dom/keyboardevent.rs @@ -647,7 +647,7 @@ fn key_location(key: Key) -> u32 { } } -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#widl-KeyboardEvent-charCode +// https://w3c.github.io/uievents/#dom-keyboardevent-charcode fn key_charcode(key: Key, mods: KeyModifiers) -> Option<u32> { let key_string = key_value(key, mods); if key_string.len() == 1 { @@ -657,10 +657,10 @@ fn key_charcode(key: Key, mods: KeyModifiers) -> Option<u32> { } } -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#legacy-key-models +// https://w3c.github.io/uievents/#legacy-key-models fn key_keycode(key: Key) -> u32 { match key { - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#legacy-key-models + // https://w3c.github.io/uievents/#legacy-key-models Key::Backspace => 8, Key::Tab => 9, Key::Enter => 13, @@ -680,7 +680,7 @@ fn key_keycode(key: Key) -> u32 { Key::Down => 40, Key::Delete => 46, - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#optionally-fixed-virtual-key-codes + // https://w3c.github.io/uievents/#optionally-fixed-virtual-key-codes Key::Semicolon => 186, Key::Equal => 187, Key::Comma => 188, @@ -820,7 +820,7 @@ impl KeyboardEventMethods for KeyboardEvent { self.is_composing.get() } - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#widl-KeyboardEvent-getModifierState + // https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate fn GetModifierState(&self, keyArg: DOMString) -> bool { match &*keyArg { "Ctrl" => self.CtrlKey(), diff --git a/components/script/dom/uievent.rs b/components/script/dom/uievent.rs index 5b0a6f3243e..16461315ca1 100644 --- a/components/script/dom/uievent.rs +++ b/components/script/dom/uievent.rs @@ -18,7 +18,7 @@ use std::cell::Cell; use std::default::Default; use string_cache::Atom; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#interface-UIEvent +// https://w3c.github.io/uievents/#interface-uievent #[dom_struct] pub struct UIEvent { event: Event, diff --git a/components/script/dom/webidls/KeyboardEvent.webidl b/components/script/dom/webidls/KeyboardEvent.webidl index a9027ededcd..5a9865c8a6d 100644 --- a/components/script/dom/webidls/KeyboardEvent.webidl +++ b/components/script/dom/webidls/KeyboardEvent.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* * The origin of this IDL file is - * https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#interface-KeyboardEvent + * https://w3c.github.io/uievents/#interface-keyboardevent * */ @@ -26,7 +26,7 @@ interface KeyboardEvent : UIEvent { boolean getModifierState (DOMString keyArg); }; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-interface-KeyboardEvent-initializers +// https://w3c.github.io/uievents/#idl-interface-KeyboardEvent-initializers partial interface KeyboardEvent { // Originally introduced (and deprecated) in DOM Level 3 void initKeyboardEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, @@ -34,7 +34,7 @@ partial interface KeyboardEvent { boolean repeat, DOMString locale); }; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#KeyboardEvent-supplemental-interface +// https://w3c.github.io/uievents/#legacy-interface-KeyboardEvent partial interface KeyboardEvent { // The following support legacy user agents readonly attribute unsigned long charCode; @@ -42,7 +42,7 @@ partial interface KeyboardEvent { readonly attribute unsigned long which; }; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#interface-KeyboardEvent +// https://w3c.github.io/uievents/#dictdef-keyboardeventinit dictionary KeyboardEventInit : SharedKeyboardAndMouseEventInit { DOMString key = ""; DOMString code = ""; @@ -51,7 +51,7 @@ dictionary KeyboardEventInit : SharedKeyboardAndMouseEventInit { boolean isComposing = false; }; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#events-KeyboardEventInit-supplemental +// https://w3c.github.io/uievents/#legacy-dictionary-KeyboardEventInit /*partial dictionary KeyboardEventInit { unsigned long charCode = 0; unsigned long keyCode = 0; diff --git a/components/script/dom/webidls/MouseEvent.webidl b/components/script/dom/webidls/MouseEvent.webidl index ea9e7772a62..e309ce0924c 100644 --- a/components/script/dom/webidls/MouseEvent.webidl +++ b/components/script/dom/webidls/MouseEvent.webidl @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-MouseEvent +// https://w3c.github.io/uievents/#interface-mouseevent [Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)] interface MouseEvent : UIEvent { readonly attribute long screenX; @@ -23,7 +23,7 @@ interface MouseEvent : UIEvent { readonly attribute long which; }; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-MouseEventInit +// https://w3c.github.io/uievents/#dictdef-eventmodifierinit dictionary MouseEventInit : SharedKeyboardAndMouseEventInit { long screenX = 0; long screenY = 0; @@ -34,7 +34,7 @@ dictionary MouseEventInit : SharedKeyboardAndMouseEventInit { EventTarget? relatedTarget = null; }; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-MouseEvent-1 +// https://w3c.github.io/uievents/#idl-interface-MouseEvent-initializers partial interface MouseEvent { // Deprecated in DOM Level 3 void initMouseEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, diff --git a/components/script/dom/webidls/SharedMouseAndKeyboardEventInit.webidl b/components/script/dom/webidls/SharedMouseAndKeyboardEventInit.webidl index c7b67c551f9..906be401f78 100644 --- a/components/script/dom/webidls/SharedMouseAndKeyboardEventInit.webidl +++ b/components/script/dom/webidls/SharedMouseAndKeyboardEventInit.webidl @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-SharedKeyboardAndMouseEventInit +// https://w3c.github.io/uievents/#dictdef-eventmodifierinit dictionary SharedKeyboardAndMouseEventInit : UIEventInit { boolean ctrlKey = false; boolean shiftKey = false; diff --git a/components/script/dom/webidls/UIEvent.webidl b/components/script/dom/webidls/UIEvent.webidl index d1019981b89..58f04ff24dc 100644 --- a/components/script/dom/webidls/UIEvent.webidl +++ b/components/script/dom/webidls/UIEvent.webidl @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-UIEvent +// https://w3c.github.io/uievents/#interface-uievent [Constructor(DOMString type, optional UIEventInit eventInitDict)] interface UIEvent : Event { // readonly attribute WindowProxy? view; @@ -10,14 +10,14 @@ interface UIEvent : Event { readonly attribute long detail; }; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-UIEventInit +// https://w3c.github.io/uievents/#dictdef-uieventinit-uieventinit dictionary UIEventInit : EventInit { // WindowProxy? view = null; Window? view = null; long detail = 0; }; -// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-UIEvent-1 +// https://w3c.github.io/uievents/#idl-interface-UIEvent-initializers partial interface UIEvent { // Deprecated in DOM Level 3 void initUIEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg); diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 35ae783f5ff..0c38376d9e7 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1920,7 +1920,6 @@ impl ScriptThread { } // http://dev.w3.org/csswg/cssom-view/#resizing-viewports - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#event-type-resize if size_type == WindowSizeType::Resize { let uievent = UIEvent::new(window.r(), DOMString::from("resize"), EventBubbles::DoesNotBubble, diff --git a/tests/html/test_UIEvent_resize.html b/tests/html/test_UIEvent_resize.html index a9d21ad07db..48d99dc8be6 100644 --- a/tests/html/test_UIEvent_resize.html +++ b/tests/html/test_UIEvent_resize.html @@ -6,7 +6,7 @@ <body> <script> window.addEventListener("resize", function (aEvent) { - // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#event-type-resize + // http://dev.w3.org/csswg/cssom-view/#resizing-viewports is_a(aEvent, UIEvent, "event should be UIEvent."); is(aEvent.bubbles, false, "Bubbles should be No."); is(aEvent.cancelable, false, "Cancelable should be No."); |