Initial checkin.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
dgrove@google.com 2011-10-05 04:52:33 +00:00
commit 4bc64b8c2b
1553 changed files with 163374 additions and 0 deletions

3
client/README Normal file
View file

@ -0,0 +1,3 @@
A Dart-based development stack that enables rapid, scalable development of
client-side applications that run well across desktop and mobile platforms.

View file

@ -0,0 +1,166 @@
// Copyright (c) 2011, 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.
typedef void AnimationCallback(num currentTime);
class CallbackData {
final AnimationCallback callback;
final num minTime;
int id;
static int _nextId;
bool ready(num time) => minTime === null || minTime <= time;
CallbackData(this.callback, this.minTime) {
// TODO(jacobr): static init needs cleanup, see http://b/4161827
if (_nextId === null) {
_nextId = 1;
}
id = _nextId++;
}
}
/**
* Animation scheduler implementing the functionality provided by
* [:window.requestAnimationFrame:] for platforms that do not support it
* or support it badly. When multiple UI components are animating at once,
* this approach yields superior performance to calling setTimeout directly as
* all pieces of the UI will animate at the same time resulting in fewer
* layouts.
*/
// TODO(jacobr): use window.requestAnimationFrame when it is available and
// 60fps for the current browser.
class AnimationScheduler {
static final FRAMES_PER_SECOND = 60;
static final MS_PER_FRAME = 1000 ~/ FRAMES_PER_SECOND;
static final USE_INTERVALS = false;
/** List of callbacks to be executed next animation frame. */
List<CallbackData> _callbacks;
int _intervalId;
bool _isMobileSafari = false;
Css _safariHackCss;
int _frameCount = 0;
bool _webkitAnimationFrameMaybeAvailable = true;
AnimationScheduler()
: _callbacks = new List<CallbackData>() {
if (_isMobileSafari) {
// TODO(jacobr): find a better workaround for the issue that 3d transforms
// sometimes don't render on iOS without forcing a layout.
final element = new Element.tag('div');
document.body.nodes.add(element);
_safariHackCss = new Css(element.style);
_safariHackCss.position = 'absolute';
}
}
/**
* Cancel the pending callback matching the specified [id].
* This is not heavily optimized as typically users don't cancel animation
* frames.
*/
void cancelRequestAnimationFrame(int id) {
_callbacks = _callbacks.filter((CallbackData e) => e.id != id);
}
/**
* Schedule [callback] to execute at the next animation frame that occurs
* at or after [minTime]. If [minTime] is not specified, the first available
* animation frame is used. Returns an id that can be used to cancel the
* pending callback.
*/
int requestAnimationFrame(AnimationCallback callback,
[Element element = null,
num minTime = null]) {
final callbackData = new CallbackData(callback, minTime);
_requestAnimationFrameHelper(callbackData);
return callbackData.id;
}
void _requestAnimationFrameHelper(CallbackData callbackData) {
_callbacks.add(callbackData);
if (_intervalId === null) {
_setupInterval();
}
}
void _setupInterval() {
// Assert that we never schedule multiple frames at once.
assert(_intervalId === null);
if (USE_INTERVALS) {
_intervalId = window.setInterval(_step, MS_PER_FRAME);
} else {
if (_webkitAnimationFrameMaybeAvailable) {
try {
// TODO(jacobr): passing in document should not be required.
_intervalId = window.webkitRequestAnimationFrame(
(int ignored) { _step(); }, document);
// TODO(jacobr) fix this odd type error.
} catch (var e) {
_webkitAnimationFrameMaybeAvailable = false;
}
}
if (!_webkitAnimationFrameMaybeAvailable) {
_intervalId = window.setTimeout(() { _step(); }, MS_PER_FRAME);
}
}
}
void _step() {
if (_callbacks.isEmpty()) {
// Cancel the interval on the first frame where there aren't actually
// any available callbacks.
assert(_intervalId != null);
if (USE_INTERVALS) {
window.clearInterval(_intervalId);
}
_intervalId = null;
} else if (USE_INTERVALS == false) {
_intervalId = null;
_setupInterval();
}
int numRemaining = 0;
int minTime = new DateTime.now().value + MS_PER_FRAME;
int len = _callbacks.length;
for (final callback in _callbacks) {
if (!callback.ready(minTime)) {
numRemaining++;
}
}
if (numRemaining == len) {
// TODO(jacobr): we could be more clever about this case if delayed
// requests really become the main use case...
return;
}
// Some callbacks need to be executed.
final currentCallbacks = _callbacks;
_callbacks = new List<CallbackData>();
for (final callbackData in currentCallbacks) {
if (callbackData.ready(minTime)) {
try {
(callbackData.callback)(minTime);
} catch (var e) {
final msg = e.toString();
print('Suppressed exception ${msg} triggered by callback');
}
} else {
_callbacks.add(callbackData);
}
}
_frameCount++;
if (_isMobileSafari) {
// Hack to work around an iOS bug where sometimes animations do not
// render if only webkit transforms were modified.
// TODO(jacobr): find a cleaner workaround.
int offset = _frameCount % 2;
_safariHackCss.left = '${offset}px';
}
}
}

6154
client/base/Css.dart Normal file

File diff suppressed because it is too large Load diff

76
client/base/Device.dart Normal file
View file

@ -0,0 +1,76 @@
// Copyright (c) 2011, 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.
// TODO(jacobr): cache these results.
// TODO(jacobr): figure out how to test this.
/**
* Utils for device detection.
*/
class Device {
/**
* The regular expression for detecting an iPhone or iPod.
*/
static final _IPHONE_REGEX = const RegExp('iPhone|iPod', '');
/**
* The regular expression for detecting an iPhone or iPod or iPad.
*/
static final _MOBILE_SAFARI_REGEX = const RegExp('iPhone|iPod|iPad', '');
/**
* The regular expression for detecting an iPhone or iPod or iPad simulator.
*/
static final _APPLE_SIM_REGEX = const RegExp('iP.*Simulator', '');
/**
* Gets the browser's user agent. Using this function allows tests to inject
* the user agent.
* Returns the user agent.
*/
static String get userAgent() => window.navigator.userAgent;
/**
* Determines if the current device is an iPhone or iPod.
* Returns true if the current device is an iPhone or iPod.
*/
static bool get isIPhone() => _IPHONE_REGEX.hasMatch(userAgent);
/**
* Determines if the current device is an iPad.
* Returns true if the current device is an iPad.
*/
static bool get isIPad() => userAgent.contains("iPad", 0);
/**
* Determines if the current device is running Firefox.
*/
static bool get isFirefox() => userAgent.contains("Firefox", 0);
/**
* Determines if the current device is an iPhone or iPod or iPad.
* Returns true if the current device is an iPhone or iPod or iPad.
*/
static bool get isMobileSafari() => _MOBILE_SAFARI_REGEX.hasMatch(userAgent);
/**
* Determines if the current device is the iP* Simulator.
* Returns true if the current device is an iP* Simulator.
*/
static bool get isAppleSimulator() => _APPLE_SIM_REGEX.hasMatch(userAgent);
/**
* Determines if the current device is an Android.
* Returns true if the current device is an Android.
*/
static bool get isAndroid() => userAgent.contains("Android", 0);
/**
* Determines if the current device is WebOS WebKit.
* Returns true if the current device is WebOS WebKit.
*/
static bool get isWebOs() => userAgent.contains("webOS", 0);
static bool get supportsTouch() => isMobileSafari || isAndroid;
}

View file

@ -0,0 +1,26 @@
// Copyright (c) 2011, 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.
/**
* Embedded DSL for generating DOM elements.
*/
class Dom {
static void ready(void f()) {
if (document.readyState == 'interactive' ||
document.readyState == 'complete') {
window.setTimeout(f, 0);
} else {
// TODO(jacobr): give this event a named property.
window.on.contentLoaded.add((Event e) { f(); });
}
}
/** Adds the given <style> text to the page. */
static void addStyle(String cssText) {
StyleElement style = document.createElement('style');
style.type = 'text/css';
style.text = cssText;
document.head.nodes.add(style);
}
}

40
client/base/Env.dart Normal file
View file

@ -0,0 +1,40 @@
// Copyright (c) 2011, 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.
/**
* This class has static fields that hold objects that this isolate
* uses to interact with the environment. Which objects are available
* depend on how the isolate was started. In the UI isolate
* of the browser, the window object is available.
*/
class Env {
static AnimationScheduler _animationScheduler;
/**
* Provides functionality similar to [:window.requestAnimationFrame:] for
* all platforms. [callback] is executed on the next animation frame that
* occurs at or after [minTime]. If [minTime] is not specified, the first
* available animation frame is used. Returns an id that can be used to
* cancel the pending callback.
*/
static int requestAnimationFrame(AnimationCallback callback,
[Element element = null,
num minTime = null]) {
if (_animationScheduler == null) {
_animationScheduler = new AnimationScheduler();
}
return _animationScheduler.requestAnimationFrame(
callback, element, minTime);
}
/**
* Cancel the pending callback callback matching the specified [id].
*/
static void cancelRequestAnimationFrame(int id) {
window.clearTimeout(id);
_animationScheduler.cancelRequestAnimationFrame(id);
}
}
typedef void XMLHttpRequestCompleted(XMLHttpRequest req);

14
client/base/base.dart Normal file
View file

@ -0,0 +1,14 @@
// Copyright (c) 2011, 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.
#library('base');
#import('../html/html.dart');
#import('../observable/observable.dart');
#import('../util/utilslib.dart');
#source('AnimationScheduler.dart');
#source('Css.dart');
#source('Device.dart');
#source('DomWrapper.dart');
#source('Env.dart');

View file

@ -0,0 +1,139 @@
#!/usr/bin/python2.6
#
# Copyright (c) 2011, 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.
"""Generates Css.dart from css property definitions defined in WebKit."""
import tempfile, os
COMMENT_LINE_PREFIX = ' * '
SOURCE_PATH = 'Source/WebCore/css/CSSPropertyNames.in'
INPUT_URL = 'http://trac.webkit.org/export/latest/trunk/%s' % SOURCE_PATH
OUTPUT_FILE = '../Css.dart'
def main():
_, css_names_file = tempfile.mkstemp('.CSSPropertyNames.in')
try:
if os.system('wget %s -O %s' % (INPUT_URL, css_names_file)):
return 1
generate_code(css_names_file)
print 'Successfully generated ' + OUTPUT_FILE
finally:
os.remove(css_names_file)
def camelCaseName(name):
"""Convert a CSS property name to a lowerCamelCase name."""
name = name.replace('-webkit-', '')
words = []
for word in name.split('-'):
if words:
words.append(word.title())
else:
words.append(word)
return ''.join(words)
def generate_code(input_path):
data = open(input_path).readlines()
# filter CSSPropertyNames.in to only the properties
data = [d[:-1] for d in data
if len(d) > 1
and not d.startswith('#')
and not d.startswith('//')
and not '=' in d]
output_file = open(OUTPUT_FILE, 'w')
output_file.write("""
// Copyright (c) 2011, 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.
// This file was generated by base/scripts/css_code_generator.py
// Source of CSS properties:
// %s
// TODO(jacobr): add versions that take numeric values in px, miliseconds, etc.
/**
* Browser neutral and typesafe class for setting CSS styles from Dart.
* This class smoothes over browser differences.
*/
class Css {
static String _cachedBrowserPrefix;
final CSSStyleDeclaration raw;
Css(CSSStyleDeclaration this.raw) { }
static String get _browserPrefix() {
if (_cachedBrowserPrefix === null) {
if (Device.isFirefox) {
_cachedBrowserPrefix = '-moz-';
} else {
_cachedBrowserPrefix = '-webkit-';
}
// TODO(jacobr): support IE 9.0 and Opera as well.
}
return _cachedBrowserPrefix;
}
""".lstrip() % SOURCE_PATH);
static_method_lines = [];
property_lines = [];
seen = set()
for prop in sorted(data, key=lambda p: camelCaseName(p)):
camel_case_name = camelCaseName(prop)
upper_camel_case_name = camel_case_name[0].upper() + camel_case_name[1:];
css_name = prop.replace('-webkit-', '${_browserPrefix}')
base_css_name = prop.replace('-webkit-', '')
if base_css_name in seen:
continue
seen.add(base_css_name)
comment = ' /** %s the value of "' + base_css_name + '" */'
static_method_lines.append('\n');
static_method_lines.append(comment % 'Gets')
static_method_lines.append("""
static String get%s(CSSStyleDeclaration style) {
return style.getPropertyValue('%s');
}
""" % (upper_camel_case_name, css_name))
static_method_lines.append(comment % 'Sets')
static_method_lines.append("""
static void set%s(CSSStyleDeclaration style, String value) {
style.setProperty('%s', value, '');
}
""" % (upper_camel_case_name, css_name))
property_lines.append('\n')
property_lines.append(comment % 'Gets')
property_lines.append("""
String get %s() {
return get%s(raw);
}
""" % (camel_case_name, upper_camel_case_name))
property_lines.append(comment % 'Sets')
property_lines.append("""
void set %s(String value) {
set%s(raw, value);
}
""" % (camel_case_name, upper_camel_case_name))
output_file.write(''.join(static_method_lines));
output_file.write(''.join(property_lines));
output_file.write('}\n')
output_file.close()
if __name__ == '__main__':
main()

View file

@ -0,0 +1,4 @@
# This file is used by gcl to get repository specific information.
CODE_REVIEW_SERVER: https://chromereviews.googleplex.com
VIEW_VC: https://code.google.com/p/dart/source/detail?r=
CC_LIST:

68
client/dart.gyp Normal file
View file

