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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.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
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/src/Isolates.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 0a7bf3b7fc3deb68dd580e2f6f1a85598c1eae00..181795ebc907ce78fcdc76e07e549d6f26207f95 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -5532,27 +5532,6 @@ class DirectoryReaderSync native "*DirectoryReaderSync" {
// BSD-style license that can be found in the LICENSE file.
-/**
- * Represents an HTML <div> element.
- *
- * The [DivElement] is a generic container for content and does not have any
- * special significance. It is functionally similar to [SpanElement].
- *
- * The [DivElement] is a block-level element, as opposed to [SpanElement],
- * which is an inline-level element.
- *
- * Example usage:
- *
- * DivElement div = new DivElement();
- * div.text = 'Here's my new DivElem
- * document.body.elements.add(elem);
- *
- * See also:
- *
- * * [HTML <div> element](http://www.w3.org/TR/html-markup/div.html) from W3C.
- * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) from W3C.
- * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes) from W3C.
- */
/// @domName HTMLDivElement; @docsEditable true
class DivElement extends Element implements Element native "*HTMLDivElement" {
@@ -5591,7 +5570,6 @@ class Document extends Node native "*Document"
/// @domName Document.cookie; @docsEditable true
String cookie;
- /// Returns the [Window] associated with the document.
/// @domName Document.defaultView; @docsEditable true
Window get window => _convertNativeToDart_Window(this._window);
@JSName('defaultView')
@@ -12203,16 +12181,6 @@ class MemoryInfo native "*MemoryInfo" {
// BSD-style license that can be found in the LICENSE file.
-/**
- * An HTML <menu> element.
- *
- * A <menu> element represents an unordered list of menu commands.
- *
- * See also:
- *
- * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu) from MDN.
- * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-element) from the W3C.
- */
/// @domName HTMLMenuElement; @docsEditable true
class MenuElement extends Element implements Element native "*HTMLMenuElement" {
@@ -21724,7 +21692,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 {
@@ -22055,7 +22023,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];
@@ -22114,7 +22082,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;
@@ -23303,9 +23271,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 ];
}
}
@@ -23363,7 +23335,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';
@@ -23428,13 +23400,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)) {
@@ -24221,6 +24193,19 @@ class KeyEvent implements KeyboardEvent {
throw new UnsupportedError("Cannot initialize an Event from a KeyEvent.");
}
String get _shadowKeyIdentifier => JS('String', '#.keyIdentifier', _parent);
+
+ 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
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/src/Isolates.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698