Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: lib/html/src/shared_FactoryProviders.dart

Issue 11191043: Third round of cleanups for new optional parameter semantics. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class _CustomEventFactoryProvider { 5 class _CustomEventFactoryProvider {
6 static CustomEvent createCustomEvent(String type, [bool canBubble = true, 6 static CustomEvent createCustomEvent(String type, [bool canBubble = true,
7 bool cancelable = true, Object detail = null]) { 7 bool cancelable = true, Object detail = null]) {
8 final _CustomEventImpl e = _document.$dom_createEvent("CustomEvent"); 8 final _CustomEventImpl e = _document.$dom_createEvent("CustomEvent");
9 e.$dom_initCustomEvent(type, canBubble, cancelable, detail); 9 e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
10 return e; 10 return e;
11 } 11 }
12 } 12 }
13 13
14 class _EventFactoryProvider { 14 class _EventFactoryProvider {
15 static Event createEvent(String type, [bool canBubble = true, 15 static Event createEvent(String type, [bool canBubble = true,
16 bool cancelable = true]) { 16 bool cancelable = true]) {
17 final _EventImpl e = _document.$dom_createEvent("Event"); 17 final _EventImpl e = _document.$dom_createEvent("Event");
18 e.$dom_initEvent(type, canBubble, cancelable); 18 e.$dom_initEvent(type, canBubble, cancelable);
19 return e; 19 return e;
20 } 20 }
21 } 21 }
22 22
23 class _MouseEventFactoryProvider { 23 class _MouseEventFactoryProvider {
24 static MouseEvent createMouseEvent(String type, Window view, int detail, 24 static MouseEvent createMouseEvent(String type, Window view, int detail,
25 int screenX, int screenY, int clientX, int clientY, int button, 25 int screenX, int screenY, int clientX, int clientY, int button,
26 [bool canBubble = true, bool cancelable = true, bool ctrlKey = false, 26 bool canBubble, bool cancelable, bool ctrlKey,
27 bool altKey = false, bool shiftKey = false, bool metaKey = false, 27 bool altKey, bool shiftKey, bool metaKey,
28 EventTarget relatedTarget = null]) { 28 EventTarget relatedTarget) {
29 final e = _document.$dom_createEvent("MouseEvent"); 29 final e = _document.$dom_createEvent("MouseEvent");
30 e.$dom_initMouseEvent(type, canBubble, cancelable, view, detail, 30 e.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
31 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, 31 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
32 button, relatedTarget); 32 button, relatedTarget);
33 return e; 33 return e;
34 } 34 }
35 } 35 }
36 36
37 class _CSSStyleDeclarationFactoryProvider { 37 class _CSSStyleDeclarationFactoryProvider {
38 static CSSStyleDeclaration createCSSStyleDeclaration_css(String css) { 38 static CSSStyleDeclaration createCSSStyleDeclaration_css(String css) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 class _SVGSVGElementFactoryProvider { 109 class _SVGSVGElementFactoryProvider {
110 static SVGSVGElement createSVGSVGElement() { 110 static SVGSVGElement createSVGSVGElement() {
111 final el = new SVGElement.tag("svg"); 111 final el = new SVGElement.tag("svg");
112 // The SVG spec requires the version attribute to match the spec version 112 // The SVG spec requires the version attribute to match the spec version
113 el.attributes['version'] = "1.1"; 113 el.attributes['version'] = "1.1";
114 return el; 114 return el;
115 } 115 }
116 } 116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698