Index: sdk/lib/html/dartium/html_dartium.dart |
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart |
index 4164d84d833208be120e0ee0103e2f6b60d5c89c..b90fb9fac3a8f7d5c10961221f88eda6315d4858 100644 |
--- a/sdk/lib/html/dartium/html_dartium.dart |
+++ b/sdk/lib/html/dartium/html_dartium.dart |
@@ -6219,9 +6219,14 @@ class CssValue extends NativeFieldWrapperClass1 { |
@DomName('CustomEvent') |
class CustomEvent extends Event { |
- factory CustomEvent(String type, [bool canBubble = true, bool cancelable = true, |
- Object detail]) => _CustomEventFactoryProvider.createCustomEvent( |
- type, canBubble, cancelable, detail); |
+ factory CustomEvent(String type, |
+ {bool canBubble: true, bool cancelable: true, Object detail}) { |
+ |
+ final CustomEvent e = document.$dom_createEvent("CustomEvent"); |
+ e.$dom_initCustomEvent(type, canBubble, cancelable, detail); |
+ |
+ return e; |
+ } |
CustomEvent.internal() : super.internal(); |
@DomName('CustomEvent.detail') |
@@ -6737,16 +6742,23 @@ class DeviceMotionEvent extends Event { |
num get interval native "DeviceMotionEvent_interval_Getter"; |
} |
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
// WARNING: Do not edit - generated code. |
- |
-@DocsEditable |
@DomName('DeviceOrientationEvent') |
+ |
class DeviceOrientationEvent extends Event { |
+ factory DeviceOrientationEvent(String type, |
+ {bool canBubble: true, bool cancelable: true, num alpha: 0, num beta: 0, |
+ num gamma: 0, bool absolute: false}) { |
+ var e = document.$dom_createEvent("DeviceOrientationEvent"); |
+ e.$dom_initDeviceOrientationEvent(type, canBubble, cancelable, alpha, beta, |
+ gamma, absolute); |
+ return e; |
+ } |
DeviceOrientationEvent.internal() : super.internal(); |
@DomName('DeviceOrientationEvent.absolute') |
@@ -6767,7 +6779,7 @@ class DeviceOrientationEvent extends Event { |
@DomName('DeviceOrientationEvent.initDeviceOrientationEvent') |
@DocsEditable |
- void initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) native "DeviceOrientationEvent_initDeviceOrientationEvent_Callback"; |
+ void $dom_initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) native "DeviceOrientationEvent_initDeviceOrientationEvent_Callback"; |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
@@ -10691,8 +10703,9 @@ class Event extends NativeFieldWrapperClass1 { |
// Contrary to JS, we default canBubble and cancelable to true, since that's |
// what people want most of the time anyway. |
factory Event(String type, |
- [bool canBubble = true, bool cancelable = true]) { |
- return new Event.eventType('Event', type, canBubble, cancelable); |
+ {bool canBubble: true, bool cancelable: true}) { |
+ return new Event.eventType('Event', type, canBubble: canBubble, |
+ cancelable: canBubble); |
} |
/** |
@@ -10703,8 +10716,8 @@ class Event extends NativeFieldWrapperClass1 { |
* |
* var e = new Event.type('MouseEvent', 'mousedown', true, true); |
*/ |
- factory Event.eventType(String type, String name, [bool canBubble = true, |
- bool cancelable = true]) { |
+ factory Event.eventType(String type, String name, {bool canBubble: true, |
+ bool cancelable: true}) { |
final Event e = document.$dom_createEvent(type); |
e.$dom_initEvent(name, canBubble, cancelable); |
return e; |
@@ -12591,16 +12604,22 @@ class HRElement extends _Element_Merged { |
factory HRElement() => document.$dom_createElement("hr"); |
} |
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
// WARNING: Do not edit - generated code. |
- |
-@DocsEditable |
@DomName('HashChangeEvent') |
+ |
class HashChangeEvent extends Event { |
+ factory HashChangeEvent(String type, |
+ {bool canBubble: true, bool cancelable: true, String oldUrl, |
+ String newUrl}) { |
+ var event = document.$dom_createEvent("HashChangeEvent"); |
+ event.$dom_initHashChangeEvent(type, canBubble, cancelable, oldUrl, newUrl); |
+ return event; |
+ } |
HashChangeEvent.internal() : super.internal(); |
@DomName('HashChangeEvent.newURL') |
@@ -12613,7 +12632,7 @@ class HashChangeEvent extends Event { |
@DomName('HashChangeEvent.initHashChangeEvent') |
@DocsEditable |
- void initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) native "HashChangeEvent_initHashChangeEvent_Callback"; |
+ void $dom_initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) native "HashChangeEvent_initHashChangeEvent_Callback"; |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
@@ -17392,16 +17411,27 @@ class MessageChannel extends NativeFieldWrapperClass1 { |
MessagePort get port2 native "MessageChannel_port2_Getter"; |
} |
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
// WARNING: Do not edit - generated code. |
- |
-@DocsEditable |
@DomName('MessageEvent') |
+ |
class MessageEvent extends Event { |
+ factory MessageEvent(String type, |
+ {bool canBubble: false, bool cancelable: false, Object data, |
+ String origin, String lastEventId, |
+ Window source, List messagePorts}) { |
+ if (source == null) { |
+ source = window; |
+ } |
+ var event = document.$dom_createEvent("MessageEvent"); |
+ event.$dom_initMessageEvent(type, canBubble, cancelable, data, origin, |
+ lastEventId, source, messagePorts); |
+ return event; |
+ } |
MessageEvent.internal() : super.internal(); |
@DomName('MessageEvent.data') |
@@ -17426,11 +17456,7 @@ class MessageEvent extends Event { |
@DomName('MessageEvent.initMessageEvent') |
@DocsEditable |
- void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List messagePorts) native "MessageEvent_initMessageEvent_Callback"; |
- |
- @DomName('MessageEvent.webkitInitMessageEvent') |
- @DocsEditable |
- void webkitInitMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List transferables) native "MessageEvent_webkitInitMessageEvent_Callback"; |
+ void $dom_initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List messagePorts) native "MessageEvent_initMessageEvent_Callback"; |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
@@ -17670,16 +17696,21 @@ class ModElement extends _Element_Merged { |
@DomName('MouseEvent') |
class MouseEvent extends UIEvent { |
- factory MouseEvent(String type, Window view, int detail, int screenX, |
- int screenY, int clientX, int clientY, int button, [bool canBubble = true, |
- bool cancelable = true, bool ctrlKey = false, bool altKey = false, |
- bool shiftKey = false, bool metaKey = false, |
- EventTarget relatedTarget = null]) => |
- _MouseEventFactoryProvider.createMouseEvent( |
- type, view, detail, screenX, screenY, |
- clientX, clientY, button, canBubble, cancelable, |
- ctrlKey, altKey, shiftKey, metaKey, |
- relatedTarget); |
+ factory MouseEvent(String type, |
+ {Window view, int detail: 0, int screenX: 0, int screenY: 0, |
+ int clientX: 0, int clientY: 0, int button: 0, bool canBubble: true, |
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false, |
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) { |
+ |
+ if (view == null) { |
+ view = window; |
+ } |
+ var event = document.$dom_createEvent('MouseEvent'); |
+ event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail, |
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, |
+ button, relatedTarget); |
+ return event; |
+ } |
MouseEvent.internal() : super.internal(); |
@DomName('MouseEvent.altKey') |
@@ -17775,12 +17806,18 @@ typedef void MutationCallback(List<MutationRecord> mutations, MutationObserver o |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-// WARNING: Do not edit - generated code. |
- |
-@DocsEditable |
@DomName('MutationEvent') |
class MutationEvent extends Event { |
+ factory MutationEvent(String type, |
+ {bool canBubble: false, bool cancelable: false, Node relatedNode, |
+ String prevValue, String newValue, String attrName, int attrChange: 0}) { |
+ |
+ var event = document.$dom_createEvent('MutationEvent'); |
+ event.$dom_initMutationEvent(type, canBubble, cancelable, relatedNode, |
+ prevValue, newValue, attrName, attrChange); |
+ return event; |
+ } |
MutationEvent.internal() : super.internal(); |
static const int ADDITION = 2; |
@@ -17811,9 +17848,12 @@ class MutationEvent extends Event { |
@DomName('MutationEvent.initMutationEvent') |
@DocsEditable |
- void initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) native "MutationEvent_initMutationEvent_Callback"; |
+ void $dom_initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) native "MutationEvent_initMutationEvent_Callback"; |
} |
+ |
+ |
+ |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -24720,8 +24760,12 @@ class UIEvent extends Event { |
// |
// Contrary to JS, we default canBubble and cancelable to true, since that's |
// what people want most of the time anyway. |
- factory UIEvent(String type, Window view, int detail, |
- [bool canBubble = true, bool cancelable = true]) { |
+ factory UIEvent(String type, |
+ {Window view, int detail: 0, bool canBubble: true, |
+ bool cancelable: true}) { |
+ if (view == null) { |
+ view = window; |
+ } |
final e = document.$dom_createEvent("UIEvent"); |
e.$dom_initUIEvent(type, canBubble, cancelable, view, detail); |
return e; |
@@ -27719,13 +27763,16 @@ class WebSocketEvents extends Events { |
@DomName('WheelEvent') |
class WheelEvent extends MouseEvent { |
- factory WheelEvent(String type, Window view, int wheelDeltaX, int wheelDeltaY, |
- int detail, int screenX, int screenY, int clientX, int clientY, |
- int button, |
- [bool canBubble = true, bool cancelable = true, bool ctrlKey = false, |
- bool altKey = false, bool shiftKey = false, bool metaKey = false, |
- EventTarget relatedTarget = null]) { |
+ factory WheelEvent(String type, |
+ {Window view, int deltaX: 0, int deltaY: 0, |
+ int detail: 0, int screenX: 0, int screenY: 0, int clientX: 0, |
+ int clientY: 0, int button: 0, bool canBubble: true, |
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false, |
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) { |
+ if (view == null) { |
+ view = window; |
+ } |
var eventType = 'WheelEvent'; |
if (_Device.isFirefox) { |
eventType = 'MouseScrollEvents'; |
@@ -27735,8 +27782,8 @@ class WheelEvent extends MouseEvent { |
event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail, |
screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, |
metaKey, button, relatedTarget); |
- event.$dom_initWebKitWheelEvent(wheelDeltaX, |
- wheelDeltaY ~/ 120, // Chrome does an auto-convert to pixels. |
+ event.$dom_initWebKitWheelEvent(deltaX, |
+ deltaY ~/ 120, // Chrome does an auto-convert to pixels. |
view, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, |
metaKey); |
@@ -33307,38 +33354,6 @@ class _HttpRequestUtils { |
// BSD-style license that can be found in the LICENSE file. |
-class _CustomEventFactoryProvider { |
- static CustomEvent createCustomEvent(String type, [bool canBubble = true, |
- bool cancelable = true, Object detail = null]) { |
- final CustomEvent e = document.$dom_createEvent("CustomEvent"); |
- e.$dom_initCustomEvent(type, canBubble, cancelable, detail); |
- return e; |
- } |
-} |
- |
-class _EventFactoryProvider { |
- static Event createEvent(String type, [bool canBubble = true, |
- bool cancelable = true]) { |
- final Event e = document.$dom_createEvent("Event"); |
- e.$dom_initEvent(type, canBubble, cancelable); |
- return e; |
- } |
-} |
- |
-class _MouseEventFactoryProvider { |
- static MouseEvent createMouseEvent(String type, Window view, int detail, |
- int screenX, int screenY, int clientX, int clientY, int button, |
- [bool canBubble = true, bool cancelable = true, bool ctrlKey = false, |
- bool altKey = false, bool shiftKey = false, bool metaKey = false, |
- EventTarget relatedTarget = null]) { |
- final e = document.$dom_createEvent("MouseEvent"); |
- e.$dom_initMouseEvent(type, canBubble, cancelable, view, detail, |
- screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, |
- button, relatedTarget); |
- return e; |
- } |
-} |
- |
class _CssStyleDeclarationFactoryProvider { |
static CssStyleDeclaration createCssStyleDeclaration_css(String css) { |
final style = new Element.tag('div').style; |
@@ -33836,7 +33851,8 @@ class ReceivePortSync { |
get _isolateId => ReceivePortSync._isolateId; |
void _dispatchEvent(String receiver, var message) { |
- var event = new CustomEvent(receiver, false, false, json.stringify(message)); |
+ var event = new CustomEvent(receiver, canBubble: false, cancelable:false, |
+ detail: json.stringify(message)); |
window.$dom_dispatchEvent(event); |
} |