| Index: client/html/frog/html_frog.dart
|
| diff --git a/client/html/frog/html_frog.dart b/client/html/frog/html_frog.dart
|
| index 2855c1a0a07ea2c8760b1211dca90844d65d1199..5d8b313288dddbf040f5ceb38bfed92199a7b3cc 100644
|
| --- a/client/html/frog/html_frog.dart
|
| +++ b/client/html/frog/html_frog.dart
|
| @@ -5417,9 +5417,10 @@ class _ElementImpl extends _NodeImpl implements Element native "*Element" {
|
| }
|
|
|
| Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) {
|
| - return _createMeasurementFuture(() =>
|
| - window._getComputedStyle(this, pseudoElement),
|
| - new Completer<CSSStyleDeclaration>());
|
| + return _createMeasurementFuture(() {
|
| + final _WindowImpl win = window;
|
| + return win._getComputedStyle(this, pseudoElement);
|
| + }, new Completer<CSSStyleDeclaration>());
|
| }
|
|
|
| _ElementEventsImpl get on() =>
|
| @@ -8254,14 +8255,16 @@ class _NodeImpl extends _EventTargetImpl implements Node native "*Node" {
|
| // TODO(jacobr): should we throw an exception if parent is already null?
|
| _NodeImpl remove() {
|
| if (this.parent != null) {
|
| - this.parent._removeChild(this);
|
| + final _NodeImpl parent = this.parent;
|
| + parent._removeChild(this);
|
| }
|
| return this;
|
| }
|
|
|
| _NodeImpl replaceWith(Node otherNode) {
|
| try {
|
| - this.parent._replaceChild(otherNode, this);
|
| + final _NodeImpl parent = this.parent;
|
| + parent._replaceChild(otherNode, this);
|
| } catch(var e) {
|
|
|
| };
|
| @@ -15735,12 +15738,6 @@ class _XSLTProcessorFactoryProvider {
|
| interface AbstractWorker extends EventTarget {
|
|
|
| AbstractWorkerEvents get on();
|
| -
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| - bool _dispatchEvent(Event evt);
|
| -
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| }
|
|
|
| interface AbstractWorkerEvents extends Events {
|
| @@ -19245,12 +19242,6 @@ interface DOMApplicationCache extends EventTarget {
|
|
|
| void abort();
|
|
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| - bool _dispatchEvent(Event evt);
|
| -
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| void swapCache();
|
|
|
| void update();
|
| @@ -19876,18 +19867,10 @@ interface Document extends HtmlElement {
|
|
|
| DocumentFragment createDocumentFragment();
|
|
|
| - Element _createElement(String tagName);
|
| -
|
| - Event _createEvent(String eventType);
|
| -
|
| Range createRange();
|
|
|
| - Text _createTextNode(String data);
|
| -
|
| Touch createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce);
|
|
|
| - TouchList _createTouchList();
|
| -
|
| Element elementFromPoint(int x, int y);
|
|
|
| bool execCommand(String command, bool userInterface, String value);
|
| @@ -20017,8 +20000,6 @@ interface DocumentFragment extends Node, NodeSelector {
|
| ElementEvents get on();
|
|
|
| Element query(String selectors);
|
| -
|
| - NodeList _querySelectorAll(String selectors);
|
| }
|
| // 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
|
| @@ -20359,28 +20340,12 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
|
|
|
| static final int ALLOW_KEYBOARD_INPUT = 1;
|
|
|
| - final int _childElementCount;
|
| -
|
| - final HTMLCollection _children;
|
| -
|
| - String _className;
|
| -
|
| - final int _clientHeight;
|
| -
|
| - final int _clientLeft;
|
| -
|
| - final int _clientTop;
|
| -
|
| - final int _clientWidth;
|
| -
|
| String contentEditable;
|
|
|
| String dir;
|
|
|
| bool draggable;
|
|
|
| - final Element _firstElementChild;
|
| -
|
| bool hidden;
|
|
|
| String id;
|
| @@ -20395,28 +20360,12 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
|
|
|
| final Element nextElementSibling;
|
|
|
| - final int _offsetHeight;
|
| -
|
| - final int _offsetLeft;
|
| -
|
| final Element offsetParent;
|
|
|
| - final int _offsetTop;
|
| -
|
| - final int _offsetWidth;
|
| -
|
| final String outerHTML;
|
|
|
| final Element previousElementSibling;
|
|
|
| - final int _scrollHeight;
|
| -
|
| - int _scrollLeft;
|
| -
|
| - int _scrollTop;
|
| -
|
| - final int _scrollWidth;
|
| -
|
| bool spellcheck;
|
|
|
| final CSSStyleDeclaration style;
|
| @@ -20439,14 +20388,6 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
|
|
|
| void focus();
|
|
|
| - String _getAttribute(String name);
|
| -
|
| - ClientRect _getBoundingClientRect();
|
| -
|
| - ClientRectList _getClientRects();
|
| -
|
| - bool _hasAttribute(String name);
|
| -
|
| Element insertAdjacentElement(String where, Element element);
|
|
|
| void insertAdjacentHTML(String where, String html);
|
| @@ -20455,18 +20396,12 @@ interface Element extends Node, NodeSelector default _ElementFactoryProvider {
|
|
|
| Element query(String selectors);
|
|
|
| - NodeList _querySelectorAll(String selectors);
|
| -
|
| - void _removeAttribute(String name);
|
| -
|
| void scrollByLines(int lines);
|
|
|
| void scrollByPages(int pages);
|
|
|
| void scrollIntoView([bool centerIfNeeded]);
|
|
|
| - void _setAttribute(String name, String value);
|
| -
|
| bool matchesSelector(String selectors);
|
|
|
| void webkitRequestFullScreen(int flags);
|
| @@ -20842,8 +20777,6 @@ interface Event default _EventFactoryProvider {
|
|
|
| final String type;
|
|
|
| - void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg);
|
| -
|
| void preventDefault();
|
|
|
| void stopImmediatePropagation();
|
| @@ -20894,13 +20827,7 @@ interface EventSource extends EventTarget default _EventSourceFactoryProvider {
|
|
|
| final String url;
|
|
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| void close();
|
| -
|
| - bool _dispatchEvent(Event evt);
|
| -
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| }
|
|
|
| interface EventSourceEvents extends Events {
|
| @@ -20933,12 +20860,6 @@ interface EventTarget {
|
|
|
| final Events on;
|
|
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| - bool _dispatchEvent(Event event);
|
| -
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| }
|
| // 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
|
| @@ -22845,16 +22766,10 @@ interface MessagePort extends EventTarget {
|
|
|
| MessagePortEvents get on();
|
|
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| void close();
|
|
|
| - bool _dispatchEvent(Event evt);
|
| -
|
| void postMessage(String message, [List messagePorts]);
|
|
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| void start();
|
|
|
| void webkitPostMessage(String message, [List transfer]);
|
| @@ -22982,8 +22897,6 @@ interface MouseEvent extends UIEvent default _MouseEventFactoryProvider {
|
| final int x;
|
|
|
| final int y;
|
| -
|
| - void _initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget);
|
| }
|
| // 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
|
| @@ -23159,10 +23072,6 @@ interface Node extends EventTarget {
|
|
|
| static final int TEXT_NODE = 3;
|
|
|
| - final NamedNodeMap _attributes;
|
| -
|
| - final NodeList _childNodes;
|
| -
|
| final Node nextNode;
|
|
|
| final Document document;
|
| @@ -23173,8 +23082,6 @@ interface Node extends EventTarget {
|
|
|
| String text;
|
|
|
| - Node _appendChild(Node newChild);
|
| -
|
| Node clone(bool deep);
|
|
|
| bool contains(Node other);
|
| @@ -23183,10 +23090,6 @@ interface Node extends EventTarget {
|
|
|
| Node insertBefore(Node newChild, Node refChild);
|
|
|
| - Node _removeChild(Node oldChild);
|
| -
|
| - Node _replaceChild(Node newChild, Node oldChild);
|
| -
|
| }
|
| // 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
|
| @@ -23288,8 +23191,6 @@ interface NodeSelector {
|
|
|
| Element query(String selectors);
|
|
|
| - NodeList _querySelectorAll(String selectors);
|
| -
|
| }
|
| // 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
|
| @@ -24549,8 +24450,6 @@ interface SVGDescElement extends SVGElement, SVGLangSpace, SVGStylable {
|
| interface SVGDocument extends Document {
|
|
|
| final SVGSVGElement rootElement;
|
| -
|
| - Event _createEvent(String eventType);
|
| }
|
| // 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
|
| @@ -24593,12 +24492,6 @@ interface SVGElementInstance extends EventTarget {
|
| final SVGElementInstance parentNode;
|
|
|
| final SVGElementInstance previousSibling;
|
| -
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| - bool _dispatchEvent(Event event);
|
| -
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| }
|
|
|
| interface SVGElementInstanceEvents extends Events {
|
| @@ -26449,8 +26342,6 @@ interface SVGStringList {
|
|
|
| interface SVGStylable {
|
|
|
| - final SVGAnimatedString _svgClassName;
|
| -
|
| final CSSStyleDeclaration style;
|
|
|
| CSSValue getPresentationAttribute(String name);
|
| @@ -29065,14 +28956,8 @@ interface WebSocket extends EventTarget {
|
|
|
| final String url;
|
|
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| void close([int code, String reason]);
|
|
|
| - bool _dispatchEvent(Event evt);
|
| -
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| bool send(String data);
|
| }
|
|
|
| @@ -29250,8 +29135,6 @@ interface Window extends EventTarget {
|
|
|
| final Window window;
|
|
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| void alert(String message);
|
|
|
| String atob(String string);
|
| @@ -29270,14 +29153,10 @@ interface Window extends EventTarget {
|
|
|
| bool confirm(String message);
|
|
|
| - bool _dispatchEvent(Event evt);
|
| -
|
| bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog);
|
|
|
| void focus();
|
|
|
| - CSSStyleDeclaration _getComputedStyle(Element element, String pseudoElement);
|
| -
|
| CSSRuleList getMatchedCSSRules(Element element, String pseudoElement);
|
|
|
| DOMSelection getSelection();
|
| @@ -29300,8 +29179,6 @@ interface Window extends EventTarget {
|
|
|
| void releaseEvents();
|
|
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| void resizeBy(num x, num y);
|
|
|
| void resizeTo(num width, num height);
|
| @@ -29658,10 +29535,6 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
|
|
|
| void abort();
|
|
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| - bool _dispatchEvent(Event evt);
|
| -
|
| String getAllResponseHeaders();
|
|
|
| String getResponseHeader(String header);
|
| @@ -29670,8 +29543,6 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
|
|
|
| void overrideMimeType(String override);
|
|
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| void send([var data]);
|
|
|
| void setRequestHeader(String header, String value);
|
| @@ -29734,12 +29605,6 @@ interface XMLHttpRequestProgressEvent extends ProgressEvent {
|
| interface XMLHttpRequestUpload extends EventTarget {
|
|
|
| XMLHttpRequestUploadEvents get on();
|
| -
|
| - void _addEventListener(String type, EventListener listener, [bool useCapture]);
|
| -
|
| - bool _dispatchEvent(Event evt);
|
| -
|
| - void _removeEventListener(String type, EventListener listener, [bool useCapture]);
|
| }
|
|
|
| interface XMLHttpRequestUploadEvents extends Events {
|
| @@ -30675,13 +30540,17 @@ void _completeMeasurementFutures() {
|
|
|
| class _TextFactoryProvider {
|
|
|
| - factory Text(String data) => document._createTextNode(data);
|
| + factory Text(String data) {
|
| + final _DocumentImpl doc = document;
|
| + return doc._createTextNode(data);
|
| + }
|
| }
|
|
|
| class _EventFactoryProvider {
|
| factory Event(String type, [bool canBubble = true,
|
| bool cancelable = true]) {
|
| - _EventImpl e = document._createEvent("Event");
|
| + final _DocumentImpl doc = document;
|
| + final _EventImpl e = doc._createEvent("Event");
|
| e._initEvent(type, canBubble, cancelable);
|
| return e;
|
| }
|
| @@ -30693,7 +30562,8 @@ class _MouseEventFactoryProvider {
|
| [bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
|
| bool altKey = false, bool shiftKey = false, bool metaKey = false,
|
| EventTarget relatedTarget = null]) {
|
| - final e = document._createEvent("MouseEvent");
|
| + final _DocumentImpl doc = document;
|
| + final e = doc._createEvent("MouseEvent");
|
| e._initMouseEvent(type, canBubble, cancelable, view, detail,
|
| screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
|
| button, relatedTarget);
|
| @@ -30746,8 +30616,7 @@ class _ElementFactoryProvider {
|
| parentTag = _CUSTOM_PARENT_TAG_MAP[tag];
|
| }
|
| }
|
| - // TODO(jacobr): make type dom.HTMLElement when dartium allows it.
|
| - _ElementImpl temp = document._createElement(parentTag);
|
| + final _ElementImpl temp = new Element.tag(parentTag);
|
| temp.innerHTML = html;
|
|
|
| Element element;
|
| @@ -30768,7 +30637,8 @@ class _ElementFactoryProvider {
|
|
|
| /** @domName Document.createElement */
|
| factory Element.tag(String tag) {
|
| - return document._createElement(tag);
|
| + final _DocumentImpl doc = document;
|
| + return doc._createElement(tag);
|
| }
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| @@ -30848,10 +30718,12 @@ class _PointFactoryProvider {
|
| */
|
| class Testing {
|
| static void addEventListener(EventTarget target, String type, EventListener listener, bool useCapture) {
|
| - target._addEventListener(type, listener, useCapture);
|
| + final _EventTargetImpl targetImpl = target;
|
| + targetImpl._addEventListener(type, listener, useCapture);
|
| }
|
| static void removeEventListener(EventTarget target, String type, EventListener listener, bool useCapture) {
|
| - target._removeEventListener(type, listener, useCapture);
|
| + final _EventTargetImpl targetImpl = target;
|
| + targetImpl._removeEventListener(type, listener, useCapture);
|
| }
|
|
|
| }// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
|
|