@ -0,0 +1,68 @@
# Copyright (c) 2011, 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.
{
'includes': [
'dart_server.gypi',
'fling/fling.gypi',
],
'targets': [
{
'target_name': 'dartserver',
'type': 'none',
'dependencies': ['../compiler/dart-compiler.gyp:dartc'],
'actions': [
{
'action_name': 'Build DartServer',
'inputs': [
'dart_server.gypi',
'<@(dart_server_sources)',
'<@(dart_server_resources)',
'<(PRODUCT_DIR)/dartc',
],
'outputs': [
'<(PRODUCT_DIR)/dartserver/dartserver.jar',
],
'action' : [
'../third_party/apache_ant/v1_7_1/bin/ant',
'-f', 'tools/dartserver/build.xml',
'-Dbuild.dir=<(PRODUCT_DIR)',
'clean',
'build'
],
'message': 'Running DartServer build actions.',
},
],
},
{
'target_name': 'fling',
'type': 'none',
'dependencies': ['../compiler/dart-compiler.gyp:dartc'],
'actions' : [
{
'action_name': 'Build Fling',
'inputs': [
'fling/fling.gypi',
'<@(fling_sources)',
'<@(fling_resources)',
'<(PRODUCT_DIR)/dartc',
],
'outputs' :[
'<(PRODUCT_DIR)/fling/runtime/fling.jar',
],
'action': [
'../third_party/apache_ant/v1_7_1/bin/ant',
'-f', 'fling/build.xml',
'-Dbuild.dir=<(PRODUCT_DIR)',
'build',
'setup-eclipse',
],
'message': 'Running Fling build actions.',
}
],
},
],
}

609
client/dom/LICENSE Normal file
View file

@ -0,0 +1,609 @@
W3C License (note, individual W3C documents are explicitly referred to
in the corresponding W3C IDL files) follows:
===============================================================================
Public documents on the W3C site are provided by the copyright holders
under the following license.
License
By using and/or copying this document, or the W3C document from which
this statement is linked, you (the licensee) agree that you have read,
understood, and will comply with the following terms and conditions:
Permission to copy, and distribute the contents of this document, or
the W3C document from which this statement is linked, in any medium
for any purpose and without fee or royalty is hereby granted, provided
that you include the following on ALL copies of the document, or
portions thereof, that you use:
A link or URL to the original W3C document.
The pre-existing copyright notice of the original author, or if it
doesn't exist, a notice (hypertext is preferred, but a textual
representation is permitted) of the form: "Copyright ©
[$date-of-document] World Wide Web Consortium, (Massachusetts
Institute of Technology, European Research Consortium for Informatics
and Mathematics, Keio University). All Rights
Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231"
If it exists, the STATUS of the W3C document.
When space permits, inclusion of the full text of this NOTICE should
be provided. We request that authorship attribution be provided in any
software, documents, or other items or products that you create
pursuant to the implementation of the contents of this document, or
any portion thereof. No right to create modifications or derivatives
of W3C documents is granted pursuant to this license. However, if
additional requirements (documented in the Copyright FAQ) are
satisfied, the right to create modifications or derivatives is
sometimes granted by the W3C to individuals complying with those
requirements.
Disclaimers
THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT
ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH
CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR
ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE
CONTENTS THEREOF. The name and trademarks of copyright holders may
NOT be used in advertising or publicity pertaining to this document or
its contents without specific, written prior permission. Title to
copyright in this document will at all times remain with copyright
holders. Notes This version:
http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231
This formulation of W3C's notice and license became active on December
31 2002. This version removes the copyright ownership notice such that
this license can be used with materials other than those owned by the
W3C, moves information on style sheets, DTDs, and schemas to the
Copyright FAQ, reflects that ERCIM is now a host of the W3C, includes
references to this specific dated version of the license, and removes
the ambiguous grant of "use". See the older formulation for the policy
prior to this date. Please see our Copyright FAQ for common questions
about using materials from our site, such as the translating or
annotating specifications.
===============================================================================
WebCore (Apple and LGPL) Licenses follow (source of WebKit IDL files):
===============================================================================
Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===============================================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

10
client/dom/README.google Normal file
View file

@ -0,0 +1,10 @@
TODO(vsm): Web IDL License
----------------------------------------------------------------------
TODO(vsm): WebKit IDL Licence
----------------------------------------------------------------------
TODO(vsm): The rest - Apache License

View file

@ -0,0 +1,82 @@
// Copyright (c) 2011, 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.
// Misc benchmark-related utility functions.
class BenchUtil {
static int get now() {
return new DateTime.now().value;
}
static Map<String, Object> deserialize(String data) {
return JSON.parse(data);
}
static String serialize(Object obj) {
return JSON.stringify(obj);
}
// Shuffle a list randomly.
static void shuffle(List<Object> list) {
int len = list.length - 1;
for (int i = 0; i < len; i++) {
int index = (Math.random() * (len - i)).toInt() + i;
Object tmp = list[i];
list[i] = list[index];
list[index] = tmp;
}
}
static String formatGolemData(String prefix, Map<String, num> results) {
List<String> elements = new List<String>();
results.forEach((String name, num score) {
elements.add('"${prefix}/${name}":${score}');
});
return serialize(elements);
}
static bool _inRange(int charCode, String start, String end) {
return start.charCodeAt(0) <= charCode && charCode <= end.charCodeAt(0);
}
static final String DIGITS = '0123456789ABCDEF';
static String _asDigit(int value) {
return DIGITS[value];
}
static String encodeUri(final String s) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < s.length; i++) {
final int charCode = s.charCodeAt(i);
final bool noEscape =
_inRange(charCode, '0', '9') ||
_inRange(charCode, 'a', 'z') ||
_inRange(charCode, 'A', 'Z');
if (noEscape) {
sb.add(s[i]);
} else {
sb.add('%');
sb.add(_asDigit((charCode >> 4) & 0xF));
sb.add(_asDigit(charCode & 0xF));
}
}
return sb.toString();
}
// TODO: use corelib implementation.
static String replaceAll(String s, String pattern,
String replacement(Match match)) {
StringBuffer sb = new StringBuffer();
int pos = 0;
for (Match match in new RegExp(pattern, '').allMatches(s)) {
sb.add(s.substring(pos, match.start()));
sb.add(replacement(match));
pos = match.end();
}
sb.add(s.substringToEnd(pos));
return sb.toString();
}
}

View file

@ -0,0 +1,30 @@
// Copyright (c) 2011, 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.
// A utility object for measuring time intervals.
class Interval {
int _start, _stop;
Interval() {
}
void start() {
_start = BenchUtil.now;
}
void stop() {
_stop = BenchUtil.now;
}
// Microseconds from between start() and stop().
int get elapsedMicrosec() {
return (_stop - _start) * 1000;
}
// Milliseconds from between start() and stop().
int get elapsedMillisec() {
return (_stop - _start);
}
}

View file

@ -0,0 +1,584 @@
// Copyright (c) 2011, 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.
// Pure Dart implementation of JSON protocol.
/**
* Utility class to parse JSON and serialize objects to JSON.
*/
class JSON {
/**
* Parses [:json:] and build the corresponding object.
*/
static parse(String json) {
return JsonParser.parse(json);
}
/**
* Serializes [:object:] into JSON string.
*/
static String stringify(Object object) {
return JsonStringifier.stringify(object);
}
}
//// Implementation ///////////////////////////////////////////////////////////
/**
* Union-like class for JSON tokens.
*/
class JsonToken {
static final int STRING = 0;
static final int NUMBER = 1;
static final int NULL = 2;
static final int FALSE = 3;
static final int TRUE = 4;
static final int RBRACKET = 5;
static final int LBRACKET = 6;
static final int RBRACE = 7;
static final int LBRACE = 8;
static final int COLON = 9;
static final int COMMA = 10;
final int kind;
final String _s;
final num _n;
String get str() {
assert(kind == STRING);
return _s;
}
num get number() {
assert(kind == NUMBER);
return _n;
}
const JsonToken._internal(this.kind, this._s, this._n);
factory JsonToken.string(String s) {
return new JsonToken._internal(STRING, s, 0);
}
factory JsonToken.number(num n) {
return new JsonToken._internal(NUMBER, '', n);
}
factory JsonToken.atom(int kind) {
return new JsonToken._internal(kind, '', 0);
}
String toString() {
switch (kind) {
case STRING:
return 'STRING(${_s})';
case NUMBER:
return 'NUMBER(${_n})';
case NULL:
return 'ATOM(null)';
case FALSE:
return 'ATOM(false)';
case TRUE:
return 'ATOM(true)';
case RBRACKET:
return 'ATOM(])';
case LBRACKET:
return 'ATOM([)';
case RBRACE:
return 'ATOM(})';
case LBRACE:
return 'ATOM({)';
case COLON:
return 'ATOM(:)';
case COMMA:
return 'ATOM(,)';
}
}
}
typedef bool Predicate(int c);
class JsonTokenizer {
static final int BACKSPACE = 8; // '\b'.charCodeAt(0)
static final int TAB = 9; // '\t'.charCodeAt(0)
static final int NEW_LINE = 10; // '\n'.charCodeAt(0)
static final int FORM_FEED = 12; // '\f'.charCodeAt(0)
static final int LINE_FEED = 13; // '\r'.charCodeAt(0)
static final int SPACE = 32; // ' '.charCodeAt(0)
static final int QUOTE = 34; // '"'.charCodeAt(0)
static final int PLUS = 43; // '+'.charCodeAt(0)
static final int COMMA = 44; // ','.charCodeAt(0)
static final int MINUS = 45; // '-'.charCodeAt(0)
static final int DOT = 46; // '.'.charCodeAt(0)
static final int BACKSLASH = 47; // '/'.charCodeAt(0)
static final int ZERO = 48; // '0'.charCodeAt(0)
static final int NINE = 57; // '9'.charCodeAt(0)
static final int COLON = 58; // ':'.charCodeAt(0)
static final int A_BIG = 65; // 'A'.charCodeAt(0)
static final int E_BIG = 69; // 'E'.charCodeAt(0)
static final int Z_BIG = 90; // 'Z'.charCodeAt(0)
static final int LBRACKET = 91; // '['.charCodeAt(0)
static final int SLASH = 92; // '\\'.charCodeAt(0)
static final int RBRACKET = 93; // ']'.charCodeAt(0)
static final int A_SMALL = 97; // 'a'.charCodeAt(0)
static final int B_SMALL = 98; // 'b'.charCodeAt(0)
static final int E_SMALL = 101; // 'e'.charCodeAt(0)
static final int Z_SMALL = 122; // 'z'.charCodeAt(0)
static final int LBRACE = 123; // '{'.charCodeAt(0)
static final int RBRACE = 125; // '}'.charCodeAt(0)
JsonTokenizer(String s) : _s = s + ' ', _pos = 0, _len = s.length + 1 {}
/**
* Fetches next token or [:null:] if the stream has been exhausted.
*/
JsonToken next() {
while (_pos < _len && isWhitespace(_s.charCodeAt(_pos))) {
_pos++;
}
if (_pos == _len) {
return null;
}
final int cur = _s.charCodeAt(_pos);
switch (true) {
case cur == QUOTE:
_pos++;
List<int> charCodes = new List<int>();
while (_pos < _len) {
int c = _s.charCodeAt(_pos);
if (c == QUOTE) {
break;
}
if (c == SLASH) {
_pos++;
if (_pos == _len) {
throw '\\ at the end';
}
switch (_s[_pos]) {
case '"':
c = QUOTE;
break;
case '\\':
c = SLASH;
break;
case '/':
c = BACKSLASH;
break;
case 'b':
c = BACKSPACE;
break;
case 'n':
c = NEW_LINE;
break;
case 'r':
c = LINE_FEED;
break;
case 'f':
c = FORM_FEED;
break;
case 't':
c = TAB;
break;
case 'u':
if (_pos + 5 > _len) {
throw 'Invalid unicode esacape sequence: \\' +
_s.substring(_pos, _len);
}
final codeString = _s.substring(_pos + 1, _pos + 5);
c = Math.parseInt('0x' + codeString);
if (c >= 128) {
// TODO(jmessery): the VM doesn't support 2-byte strings yet
// see runtime/lib/string.cc:49
// So instead we replace these characters with '?'
c = '?'.charCodeAt(0);
}
_pos += 4;
break;
default:
throw 'Invalid esacape sequence: \\' + _s[_pos];
}
}
charCodes.add(c);
_pos++;
}
if (_pos == _len) {
throw 'Unmatched quote';
}
final String body = new String.fromCharCodes(charCodes);
_pos++;
return new JsonToken.string(body);
case cur == MINUS || isDigit(cur):
skipDigits() {
_scanWhile((int c) => isDigit(c), 'Invalid number');
}
final int startPos = _pos;
bool isInteger = true;
_pos++;
skipDigits();
int c = _s.charCodeAt(_pos);
if (c == DOT) {
isInteger = false;
_pos++;
skipDigits();
c = _s.charCodeAt(_pos);
}
if (c == E_SMALL || c == E_BIG) {
// TODO: consider keeping E+ as an integer.
isInteger = false;
_pos++;
c = _s.charCodeAt(_pos);
if (c == PLUS || c == MINUS) {
_pos++;
}
skipDigits();
}
final String body = _s.substring(startPos, _pos);
return new JsonToken.number(
isInteger ? Math.parseInt(body) : Math.parseDouble(body));
case cur == LBRACE:
_pos++;
return new JsonToken.atom(JsonToken.LBRACE);
case cur == RBRACE:
_pos++;
return new JsonToken.atom(JsonToken.RBRACE);
case cur == LBRACKET:
_pos++;
return new JsonToken.atom(JsonToken.LBRACKET);
case cur == RBRACKET:
_pos++;
return new JsonToken.atom(JsonToken.RBRACKET);
case cur == COMMA:
_pos++;
return new JsonToken.atom(JsonToken.COMMA);
case cur == COLON:
_pos++;
return new JsonToken.atom(JsonToken.COLON);
case isLetter(cur):
final int startPos = _pos;
_pos++;
while (_pos < _len && isLetter(_s.charCodeAt(_pos))) {
_pos++;
}
final String body = _s.substring(startPos, _pos);
switch (body) {
case 'null':
return new JsonToken.atom(JsonToken.NULL);
case 'false':
return new JsonToken.atom(JsonToken.FALSE);
case 'true':
return new JsonToken.atom(JsonToken.TRUE);
default:
throw 'Unexpected sequence ${body}';
}
// TODO: Bogous, to please DartVM.
return null;
default:
throw 'Invalid token';
}
}
final String _s;
int _pos;
final int _len;
void _scanWhile(Predicate predicate, String errorMsg) {
while (_pos < _len && predicate(_s.charCodeAt(_pos))) {
_pos++;
}
if (_pos == _len) {
throw errorMsg;
}
}
// TODO other kind of whitespace.
static bool isWhitespace(int c) {
return c == SPACE || c == TAB || c == NEW_LINE || c == LINE_FEED;
}
static bool isDigit(int c) {
return (ZERO <= c) && (c <= NINE);
}
static bool isLetter(int c) {
return ((A_SMALL <= c) && (c <= Z_SMALL)) || ((A_BIG <= c) && (c <= Z_BIG));
}
}
class JsonParser {
static parse(String json) {
return new JsonParser._internal(json)._parseToplevel();
}
final JsonTokenizer _tokenizer;
JsonParser._internal(String json) : _tokenizer = new JsonTokenizer(json) {}
_parseToplevel() {
JsonToken token = _tokenizer.next();
final result = _parseValue(token);
token = _tokenizer.next();
if (token !== null) {
throw 'Junk at the end';
}
return result;
}
_parseValue(final JsonToken token) {
if (token === null) {
throw 'Nothing to parse';
}
switch (token.kind) {
case JsonToken.STRING:
return token.str;
case JsonToken.NUMBER:
return token.number;
case JsonToken.NULL:
return null;
case JsonToken.FALSE:
return false;
case JsonToken.TRUE:
return true;
case JsonToken.LBRACE:
return _parseObject();
case JsonToken.LBRACKET:
return _parseList();
default:
throw 'Unexpected token: ${token}';
}
}
_parseObject() {
Map<String, Object> object = new Map<String, Object>();
_parseSequence(JsonToken.RBRACE, (JsonToken token) {
_assertTokenKind(token, JsonToken.STRING);
final String key = token.str;
token = _tokenizer.next();
_assertTokenKind(token, JsonToken.COLON);
token = _tokenizer.next();
final value = _parseValue(token);
object[key] = value;
});
return object;
}
_parseList() {
List<Object> array = new List<Object>();
_parseSequence(JsonToken.RBRACKET, (JsonToken token) {
final value = _parseValue(token);
array.add(value);
});
return array;
}
void _parseSequence(int endTokenKind, void parseElement(JsonToken token)) {
JsonToken token = _tokenizer.next();
if (token === null) {
throw 'Unexpected end of stream';
}
if (token.kind == endTokenKind) {
return;
}
parseElement(token);
token = _tokenizer.next();
if (token === null) {
throw 'Expected either comma or terminator';
}
while (token.kind != endTokenKind) {
_assertTokenKind(token, JsonToken.COMMA);
token = _tokenizer.next();
parseElement(token);
token = _tokenizer.next();
}
}
void _assertTokenKind(JsonToken token, int kind) {
if (token === null || token.kind != kind) {
throw 'Unexpected token kind: token = ${token}, expected kind = ${kind}';
}
}
// TODO: consider factor out error throwing code and build more complicated
// data structure to provide more info for a caller.
}
// TODO: proper base class.
class JsonUnsupportedObjectType {
const JsonUnsupportedObjectType();
}
class JsonStringifier {
static String stringify(final object) {
JsonStringifier stringifier = new JsonStringifier._internal();
stringifier._stringify(object);
/*
try {
stringifier._stringify(object);
} catch (JsonUnsupportedObjectType e) {
return null;
}*/
return stringifier._result;
}
JsonStringifier._internal()
: _sb = new StringBuffer(), _seen = new List<Object>() {}
StringBuffer _sb;
List<Object> _seen; // TODO: that should be identity set.
String get _result() { return _sb.toString(); }
static String _numberToString(num x) {
// TODO: need some more investigation what to do with precision
// of double values.
switch (true) {
case x is int:
return x.toString();
case x is double:
return x.toString();
default:
return x.toDouble().toString();
}
}
// TODO: add others.
static bool _needsEscape(int charCode) {
return JsonTokenizer.QUOTE == charCode || JsonTokenizer.SLASH == charCode;
}
static void _escape(StringBuffer sb, String s) {
// TODO: support \u code points.
// TODO: use writeCodePoint when implemented.
// TODO: use for each if implemented.
final int length = s.length;
bool needsEscape = false;
final charCodes = new List<int>();
for (int i = 0; i < length; i++) {
final int charCode = s.charCodeAt(i);
if (_needsEscape(charCode)) {
charCodes.add(JsonTokenizer.SLASH);
needsEscape = true;
}
charCodes.add(charCode);
}
sb.add(needsEscape ? new String.fromCharCodes(charCodes) : s);
}
void _checkCycle(final object) {
// TODO: use Iterables.
for (int i = 0; i < _seen.length; i++) {
if (_seen[i] === object) {
throw 'Cyclic structure';
}
}
_seen.add(object);
}
void _stringify(final object) {
switch (true) {
case object is num:
// TODO: use writeOn.
_sb.add(_numberToString(object));
return;
case object === true:
_sb.add('true');
return;
case object === false:
_sb.add('false');
return;
case object === null:
_sb.add('null');
return;
case object is String:
_sb.add('"');
_escape(_sb, object);
_sb.add('"');
return;
case object is List:
_checkCycle(object);
List a = object;
_sb.add('[');
if (a.length > 0) {
_stringify(a[0]);
}
// TODO: switch to Iterables.
for (int i = 1; i < a.length; i++) {
_sb.add(',');
_stringify(a[i]);
}
_sb.add(']');
return;
case object is Map:
_checkCycle(object);
Map<String, Object> m = object;
_sb.add('{');
int counter = m.length;
m.forEach((String key, Object value) {
_stringify(key);
_sb.add(':');
_stringify(value);
counter--;
if (counter != 0) {
_sb.add(',');
}
});
_sb.add('}');
return;
default:
throw const JsonUnsupportedObjectType();
}
}
}

