| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // DO NOT EDIT | 5 // DO NOT EDIT |
| 6 // Auto-generated Dart DOM implementation. | 6 // Auto-generated Dart DOM implementation. |
| 7 | 7 |
| 8 function DOM$EnsureDartNull(value) { | 8 function DOM$EnsureDartNull(value) { |
| 9 return value === null ? (void 0) : value; | 9 return value === null ? (void 0) : value; |
| 10 } | 10 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // TODO(vsm): Clean this up. This is a workaround for Firefox 3.6 where | 91 // TODO(vsm): Clean this up. This is a workaround for Firefox 3.6 where |
| 92 // the Navigator prototype cannot be modified. | 92 // the Navigator prototype cannot be modified. |
| 93 if (navigator.userAgent.indexOf("Firefox") != -1) { | 93 if (navigator.userAgent.indexOf("Firefox") != -1) { |
| 94 w.Navigator = { prototype: w.navigator }; | 94 w.Navigator = { prototype: w.navigator }; |
| 95 } | 95 } |
| 96 $(!INNER) | 96 $(!INNER) |
| 97 if (tmpLocation) { | 97 if (tmpLocation) { |
| 98 w.Location = tmpLocation; | 98 w.Location = tmpLocation; |
| 99 } | 99 } |
| 100 | 100 |
| 101 // TODO(vsm): Refactor additional implementation code to a separate file. | |
| 102 w.DOMWindow.prototype.createXMLHttpRequest = function() { | |
| 103 return new XMLHttpRequest(); | |
| 104 }; | |
| 105 | |
| 106 w.DOMWindow.prototype.createWebKitCSSMatrix = function(opt_value) { | |
| 107 if (typeof opt_value === "undefined") | |
| 108 return new WebKitCSSMatrix(); | |
| 109 else | |
| 110 return new WebKitCSSMatrix(opt_value); | |
| 111 }; | |
| 112 | |
| 113 w.DOMWindow.prototype.createWebKitPoint = function(x, y) { | |
| 114 return new WebKitPoint(x, y); | |
| 115 }; | |
| 116 | |
| 117 w.DOMWindow.prototype.createFileReader = function() { | |
| 118 return new FileReader(); | |
| 119 }; | |
| 120 | |
| 121 // TODO(vsm): These will eventually be changed to attributes | |
| 122 // with a getter and setter (see b/4341558). | |
| 123 w.CanvasRenderingContext2D.prototype.setFillStyle = function(value) { | |
| 124 this.fillStyle = value; | |
| 125 }; | |
| 126 | |
| 127 w.CanvasRenderingContext2D.prototype.setStrokeStyle = function(value) { | |
| 128 this.strokeStyle = value; | |
| 129 }; | |
| 130 | |
| 131 // Chrome still uses initWebKitWheelEvent. | 101 // Chrome still uses initWebKitWheelEvent. |
| 132 if (w && w.WheelEvent && w.WheelEvent.prototype && | 102 if (w && w.WheelEvent && w.WheelEvent.prototype && |
| 133 !w.WheelEvent.prototype.initWheelEvent) { | 103 !w.WheelEvent.prototype.initWheelEvent) { |
| 134 w.WheelEvent.prototype.initWheelEvent = function() { | 104 w.WheelEvent.prototype.initWheelEvent = function() { |
| 135 return this.initWebKitWheelEvent.apply(this, arguments); | 105 return this.initWebKitWheelEvent.apply(this, arguments); |
| 136 }; | 106 }; |
| 137 } | 107 } |
| 138 | 108 |
| 139 | 109 |
| 140 // Special implementations that fix the prototypes in a new context on the | 110 // Special implementations that fix the prototypes in a new context on the |
| (...skipping 25 matching lines...) Expand all Loading... |
| 166 function native__NativeDomGlobalProperties_getWindow() { | 136 function native__NativeDomGlobalProperties_getWindow() { |
| 167 // TODO: Should the window be obtained from an isolate? | 137 // TODO: Should the window be obtained from an isolate? |
| 168 return window; | 138 return window; |
| 169 } | 139 } |
| 170 | 140 |
| 171 // Declared in src/GlobalProperties.dart | 141 // Declared in src/GlobalProperties.dart |
| 172 function native__NativeDomGlobalProperties_getDocument() { | 142 function native__NativeDomGlobalProperties_getDocument() { |
| 173 // TODO: Should the window be obtained from an isolate? | 143 // TODO: Should the window be obtained from an isolate? |
| 174 return window.document; | 144 return window.document; |
| 175 } | 145 } |
| OLD | NEW |