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

Unified Diff: client/html/frog/html_frog.dart

Issue 9623017: Refactor the event-generation code to locate it in systemhtml.py. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/html/dartium/html_dartium.dart ('k') | client/html/generated/html/dartium/BodyElement.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/frog/html_frog.dart
diff --git a/client/html/frog/html_frog.dart b/client/html/frog/html_frog.dart
index decc8ed33e94668eac1e051105254d776ba22031..981c7302d39d010fde8624892df153bd5e8f3afd 100644
--- a/client/html/frog/html_frog.dart
+++ b/client/html/frog/html_frog.dart
@@ -542,6 +542,9 @@ class _BlobBuilderImpl implements BlobBuilder native "*WebKitBlobBuilder" {
class _BodyElementImpl extends _ElementImpl implements BodyElement native "*HTMLBodyElement" {
+ _BodyElementEventsImpl get on() =>
+ new _BodyElementEventsImpl(this);
+
String aLink;
String background;
@@ -551,9 +554,6 @@ class _BodyElementImpl extends _ElementImpl implements BodyElement native "*HTML
String link;
String vLink;
-
- _BodyElementEventsImpl get on() =>
- new _BodyElementEventsImpl(this);
}
class _BodyElementEventsImpl extends _ElementEventsImpl implements BodyElementEvents {
@@ -4182,6 +4182,9 @@ class _DListElementImpl extends _ElementImpl implements DListElement native "*HT
class _DOMApplicationCacheImpl extends _EventTargetImpl implements DOMApplicationCache native "*DOMApplicationCache" {
+ _DOMApplicationCacheEventsImpl get on() =>
+ new _DOMApplicationCacheEventsImpl(this);
+
static final int CHECKING = 2;
static final int DOWNLOADING = 3;
@@ -4196,9 +4199,6 @@ class _DOMApplicationCacheImpl extends _EventTargetImpl implements DOMApplicatio
final int status;
- _DOMApplicationCacheEventsImpl get on() =>
- new _DOMApplicationCacheEventsImpl(this);
-
void abort() native;
void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);";
@@ -4633,6 +4633,9 @@ class _DocumentImpl extends _ElementImpl
implements Document
native "*HTMLHtmlElement" {
+ _DocumentEventsImpl get on() =>
+ new _DocumentEventsImpl(_jsDocument);
+
_ElementImpl get activeElement() native "return this.parentNode.activeElement;";
_ElementImpl get body() native "return this.parentNode.body;";
@@ -4681,9 +4684,6 @@ class _DocumentImpl extends _ElementImpl
String get webkitVisibilityState() native "return this.parentNode.webkitVisibilityState;";
- _DocumentEventsImpl get on() =>
- new _DocumentEventsImpl(_jsDocument);
-
_RangeImpl caretRangeFromPoint(int x, int y) native "return this.parentNode.caretRangeFromPoint(x, y);";
_CDATASectionImpl createCDATASection(String data) native "return this.parentNode.createCDATASection(data);";
@@ -4849,6 +4849,9 @@ class _DocumentEventsImpl extends _ElementEventsImpl implements DocumentEvents {
class _DocumentFragmentImpl extends _NodeImpl implements DocumentFragment native "*DocumentFragment" {
+ ElementEvents get on() =>
+ new ElementEvents(this);
+
_ElementImpl query(String selectors) native "return this.querySelector(selectors);";
_NodeListImpl _querySelectorAll(String selectors) native "return this.querySelectorAll(selectors);";
@@ -5419,6 +5422,9 @@ class _ElementImpl extends _NodeImpl implements Element native "*Element" {
new Completer<CSSStyleDeclaration>());
}
+ _ElementEventsImpl get on() =>
+ new _ElementEventsImpl(this);
+
static final int ALLOW_KEYBOARD_INPUT = 1;
int get _childElementCount() native "return this.childElementCount;";
@@ -5503,9 +5509,6 @@ class _ElementImpl extends _NodeImpl implements Element native "*Element" {
String webkitdropzone;
- _ElementEventsImpl get on() =>
- new _ElementEventsImpl(this);
-
void blur() native;
void click() native;
@@ -5864,6 +5867,9 @@ class _EventExceptionImpl implements EventException native "*EventException" {
class _EventSourceImpl extends _EventTargetImpl implements EventSource native "*EventSource" {
+ _EventSourceEventsImpl get on() =>
+ new _EventSourceEventsImpl(this);
+
static final int CLOSED = 2;
static final int CONNECTING = 0;
@@ -5876,9 +5882,6 @@ class _EventSourceImpl extends _EventTargetImpl implements EventSource native "*
final String url;
- _EventSourceEventsImpl get on() =>
- new _EventSourceEventsImpl(this);
-
void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);";
void close() native;
@@ -6437,12 +6440,12 @@ class _FrameElementImpl extends _ElementImpl implements FrameElement native "*HT
class _FrameSetElementImpl extends _ElementImpl implements FrameSetElement native "*HTMLFrameSetElement" {
+ _FrameSetElementEventsImpl get on() =>
+ new _FrameSetElementEventsImpl(this);
+
String cols;
String rows;
-
- _FrameSetElementEventsImpl get on() =>
- new _FrameSetElementEventsImpl(this);
}
class _FrameSetElementEventsImpl extends _ElementEventsImpl implements FrameSetElementEvents {
@@ -7006,6 +7009,9 @@ class _ImageElementImpl extends _ElementImpl implements ImageElement native "*HT
class _InputElementImpl extends _ElementImpl implements InputElement native "*HTMLInputElement" {
+ _InputElementEventsImpl get on() =>
+ new _InputElementEventsImpl(this);
+
String accept;
String align;
@@ -7096,9 +7102,6 @@ class _InputElementImpl extends _ElementImpl implements InputElement native "*HT
final bool willValidate;
- _InputElementEventsImpl get on() =>
- new _InputElementEventsImpl(this);
-
bool checkValidity() native;
void select() native;
@@ -8587,13 +8590,13 @@ class _NotationImpl extends _NodeImpl implements Notation native "*Notation" {
class _NotificationImpl extends _EventTargetImpl implements Notification native "*Notification" {
+ _NotificationEventsImpl get on() =>
+ new _NotificationEventsImpl(this);
+
String dir;
String replaceId;
- _NotificationEventsImpl get on() =>
- new _NotificationEventsImpl(this);
-
void cancel() native;
void show() native;
@@ -9700,6 +9703,9 @@ class _SVGElementImpl extends _ElementImpl implements SVGElement native "*SVGEle
class _SVGElementInstanceImpl extends _EventTargetImpl implements SVGElementInstance native "*SVGElementInstance" {
+ _SVGElementInstanceEventsImpl get on() =>
+ new _SVGElementInstanceEventsImpl(this);
+
final _SVGElementInstanceListImpl childNodes;
final _SVGElementImpl correspondingElement;
@@ -9716,9 +9722,6 @@ class _SVGElementInstanceImpl extends _EventTargetImpl implements SVGElementInst
final _SVGElementInstanceImpl previousSibling;
- _SVGElementInstanceEventsImpl get on() =>
- new _SVGElementInstanceEventsImpl(this);
-
void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);";
bool _dispatchEvent(_EventImpl event) native "return this.dispatchEvent(event);";
@@ -14766,6 +14769,9 @@ class _WebKitNamedFlowImpl implements WebKitNamedFlow native "*WebKitNamedFlow"
class _WebSocketImpl extends _EventTargetImpl implements WebSocket native "*WebSocket" {
+ _WebSocketEventsImpl get on() =>
+ new _WebSocketEventsImpl(this);
+
static final int CLOSED = 3;
static final int CLOSING = 2;
@@ -14788,9 +14794,6 @@ class _WebSocketImpl extends _EventTargetImpl implements WebSocket native "*WebS
final String url;
- _WebSocketEventsImpl get on() =>
- new _WebSocketEventsImpl(this);
-
void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);";
void close([int code = null, String reason = null]) native;
@@ -14863,6 +14866,9 @@ class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow
}
+ _WindowEventsImpl get on() =>
+ new _WindowEventsImpl(this);
+
static final int PERSISTENT = 1;
static final int TEMPORARY = 0;
@@ -14965,9 +14971,6 @@ class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow
final _WindowImpl window;
- _WindowEventsImpl get on() =>
- new _WindowEventsImpl(this);
-
void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);";
void alert(String message) native;
@@ -15311,6 +15314,9 @@ class _WorkerNavigatorImpl implements WorkerNavigator native "*WorkerNavigator"
class _XMLHttpRequestImpl extends _EventTargetImpl implements XMLHttpRequest native "*XMLHttpRequest" {
+ _XMLHttpRequestEventsImpl get on() =>
+ new _XMLHttpRequestEventsImpl(this);
+
static final int DONE = 4;
static final int HEADERS_RECEIVED = 2;
@@ -15345,9 +15351,6 @@ class _XMLHttpRequestImpl extends _EventTargetImpl implements XMLHttpRequest nat
bool withCredentials;
- _XMLHttpRequestEventsImpl get on() =>
- new _XMLHttpRequestEventsImpl(this);
-
void abort() native;
void _addEventListener(String type, EventListener listener, [bool useCapture = null]) native "this.addEventListener(type, listener, useCapture);";
@@ -16391,6 +16394,8 @@ interface BlobBuilder default _BlobBuilderFactoryProvider {
interface BodyElement extends Element {
+ BodyElementEvents get on();
+
String aLink;
String background;
@@ -16400,8 +16405,6 @@ interface BodyElement extends Element {
String link;
String vLink;
-
- BodyElementEvents get on();
}
interface BodyElementEvents extends ElementEvents {
@@ -19226,6 +19229,8 @@ interface DListElement extends Element {
interface DOMApplicationCache extends EventTarget {
+ DOMApplicationCacheEvents get on();
+
static final int CHECKING = 2;
static final int DOWNLOADING = 3;
@@ -19240,8 +19245,6 @@ interface DOMApplicationCache extends EventTarget {
final int status;
- DOMApplicationCacheEvents get on();
-
void abort();
void _addEventListener(String type, EventListener listener, [bool useCapture]);
@@ -19829,6 +19832,8 @@ interface DivElement extends Element {
interface Document extends HtmlElement {
+ DocumentEvents get on();
+
final Element activeElement;
Element body;
@@ -19867,8 +19872,6 @@ interface Document extends HtmlElement {
final String webkitVisibilityState;
- DocumentEvents get on();
-
Range caretRangeFromPoint(int x, int y);
CDATASection createCDATASection(String data);
@@ -20013,6 +20016,8 @@ interface DocumentEvents extends ElementEvents {
interface DocumentFragment extends Node, NodeSelector {
+ ElementEvents get on();
+
Element query(String selectors);
NodeList _querySelectorAll(String selectors);
@@ -20352,6 +20357,8 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
Element get parent();
+ ElementEvents get on();
+
static final int ALLOW_KEYBOARD_INPUT = 1;
final int _childElementCount;
@@ -20430,8 +20437,6 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
String webkitdropzone;
- ElementEvents get on();
-
void blur();
void click();
@@ -20879,6 +20884,8 @@ interface EventSource extends EventTarget default _EventSourceFactoryProvider {
EventSource(String scriptUrl);
+ EventSourceEvents get on();
+
static final int CLOSED = 2;
static final int CONNECTING = 0;
@@ -20891,8 +20898,6 @@ interface EventSource extends EventTarget default _EventSourceFactoryProvider {
final String url;
- EventSourceEvents get on();
-
void _addEventListener(String type, EventListener listener, [bool useCapture]);
void close();
@@ -21372,11 +21377,11 @@ interface FrameElement extends Element {
interface FrameSetElement extends Element {
+ FrameSetElementEvents get on();
+
String cols;
String rows;
-
- FrameSetElementEvents get on();
}
interface FrameSetElementEvents extends ElementEvents {
@@ -22011,6 +22016,8 @@ interface ImageElement extends Element {
interface InputElement extends Element {
+ InputElementEvents get on();
+
String accept;
String align;
@@ -22101,8 +22108,6 @@ interface InputElement extends Element {
final bool willValidate;
- InputElementEvents get on();
-
bool checkValidity();
void select();
@@ -23310,12 +23315,12 @@ interface Notation extends Node {
interface Notification extends EventTarget {
+ NotificationEvents get on();
+
String dir;
String replaceId;
- NotificationEvents get on();
-
void cancel();
void show();
@@ -24575,6 +24580,8 @@ interface SVGElement extends Element {
interface SVGElementInstance extends EventTarget {
+ SVGElementInstanceEvents get on();
+
final SVGElementInstanceList childNodes;
final SVGElement correspondingElement;
@@ -24591,8 +24598,6 @@ interface SVGElementInstance extends EventTarget {
final SVGElementInstance previousSibling;
- SVGElementInstanceEvents get on();
-
void _addEventListener(String type, EventListener listener, [bool useCapture]);
bool _dispatchEvent(Event event);
@@ -29040,6 +29045,8 @@ interface WebKitNamedFlow {
interface WebSocket extends EventTarget {
+ WebSocketEvents get on();
+
static final int CLOSED = 3;
static final int CLOSING = 2;
@@ -29062,8 +29069,6 @@ interface WebSocket extends EventTarget {
final String url;
- WebSocketEvents get on();
-
void _addEventListener(String type, EventListener listener, [bool useCapture]);
void close([int code, String reason]);
@@ -29145,6 +29150,8 @@ interface Window extends EventTarget {
void requestLayoutFrame(TimeoutHandler callback);
+ WindowEvents get on();
+
static final int PERSISTENT = 1;
static final int TEMPORARY = 0;
@@ -29247,8 +29254,6 @@ interface Window extends EventTarget {
final Window window;
- WindowEvents get on();
-
void _addEventListener(String type, EventListener listener, [bool useCapture]);
void alert(String message);
@@ -29621,6 +29626,8 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
XMLHttpRequest();
+ XMLHttpRequestEvents get on();
+
static final int DONE = 4;
static final int HEADERS_RECEIVED = 2;
@@ -29653,8 +29660,6 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
bool withCredentials;
- XMLHttpRequestEvents get on();
-
void abort();
void _addEventListener(String type, EventListener listener, [bool useCapture]);
« no previous file with comments | « client/html/dartium/html_dartium.dart ('k') | client/html/generated/html/dartium/BodyElement.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698