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

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

Side-by-side diff isn't available for this file because of its large size.
Issue 166213002: Version 1.2.0-dev.5.7 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 10 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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/html_common/lists.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
===================================================================
--- sdk/lib/html/dartium/html_dartium.dart (revision 32687)
+++ sdk/lib/html/dartium/html_dartium.dart (working copy)
@@ -101,7 +101,7 @@
@DocsEditable()
@DomName('AbstractWorker')
-class AbstractWorker extends NativeFieldWrapperClass2 implements EventTarget {
+abstract class AbstractWorker extends NativeFieldWrapperClass2 implements EventTarget {
// To suppress missing implicit constructor warnings.
factory AbstractWorker._() { throw new UnsupportedError("Not supported"); }
@@ -304,6 +304,12 @@
@DocsEditable()
void set href(String value) native "HTMLAnchorElement_href_Setter";
+ @DomName('HTMLAnchorElement.origin')
+ @DocsEditable()
+ // WebKit only
+ @Experimental() // non-standard
+ String get origin native "HTMLAnchorElement_origin_Getter";
+
@DomName('HTMLAnchorElement.password')
@DocsEditable()
@Experimental() // untriaged
@@ -8291,13 +8297,16 @@
validator: validator, treeSanitizer: treeSanitizer);
}
- List<Element> _children;
+ HtmlCollection get _children => throw new UnimplementedError(
+ 'Use _docChildren instead');
+ List<Element> _docChildren;
+
List<Element> get children {
- if (_children == null) {
- _children = new FilteredElementList(this);
+ if (_docChildren == null) {
+ _docChildren = new FilteredElementList(this);
}
- return _children;
+ return _docChildren;
}
void set children(List<Element> value) {
@@ -8424,22 +8433,6 @@
@DocsEditable()
-@DomName('DocumentType')
-// http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-412266927
-@deprecated // stable
-class DocumentType extends Node implements ChildNode {
- // To suppress missing implicit constructor warnings.
- factory DocumentType._() { throw new UnsupportedError("Not supported"); }
-
-}
-// 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
-// BSD-style license that can be found in the LICENSE file.
-
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable()
@DomName('DOMError')
class DomError extends NativeFieldWrapperClass2 {
// To suppress missing implicit constructor warnings.
@@ -8522,11 +8515,11 @@
@DomName('DOMImplementation.createDocument')
@DocsEditable()
- Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) native "DOMImplementation_createDocument_Callback";
+ Document createDocument(String namespaceURI, String qualifiedName, _DocumentType doctype) native "DOMImplementation_createDocument_Callback";
@DomName('DOMImplementation.createDocumentType')
@DocsEditable()
- DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) native "DOMImplementation_createDocumentType_Callback";
+ _DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) native "DOMImplementation_createDocumentType_Callback";
@DomName('DOMImplementation.createHTMLDocument')
@DocsEditable()
@@ -11186,8 +11179,6 @@
bool hidden;
- InputMethodContext get inputMethodContext;
-
bool get isContentEditable;
String lang;
@@ -15596,10 +15587,6 @@
// To suppress missing implicit constructor warnings.
factory HtmlFormControlsCollection._() { throw new UnsupportedError("Not supported"); }
- @DomName('HTMLFormControlsCollection.__getter__')
- @DocsEditable()
- Node __getter__(int index) native "HTMLFormControlsCollection___getter___Callback";
-
@DomName('HTMLFormControlsCollection.namedItem')
@DocsEditable()
Node namedItem(String name) native "HTMLFormControlsCollection_namedItem_Callback";
@@ -31603,6 +31590,15 @@
String getEventType(EventTarget target) {
return _eventType;
}
+
+ ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false}) {
+ return new _ElementEventStreamImpl(e, _eventType, useCapture);
+ }
+
+ ElementStream<BeforeUnloadEvent> _forElementList(ElementList e,
+ {bool useCapture: false}) {
+ return new _ElementListEventStreamImpl(e, _eventType, 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
@@ -31641,11 +31637,6 @@
// To suppress missing implicit constructor warnings.
factory WindowEventHandlers._() { throw new UnsupportedError("Not supported"); }
- @DomName('WindowEventHandlers.beforeunloadEvent')
- @DocsEditable()
- @Experimental() // untriaged
- static const EventStreamProvider<Event> beforeUnloadEvent = const EventStreamProvider<Event>('beforeunload');
-
@DomName('WindowEventHandlers.hashchangeEvent')
@DocsEditable()
@Experimental() // untriaged
@@ -31686,11 +31677,6 @@
@Experimental() // untriaged
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
- @DomName('WindowEventHandlers.onbeforeunload')
- @DocsEditable()
- @Experimental() // untriaged
- Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
-
@DomName('WindowEventHandlers.onhashchange')
@DocsEditable()
@Experimental() // untriaged
@@ -32865,6 +32851,22 @@
@DocsEditable()
+@DomName('DocumentType')
+// http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-412266927
+@deprecated // stable
+abstract class _DocumentType extends Node implements ChildNode {
+ // To suppress missing implicit constructor warnings.
+ factory _DocumentType._() { throw new UnsupportedError("Not supported"); }
+
+}
+// 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
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+@DocsEditable()
@DomName('WebKitPoint')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@@ -33920,6 +33922,10 @@
*/
class _WrappedEvent implements Event {
final Event wrapped;
+
+ /** The CSS selector involved with event delegation. */
+ String _selector;
+
_WrappedEvent(this.wrapped);
bool get bubbles => wrapped.bubbles;
@@ -33957,6 +33963,43 @@
void stopPropagation() {
wrapped.stopPropagation();
}
+
+ /**
+ * A pointer to the element whose CSS selector matched within which an event
+ * was fired. If this Event was not associated with any Event delegation,
+ * accessing this value will throw an [UnsupportedError].
+ */
+ Element get matchingTarget {
+ if (_selector == null) {
+ throw new UnsupportedError('Cannot call matchingTarget if this Event did'
+ ' not arise as a result of event delegation.');
+ }
+ var currentTarget = this.currentTarget;
+ var target = this.target;
+ var matchedTarget;
+ do {
+ if (target.matches(_selector)) return target;
+ target = target.parent;
+ } while (target != null && target != currentTarget.parent);
+ throw new StateError('No selector matched for populating matchedTarget.');
+ }
+
+ /**
+ * This event's path, taking into account shadow DOM.
+ *
+ * ## Other resources
+ *
+ * * [Shadow DOM extensions to Event]
+ * (http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event) from
+ * W3C.
+ */
+ // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#extensions-to-event
+ @Experimental()
+ List<Node> get path => wrapped.path;
+
+ dynamic get _get_currentTarget => wrapped._get_currentTarget;
+
+ dynamic get _get_target => wrapped._get_target;
}
// 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
@@ -35363,6 +35406,9 @@
String getEventType(EventTarget target) {
return _eventTypeGetter(target);
}
+
+ String get _eventType =>
+ throw new UnsupportedError('Access type through getEventType method.');
}
// DO NOT EDIT- this file is generated from running tool/generator.sh.
@@ -38088,6 +38134,17 @@
throw new UnsupportedError(
"Cannot initialize a KeyboardEvent from a KeyEvent.");
}
+ int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
+ int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
+ int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
+ int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
+ @Experimental() // untriaged
+ bool getModifierState(String keyArgument) => throw new UnimplementedError();
+ @Experimental() // untriaged
+ int get location => throw new UnimplementedError();
+ @Experimental() // untriaged
+ bool get repeat => throw new UnimplementedError();
+ dynamic get _get_view => throw new UnimplementedError();
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -38585,7 +38642,7 @@
// TODO(vsm): Move these checks into native code.
ClassMirror cls = reflectClass(type);
if (_isBuiltinType(cls)) {
- throw new UnsupportedError("Invalid custom element from ${cls.owner.uri}.");
+ throw new UnsupportedError("Invalid custom element from ${(cls.owner as LibraryMirror).uri}.");
}
var className = MirrorSystem.getName(cls.simpleName);
var createdConstructor = cls.declarations[new Symbol('$className.created')];
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/html_common/lists.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698