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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 11453027: Fixed a lot of dartanalyzer static analysis issues with the html lib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
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 f2b013a3ab8272ce0899c1401cd223e9f7edceb6..6695d8ec67aff7b5a85212252cc4336245120d65 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -27221,7 +27221,7 @@ abstract class Window {
* * [Window close discussion](http://www.w3.org/TR/html5/browsers.html#dom-window-close) from the W3C
*/
void close();
- void postMessage(var message, String targetOrigin, [List messagePorts = null]);
+ void postMessage(var message, String targetOrigin, [List messagePorts]);
}
abstract class Location {
@@ -27516,7 +27516,7 @@ class KeyboardEventController {
String _type;
/** The element we are watching for events to happen on. */
- EventTarget _target;
+ Element _target;
// The distance to shift from upper case alphabet Roman letters to lower case.
final int _ROMAN_ALPHABET_OFFSET = "a".charCodes[0] - "A".charCodes[0];
@@ -27575,7 +27575,7 @@ class KeyboardEventController {
* General constructor, performs basic initialization for our improved
* KeyboardEvent controller.
*/
- _KeyboardEventController(EventTarget target, String type) {
+ _KeyboardEventController(Element target, String type) {
_callbacks = [];
_type = type;
_target = target;
@@ -28926,6 +28926,19 @@ class KeyEvent implements KeyboardEvent {
throw new UnsupportedError("Cannot initialize an Event from a KeyEvent.");
}
String get _shadowKeyIdentifier => _parent.$dom_keyIdentifier;
+
+ int get $dom_charCode => charCode;
+ int get $dom_keyCode => keyCode;
+ EventTarget get target => _parent.target;
+ String get $dom_keyIdentifier {
+ throw new UnsupportedError("keyIdentifier is deprecated");
+ }
+ void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable,
+ LocalWindow view, String keyIdentifier, int keyLocation, bool ctrlKey,
+ bool altKey, bool shiftKey, bool metaKey,
+ bool altGraphKey) {
+ throw new UnsupportedError("Cannot initialize a KeyboardEvent from a KeyEvent.");
+ }
}
// 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
@@ -29076,9 +29089,13 @@ class _JsSerializer extends _Serializer {
ReceivePortSync._isolateId, x._receivePort._portId ];
}
+ visitSendPort(SendPort x) {
+ throw new UnimplementedError('Asynchronous send port not yet implemented.');
+ }
+
visitRemoteSendPortSync(_RemoteSendPortSync x) {
return [ 'sendport', 'dart',
- x._receivePort._isolateId, x._receivePort._portId ];
+ x._isolateId, x._portId ];
}
}
@@ -29136,7 +29153,7 @@ class _RemoteSendPortSync implements SendPortSync {
}
static _call(int isolateId, int portId, var message) {
- var target = 'dart-port-$isolateId-$portId';
+ var target = 'dart-port-$isolateId-$portId';
// TODO(vsm): Make this re-entrant.
// TODO(vsm): Set this up set once, on the first call.
var source = '$target-result';
@@ -29201,13 +29218,13 @@ class ReceivePortSync {
static int get _isolateId {
// TODO(vsm): Make this coherent with existing isolate code.
if (_cachedIsolateId == null) {
- _cachedIsolateId = _getNewIsolateId();
+ _cachedIsolateId = _getNewIsolateId();
}
return _cachedIsolateId;
}
static String _getListenerName(isolateId, portId) =>
- 'dart-port-$isolateId-$portId';
+ 'dart-port-$isolateId-$portId';
String get _listenerName => _getListenerName(_isolateId, _portId);
void receive(callback(var message)) {

Powered by Google App Engine
This is Rietveld 408576698