| Index: client/html/dartium/html_dartium.dart | 
| diff --git a/client/html/dartium/html_dartium.dart b/client/html/dartium/html_dartium.dart | 
| index 0ce5db7019e9a94689973128f1c9549b8a54cecd..a3346730412f05e459a190b1d07c6b99e2395bd7 100644 | 
| --- a/client/html/dartium/html_dartium.dart | 
| +++ b/client/html/dartium/html_dartium.dart | 
| @@ -7516,9 +7516,10 @@ class _ElementImpl extends _NodeImpl implements 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>()); | 
| } | 
| _ElementImpl._wrap(ptr) : super._wrap(ptr); | 
|  | 
| @@ -11762,14 +11763,16 @@ class _NodeImpl extends _EventTargetImpl implements 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) { | 
|  | 
| }; | 
| @@ -21112,12 +21115,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 { | 
| @@ -24622,12 +24619,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(); | 
| @@ -25253,18 +25244,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); | 
| @@ -25394,8 +25377,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 | 
| @@ -25736,28 +25717,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; | 
| @@ -25772,28 +25737,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; | 
| @@ -25816,14 +25765,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); | 
| @@ -25832,18 +25773,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); | 
| @@ -26219,8 +26154,6 @@ interface Event default _EventFactoryProvider { | 
|  | 
| final String type; | 
|  | 
| -  void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg); | 
| - | 
| void preventDefault(); | 
|  | 
| void stopImmediatePropagation(); | 
| @@ -26271,13 +26204,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 { | 
| @@ -26310,12 +26237,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 | 
| @@ -28222,16 +28143,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]); | 
| @@ -28359,8 +28274,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 | 
| @@ -28536,10 +28449,6 @@ interface Node extends EventTarget { | 
|  | 
| static final int TEXT_NODE = 3; | 
|  | 
| -  final NamedNodeMap _attributes; | 
| - | 
| -  final NodeList _childNodes; | 
| - | 
| final Node nextNode; | 
|  | 
| final Document document; | 
| @@ -28550,8 +28459,6 @@ interface Node extends EventTarget { | 
|  | 
| String text; | 
|  | 
| -  Node _appendChild(Node newChild); | 
| - | 
| Node clone(bool deep); | 
|  | 
| bool contains(Node other); | 
| @@ -28560,10 +28467,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 | 
| @@ -28665,8 +28568,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 | 
| @@ -29926,8 +29827,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 | 
| @@ -29970,12 +29869,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 { | 
| @@ -31826,8 +31719,6 @@ interface SVGStringList { | 
|  | 
| interface SVGStylable { | 
|  | 
| -  final SVGAnimatedString _svgClassName; | 
| - | 
| final CSSStyleDeclaration style; | 
|  | 
| CSSValue getPresentationAttribute(String name); | 
| @@ -34442,14 +34333,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); | 
| } | 
|  | 
| @@ -34627,8 +34512,6 @@ interface Window extends EventTarget { | 
|  | 
| final Window window; | 
|  | 
| -  void _addEventListener(String type, EventListener listener, [bool useCapture]); | 
| - | 
| void alert(String message); | 
|  | 
| String atob(String string); | 
| @@ -34647,14 +34530,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(); | 
| @@ -34677,8 +34556,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); | 
| @@ -35035,10 +34912,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); | 
| @@ -35047,8 +34920,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); | 
| @@ -35111,12 +34982,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 { | 
| @@ -35932,13 +35797,17 @@ class _XMLHttpRequestUtils { | 
|  | 
| 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; | 
| } | 
| @@ -35950,7 +35819,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); | 
| @@ -36003,8 +35873,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; | 
| @@ -36025,7 +35894,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 | 
| @@ -36241,10 +36111,12 @@ class _Device { | 
| */ | 
| 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 | 
|  |