View file

@ -0,0 +1,49 @@
// Copyright (c) 2011, 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.
// Various math-related utility functions.
class Math2 {
/// Computes the geometric mean of a set of numbers.
/// [minNumber] is optional (defaults to 0.001) anything smaller than this
/// will be changed to this value, eliminating infinite results.
static double geometricMean(List<double> numbers,
[double minNumber = 0.001]) {
double log = 0.0;
int nNumbers = 0;
for (int i = 0, n = numbers.length; i < n; i++) {
double number = numbers[i];
if (number < minNumber) {
number = minNumber;
}
nNumbers++;
log += Math.log(number);
}
return nNumbers > 0 ? Math.pow(Math.E, log / nNumbers) : 0.0;
}
static int round(double d) {
return d.round().toInt();
}
static int floor(double d) {
return d.floor().toInt();
}
// TODO (olonho): use d.toStringAsFixed(precision) when implemented by DartVM
static String toStringAsFixed(num d, int precision) {
String dStr = d.toString();
int pos = dStr.indexOf('.', 0);
int end = pos < 0 ? dStr.length : pos + precision;
if (precision > 0) {
end++;
}
if (end > dStr.length) {
end = dStr.length;
}
return dStr.substring(0, end);
}
}

View file

@ -0,0 +1,9 @@
// Copyright (c) 2011, 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.
#library('common.dart');
#source('BenchUtil.dart');
#source('Interval.dart');
#source('JSON.dart');
#source('Math2.dart');

View file

@ -0,0 +1,208 @@
#import('dart:dom');
#import('dart:json');
#import('Suites.dart');
main() {
window.onload = (Event evt) {
new Dromaeo().run();
};
}
class SuiteController {
final SuiteDescription _suiteDescription;
final HTMLIFrameElement _suiteIframe;
HTMLDivElement _element;
double _meanProduct;
int _nTests;
SuiteController(this._suiteDescription, this._suiteIframe)
: _meanProduct = 1.0,
_nTests = 0 {
_make();
_init();
}
start() {
_suiteIframe.contentWindow.dynamic.postMessage('start', '*');
}
update(String testName, num mean, num error, double percent) {
_meanProduct *= mean;
_nTests++;
final meanAsString = mean.toStringAsFixed(2);
final errorAsString = error.toStringAsFixed(2);
final HTMLElement progressDisplay = _element.nextSibling.nextSibling;
progressDisplay.innerHTML +=
'<li><b>${testName}:</b>' +
'${meanAsString}<small> runs/s &#177;${errorAsString}%<small></li>';
_updateTestPos(percent);
}
_make() {
_element = _createDiv('test');
// TODO(antonm): add an onclick functionality.
_updateTestPos();
}
_updateTestPos([double percent = 1.0]) {
String suiteName = _suiteDescription.name;
final done = percent >= 100.0;
String info = '';
if (done) {
final parent = _element.parentNode;
parent.setAttribute('class', parent.getAttribute('class') + ' done');
final mean = Math.pow(_meanProduct, 1.0 / _nTests).toStringAsFixed(2);
info = '<span>${mean} runs/s</span>';
}
_element.innerHTML =
'<b>${suiteName}:</b>' +
'<div class="bar"><div style="width:${percent}%;">${info}</div></div>';
}
_init() {
final div = _createDiv('result-item');
div.appendChild(_element);
final description = _suiteDescription.description;
final originUrl = _suiteDescription.origin.url;
final testUrl = 'tests/' + _suiteDescription.file;
div.innerHTML +=
'<p>${description}<br/><a href="${originUrl}">Origin</a>' +
', <a href="${testUrl}">Source</a>' +
'<ol class="results"></ol>';
// Reread the element, as the previous wrapper get disconnected thanks
// to .innerHTML update above.
_element = div.firstChild;
document.getElementById('main').appendChild(div);
}
HTMLDivElement _createDiv(String clazz) {
final div = document.createElement('div');
div.setAttribute('class', clazz);
return div;
}
}
class Dromaeo {
final List<SuiteController> _suiteControllers;
Function _handler;
Dromaeo()
: _suiteControllers = new List<SuiteController>(),
_handler = _createHandler()
{
window.addEventListener(
'message',
(MessageEvent event) {
try {
final response = JSON.parse(event.data);
_handler = _handler(response['command'], response['data']);
} catch (final e, final stacktrace) {
window.alert('Exception: ${e}: ${stacktrace}');
}
},
false
);
}
run() {
// TODO(antonm): create Re-run tests href.
final HTMLElement suiteNameElement = _byId('overview').firstChild;
suiteNameElement.innerHTML = 'DOM Core Tests';
_css(_byId('tests'), 'display', 'none');
for (SuiteDescription suite in Suites.SUITE_DESCRIPTIONS) {
final iframe = document.createElement('iframe');
_css(iframe, 'height', '1px');
_css(iframe, 'width', '1px');
iframe.src = 'tests/' + suite.file;
document.body.appendChild(iframe);
_suiteControllers.add(new SuiteController(suite, iframe));
}
}
static final double _SECS_PER_TEST = 5.0;
Function _createHandler() {
int suitesLoaded = 0;
int totalTests = 0;
int currentSuite;
double totalTimeSecs, estimatedTimeSecs;
// TODO(jat): Remove void type below. Bug 5269037.
void _updateTime() {
final mins = (estimatedTimeSecs / 60).floor().toInt();
final secs = (estimatedTimeSecs - mins * 60).round().toInt();
final secsAsString = (secs < 10 ? '0' : '') + secs;
_byId('left').innerHTML = '${mins}:${secsAsString}';
final elapsed = totalTimeSecs - estimatedTimeSecs;
final percent = (100 * elapsed / totalTimeSecs).toStringAsFixed(2);
_css(_byId('timebar'), 'width', '${percent}%');
}
Function loading, running, done;
loading = (String command, var data) {
assert(command == 'inited');
suitesLoaded++;
totalTests += data['nTests'];
if (suitesLoaded == _suitesTotal) {
totalTimeSecs = estimatedTimeSecs = _SECS_PER_TEST * totalTests;
_updateTime();
currentSuite = 0;
_suiteControllers[currentSuite].start();
return running;
}
return loading;
};
running = (String command, var data) {
switch (command) {
case 'result':
final testName = data['testName'];
final mean = data['mean'];
final error = data['error'];
final percent = data['percent'];
_suiteControllers[currentSuite].update(testName, mean, error, percent);
estimatedTimeSecs -= _SECS_PER_TEST;
_updateTime();
return running;
case 'over':
currentSuite++;
if (currentSuite < _suitesTotal) {
_suiteControllers[currentSuite].start();
return running;
}
document.body.setAttribute('class', 'alldone');
return done;
default:
throw 'Unknown command ${command} [${data}]';
}
};
done = (String command, var data) {
};
return loading;
}
_css(Element element, String property, String value) {
// TODO(antonm): remove the last argument when CallWithDefaultValue
// is implemented.
element.style.setProperty(property, value, '');
}
HTMLElement _byId(String id) {
return document.getElementById(id);
}
int get _suitesTotal() {
return _suiteControllers.length;
}
}

View file

@ -0,0 +1,44 @@
#library('Suites.dart');
class Origin {
final String author;
final String url;
const Origin(this.author, this.url);
}
class SuiteDescription {
final String file;
final String name;
final Origin origin;
final String description;
const SuiteDescription(this.file, this.name, this.origin, this.description);
}
class Suites {
static final JOHN_RESIG = const Origin('John Resig', 'http://ejohn.org/');
static final SUITE_DESCRIPTIONS = const [
const SuiteDescription(
'dom-attr.html',
'DOM Attributes',
JOHN_RESIG,
'Setting and getting DOM node attributes'),
const SuiteDescription(
'dom-modify.html',
'DOM Modification',
JOHN_RESIG,
'Creating and injecting DOM nodes into a document'),
const SuiteDescription(
'dom-query.html',
'DOM Query',
JOHN_RESIG,
'Querying DOM elements in a document'),
const SuiteDescription(
'dom-traverse.html',
'DOM Traversal',
JOHN_RESIG,
'Traversing a DOM structure')
];
}

View file

