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

Unified Diff: client/dom/templates/html/frog/impl_Document.darttemplate

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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:
View side-by-side diff with in-line comments
Download patch
Index: client/dom/templates/html/frog/impl_Document.darttemplate
diff --git a/client/dom/templates/html/frog/impl_Document.darttemplate b/client/dom/templates/html/frog/impl_Document.darttemplate
index 81f3d59c69dedc27f868d611646e6fc47c7cf5f4..22265a221d8a63322355c0f7749f7d4a9770832a 100644
--- a/client/dom/templates/html/frog/impl_Document.darttemplate
+++ b/client/dom/templates/html/frog/impl_Document.darttemplate
@@ -2,17 +2,11 @@
// 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.
-class $CLASSNAME extends _ElementJs
+class $CLASSNAME extends _ElementImpl
implements Document
native "*HTMLHtmlElement" {
$!MEMBERS
- // We execute query selectors off the traditional document rather than the
- // HTMLHtmlElement to make the result of query and queryAll less surprising.
- // Note: this means that document.query('html') will return the Document.
- _ElementJs query(String selectors) native "return this.parentNode.querySelector(selectors);";
- ElementList queryAll(String selectors) native "return this.parentNode.querySelectorAll(selectors);";
-
// TODO(jacobr): remove these methods and let them be generated automatically
// once dart supports defining fields with the same name in an interface and
// its parent interface.
@@ -22,24 +16,24 @@ $!MEMBERS
// For efficiency and simplicity, we always use the HtmlElement as the
// Document but sometimes internally we need the real JS document object.
- _NodeJs get _jsDocument() native "return this.parentNode;";
+ _NodeImpl get _jsDocument() native "return this.parentNode;";
// The document doesn't have a parent element.
- _ElementJs get parent() => null;
+ _ElementImpl get parent() => null;
}
// This class should not be externally visible. If a user ever gets access to
-// a _SecretHtmlDocumentJs object that is a bug. This object is hidden by
+// a _SecretHtmlDocumentImpl object that is a bug. This object is hidden by
// adding checks to all methods that could an HTMLDocument. We believe that
// list is limited to Event.target, and HTMLHtmlElement.parent.
-class _SecretHtmlDocumentJs extends _NodeJs implements Node
+class _SecretHtmlDocumentImpl extends _NodeImpl implements Node
native "*HTMLDocument" {
- _DocumentJs get _documentElement() native "return this.documentElement;";
+ _DocumentImpl get _documentElement() native "return this.documentElement;";
}
EventTarget _FixHtmlDocumentReference(EventTarget eventTarget) {
- if (eventTarget is _SecretHtmlDocumentJs) {
- _SecretHtmlDocumentJs secretDocument = eventTarget;
+ if (eventTarget is _SecretHtmlDocumentImpl) {
+ _SecretHtmlDocumentImpl secretDocument = eventTarget;
return secretDocument._documentElement;
} else {
return eventTarget;

Powered by Google App Engine
This is Rietveld 408576698