@ -0,0 +1,115 @@
ol.results { text-align: left; display: none; font-size: 10px; list-style: none; display: none; }
.alldone ol.results { display: block; width: 48%; float: left; }
ol.results li { clear: both; overflow: auto; }
ol.results b { display: block; width: 200px; float: left; text-align: right; padding-right: 15px; }
#info { clear:both;width:420px;margin:0 auto;text-align:left; padding: 10px; }
div.results { width:420px;margin:0 auto;margin-bottom:20px;text-align:left; padding: 10px 10px 10px 10px; }
#info span { font-weight: bold; padding-top: 8px; }
h1 { text-align: left; }
h1 img { float:left;margin-right: 15px;margin-top: -10px; border: 0; }
h1 small { font-weight:normal; }
iframe { display: none; }
div.resultwrap { text-align: center; }
table.results { font-size: 12px; margin: 0 auto; }
table.results td, table.results th.name, table.results th { text-align: right; }
table.results .winner { color: #000; background-color: #c7331d; }
table.results .tie { color: #000; background-color: #f9f2a1; }
body {
font: normal 11px "Lucida Grande", Helvetica, Arial, sans-serif;
background: black url(images/bg.png) repeat-x;
margin: 0px auto;
padding: 0px;
color: #eee;
text-align: center;
line-height: 180%;
}
div, img, form, ul {
margin: 0px;
padding: 0px;
border: 0px;
}
small {font-size: 9px;}
div, span, td, .text_l {text-align: left;}
.clear {clear: both;}
.text_r {text-align: right;}
.text_c {text-align: center;}
a {font: normal "Arial", sans-serif; color: #f9f2a1; }
.left {float: left;}
.right {float: right;}
#wrapper {width: 690px; margin: 0px auto; padding: 0px; margin-top: -7px; text-align: center;}
#content {margin-bottom: 30px;}
#main {padding-bottom: 40px;}
#top {background: url(images/top.png) repeat-x; height: 250px;}
#logo {position: absolute; top: 0; left: 0; width: 100%; text-align: center; z-index: 100;}
#logo img { margin: 0px auto; padding: 0px;}
.dino1 {position: absolute; top: 105px; right: 300px; z-index: 15;}
.dino2 {position: absolute; top: 110px; left: 15%; z-index: 12;}
.dino3 {position: absolute; top: 120px; left: 400px; z-index: 31;}
.dino4 {position: absolute; top: 96px; left: 200px; z-index: 8;}
.dino5 {position: absolute; top: 110px; right: 85px; z-index: 14;}
.dino6 {position: absolute; top: 105px; left: 30%; z-index: 14;}
.dino7 {position: absolute; top: 110px; left: 70%; z-index: 22;}
.dino8 {position: absolute; top: 105px; left: 37%; z-index: 20;}
.coment {position: absolute; top: 0px; right: 0px; z-index: 2; float: right;}
.clouds {position: absolute; top: 10px; right: 11%; z-index: 12;}
.clouds2 {position: absolute; top: 50px; right: 29%; z-index: 13;}
.clouds5 {position: absolute; top: 0px; right: 15%; z-index: 16;}
.clouds3 {position: absolute; top: 15px; left: 10%; z-index: 15;}
.clouds4 {position: absolute; top: 10px; left: 15%; z-index: 14;}
.water {position: absolute; top: 110px; right: 9%; z-index: 13;}
/* rendered html stuff */
table.results {text-align: center; margin: 0px auto; padding: 0px; background: none;}
table.results td, table.results th {padding: 2px;}
table.results tr.onetest td, table.results tr.onetest th {padding: 0px;}
table.results tr.hidden { display: none; }
#info {margin-bottom: 10px;}
table.results .winner {background: #58bd79;}
.name {font-weight: bold;}
div.resultwrap {margin: 10px 0 10px 0;}
div.results {padding: 10px; margin-bottom: 20px; background: #c7331d;}
div.result-item { position: relative; width: 48%; float: left; overflow: hidden; margin-left: 1%; margin-right: 1%; height: 100px; }
.alldone div.result-item { width: 98%; height: auto; margin-bottom: 10px; overflow: auto; }
.alldone div.result-item p { width: 48%; float: left; }
div.result-item p { padding: 0px 4px; }
div.test { overflow: hidden; margin: 4px 0; }
div.test b { display: block; width: 100%; text-align: left; margin: 0px; background: #c7331d; padding: 4px; }
/*div.done div.test b {background: #58bd79;}*/
div.done div.test b {background: #222;}
div.bar { width: 100px; border: 1px inset #666; background: #c7331d; text-align: left; position: absolute; top: 7px; right: 4px; }
div.bar div { height: 20px; background: #222; text-align: right; }
div.done div.bar div {background: #58bd79; color: #000;}
div.bar span { padding-left: 5px; padding-right: 5px; }
#info { margin: auto; }
h1 { font-size: 28px; border-bottom: 1px solid #AAA; position: relative; padding: 0px 1% 2px 1%;}
h1 div.bar { font-size: 10px; width: 275px; top: -2px; right: 1%; }
h1 input { position: absolute; top: 0px; right: 300px; }
h2 { font-size: 20px; border-bottom: 1px solid #AAA; position: relative; padding: 0px 1% 2px 1%;}
h2 a { color: #FFF; }
h2 div.bar { font-size: 10px; width: 275px; top: -2px; right: 1%; }
h2 input { position: absolute; top: 0px; right: 300px; }
ul#tests { clear:both;width:420px;margin:0 auto;text-align:left; padding: 10px; list-style: none; }
#tests b { background: #c7331d; color: #000; display: block; padding: 4px 0 4px 4px; margin-left: -20px; margin-bottom: 5px; font-size: 1.1em; -webkit-border-radius: 4px; -moz-border-radius: 4px; font-weight: normal; }
#tests b.recommended { background: #58bd79; }
#tests a:first-of-type { font-size: 1.2em; }
#tests b a { font-weight: bold; color: #000; }
#tests li { padding-left: 10px; padding-bottom: 5px; }
#overview { position: relative; }
#overview a { font-size: 10px; top: -29px; left: 8px; position: absolute; }
#overview table a { position: static; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; utf-8" />
<title>Dromaeo: JavaScript Performance Testing</title>
<link href="reset.css" rel="stylesheet" type="text/css" />
<link href="application.css" rel="stylesheet" type="text/css" />
<script type="application/dart" src="Dromaeo.dart"></script>
</head>
<body>
<div id="top" >
<div id="logo">
<a href="./"><img src="images/logo3.png" class="png"/></a>
</div>
<img src="images/dino1.png" class="dino1 png"/>
<img src="images/left.png" class="left png"/>
<img src="images/dino2.png" class="dino2 png"/>
<img src="images/dino2.png" class="dino2 png"/>
<img src="images/dino3.png" class="dino3 png"/>
<img src="images/dino4.png" class="dino4 png"/>
<img src="images/dino5.png" class="dino5 png"/>
<img src="images/dino7.png" class="dino7 png"/>
<img src="images/dino8.png" class="dino8 png"/>
<img src="images/dino6.png" class="dino6 png"/>
<img src="images/clouds2.png" class="clouds2 png"/>
<img src="images/clouds.png" class="clouds png"/>
<img src="images/clouds2.png" class="clouds3 png"/>
<img src="images/clouds.png" class="clouds4 png"/>
<img src="images/clouds2.png" class="clouds5 png"/>
<img src="images/comets.png" class="right png"/>
</div>
<div id="wrapper">
<div id="main">
<div id="info"><span>Mozilla JavaScript performance test suite.</span><br/>More information about <a href="http://wiki.mozilla.org/Dromaeo">Dromaeo</a> can be found on the Mozilla wiki.</div>
<h1 id="overview" class="test"><span>Performance Tests</span> <input type="button" id="pause" class="pause" value="Loading..."/><div class="bar"><div id="timebar" style="width:25%;"><span class="left">Est.&nbsp;Time:&nbsp;<strong id="left">0:00</strong></span></div></div><a href="./">&laquo; View All Tests</a></h1><br style="clear:both;"/>
<ul id="tests">
<li><a href="?dom">DOM Core Tests</a><br/>(Tests DOM Querying, Traversing, Manipulation, and Atributes.)</li>
</ul>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,38 @@
/* --------------------------------------------------------------
reset.css
* Resets default browser CSS.
Based on work by Eric Meyer:
* meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
-------------------------------------------------------------- */
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body { line-height: 1.5; background: #fff; margin:1.5em 0; }
/* Tables still need 'cellspacing="0"' in the markup. */
caption, th, td { text-align: left; font-weight:400; }
/* Remove possible quote marks (") from <q>, <blockquote>. */
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
blockquote, q { quotes: "" ""; }
a img { border: none; }

View file

@ -0,0 +1,4 @@
<html>
<head>
<script src="../htmlrunner.js"></script>
<script>

View file

@ -0,0 +1,4 @@
</script>
</head>
<body></body>
</html>

View file

@ -0,0 +1,51 @@
class Result {
int get runs() { return _sorted.length; }
double get sum() {
double result = 0.0;
_sorted.forEach((double e) { result += e; });
return result;
}
double get min() { return _sorted[0]; }
double get max() { return _sorted[runs - 1]; }
double get mean() { return sum / runs; }
double get median() {
return (runs % 2 == 0) ?
(_sorted[runs ~/ 2] + _sorted[runs ~/ 2 + 1]) / 2 : _sorted[runs ~/ 2];
}
double get variance() {
double m = mean;
double result = 0.0;
_sorted.forEach((double e) { result += Math.pow(e - m, 2.0); });
return result / (runs - 1);
}
double get deviation() { return Math.sqrt(variance); }
// Compute Standard Errors Mean
double get sem() { return (deviation / Math.sqrt(runs)) * T_DISTRIBUTION; }
double get error() { return (sem / mean) * 100; }
// TODO: Implement writeOn.
String toString() {
return '[Result: mean = ${mean}]';
}
factory Result(List<double> runsPerSecond) {
runsPerSecond.sort(int _(double a, double b) => a.compareTo(b));
return new Result._internal(runsPerSecond);
}
Result._internal(this._sorted) {}
List<double> _sorted;
// Populated from: http://www.medcalc.be/manual/t-distribution.php
// 95% confidence for N - 1 = 4
static final double T_DISTRIBUTION = 2.776;
}

View file

@ -0,0 +1,135 @@
typedef void Test();
typedef void Operation();
typedef void Reporter(Map<String, Result> results);
class Suite {
/**
* Ctor.
* [:_window:] The window of the suite.
* [:_name:] The name of the suite.
*/
Suite(this._window, this._name) :
_operations = new List<Operation>(),
_nTests = 0, _nRanTests = 0 {
_window.addEventListener(
'message',
(MessageEvent event) {
String command = event.data;
switch (command) {
case 'start':
_run();
return;
default:
_window.alert('[${_name}]: unknown command ${command}');
}
},
false
);
}
/**
* Adds a preparation step to the suite.
* [:operation:] The operation to be performed.
*/
Suite prep(Operation operation){
return _addOperation(operation);
}
// How many times each individual test should be ran.
static final int _N_RUNS = 5;
/**
* Adds another test to the suite.
* [:name:] The unique name of the test
* [:test:] A function holding the test to run
*/
Suite test(String name, Test test) {
_nTests++;
// Don't execute the test immediately.
return _addOperation(() {
// List of number of runs in seconds.
List<double> runsPerSecond = new List<double>();
// Run the test several times.
try {
// TODO(antonm): use .setTimeout to schedule next run as JS
// version does. That allows to report the intermidiate results
// more smoothly as well.
for (int i = 0; i < _N_RUNS; i++) {
int runs = 0;
final int start = new DateTime.now().value;
int cur = new DateTime.now().value;
while ((cur - start) < 1000) {
test();
cur = new DateTime.now().value;
runs++;
}
runsPerSecond.add((runs * 1000.0) / (cur - start));
}
} catch(var exception, var stacktrace) {
_window.alert('Exception ${exception}: ${stacktrace}');
return;
}
_reportTestResults(name, new Result(runsPerSecond));
});
}
/**
* Finalizes the suite.
* It might either run the tests immediately or schedule them to be ran later.
*/
void end() {
_postMessage('inited', { 'nTests': _nTests });
}
_run() {
int currentOperation = 0;
handler() {
if (currentOperation < _operations.length) {
_operations[currentOperation]();
currentOperation++;
_window.setTimeout(handler, 1);
} else {
_postMessage('over');
}
}
_window.setTimeout(handler, 0);
}
_reportTestResults(String name, Result result) {
_nRanTests++;
_postMessage('result', {
'testName': name,
'mean': result.mean,
'error': result.error / result.mean,
'percent': (100.0 * _nRanTests / _nTests)
});
}
_postMessage(String command, [var data = null]) {
final payload = { 'command': command };
if (data != null) {
payload['data'] = data;
}
// TODO(antonm): Remove dynamic below.
_window.top.dynamic.postMessage(JSON.stringify(payload), '*');
}
// Implementation.
final Window _window;
final String _name;
List<Operation> _operations;
int _nTests;
int _nRanTests;
Suite _addOperation(Operation operation) {
_operations.add(operation);
return this;
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
#import("dart:dom");
#import('runner.dart');
void main() {
final int num = 10240;
// Try to force real results.
var ret;
window.onload = (Event evt) {
HTMLElement elem = document.getElementById('test1');
HTMLElement a = document.getElementsByTagName('a')[0];
new Suite(window, 'dom-attr')
.test('getAttribute', void _() {
for (int i = 0; i < num; i++)
ret = elem.getAttribute('id');
})
.test('element.property', () {
for (int i = 0; i < num * 2; i++)
ret = elem.id;
})
.test('setAttribute', () {
for (int i = 0; i < num; i++)
a.setAttribute('id', 'foo');
})
.test('element.property = value', () {
for (int i = 0; i < num; i++)
a.id = 'foo';
})
.end();
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,66 @@
#import("dart:dom");
#import('runner.dart');
void main() {
final int num = 400;
String str = 'null';
// Very ugly way to build up the string, but let's mimic JS version as much as possible.
for (int i = 0; i < 1024; i++) {
str += new String.fromCharCodes([((25 * Math.random()) + 97).toInt()]);
}
List<Node> elems = new List<Node>();
// Try to force real results.
var ret;
window.onload = (Event evt) {
final htmlstr = document.body.innerHTML;
new Suite(window, 'dom-modify')
.test('createElement', () {
for (int i = 0; i < num; i++) {
ret = document.createElement('div');
ret = document.createElement('span');
ret = document.createElement('table');
ret = document.createElement('tr');
ret = document.createElement('select');
}
})
.test('createTextNode', () {
for (int i = 0; i < num; i++) {
ret = document.createTextNode(str);
ret = document.createTextNode(str + '2');
ret = document.createTextNode(str + '3');
ret = document.createTextNode(str + '4');
ret = document.createTextNode(str + '5');
}
})
.test('innerHTML', () {
document.body.innerHTML = htmlstr;
})
.prep(() {
elems = new List<Node>();
final telems = document.body.childNodes;
for (int i = 0; i < telems.length; i++) {
elems.add(telems[i]);
}
})
.test('cloneNode', () {
for (int i = 0; i < elems.length; i++) {
ret = elems[i].cloneNode(false);
ret = elems[i].cloneNode(true);
ret = elems[i].cloneNode(true);
}
})
.test('appendChild', () {
for (int i = 0; i < elems.length; i++)
document.body.appendChild(elems[i]);
})
.test('insertBefore', () {
for (int i = 0; i < elems.length; i++)
document.body.insertBefore(elems[i], document.body.firstChild);
})
.end();
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,102 @@
#import("dart:dom");
#import('../../common/common.dart');
#import('runner.dart');
void main() {
final int num = 40;
// Try to force real results.
var ret;
window.onload = (Event evt) {
String html = document.body.innerHTML;
new Suite(window, 'dom-query')
.prep(() {
html = BenchUtil.replaceAll(html, 'id="test(\\w).*?"', (Match match) {
final group = match.group(1);
return 'id="test${group}${num}"';
});
html = BenchUtil.replaceAll(html, 'name="test.*?"', (Match match) {
return 'name="test${num}"';
});
html = BenchUtil.replaceAll(html, 'class="foo.*?"', (Match match) {
return 'class="foo test${num} bar"';
});
final div = document.createElement('div');
div.innerHTML = html;
document.body.appendChild(div);
})
.test('getElementById', () {
for (int i = 0; i < num * 30; i++) {
ret = document.getElementById('testA' + num).nodeType;
ret = document.getElementById('testB' + num).nodeType;
ret = document.getElementById('testC' + num).nodeType;
ret = document.getElementById('testD' + num).nodeType;
ret = document.getElementById('testE' + num).nodeType;
ret = document.getElementById('testF' + num).nodeType;
}
})
.test('getElementById (not in document)', () {
for (int i = 0; i < num * 30; i++) {
ret = document.getElementById('testA');
ret = document.getElementById('testB');
ret = document.getElementById('testC');
ret = document.getElementById('testD');
ret = document.getElementById('testE');
ret = document.getElementById('testF');
}
})
.test('getElementsByTagName(div)', () {
for (int i = 0; i < num; i++) {
var elems = document.getElementsByTagName('div');
ret = elems[elems.length-1].nodeType;
}
})
.test('getElementsByTagName(p)', () {
for (int i = 0; i < num; i++) {
final elems = document.getElementsByTagName('p');
ret = elems[elems.length-1].nodeType;
}
})
.test('getElementsByTagName(a)', () {
for (int i = 0; i < num; i++) {
var elems = document.getElementsByTagName('a');
ret = elems[elems.length-1].nodeType;
}
})
.test('getElementsByTagName(*)', () {
for (int i = 0; i < num; i++) {
var elems = document.getElementsByTagName('*');
ret = elems[elems.length-1].nodeType;
}
})
.test('getElementsByTagName (not in document)', () {
for (int i = 0; i < num; i++) {
var elems = document.getElementsByTagName('strong');
ret = elems.length == 0;
}
})
.test('getElementsByName', () {
for (int i = 0; i < num * 20; i++) {
var elems = document.getElementsByName('test' + num);
ret = elems[elems.length-1].nodeType;
elems = document.getElementsByName('test' + num);
ret = elems[elems.length-1].nodeType;
elems = document.getElementsByName('test' + num);
ret = elems[elems.length-1].nodeType;
elems = document.getElementsByName('test' + num);
ret = elems[elems.length-1].nodeType;
}
})
.test('getElementsByName (not in document)', () {
for (int i = 0; i < num * 20; i++) {
ret = document.getElementsByName('test').length == 0;
ret = document.getElementsByName('test').length == 0;
ret = document.getElementsByName('test').length == 0;
ret = document.getElementsByName('test').length == 0;
ret = document.getElementsByName('test').length == 0;
}
})
.end();
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,87 @@
#import("dart:dom");
#import('../../common/common.dart');
#import('runner.dart');
void main() {
final int num = 40;
// Try to force real results.
var ret;
window.onload = (Event evt) {
String html = document.body.innerHTML;
new Suite(window, 'dom-traverse')
.prep(() {
html = BenchUtil.replaceAll(html, 'id="test(\\w).*?"', (Match match) {
final group = match.group(1);
return 'id="test${group}${num}"';
});
html = BenchUtil.replaceAll(html, 'name="test.*?"', (Match match) {
return 'name="test${num}"';
});
html = BenchUtil.replaceAll(html, 'class="foo.*?"', (Match match) {
return 'class="foo test${num} bar"';
});
final div = document.createElement('div');
div.innerHTML = html;
document.body.appendChild(div);
})
.test('firstChild', () {
final nodes = document.body.childNodes;
final nl = nodes.length;
for (int i = 0; i < num; i++) {
for (int j = 0; j < nl; j++) {
Node cur = nodes[j];
while (cur !== null) {
cur = cur.firstChild;
}
ret = cur;
}
}
})
.test('lastChild', () {
final nodes = document.body.childNodes;
final nl = nodes.length;
for (int i = 0; i < num; i++) {
for (int j = 0; j < nl; j++) {
Node cur = nodes[j];
while (cur !== null) {
cur = cur.lastChild;
}
ret = cur;
}
}
})
.test('nextSibling', () {
for (int i = 0; i < num * 2; i++) {
Node cur = document.body.firstChild;
while (cur !== null) {
cur = cur.nextSibling;
}
ret = cur;
}
})
.test('previousSibling', () {
for (int i = 0; i < num * 2; i++) {
Node cur = document.body.firstChild;
while (cur !== null) {
cur = cur.previousSibling;
}
ret = cur;
}
})
.test('childNodes', () {
for (int i = 0; i < num; i++) {
final nodes = document.body.childNodes;
for (int j = 0; j < nodes.length; j++) {
ret = nodes[j];
}
}
})
.end();
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,5 @@
#library('runner.dart');
#import('dart:dom');
#import('dart:json');
#source('Common.dart');
#source('RunnerSuite.dart');

View file

@ -0,0 +1,24 @@
a { color: orange; }
div.test { overflow: hidden; margin: 4px; }
div.test b { display: block; float: left; width: 150px; text-align: right; margin-right: 10px; }
div.bar { float: left; width: 400px; border: 1px inset; text-align: left; }
div.bar div { height: 1em; background: url(orange-stripe.png); }
div.bar span { padding-left: 5px; padding-right: 5px; }
body { font-family: Arial; font-size: 12px; background: url(gray-stripe.png); text-align: center; }
/*#main { margin: 0 auto; width: 600px; padding: 10px; background: #FFF; }*/
ol.results { text-align: left; display: none; font-size: 10px; margin-left: 120px; list-style: none; }
ol.results li { clear: both; overflow: auto; }
ol.results b { display: block; width: 200px; float: left; text-align: right; padding-right: 15px; }
#info, div.results { clear:both;width:420px;margin:10 auto;text-align:left; padding: 10px 10px 10px 110px; }
#info span { background: #FFF; color: #000; padding: 8px 4px 4px 4px; }
h1 { text-align: left; }
h1 img { float:left;margin-right: 15px;margin-top: -10px; border: 0; }
h1 small { font-weight:normal; }
iframe { display: none; }
div.resultwrap { text-align: center; }
table.results { font-size: 12px; margin: 0 auto; }
table.results td, table.results th.name { text-align: right; }
table.results .winner { background-color: #c7331d; }

View file

@ -0,0 +1,4 @@
# This file is used by gcl to get repository specific information.
CODE_REVIEW_SERVER: https://chromereviews.googleplex.com
VIEW_VC: https://code.google.com/p/dart/source/detail?r=
CC_LIST:

696
client/dom/dom.dart Normal file
View file

@ -0,0 +1,696 @@
// Copyright (c) 2011, 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.
// DO NOT EDIT
// Auto-generated Dart DOM library.
#library("dom");
#source('generated/src/interface/AbstractWorker.dart');
#source('generated/src/interface/ArrayBuffer.dart');
#source('generated/src/interface/ArrayBufferView.dart');
#source('generated/src/interface/Attr.dart');
#source('generated/src/interface/BarInfo.dart');
#source('generated/src/interface/BeforeLoadEvent.dart');
#source('generated/src/interface/Blob.dart');
#source('generated/src/interface/CDATASection.dart');
#source('generated/src/interface/CSSCharsetRule.dart');
#source('generated/src/interface/CSSFontFaceRule.dart');
#source('generated/src/interface/CSSImportRule.dart');
#source('generated/src/interface/CSSMediaRule.dart');
#source('generated/src/interface/CSSPageRule.dart');
#source('generated/src/interface/CSSPrimitiveValue.dart');
#source('generated/src/interface/CSSRule.dart');
#source('generated/src/interface/CSSRuleList.dart');
#source('generated/src/interface/CSSStyleDeclaration.dart');
#source('generated/src/interface/CSSStyleRule.dart');
#source('generated/src/interface/CSSStyleSheet.dart');
#source('generated/src/interface/CSSUnknownRule.dart');
#source('generated/src/interface/CSSValue.dart');
#source('generated/src/interface/CSSValueList.dart');
#source('generated/src/interface/CanvasGradient.dart');
#source('generated/src/interface/CanvasPattern.dart');
#source('generated/src/interface/CanvasPixelArray.dart');
#source('generated/src/interface/CanvasRenderingContext.dart');
#source('generated/src/interface/CanvasRenderingContext2D.dart');
#source('generated/src/interface/CharacterData.dart');
#source('generated/src/interface/ClientRect.dart');
#source('generated/src/interface/ClientRectList.dart');
#source('generated/src/interface/Clipboard.dart');
#source('generated/src/interface/CloseEvent.dart');
#source('generated/src/interface/Comment.dart');
#source('generated/src/interface/CompositionEvent.dart');
#source('generated/src/interface/Console.dart');
#source('generated/src/interface/Coordinates.dart');
#source('generated/src/interface/Counter.dart');
#source('generated/src/interface/Crypto.dart');
#source('generated/src/interface/CustomEvent.dart');
#source('generated/src/interface/DOMApplicationCache.dart');
#source('generated/src/interface/DOMException.dart');
#source('generated/src/interface/DOMFileSystem.dart');
#source('generated/src/interface/DOMFileSystemSync.dart');
#source('generated/src/interface/DOMFormData.dart');
#source('generated/src/interface/DOMImplementation.dart');
#source('generated/src/interface/DOMMimeType.dart');
#source('generated/src/interface/DOMMimeTypeArray.dart');
#source('generated/src/interface/DOMParser.dart');
#source('generated/src/interface/DOMPlugin.dart');
#source('generated/src/interface/DOMPluginArray.dart');
#source('generated/src/interface/DOMSelection.dart');
#source('generated/src/interface/DOMSettableTokenList.dart');
#source('generated/src/interface/DOMTokenList.dart');
#source('generated/src/interface/DOMURL.dart');
#source('generated/src/interface/DOMWindow.dart');
#source('generated/src/interface/DataTransferItem.dart');
#source('generated/src/interface/DataTransferItems.dart');
#source('generated/src/interface/DataView.dart');
#source('generated/src/interface/Database.dart');
#source('generated/src/interface/DatabaseCallback.dart');
#source('generated/src/interface/DatabaseSync.dart');
#source('generated/src/interface/DedicatedWorkerContext.dart');
#source('generated/src/interface/DeviceMotionEvent.dart');
#source('generated/src/interface/DeviceOrientationEvent.dart');
#source('generated/src/interface/DirectoryEntry.dart');
#source('generated/src/interface/DirectoryEntrySync.dart');
#source('generated/src/interface/DirectoryReader.dart');
#source('generated/src/interface/DirectoryReaderSync.dart');
#source('generated/src/interface/Document.dart');
#source('generated/src/interface/DocumentFragment.dart');
#source('generated/src/interface/DocumentType.dart');
#source('generated/src/interface/Element.dart');
#source('generated/src/interface/ElementTraversal.dart');
#source('generated/src/interface/Entity.dart');
#source('generated/src/interface/EntityReference.dart');
#source('generated/src/interface/EntriesCallback.dart');
#source('generated/src/interface/Entry.dart');
#source('generated/src/interface/EntryArray.dart');
#source('generated/src/interface/EntryArraySync.dart');
#source('generated/src/interface/EntryCallback.dart');
#source('generated/src/interface/EntrySync.dart');
#source('generated/src/interface/ErrorCallback.dart');
#source('generated/src/interface/ErrorEvent.dart');
#source('generated/src/interface/Event.dart');
#source('generated/src/interface/EventException.dart');
#source('generated/src/interface/EventSource.dart');
#source('generated/src/interface/EventTarget.dart');
#source('generated/src/interface/File.dart');
#source('generated/src/interface/FileCallback.dart');
#source('generated/src/interface/FileEntry.dart');
#source('generated/src/interface/FileEntrySync.dart');
#source('generated/src/interface/FileError.dart');
#source('generated/src/interface/FileException.dart');
#source('generated/src/interface/FileList.dart');
#source('generated/src/interface/FileReader.dart');
#source('generated/src/interface/FileReaderSync.dart');
#source('generated/src/interface/FileSystemCallback.dart');
#source('generated/src/interface/FileWriter.dart');
#source('generated/src/interface/FileWriterCallback.dart');
#source('generated/src/interface/FileWriterSync.dart');
#source('generated/src/interface/Float32Array.dart');
#source('generated/src/interface/Float64Array.dart');
#source('generated/src/interface/Geolocation.dart');
#source('generated/src/interface/Geoposition.dart');
#source('generated/src/interface/HTMLAllCollection.dart');
#source('generated/src/interface/HTMLAnchorElement.dart');
#source('generated/src/interface/HTMLAppletElement.dart');
#source('generated/src/interface/HTMLAreaElement.dart');
#source('generated/src/interface/HTMLAudioElement.dart');
#source('generated/src/interface/HTMLBRElement.dart');
#source('generated/src/interface/HTMLBaseElement.dart');
#source('generated/src/interface/HTMLBaseFontElement.dart');
#source('generated/src/interface/HTMLBodyElement.dart');
#source('generated/src/interface/HTMLButtonElement.dart');
#source('generated/src/interface/HTMLCanvasElement.dart');
#source('generated/src/interface/HTMLCollection.dart');
#source('generated/src/interface/HTMLDListElement.dart');
#source('generated/src/interface/HTMLDataListElement.dart');
#source('generated/src/interface/HTMLDetailsElement.dart');
#source('generated/src/interface/HTMLDirectoryElement.dart');
#source('generated/src/interface/HTMLDivElement.dart');
#source('generated/src/interface/HTMLDocument.dart');
#source('generated/src/interface/HTMLElement.dart');
#source('generated/src/interface/HTMLEmbedElement.dart');
#source('generated/src/interface/HTMLFieldSetElement.dart');
#source('generated/src/interface/HTMLFontElement.dart');
#source('generated/src/interface/HTMLFormElement.dart');
#source('generated/src/interface/HTMLFrameElement.dart');
#source('generated/src/interface/HTMLFrameSetElement.dart');
#source('generated/src/interface/HTMLHRElement.dart');
#source('generated/src/interface/HTMLHeadElement.dart');
#source('generated/src/interface/HTMLHeadingElement.dart');
#source('generated/src/interface/HTMLHtmlElement.dart');
#source('generated/src/interface/HTMLIFrameElement.dart');
#source('generated/src/interface/HTMLImageElement.dart');
#source('generated/src/interface/HTMLInputElement.dart');
#source('generated/src/interface/HTMLIsIndexElement.dart');
#source('generated/src/interface/HTMLKeygenElement.dart');
#source('generated/src/interface/HTMLLIElement.dart');
#source('generated/src/interface/HTMLLabelElement.dart');
#source('generated/src/interface/HTMLLegendElement.dart');
#source('generated/src/interface/HTMLLinkElement.dart');
#source('generated/src/interface/HTMLMapElement.dart');
#source('generated/src/interface/HTMLMarqueeElement.dart');
#source('generated/src/interface/HTMLMediaElement.dart');
#source('generated/src/interface/HTMLMenuElement.dart');
#source('generated/src/interface/HTMLMetaElement.dart');
#source('generated/src/interface/HTMLMeterElement.dart');
#source('generated/src/interface/HTMLModElement.dart');
#source('generated/src/interface/HTMLOListElement.dart');
#source('generated/src/interface/HTMLObjectElement.dart');
#source('generated/src/interface/HTMLOptGroupElement.dart');
#source('generated/src/interface/HTMLOptionElement.dart');
#source('generated/src/interface/HTMLOptionsCollection.dart');
#source('generated/src/interface/HTMLOutputElement.dart');
#source('generated/src/interface/HTMLParagraphElement.dart');
#source('generated/src/interface/HTMLParamElement.dart');
#source('generated/src/interface/HTMLPreElement.dart');
#source('generated/src/interface/HTMLProgressElement.dart');
#source('generated/src/interface/HTMLQuoteElement.dart');
#source('generated/src/interface/HTMLScriptElement.dart');
#source('generated/src/interface/HTMLSelectElement.dart');
#source('generated/src/interface/HTMLSourceElement.dart');
#source('generated/src/interface/HTMLSpanElement.dart');
#source('generated/src/interface/HTMLStyleElement.dart');
#source('generated/src/interface/HTMLTableCaptionElement.dart');
#source('generated/src/interface/HTMLTableCellElement.dart');
#source('generated/src/interface/HTMLTableColElement.dart');
#source('generated/src/interface/HTMLTableElement.dart');
#source('generated/src/interface/HTMLTableRowElement.dart');
#source('generated/src/interface/HTMLTableSectionElement.dart');
#source('generated/src/interface/HTMLTextAreaElement.dart');
#source('generated/src/interface/HTMLTitleElement.dart');
#source('generated/src/interface/HTMLTrackElement.dart');
#source('generated/src/interface/HTMLUListElement.dart');
#source('generated/src/interface/HTMLUnknownElement.dart');
#source('generated/src/interface/HTMLVideoElement.dart');
#source('generated/src/interface/HashChangeEvent.dart');
#source('generated/src/interface/History.dart');
#source('generated/src/interface/IDBAny.dart');
#source('generated/src/interface/IDBCursor.dart');
#source('generated/src/interface/IDBCursorWithValue.dart');
#source('generated/src/interface/IDBDatabase.dart');
#source('generated/src/interface/IDBDatabaseError.dart');
#source('generated/src/interface/IDBDatabaseException.dart');
#source('generated/src/interface/IDBFactory.dart');
#source('generated/src/interface/IDBIndex.dart');
#source('generated/src/interface/IDBKey.dart');
#source('generated/src/interface/IDBKeyRange.dart');
#source('generated/src/interface/IDBObjectStore.dart');
#source('generated/src/interface/IDBRequest.dart');
#source('generated/src/interface/IDBTransaction.dart');
#source('generated/src/interface/IDBVersionChangeEvent.dart');
#source('generated/src/interface/IDBVersionChangeRequest.dart');
#source('generated/src/interface/ImageData.dart');
#source('generated/src/interface/InjectedScriptHost.dart');
#source('generated/src/interface/InspectorFrontendHost.dart');
#source('generated/src/interface/Int16Array.dart');
#source('generated/src/interface/Int32Array.dart');
#source('generated/src/interface/Int8Array.dart');
#source('generated/src/interface/JavaScriptCallFrame.dart');
#source('generated/src/interface/KeyboardEvent.dart');
#source('generated/src/interface/LocalMediaStream.dart');
#source('generated/src/interface/Location.dart');
#source('generated/src/interface/MediaError.dart');
#source('generated/src/interface/MediaList.dart');
#source('generated/src/interface/MediaQueryList.dart');
#source('generated/src/interface/MediaQueryListListener.dart');
#source('generated/src/interface/MediaStream.dart');
#source('generated/src/interface/MediaStreamList.dart');
#source('generated/src/interface/MediaStreamTrack.dart');
#source('generated/src/interface/MediaStreamTrackList.dart');
#source('generated/src/interface/MemoryInfo.dart');
#source('generated/src/interface/MessageChannel.dart');
#source('generated/src/interface/MessageEvent.dart');
#source('generated/src/interface/MessagePort.dart');
#source('generated/src/interface/Metadata.dart');
#source('generated/src/interface/MetadataCallback.dart');
#source('generated/src/interface/MouseEvent.dart');
#source('generated/src/interface/MutationEvent.dart');
#source('generated/src/interface/MutationRecord.dart');
#source('generated/src/interface/NamedNodeMap.dart');
#source('generated/src/interface/Navigator.dart');
#source('generated/src/interface/NavigatorUserMediaError.dart');
#source('generated/src/interface/NavigatorUserMediaErrorCallback.dart');
#source('generated/src/interface/NavigatorUserMediaSuccessCallback.dart');
#source('generated/src/interface/Node.dart');
#source('generated/src/interface/NodeFilter.dart');
#source('generated/src/interface/NodeIterator.dart');
#source('generated/src/interface/NodeList.dart');
#source('generated/src/interface/NodeSelector.dart');
#source('generated/src/interface/Notation.dart');
#source('generated/src/interface/Notification.dart');
#source('generated/src/interface/NotificationCenter.dart');
#source('generated/src/interface/OESStandardDerivatives.dart');
#source('generated/src/interface/OESTextureFloat.dart');
#source('generated/src/interface/OESVertexArrayObject.dart');
#source('generated/src/interface/OperationNotAllowedException.dart');
#source('generated/src/interface/OverflowEvent.dart');
#source('generated/src/interface/PageTransitionEvent.dart');
#source('generated/src/interface/Performance.dart');
#source('generated/src/interface/PerformanceNavigation.dart');
#source('generated/src/interface/PerformanceTiming.dart');
#source('generated/src/interface/PopStateEvent.dart');
#source('generated/src/interface/PositionCallback.dart');
#source('generated/src/interface/PositionError.dart');
#source('generated/src/interface/PositionErrorCallback.dart');
#source('generated/src/interface/ProcessingInstruction.dart');
#source('generated/src/interface/ProgressEvent.dart');
#source('generated/src/interface/RGBColor.dart');
#source('generated/src/interface/Range.dart');
#source('generated/src/interface/RangeException.dart');
#source('generated/src/interface/Rect.dart');
#source('generated/src/interface/SQLError.dart');
#source('generated/src/interface/SQLException.dart');
#source('generated/src/interface/SQLResultSet.dart');
#source('generated/src/interface/SQLResultSetRowList.dart');
#source('generated/src/interface/SQLStatementCallback.dart');
#source('generated/src/interface/SQLStatementErrorCallback.dart');
#source('generated/src/interface/SQLTransaction.dart');
#source('generated/src/interface/SQLTransactionCallback.dart');
#source('generated/src/interface/SQLTransactionErrorCallback.dart');
#source('generated/src/interface/SQLTransactionSync.dart');
#source('generated/src/interface/SQLTransactionSyncCallback.dart');
#source('generated/src/interface/Screen.dart');
#source('generated/src/interface/ScriptProfile.dart');
#source('generated/src/interface/ScriptProfileNode.dart');
#source('generated/src/interface/SharedWorker.dart');
#source('generated/src/interface/SharedWorkercontext.dart');
#source('generated/src/interface/SpeechInputEvent.dart');
#source('generated/src/interface/SpeechInputResult.dart');
#source('generated/src/interface/SpeechInputResultList.dart');
#source('generated/src/interface/Storage.dart');
#source('generated/src/interface/StorageEvent.dart');
#source('generated/src/interface/StorageInfo.dart');
#source('generated/src/interface/StorageInfoErrorCallback.dart');
#source('generated/src/interface/StorageInfoQuotaCallback.dart');
#source('generated/src/interface/StorageInfoUsageCallback.dart');
#source('generated/src/interface/StringCallback.dart');
#source('generated/src/interface/StyleMedia.dart');
#source('generated/src/interface/StyleSheet.dart');
#source('generated/src/interface/StyleSheetList.dart');
#source('generated/src/interface/Text.dart');
#source('generated/src/interface/TextEvent.dart');
#source('generated/src/interface/TextMetrics.dart');
#source('generated/src/interface/TimeRanges.dart');
#source('generated/src/interface/Touch.dart');
#source('generated/src/interface/TouchEvent.dart');
#source('generated/src/interface/TouchList.dart');
#source('generated/src/interface/TreeWalker.dart');
#source('generated/src/interface/UIEvent.dart');
#source('generated/src/interface/Uint16Array.dart');
#source('generated/src/interface/Uint32Array.dart');
#source('generated/src/interface/Uint8Array.dart');
#source('generated/src/interface/ValidityState.dart');
#source('generated/src/interface/VoidCallback.dart');
#source('generated/src/interface/WebGLActiveInfo.dart');
#source('generated/src/interface/WebGLBuffer.dart');
#source('generated/src/interface/WebGLContextAttributes.dart');
#source('generated/src/interface/WebGLContextEvent.dart');
#source('generated/src/interface/WebGLFramebuffer.dart');
#source('generated/src/interface/WebGLProgram.dart');
#source('generated/src/interface/WebGLRenderbuffer.dart');
#source('generated/src/interface/WebGLRenderingContext.dart');
#source('generated/src/interface/WebGLShader.dart');
#source('generated/src/interface/WebGLTexture.dart');
#source('generated/src/interface/WebGLUniformLocation.dart');
#source('generated/src/interface/WebGLVertexArrayObjectOES.dart');
#source('generated/src/interface/WebKitAnimation.dart');
#source('generated/src/interface/WebKitAnimationEvent.dart');
#source('generated/src/interface/WebKitAnimationList.dart');
#source('generated/src/interface/WebKitBlobBuilder.dart');
#source('generated/src/interface/WebKitCSSKeyframeRule.dart');
#source('generated/src/interface/WebKitCSSKeyframesRule.dart');
#source('generated/src/interface/WebKitCSSMatrix.dart');
#source('generated/src/interface/WebKitCSSTransformValue.dart');
#source('generated/src/interface/WebKitFlags.dart');
#source('generated/src/interface/WebKitLoseContext.dart');
#source('generated/src/interface/WebKitPoint.dart');
#source('generated/src/interface/WebKitTransitionEvent.dart');
#source('generated/src/interface/WebSocket.dart');
#source('generated/src/interface/WheelEvent.dart');
#source('generated/src/interface/Worker.dart');
#source('generated/src/interface/WorkerContext.dart');
#source('generated/src/interface/WorkerLocation.dart');
#source('generated/src/interface/WorkerNavigator.dart');
#source('generated/src/interface/XMLHttpRequest.dart');
#source('generated/src/interface/XMLHttpRequestException.dart');
#source('generated/src/interface/XMLHttpRequestProgressEvent.dart');
#source('generated/src/interface/XMLHttpRequestUpload.dart');
#source('generated/src/interface/XMLSerializer.dart');
#source('generated/src/interface/XPathEvaluator.dart');
#source('generated/src/interface/XPathException.dart');
#source('generated/src/interface/XPathExpression.dart');
#source('generated/src/interface/XPathNSResolver.dart');
#source('generated/src/interface/XPathResult.dart');
#source('generated/src/interface/XSLTProcessor.dart');
#source('generated/src/wrapping/_AbstractWorkerWrappingImplementation.dart');
#source('generated/src/wrapping/_ArrayBufferViewWrappingImplementation.dart');
#source('generated/src/wrapping/_ArrayBufferWrappingImplementation.dart');
#source('generated/src/wrapping/_AttrWrappingImplementation.dart');
#source('generated/src/wrapping/_BarInfoWrappingImplementation.dart');
#source('generated/src/wrapping/_BeforeLoadEventWrappingImplementation.dart');
#source('generated/src/wrapping/_BlobWrappingImplementation.dart');
#source('generated/src/wrapping/_CDATASectionWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSCharsetRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSFontFaceRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSImportRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSMediaRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSPageRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSPrimitiveValueWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSRuleListWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSStyleDeclarationWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSStyleRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSStyleSheetWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSUnknownRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSValueListWrappingImplementation.dart');
#source('generated/src/wrapping/_CSSValueWrappingImplementation.dart');
#source('generated/src/wrapping/_CanvasGradientWrappingImplementation.dart');
#source('generated/src/wrapping/_CanvasPatternWrappingImplementation.dart');
#source('generated/src/wrapping/_CanvasPixelArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_CanvasRenderingContext2DWrappingImplementation.dart');
#source('generated/src/wrapping/_CanvasRenderingContextWrappingImplementation.dart');
#source('generated/src/wrapping/_CharacterDataWrappingImplementation.dart');
#source('generated/src/wrapping/_ClientRectListWrappingImplementation.dart');
#source('generated/src/wrapping/_ClientRectWrappingImplementation.dart');
#source('generated/src/wrapping/_ClipboardWrappingImplementation.dart');
#source('generated/src/wrapping/_CloseEventWrappingImplementation.dart');
#source('generated/src/wrapping/_CommentWrappingImplementation.dart');
#source('generated/src/wrapping/_CompositionEventWrappingImplementation.dart');
#source('generated/src/wrapping/_ConsoleWrappingImplementation.dart');
#source('generated/src/wrapping/_CoordinatesWrappingImplementation.dart');
#source('generated/src/wrapping/_CounterWrappingImplementation.dart');
#source('generated/src/wrapping/_CryptoWrappingImplementation.dart');
#source('generated/src/wrapping/_CustomEventWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMApplicationCacheWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMFileSystemSyncWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMFileSystemWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMFormDataWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMImplementationWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMMimeTypeArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMMimeTypeWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMParserWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMPluginArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMPluginWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMSelectionWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMSettableTokenListWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMTokenListWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMURLWrappingImplementation.dart');
#source('generated/src/wrapping/_DOMWindowWrappingImplementation.dart');
#source('generated/src/wrapping/_DataTransferItemWrappingImplementation.dart');
#source('generated/src/wrapping/_DataTransferItemsWrappingImplementation.dart');
#source('generated/src/wrapping/_DataViewWrappingImplementation.dart');
#source('generated/src/wrapping/_DatabaseCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_DatabaseSyncWrappingImplementation.dart');
#source('generated/src/wrapping/_DatabaseWrappingImplementation.dart');
#source('generated/src/wrapping/_DedicatedWorkerContextWrappingImplementation.dart');
#source('generated/src/wrapping/_DeviceMotionEventWrappingImplementation.dart');
#source('generated/src/wrapping/_DeviceOrientationEventWrappingImplementation.dart');
#source('generated/src/wrapping/_DirectoryEntrySyncWrappingImplementation.dart');
#source('generated/src/wrapping/_DirectoryEntryWrappingImplementation.dart');
#source('generated/src/wrapping/_DirectoryReaderSyncWrappingImplementation.dart');
#source('generated/src/wrapping/_DirectoryReaderWrappingImplementation.dart');
#source('generated/src/wrapping/_DocumentFragmentWrappingImplementation.dart');
#source('generated/src/wrapping/_DocumentTypeWrappingImplementation.dart');
#source('generated/src/wrapping/_DocumentWrappingImplementation.dart');
#source('generated/src/wrapping/_ElementTraversalWrappingImplementation.dart');
#source('generated/src/wrapping/_ElementWrappingImplementation.dart');
#source('generated/src/wrapping/_EntityReferenceWrappingImplementation.dart');
#source('generated/src/wrapping/_EntityWrappingImplementation.dart');
#source('generated/src/wrapping/_EntriesCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_EntryArraySyncWrappingImplementation.dart');
#source('generated/src/wrapping/_EntryArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_EntryCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_EntrySyncWrappingImplementation.dart');
#source('generated/src/wrapping/_EntryWrappingImplementation.dart');
#source('generated/src/wrapping/_ErrorCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_ErrorEventWrappingImplementation.dart');
#source('generated/src/wrapping/_EventExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_EventSourceWrappingImplementation.dart');
#source('generated/src/wrapping/_EventTargetWrappingImplementation.dart');
#source('generated/src/wrapping/_EventWrappingImplementation.dart');
#source('generated/src/wrapping/_FileCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_FileEntrySyncWrappingImplementation.dart');
#source('generated/src/wrapping/_FileEntryWrappingImplementation.dart');
#source('generated/src/wrapping/_FileErrorWrappingImplementation.dart');
#source('generated/src/wrapping/_FileExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_FileListWrappingImplementation.dart');
#source('generated/src/wrapping/_FileReaderSyncWrappingImplementation.dart');
#source('generated/src/wrapping/_FileReaderWrappingImplementation.dart');
#source('generated/src/wrapping/_FileSystemCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_FileWrappingImplementation.dart');
#source('generated/src/wrapping/_FileWriterCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_FileWriterSyncWrappingImplementation.dart');
#source('generated/src/wrapping/_FileWriterWrappingImplementation.dart');
#source('generated/src/wrapping/_Float32ArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_Float64ArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_GeolocationWrappingImplementation.dart');
#source('generated/src/wrapping/_GeopositionWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLAllCollectionWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLAnchorElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLAppletElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLAreaElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLAudioElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLBRElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLBaseElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLBaseFontElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLBodyElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLButtonElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLCanvasElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLCollectionWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLDListElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLDataListElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLDetailsElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLDirectoryElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLDivElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLDocumentWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLEmbedElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLFieldSetElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLFontElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLFormElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLFrameElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLFrameSetElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLHRElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLHeadElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLHeadingElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLHtmlElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLIFrameElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLImageElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLInputElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLIsIndexElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLKeygenElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLLIElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLLabelElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLLegendElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLLinkElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLMapElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLMarqueeElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLMediaElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLMenuElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLMetaElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLMeterElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLModElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLOListElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLObjectElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLOptGroupElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLOptionElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLOptionsCollectionWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLOutputElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLParagraphElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLParamElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLPreElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLProgressElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLQuoteElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLScriptElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLSelectElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLSourceElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLSpanElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLStyleElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTableCaptionElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTableCellElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTableColElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTableElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTableRowElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTableSectionElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTextAreaElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTitleElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLTrackElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLUListElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLUnknownElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HTMLVideoElementWrappingImplementation.dart');
#source('generated/src/wrapping/_HashChangeEventWrappingImplementation.dart');
#source('generated/src/wrapping/_HistoryWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBAnyWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBCursorWithValueWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBCursorWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBDatabaseErrorWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBDatabaseExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBDatabaseWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBFactoryWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBIndexWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBKeyRangeWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBKeyWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBObjectStoreWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBRequestWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBTransactionWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBVersionChangeEventWrappingImplementation.dart');
#source('generated/src/wrapping/_IDBVersionChangeRequestWrappingImplementation.dart');
#source('generated/src/wrapping/_ImageDataWrappingImplementation.dart');
#source('generated/src/wrapping/_InjectedScriptHostWrappingImplementation.dart');
#source('generated/src/wrapping/_InspectorFrontendHostWrappingImplementation.dart');
#source('generated/src/wrapping/_Int16ArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_Int32ArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_Int8ArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_JavaScriptCallFrameWrappingImplementation.dart');
#source('generated/src/wrapping/_KeyboardEventWrappingImplementation.dart');
#source('generated/src/wrapping/_LocalMediaStreamWrappingImplementation.dart');
#source('generated/src/wrapping/_LocationWrappingImplementation.dart');
#source('generated/src/wrapping/_MediaErrorWrappingImplementation.dart');
#source('generated/src/wrapping/_MediaListWrappingImplementation.dart');
#source('generated/src/wrapping/_MediaQueryListListenerWrappingImplementation.dart');
#source('generated/src/wrapping/_MediaQueryListWrappingImplementation.dart');
#source('generated/src/wrapping/_MediaStreamListWrappingImplementation.dart');
#source('generated/src/wrapping/_MediaStreamTrackListWrappingImplementation.dart');
#source('generated/src/wrapping/_MediaStreamTrackWrappingImplementation.dart');
#source('generated/src/wrapping/_MediaStreamWrappingImplementation.dart');
#source('generated/src/wrapping/_MemoryInfoWrappingImplementation.dart');
#source('generated/src/wrapping/_MessageChannelWrappingImplementation.dart');
#source('generated/src/wrapping/_MessageEventWrappingImplementation.dart');
#source('generated/src/wrapping/_MessagePortWrappingImplementation.dart');
#source('generated/src/wrapping/_MetadataCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_MetadataWrappingImplementation.dart');
#source('generated/src/wrapping/_MouseEventWrappingImplementation.dart');
#source('generated/src/wrapping/_MutationEventWrappingImplementation.dart');
#source('generated/src/wrapping/_MutationRecordWrappingImplementation.dart');
#source('generated/src/wrapping/_NamedNodeMapWrappingImplementation.dart');
#source('generated/src/wrapping/_NavigatorUserMediaErrorCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_NavigatorUserMediaErrorWrappingImplementation.dart');
#source('generated/src/wrapping/_NavigatorUserMediaSuccessCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_NavigatorWrappingImplementation.dart');
#source('generated/src/wrapping/_NodeFilterWrappingImplementation.dart');
#source('generated/src/wrapping/_NodeIteratorWrappingImplementation.dart');
#source('generated/src/wrapping/_NodeListWrappingImplementation.dart');
#source('generated/src/wrapping/_NodeSelectorWrappingImplementation.dart');
#source('generated/src/wrapping/_NodeWrappingImplementation.dart');
#source('generated/src/wrapping/_NotationWrappingImplementation.dart');
#source('generated/src/wrapping/_NotificationCenterWrappingImplementation.dart');
#source('generated/src/wrapping/_NotificationWrappingImplementation.dart');
#source('generated/src/wrapping/_OESStandardDerivativesWrappingImplementation.dart');
#source('generated/src/wrapping/_OESTextureFloatWrappingImplementation.dart');
#source('generated/src/wrapping/_OESVertexArrayObjectWrappingImplementation.dart');
#source('generated/src/wrapping/_OperationNotAllowedExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_OverflowEventWrappingImplementation.dart');
#source('generated/src/wrapping/_PageTransitionEventWrappingImplementation.dart');
#source('generated/src/wrapping/_PerformanceNavigationWrappingImplementation.dart');
#source('generated/src/wrapping/_PerformanceTimingWrappingImplementation.dart');
#source('generated/src/wrapping/_PerformanceWrappingImplementation.dart');
#source('generated/src/wrapping/_PopStateEventWrappingImplementation.dart');
#source('generated/src/wrapping/_PositionCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_PositionErrorCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_PositionErrorWrappingImplementation.dart');
#source('generated/src/wrapping/_ProcessingInstructionWrappingImplementation.dart');
#source('generated/src/wrapping/_ProgressEventWrappingImplementation.dart');
#source('generated/src/wrapping/_RGBColorWrappingImplementation.dart');
#source('generated/src/wrapping/_RangeExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_RangeWrappingImplementation.dart');
#source('generated/src/wrapping/_RectWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLErrorWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLResultSetRowListWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLResultSetWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLStatementCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLStatementErrorCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLTransactionCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLTransactionErrorCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLTransactionSyncCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLTransactionSyncWrappingImplementation.dart');
#source('generated/src/wrapping/_SQLTransactionWrappingImplementation.dart');
#source('generated/src/wrapping/_ScreenWrappingImplementation.dart');
#source('generated/src/wrapping/_ScriptProfileNodeWrappingImplementation.dart');
#source('generated/src/wrapping/_ScriptProfileWrappingImplementation.dart');
#source('generated/src/wrapping/_SharedWorkerWrappingImplementation.dart');
#source('generated/src/wrapping/_SharedWorkercontextWrappingImplementation.dart');
#source('generated/src/wrapping/_SpeechInputEventWrappingImplementation.dart');
#source('generated/src/wrapping/_SpeechInputResultListWrappingImplementation.dart');
#source('generated/src/wrapping/_SpeechInputResultWrappingImplementation.dart');
#source('generated/src/wrapping/_StorageEventWrappingImplementation.dart');
#source('generated/src/wrapping/_StorageInfoErrorCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_StorageInfoQuotaCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_StorageInfoUsageCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_StorageInfoWrappingImplementation.dart');
#source('generated/src/wrapping/_StorageWrappingImplementation.dart');
#source('generated/src/wrapping/_StringCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_StyleMediaWrappingImplementation.dart');
#source('generated/src/wrapping/_StyleSheetListWrappingImplementation.dart');
#source('generated/src/wrapping/_StyleSheetWrappingImplementation.dart');
#source('generated/src/wrapping/_TextEventWrappingImplementation.dart');
#source('generated/src/wrapping/_TextMetricsWrappingImplementation.dart');
#source('generated/src/wrapping/_TextWrappingImplementation.dart');
#source('generated/src/wrapping/_TimeRangesWrappingImplementation.dart');
#source('generated/src/wrapping/_TouchEventWrappingImplementation.dart');
#source('generated/src/wrapping/_TouchListWrappingImplementation.dart');
#source('generated/src/wrapping/_TouchWrappingImplementation.dart');
#source('generated/src/wrapping/_TreeWalkerWrappingImplementation.dart');
#source('generated/src/wrapping/_UIEventWrappingImplementation.dart');
#source('generated/src/wrapping/_Uint16ArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_Uint32ArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_Uint8ArrayWrappingImplementation.dart');
#source('generated/src/wrapping/_ValidityStateWrappingImplementation.dart');
#source('generated/src/wrapping/_VoidCallbackWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLActiveInfoWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLBufferWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLContextAttributesWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLContextEventWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLFramebufferWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLProgramWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLRenderbufferWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLRenderingContextWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLShaderWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLTextureWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLUniformLocationWrappingImplementation.dart');
#source('generated/src/wrapping/_WebGLVertexArrayObjectOESWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitAnimationEventWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitAnimationListWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitAnimationWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitBlobBuilderWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitCSSKeyframeRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitCSSKeyframesRuleWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitCSSMatrixWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitCSSTransformValueWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitFlagsWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitLoseContextWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitPointWrappingImplementation.dart');
#source('generated/src/wrapping/_WebKitTransitionEventWrappingImplementation.dart');
#source('generated/src/wrapping/_WebSocketWrappingImplementation.dart');
#source('generated/src/wrapping/_WheelEventWrappingImplementation.dart');
#source('generated/src/wrapping/_WorkerContextWrappingImplementation.dart');
#source('generated/src/wrapping/_WorkerLocationWrappingImplementation.dart');
#source('generated/src/wrapping/_WorkerNavigatorWrappingImplementation.dart');
#source('generated/src/wrapping/_WorkerWrappingImplementation.dart');
#source('generated/src/wrapping/_XMLHttpRequestExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_XMLHttpRequestProgressEventWrappingImplementation.dart');
#source('generated/src/wrapping/_XMLHttpRequestUploadWrappingImplementation.dart');
#source('generated/src/wrapping/_XMLHttpRequestWrappingImplementation.dart');
#source('generated/src/wrapping/_XMLSerializerWrappingImplementation.dart');
#source('generated/src/wrapping/_XPathEvaluatorWrappingImplementation.dart');
#source('generated/src/wrapping/_XPathExceptionWrappingImplementation.dart');
#source('generated/src/wrapping/_XPathExpressionWrappingImplementation.dart');
#source('generated/src/wrapping/_XPathNSResolverWrappingImplementation.dart');
#source('generated/src/wrapping/_XPathResultWrappingImplementation.dart');
#source('generated/src/wrapping/_XSLTProcessorWrappingImplementation.dart');
#source('src/DOMType.dart');
#source('src/DOMWrapperBase.dart');
#source('src/EventListener.dart');
#source('src/GlobalProperties.dart');
#source('src/RequestAnimationFrameCallback.dart');
#source('src/TimeoutHandler.dart');
#source('src/_Collections.dart');
#source('src/_FactoryProviders.dart');
#source('src/_ListIterators.dart');
#source('src/_Lists.dart');
#native('generated/wrapping_dom.js');
#native('generated/wrapping_dom_externs.js');

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
// Copyright (c) 2011, 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.
interface AbstractWorker extends EventTarget {
EventListener get onerror();
void set onerror(EventListener value);
void addEventListener(String type, EventListener listener, bool useCapture = null);
bool dispatchEvent(Event evt);
void removeEventListener(String type, EventListener listener, bool useCapture = null);
}

View file

@ -0,0 +1,10 @@
// Copyright (c) 2011, 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.
interface ArrayBuffer {
int get byteLength();
}

View file

@ -0,0 +1,14 @@
// Copyright (c) 2011, 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.
interface ArrayBufferView {
ArrayBuffer get buffer();
int get byteLength();
int get byteOffset();
}

View file

@ -0,0 +1,20 @@
// Copyright (c) 2011, 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.
interface Attr extends Node {
bool get isId();
String get name();
Element get ownerElement();
bool get specified();
String get value();
void set value(String value);
}

View file

@ -0,0 +1,13 @@
// Copyright (c) 2011, 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.
interface BarProp {
bool get visible();
}
interface BarInfo extends BarProp {
}

View file

@ -0,0 +1,12 @@
// Copyright (c) 2011, 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.
interface BeforeLoadEvent extends Event {
String get url();
void initBeforeLoadEvent(String type = null, bool canBubble = null, bool cancelable = null, String url = null);
}

View file

@ -0,0 +1,12 @@
// Copyright (c) 2011, 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.
interface Blob {
int get size();
String get type();
}

View file

@ -0,0 +1,8 @@
// Copyright (c) 2011, 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.
interface CDATASection extends Text {
}

View file

@ -0,0 +1,12 @@
// Copyright (c) 2011, 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.
interface CSSCharsetRule extends CSSRule {
String get encoding();
void set encoding(String value);
}

View file

@ -0,0 +1,10 @@
// Copyright (c) 2011, 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.
interface CSSFontFaceRule extends CSSRule {
CSSStyleDeclaration get style();
}

View file

@ -0,0 +1,14 @@
// Copyright (c) 2011, 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.
interface CSSImportRule extends CSSRule {
String get href();
MediaList get media();
CSSStyleSheet get styleSheet();
}

View file

@ -0,0 +1,16 @@
// Copyright (c) 2011, 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.
interface CSSMediaRule extends CSSRule {
CSSRuleList get cssRules();
MediaList get media();
void deleteRule(int index = null);
int insertRule(String rule = null, int index = null);
}

View file

@ -0,0 +1,14 @@
// Copyright (c) 2011, 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.
interface CSSPageRule extends CSSRule {
String get selectorText();
void set selectorText(String value);
CSSStyleDeclaration get style();
}

View file

@ -0,0 +1,76 @@
// Copyright (c) 2011, 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.
interface CSSPrimitiveValue extends CSSValue {
static final int CSS_ATTR = 22;
static final int CSS_CM = 6;
static final int CSS_COUNTER = 23;
static final int CSS_DEG = 11;
static final int CSS_DIMENSION = 18;
static final int CSS_EMS = 3;
static final int CSS_EXS = 4;
static final int CSS_GRAD = 13;
static final int CSS_HZ = 16;
static final int CSS_IDENT = 21;
static final int CSS_IN = 8;
static final int CSS_KHZ = 17;
static final int CSS_MM = 7;
static final int CSS_MS = 14;
static final int CSS_NUMBER = 1;
static final int CSS_PC = 10;
static final int CSS_PERCENTAGE = 2;
static final int CSS_PT = 9;
static final int CSS_PX = 5;
static final int CSS_RAD = 12;
static final int CSS_RECT = 24;
static final int CSS_RGBCOLOR = 25;
static final int CSS_S = 15;
static final int CSS_STRING = 19;
static final int CSS_UNKNOWN = 0;
static final int CSS_URI = 20;
int get primitiveType();
Counter getCounterValue();
num getFloatValue(int unitType = null);
RGBColor getRGBColorValue();
Rect getRectValue();
String getStringValue();
void setFloatValue(int unitType = null, num floatValue = null);
void setStringValue(int stringType = null, String stringValue = null);
}

View file

@ -0,0 +1,36 @@
// Copyright (c) 2011, 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.
interface CSSRule {
static final int CHARSET_RULE = 2;
static final int FONT_FACE_RULE = 5;
static final int IMPORT_RULE = 3;
static final int MEDIA_RULE = 4;
static final int PAGE_RULE = 6;
static final int STYLE_RULE = 1;
static final int UNKNOWN_RULE = 0;
static final int WEBKIT_KEYFRAMES_RULE = 8;
static final int WEBKIT_KEYFRAME_RULE = 9;
String get cssText();
void set cssText(String value);
CSSRule get parentRule();
CSSStyleSheet get parentStyleSheet();
int get type();
}

View file

@ -0,0 +1,12 @@
// Copyright (c) 2011, 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.
interface CSSRuleList {
int get length();
CSSRule item(int index = null);
}

View file

@ -0,0 +1,32 @@
// Copyright (c) 2011, 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.
interface CSSStyleDeclaration {
String get cssText();
void set cssText(String value);
int get length();
CSSRule get parentRule();
CSSValue getPropertyCSSValue(String propertyName = null);
String getPropertyPriority(String propertyName = null);
String getPropertyShorthand(String propertyName = null);
String getPropertyValue(String propertyName = null);
bool isPropertyImplicit(String propertyName = null);
String item(int index = null);
String removeProperty(String propertyName = null);
void setProperty(String propertyName = null, String value = null, String priority = null);
}

View file

@ -0,0 +1,14 @@
// Copyright (c) 2011, 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.
interface CSSStyleRule extends CSSRule {
String get selectorText();
void set selectorText(String value);
CSSStyleDeclaration get style();
}

View file

@ -0,0 +1,22 @@
// Copyright (c) 2011, 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.
interface CSSStyleSheet extends StyleSheet {
CSSRuleList get cssRules();
CSSRule get ownerRule();
CSSRuleList get rules();
int addRule(String selector = null, String style = null, int index = null);
void deleteRule(int index = null);
int insertRule(String rule = null, int index = null);
void removeRule(int index = null);
}

View file

@ -0,0 +1,8 @@
// Copyright (c) 2011, 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.
interface CSSUnknownRule extends CSSRule {
}

View file

@ -0,0 +1,22 @@
// Copyright (c) 2011, 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.
interface CSSValue {
static final int CSS_CUSTOM = 3;
static final int CSS_INHERIT = 0;
static final int CSS_PRIMITIVE_VALUE = 1;
static final int CSS_VALUE_LIST = 2;
String get cssText();
void set cssText(String value);
int get cssValueType();
}

View file

@ -0,0 +1,12 @@
// Copyright (c) 2011, 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.
interface CSSValueList extends CSSValue {
int get length();
CSSValue item(int index = null);
}

View file

@ -0,0 +1,10 @@
// Copyright (c) 2011, 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.
interface CanvasGradient {
void addColorStop(num offset = null, String color = null);
}

View file

@ -0,0 +1,8 @@
// Copyright (c) 2011, 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.
interface CanvasPattern {
}

View file

@ -0,0 +1,12 @@
// Copyright (c) 2011, 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.
interface CanvasPixelArray extends List<int> {
int get length();
int item(int index);
}

View file

@ -0,0 +1,10 @@
// Copyright (c) 2011, 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.
interface CanvasRenderingContext {
HTMLCanvasElement get canvas();
}

View file

@ -0,0 +1,152 @@
// Copyright (c) 2011, 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.
interface CanvasRenderingContext2D extends CanvasRenderingContext {
String get font();
void set font(String value);
num get globalAlpha();
void set globalAlpha(num value);
String get globalCompositeOperation();
void set globalCompositeOperation(String value);
String get lineCap();
void set lineCap(String value);
String get lineJoin();
void set lineJoin(String value);
num get lineWidth();
void set lineWidth(num value);
num get miterLimit();
void set miterLimit(num value);
num get shadowBlur();
void set shadowBlur(num value);
String get shadowColor();
void set shadowColor(String value);
num get shadowOffsetX();
void set shadowOffsetX(num value);
num get shadowOffsetY();
void set shadowOffsetY(num value);
String get textAlign();
void set textAlign(String value);
String get textBaseline();
void set textBaseline(String value);
void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise);
void arcTo(num x1, num y1, num x2, num y2, num radius);
void beginPath();
void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y);
void clearRect(num x, num y, num width, num height);
void clearShadow();
void clip();
void closePath();
ImageData createImageData(var imagedata_OR_sw, num sh = null);
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1);
CanvasPattern createPattern(var canvas_OR_image, String repetitionType);
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1);
void drawImage(var canvas_OR_image, num sx_OR_x, num sy_OR_y, num sw_OR_width = null, num height_OR_sh = null, num dx = null, num dy = null, num dw = null, num dh = null);
void drawImageFromRect(HTMLImageElement image, num sx = null, num sy = null, num sw = null, num sh = null, num dx = null, num dy = null, num dw = null, num dh = null, String compositeOperation = null);
void fill();
void fillRect(num x, num y, num width, num height);
void fillText(String text, num x, num y, num maxWidth = null);
ImageData getImageData(num sx, num sy, num sw, num sh);
bool isPointInPath(num x, num y);
void lineTo(num x, num y);
TextMetrics measureText(String text);
void moveTo(num x, num y);
void putImageData(ImageData imagedata, num dx, num dy, num dirtyX = null, num dirtyY = null, num dirtyWidth = null, num dirtyHeight = null);
void quadraticCurveTo(num cpx, num cpy, num x, num y);
void rect(num x, num y, num width, num height);
void restore();
void rotate(num angle);
void save();
void scale(num sx, num sy);
void setAlpha(num alpha);
void setCompositeOperation(String compositeOperation);
void setFillColor(var c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null);
void setFillStyle(var color_OR_gradient_OR_pattern);
void setLineCap(String cap);
void setLineJoin(String join);
void setLineWidth(num width);
void setMiterLimit(num limit);
void setShadow(num width, num height, num blur, var c_OR_color_OR_grayLevel_OR_r = null, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null);
void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null);
void setStrokeStyle(var color_OR_gradient_OR_pattern);
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy);
void stroke();
void strokeRect(num x, num y, num width, num height, num lineWidth = null);
void strokeText(String text, num x, num y, num maxWidth = null);
void transform(num m11, num m12, num m21, num m22, num dx, num dy);
void translate(num tx, num ty);
}

View file

@ -0,0 +1,24 @@
// Copyright (c) 2011, 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.
interface CharacterData extends Node {
String get data();
void set data(String value);
int get length();
void appendData(String data = null);
void deleteData(int offset = null, int length = null);
void insertData(int offset = null, String data = null);
void replaceData(int offset = null, int length = null, String data = null);
String substringData(int offset = null, int length = null);
}

View file

@ -0,0 +1,20 @@
// Copyright (c) 2011, 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.
interface ClientRect {
num get bottom();
num get height();
num get left();
num get right();
num get top();
num get width();
}

View file

@ -0,0 +1,12 @@
// Copyright (c) 2011, 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.
interface ClientRectList {
int get length();
ClientRect item(int index = null);
}

View file

@ -0,0 +1,28 @@
// Copyright (c) 2011, 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.
interface Clipboard {
String get dropEffect();
void set dropEffect(String value);
String get effectAllowed();
void set effectAllowed(String value);
FileList get files();
DataTransferItems get items();
void clearData(String type = null);
void getData(String type);
bool setData(String type, String data);
void setDragImage(HTMLImageElement image, int x, int y);
}

View file

@ -0,0 +1,16 @@
// Copyright (c) 2011, 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.
interface CloseEvent extends Event {
int get code();
String get reason();
bool get wasClean();
void initCloseEvent(String typeArg = null, bool canBubbleArg = null, bool cancelableArg = null, bool wasCleanArg = null, int codeArg = null, String reasonArg = null);
}

View file

@ -0,0 +1,8 @@
// Copyright (c) 2011, 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.
interface Comment extends CharacterData {
}

View file

@ -0,0 +1,12 @@
// Copyright (c) 2011, 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.
interface CompositionEvent extends UIEvent {
String get data();
void initCompositionEvent(String typeArg = null, bool canBubbleArg = null, bool cancelableArg = null, DOMWindow viewArg = null, String dataArg = null);
}

View file

@ -0,0 +1,44 @@
// Copyright (c) 2011, 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.
interface Console {
MemoryInfo get memory();
void assert(bool condition);
void count();
void debug(Object arg);
void dir();
void dirxml();
void error(Object arg);
void group();
void groupCollapsed();
void groupEnd();
void info(Object arg);
void log(Object arg);
void markTimeline();
void time(String title = null);
void timeEnd(String title);
void timeStamp();
void trace(Object arg);
void warn(Object arg);
}

View file

@ -0,0 +1,22 @@
// Copyright (c) 2011, 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.
interface Coordinates {
num get accuracy();
num get altitude();
num get altitudeAccuracy();
num get heading();
num get latitude();
num get longitude();
num get speed();
}

View file

@ -0,0 +1,14 @@
// Copyright (c) 2011, 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.
interface Counter {
String get identifier();
String get listStyle();
String get separator();
}

View file

@ -0,0 +1,10 @@
// Copyright (c) 2011, 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.
interface Crypto {
void getRandomValues(ArrayBufferView array);
}

Some files were not shown because too many files have changed in this diff Show more